@copado/agentia-cli 0.91.0-alpha.0 → 0.93.0-alpha.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.
- package/README.md +234 -220
- package/dist/commands/auth/get.d.ts +1 -0
- package/dist/commands/auth/get.js +35 -21
- package/dist/commands/auth/get.js.map +1 -1
- package/dist/commands/auth/set.d.ts +1 -2
- package/dist/commands/auth/set.js +16 -23
- package/dist/commands/auth/set.js.map +1 -1
- package/dist/commands/auth/unset.d.ts +2 -0
- package/dist/commands/auth/unset.js +12 -1
- package/dist/commands/auth/unset.js.map +1 -1
- package/dist/commands/cicd/work/commit.js +2 -2
- package/dist/commands/cicd/work/commit.js.map +1 -1
- package/dist/commands/cicd/work/done.d.ts +4 -0
- package/dist/commands/cicd/work/done.js +11 -124
- package/dist/commands/cicd/work/done.js.map +1 -1
- package/dist/commands/cicd/work/push.js +4 -3
- package/dist/commands/cicd/work/push.js.map +1 -1
- package/dist/commands/cicd/work/submit.d.ts +4 -3
- package/dist/commands/cicd/work/submit.js +13 -4
- package/dist/commands/cicd/work/submit.js.map +1 -1
- package/dist/commands/setup.js +1 -1
- package/dist/commands/setup.js.map +1 -1
- package/dist/lib/ai-config.js +33 -7
- package/dist/lib/ai-config.js.map +1 -1
- package/dist/lib/auth-config.d.ts +6 -3
- package/dist/lib/auth-config.js +127 -56
- package/dist/lib/auth-config.js.map +1 -1
- package/dist/lib/auth-profile.d.ts +25 -0
- package/dist/lib/auth-profile.js +112 -0
- package/dist/lib/auth-profile.js.map +1 -0
- package/dist/lib/cicd-gateway.js +19 -6
- package/dist/lib/cicd-gateway.js.map +1 -1
- package/dist/lib/credential-store.d.ts +3 -0
- package/dist/lib/credential-store.js +15 -3
- package/dist/lib/credential-store.js.map +1 -1
- package/dist/lib/defaults-store.js +9 -0
- package/dist/lib/defaults-store.js.map +1 -1
- package/dist/lib/mcp/command-id.js +1 -0
- package/dist/lib/mcp/command-id.js.map +1 -1
- package/dist/lib/mcp/tools.d.ts +33 -20
- package/dist/lib/mcp/tools.js +29 -36
- package/dist/lib/mcp/tools.js.map +1 -1
- package/dist/lib/mcp/work-tools.d.ts +15 -0
- package/dist/lib/mcp/work-tools.js +50 -34
- package/dist/lib/mcp/work-tools.js.map +1 -1
- package/dist/lib/nested-metadata-changes.d.ts +41 -3
- package/dist/lib/nested-metadata-changes.js +110 -16
- package/dist/lib/nested-metadata-changes.js.map +1 -1
- package/dist/lib/nested-metadata-registry.d.ts +13 -1
- package/dist/lib/nested-metadata-registry.js +87 -28
- package/dist/lib/nested-metadata-registry.js.map +1 -1
- package/dist/lib/setup-templates.d.ts +1 -1
- package/dist/lib/setup-templates.js +9 -19
- package/dist/lib/setup-templates.js.map +1 -1
- package/dist/lib/setup-wizard.d.ts +3 -1
- package/dist/lib/setup-wizard.js +152 -30
- package/dist/lib/setup-wizard.js.map +1 -1
- package/dist/lib/testing-config.js +14 -5
- package/dist/lib/testing-config.js.map +1 -1
- package/dist/lib/user-context.js +3 -2
- package/dist/lib/user-context.js.map +1 -1
- package/dist/lib/work-done.d.ts +22 -0
- package/dist/lib/work-done.js +136 -0
- package/dist/lib/work-done.js.map +1 -0
- package/dist/lib/work-local-commit.js +18 -2
- package/dist/lib/work-local-commit.js.map +1 -1
- package/dist/lib/work-push.d.ts +18 -5
- package/dist/lib/work-push.js +101 -30
- package/dist/lib/work-push.js.map +1 -1
- package/dist/lib/work-types.d.ts +22 -23
- package/dist/lib/work-types.js.map +1 -1
- package/oclif.manifest.json +95 -82
- package/package.json +1 -1
- package/templates/skills/agentia-cicd/SKILL.md +1 -1
- package/templates/skills/agentia-cicd/references/promotions.md +1 -1
- package/templates/skills/agentia-cicd/references/work.md +7 -8
|
@@ -1,39 +1,56 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Parents whose nested children are permissions rather than deployable components on their own.
|
|
3
|
-
* Their changed children are pushed as `
|
|
3
|
+
* Their changed children are pushed as `RetrieveOnly`, the same way `lastPermissionSelected` is.
|
|
4
4
|
*/
|
|
5
5
|
export const PERMISSION_NESTED_PARENT_TYPES = new Set(['PermissionSet', 'Profile']);
|
|
6
6
|
export function isPermissionNestedParentType(type) {
|
|
7
7
|
return PERMISSION_NESTED_PARENT_TYPES.has(type);
|
|
8
8
|
}
|
|
9
9
|
export const NESTED_METADATA_REGISTRY = {
|
|
10
|
-
AssignmentRules: [
|
|
10
|
+
AssignmentRules: [
|
|
11
|
+
{ childType: 'AssignmentRule', nameFields: ['fullName'], nameScope: 'parent', xmlElement: 'assignmentRule' },
|
|
12
|
+
],
|
|
11
13
|
AutoResponseRules: [
|
|
12
|
-
{
|
|
14
|
+
{
|
|
15
|
+
childType: 'AutoResponseRule',
|
|
16
|
+
nameFields: ['fullName'],
|
|
17
|
+
nameScope: 'parent',
|
|
18
|
+
xmlElement: 'autoResponseRule',
|
|
19
|
+
},
|
|
13
20
|
],
|
|
14
21
|
CustomLabels: [{ childType: 'CustomLabel', nameFields: ['fullName'], xmlElement: 'labels' }],
|
|
15
22
|
CustomObject: [
|
|
16
23
|
{ childType: 'SharingRecalculation', nameFields: ['className'], xmlElement: 'sharingRecalculations' },
|
|
17
24
|
],
|
|
18
25
|
CustomObjectTranslation: [
|
|
19
|
-
{ childType: 'FieldSet', nameFields: ['name'], xmlElement: 'fieldSets' },
|
|
20
|
-
{ childType: 'CustomField', nameFields: ['name'], xmlElement: 'fields' },
|
|
26
|
+
{ childType: 'FieldSet', nameFields: ['name'], nameScope: 'object', xmlElement: 'fieldSets' },
|
|
27
|
+
{ childType: 'CustomField', nameFields: ['name'], nameScope: 'object', xmlElement: 'fields' },
|
|
21
28
|
{
|
|
29
|
+
// The translated layout name already carries its object, so it needs no parent scope.
|
|
22
30
|
childType: 'Layout',
|
|
23
31
|
keyStyle: 'layoutRecordType',
|
|
24
32
|
nameFields: ['layout', 'layoutType'],
|
|
25
33
|
xmlElement: 'layouts',
|
|
26
34
|
},
|
|
27
|
-
{ childType: 'QuickAction', nameFields: ['name'], xmlElement: 'quickActions' },
|
|
28
|
-
{ childType: 'RecordType', nameFields: ['name'], xmlElement: 'recordTypes' },
|
|
29
|
-
{ childType: 'SharingReason', nameFields: ['name'], xmlElement: 'sharingReasons' },
|
|
30
|
-
{
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
35
|
+
{ childType: 'QuickAction', nameFields: ['name'], nameScope: 'object', xmlElement: 'quickActions' },
|
|
36
|
+
{ childType: 'RecordType', nameFields: ['name'], nameScope: 'object', xmlElement: 'recordTypes' },
|
|
37
|
+
{ childType: 'SharingReason', nameFields: ['name'], nameScope: 'object', xmlElement: 'sharingReasons' },
|
|
38
|
+
{
|
|
39
|
+
childType: 'StandardFieldTranslation',
|
|
40
|
+
nameFields: ['name'],
|
|
41
|
+
nameScope: 'object',
|
|
42
|
+
xmlElement: 'standardFields',
|
|
43
|
+
},
|
|
44
|
+
{ childType: 'ValidationRule', nameFields: ['name'], nameScope: 'object', xmlElement: 'validationRules' },
|
|
45
|
+
{ childType: 'WebLink', nameFields: ['name'], nameScope: 'object', xmlElement: 'webLinks' },
|
|
46
|
+
{ childType: 'WorkflowTask', nameFields: ['name'], nameScope: 'object', xmlElement: 'workflowTasks' },
|
|
47
|
+
],
|
|
48
|
+
EscalationRules: [
|
|
49
|
+
{ childType: 'EscalationRule', nameFields: ['fullName'], nameScope: 'parent', xmlElement: 'escalationRule' },
|
|
50
|
+
],
|
|
51
|
+
MatchingRules: [
|
|
52
|
+
{ childType: 'MatchingRule', nameFields: ['fullName'], nameScope: 'parent', xmlElement: 'matchingRules' },
|
|
34
53
|
],
|
|
35
|
-
EscalationRules: [{ childType: 'EscalationRule', nameFields: ['fullName'], xmlElement: 'escalationRule' }],
|
|
36
|
-
MatchingRules: [{ childType: 'MatchingRule', nameFields: ['fullName'], xmlElement: 'matchingRules' }],
|
|
37
54
|
MutingPermissionSet: [
|
|
38
55
|
{ childType: 'CustomApplication', nameFields: ['application'], xmlElement: 'applicationVisibilities' },
|
|
39
56
|
{ childType: 'CustomField', nameFields: ['field'], xmlElement: 'fieldPermissions' },
|
|
@@ -122,12 +139,34 @@ export const NESTED_METADATA_REGISTRY = {
|
|
|
122
139
|
},
|
|
123
140
|
{ childType: 'Flow', nameFields: ['flow'], xmlElement: 'flowAccesses' },
|
|
124
141
|
],
|
|
125
|
-
RecordType: [
|
|
142
|
+
RecordType: [
|
|
143
|
+
{ childType: 'CustomField', nameFields: ['picklist'], nameScope: 'object', xmlElement: 'picklistValues' },
|
|
144
|
+
],
|
|
126
145
|
SharingRules: [
|
|
127
|
-
{
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
146
|
+
{
|
|
147
|
+
childType: 'SharingCriteriaRule',
|
|
148
|
+
nameFields: ['fullName'],
|
|
149
|
+
nameScope: 'parent',
|
|
150
|
+
xmlElement: 'sharingCriteriaRules',
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
childType: 'SharingOwnerRule',
|
|
154
|
+
nameFields: ['fullName'],
|
|
155
|
+
nameScope: 'parent',
|
|
156
|
+
xmlElement: 'sharingOwnerRules',
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
childType: 'SharingTerritoryRule',
|
|
160
|
+
nameFields: ['fullName'],
|
|
161
|
+
nameScope: 'parent',
|
|
162
|
+
xmlElement: 'sharingTerritoryRules',
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
childType: 'SharingGuestRule',
|
|
166
|
+
nameFields: ['fullName'],
|
|
167
|
+
nameScope: 'parent',
|
|
168
|
+
xmlElement: 'sharingGuestRules',
|
|
169
|
+
},
|
|
131
170
|
],
|
|
132
171
|
Translations: [
|
|
133
172
|
{ childType: 'CustomApplication', nameFields: ['name'], xmlElement: 'customApplications' },
|
|
@@ -183,15 +222,35 @@ export const NESTED_METADATA_REGISTRY = {
|
|
|
183
222
|
{ childType: 'Report', nameFields: ['name'], xmlElement: 'reports' },
|
|
184
223
|
],
|
|
185
224
|
Workflow: [
|
|
186
|
-
{ childType: 'WorkflowRule', nameFields: ['fullName'], xmlElement: 'rules' },
|
|
187
|
-
{ childType: 'WorkflowFlowAction', nameFields: ['fullName'], xmlElement: 'flowActions' },
|
|
188
|
-
{
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
{ childType: '
|
|
225
|
+
{ childType: 'WorkflowRule', nameFields: ['fullName'], nameScope: 'parent', xmlElement: 'rules' },
|
|
226
|
+
{ childType: 'WorkflowFlowAction', nameFields: ['fullName'], nameScope: 'parent', xmlElement: 'flowActions' },
|
|
227
|
+
{
|
|
228
|
+
childType: 'WorkflowFieldUpdate',
|
|
229
|
+
nameFields: ['fullName'],
|
|
230
|
+
nameScope: 'parent',
|
|
231
|
+
xmlElement: 'fieldUpdates',
|
|
232
|
+
},
|
|
233
|
+
{ childType: 'WorkflowTask', nameFields: ['fullName'], nameScope: 'parent', xmlElement: 'tasks' },
|
|
234
|
+
{ childType: 'WorkflowAlert', nameFields: ['fullName'], nameScope: 'parent', xmlElement: 'alerts' },
|
|
235
|
+
{
|
|
236
|
+
childType: 'WorkflowOutboundMessage',
|
|
237
|
+
nameFields: ['fullName'],
|
|
238
|
+
nameScope: 'parent',
|
|
239
|
+
xmlElement: 'outboundMessages',
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
childType: 'WorkflowKnowledgePublish',
|
|
243
|
+
nameFields: ['fullName'],
|
|
244
|
+
nameScope: 'parent',
|
|
245
|
+
xmlElement: 'knowledgePublishes',
|
|
246
|
+
},
|
|
247
|
+
{ childType: 'WorkflowSend', nameFields: ['fullName'], nameScope: 'parent', xmlElement: 'send' },
|
|
248
|
+
{
|
|
249
|
+
childType: 'WorkflowFlowAutomation',
|
|
250
|
+
nameFields: ['fullName'],
|
|
251
|
+
nameScope: 'parent',
|
|
252
|
+
xmlElement: 'flowAutomations',
|
|
253
|
+
},
|
|
195
254
|
],
|
|
196
255
|
};
|
|
197
256
|
export function nestedRulesForType(type, registry = NESTED_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,EAAE,UAAU,EAAE,CAAC,UAAU,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAC;QACjG;YACE,SAAS,EAAE,yBAAyB;YACpC,UAAU,EAAE,CAAC,UAAU,CAAC;YACxB,SAAS,EAAE,QAAQ;YACnB,UAAU,EAAE,kBAAkB;SAC/B;QACD;YACE,SAAS,EAAE,0BAA0B;YACrC,UAAU,EAAE,CAAC,UAAU,CAAC;YACxB,SAAS,EAAE,QAAQ;YACnB,UAAU,EAAE,oBAAoB;SACjC;QACD,EAAC,SAAS,EAAE,cAAc,EAAE,UAAU,EAAE,CAAC,UAAU,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,EAAC;QAC9F;YACE,SAAS,EAAE,wBAAwB;YACnC,UAAU,EAAE,CAAC,UAAU,CAAC;YACxB,SAAS,EAAE,QAAQ;YACnB,UAAU,EAAE,iBAAiB;SAC9B;KACF;CACF,CAAA;AAED,MAAM,UAAU,kBAAkB,CAAC,IAAY,EAAE,WAA2B,wBAAwB;IAClG,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAA;IAC5B,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAA;AACtE,CAAC"}
|
|
@@ -9,5 +9,5 @@ export declare const AGENTIA_DIR_GITIGNORE_ENTRIES: readonly [".agentia", ".agen
|
|
|
9
9
|
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` 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 # Normalize commas to spaces so --class-names gets discrete values\n # shellcheck disable=SC2206\n class_names=(${AGENTIA_APEX_TEST_CLASSES//,/ })\n if [[ ${#class_names[@]} -gt 0 ]]; then\n echo \"## Running Apex tests: ${class_names[@]}\"\n sf apex run test --class-names \"${class_names[@]}\" --result-format human --wait 10\n fi\nfi\n\necho \"## Running LWC tests\"\nnpx sfdx-lwc-jest -- # --passWithNoTests\n";
|
|
10
10
|
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` 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 set \"CLASS_NAMES=!AGENTIA_APEX_TEST_CLASSES:,= !\"\n if not \"!CLASS_NAMES!\"==\"\" (\n echo ## Running Apex tests: !CLASS_NAMES!\n sf apex run test --class-names !CLASS_NAMES! --result-format human --wait 10\n if errorlevel 1 exit /b %errorlevel%\n )\n)\n\necho ## Running LWC tests\nnpx sfdx-lwc-jest --\nif errorlevel 1 exit /b %errorlevel%\n";
|
|
11
11
|
/** Bundled AGENTS.md template (mirrors docs/AGENTS.sample.md). Used when DEFAULT_AGENTS_MD_URL is unset or download fails. */
|
|
12
|
-
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_push`,
|
|
12
|
+
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_push`, 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 push \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_push` | `agentia cicd work push --json` | Push 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`) | `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 push`\n\nPush committed changes to git and register them with Copado:\n\n```sh\nagentia cicd work push --json\n```\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, 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. Only `--local` is supported for now. Optional `--apex-test-classes=class1,class2` is passed to the script as `AGENTIA_APEX_TEST_CLASSES` (MCP: `apexTestClasses`).\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 --done --skip-nested-metadata-detection --json\n```\n\nSame branch/clean-tree rules as `work push`. 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 (same local gates as `work test --local`). 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 counts commits since `lastBaseBranch` 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` (MCP: `done`), submit matches Copado UI Submit when promoting (validate=false / headless work/done) and honors `--skip-nested-metadata-detection`. Prefer `submit --done` 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_push` 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`, `push`, 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 local commit or cloud commit \u2192 `push` when local Git commits exist \u2192 `submit` (optionally `--done`). `submit` counts commits since `lastBaseBranch` before checking origin; it auto-pushes only when that range is non-empty and origin is behind. A Data Set or Data Template deployment step can waive the empty-history error, but not push validation when commits exist. `set` is still required first.\n8. **Confirm intent for `submit --done`.** Promotion deploys to the next stage; do not run it unless the user asked to promote/deploy.\n";
|
|
13
13
|
export declare function qualityGatesExplanation(bin?: string): string;
|
|
@@ -60,7 +60,7 @@ export const BUNDLED_AGENTS_MD = `# Agentia CLI for AI Agents
|
|
|
60
60
|
|
|
61
61
|
Use Agentia to manage Copado user stories end-to-end: pick work, prepare a git branch, push changes, submit for review, and promote.
|
|
62
62
|
|
|
63
|
-
**Prefer the Agentia MCP server when it is available.** If tools such as \`agentia_work_list\`, \`agentia_work_set\`, \`agentia_work_commit\`, \`agentia_work_push\`,
|
|
63
|
+
**Prefer the Agentia MCP server when it is available.** If tools such as \`agentia_work_list\`, \`agentia_work_set\`, \`agentia_work_commit\`, \`agentia_work_push\`, 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.
|
|
64
64
|
|
|
65
65
|
When using the CLI, prefer \`--json\` on every command so you can parse structured output instead of terminal tables.
|
|
66
66
|
|
|
@@ -69,7 +69,7 @@ Authentication must already be configured (\`agentia auth set\` / keychain, or l
|
|
|
69
69
|
## Typical workflow
|
|
70
70
|
|
|
71
71
|
\`\`\`text
|
|
72
|
-
list → get → set → (implement & commit or cloud commit) → push → submit
|
|
72
|
+
list → get → set → (implement & commit or cloud commit) → push → submit [--done]
|
|
73
73
|
\`\`\`
|
|
74
74
|
|
|
75
75
|
| Step | MCP tool (preferred) | CLI fallback | Purpose |
|
|
@@ -80,7 +80,7 @@ list → get → set → (implement & commit or cloud commit) → push → submi
|
|
|
80
80
|
| 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 |
|
|
81
81
|
| 5 | \`agentia_work_push\` | \`agentia cicd work push --json\` | Push local Git commits and register them with Copado |
|
|
82
82
|
| 6 | \`agentia_work_submit\` | \`agentia cicd work submit --json\` | Flag ready for review (pipeline quality gates / validation) |
|
|
83
|
-
| 7 | \`
|
|
83
|
+
| 7 | \`agentia_work_submit\` (\`done: true\`) | \`agentia cicd work submit --done --json\` | Promote and deploy to the next stage (Copado UI Submit promote) |
|
|
84
84
|
|
|
85
85
|
Do not skip \`work set\` before coding. Later steps expect a \`feature/<user-story-name>\` branch and a recorded base branch from \`work set\`.
|
|
86
86
|
|
|
@@ -179,21 +179,11 @@ Flag the user story as ready for review. Runs local project quality gates (when
|
|
|
179
179
|
agentia cicd work submit --json
|
|
180
180
|
agentia cicd work submit --apex-test-classes=MyTest,OtherTest --json
|
|
181
181
|
agentia cicd work submit --skip-local-tests --json
|
|
182
|
+
agentia cicd work submit --done --json
|
|
183
|
+
agentia cicd work submit --done --skip-nested-metadata-detection --json
|
|
182
184
|
\`\`\`
|
|
183
185
|
|
|
184
|
-
Same branch/clean-tree rules as \`work push\`. If the project root contains \`${QUALITY_GATES_SCRIPT_UNIX}\` (macOS/Linux) or \`${QUALITY_GATES_SCRIPT_WINDOWS}\` (Windows), that script runs first and submit stops on failure (same local gates as \`work test --local\`). 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 counts commits since \`lastBaseBranch\` 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.
|
|
185
|
-
|
|
186
|
-
### \`agentia cicd work done\`
|
|
187
|
-
|
|
188
|
-
Promote and deploy the user story to the next pipeline stage:
|
|
189
|
-
|
|
190
|
-
\`\`\`sh
|
|
191
|
-
agentia cicd work done --json
|
|
192
|
-
\`\`\`
|
|
193
|
-
|
|
194
|
-
Same branch/clean-tree rules as \`work submit\`. Uses the same commit-then-unpushed order (including the Data Set / Data Template empty-history exception), then promotes without the validate-only path used by submit.
|
|
195
|
-
|
|
196
|
-
Only run this when the story is approved and ready to move to the next environment.
|
|
186
|
+
Same branch/clean-tree rules as \`work push\`. If the project root contains \`${QUALITY_GATES_SCRIPT_UNIX}\` (macOS/Linux) or \`${QUALITY_GATES_SCRIPT_WINDOWS}\` (Windows), that script runs first and submit stops on failure (same local gates as \`work test --local\`). 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 counts commits since \`lastBaseBranch\` 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\` (MCP: \`done\`), submit matches Copado UI Submit when promoting (validate=false / headless work/done) and honors \`--skip-nested-metadata-detection\`. Prefer \`submit --done\` over the compatibility alias \`cicd work done\`.
|
|
197
187
|
|
|
198
188
|
---
|
|
199
189
|
|
|
@@ -203,10 +193,10 @@ Only run this when the story is approved and ready to move to the next environme
|
|
|
203
193
|
2. **Discover before acting.** List assigned stories, then \`get\` the chosen ID, then \`set\` before editing files.
|
|
204
194
|
3. **One story, one feature branch.** Do not mix unrelated commits on the same \`feature/US-XXXX\` branch.
|
|
205
195
|
4. **Choose the right commit path.** Use normal \`git add\` / \`git commit\` followed by \`agentia_work_push\` for local Git work. Use \`agentia_work_commit\` / \`agentia cicd work commit --cloud\` for Copado cloud metadata commits.
|
|
206
|
-
5. **Keep the tree clean** before \`set\`, \`push\`,
|
|
196
|
+
5. **Keep the tree clean** before \`set\`, \`push\`, and \`submit\`. Those steps fail if tracked changes are pending.
|
|
207
197
|
6. **Prefer structured results.** MCP returns JSON; for CLI, use \`--json\` and do not scrape human table output.
|
|
208
|
-
7. **Order matters.** \`set\` → local commit or cloud commit → \`push\` when local Git commits exist → \`submit\`
|
|
209
|
-
8. **Confirm intent for \`done\`.** Promotion deploys to the next stage; do not run it unless the user asked to promote/deploy.
|
|
198
|
+
7. **Order matters.** \`set\` → local commit or cloud commit → \`push\` when local Git commits exist → \`submit\` (optionally \`--done\`). \`submit\` counts commits since \`lastBaseBranch\` before checking origin; it auto-pushes only when that range is non-empty and origin is behind. A Data Set or Data Template deployment step can waive the empty-history error, but not push validation when commits exist. \`set\` is still required first.
|
|
199
|
+
8. **Confirm intent for \`submit --done\`.** Promotion deploys to the next stage; do not run it unless the user asked to promote/deploy.
|
|
210
200
|
`;
|
|
211
201
|
export function qualityGatesExplanation(bin = 'agentia') {
|
|
212
202
|
return [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup-templates.js","sourceRoot":"","sources":["../../src/lib/setup-templates.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,EACzB,4BAA4B,GAC7B,MAAM,0BAA0B,CAAA;AAEjC;;;GAGG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,EAAE,CAAA;AAEvC,MAAM,CAAC,MAAM,uBAAuB,GAAG,2BAA2B,CAAA;AAElE,iGAAiG;AACjG,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,CAAU,CAAA;AAE1G,MAAM,CAAC,MAAM,yBAAyB,GAAG;;;;;;;;;;;;;;;;;;;;;;;CAuBxC,CAAA;AAED,MAAM,CAAC,MAAM,4BAA4B,GAAG;;;;;;;;;;;;;;;;;;;;;;;CAuB3C,CAAA;AAED,8HAA8H;AAC9H,MAAM,CAAC,MAAM,iBAAiB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAiHA,yBAAyB,yBAAyB,4BAA4B
|
|
1
|
+
{"version":3,"file":"setup-templates.js","sourceRoot":"","sources":["../../src/lib/setup-templates.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,EACzB,4BAA4B,GAC7B,MAAM,0BAA0B,CAAA;AAEjC;;;GAGG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,EAAE,CAAA;AAEvC,MAAM,CAAC,MAAM,uBAAuB,GAAG,2BAA2B,CAAA;AAElE,iGAAiG;AACjG,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,CAAU,CAAA;AAE1G,MAAM,CAAC,MAAM,yBAAyB,GAAG;;;;;;;;;;;;;;;;;;;;;;;CAuBxC,CAAA;AAED,MAAM,CAAC,MAAM,4BAA4B,GAAG;;;;;;;;;;;;;;;;;;;;;;;CAuB3C,CAAA;AAED,8HAA8H;AAC9H,MAAM,CAAC,MAAM,iBAAiB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAiHA,yBAAyB,yBAAyB,4BAA4B;;;;;;;;;;;;;;gFAc/B,yBAAyB,yBAAyB,4BAA4B;;;;;;;;;;;;;;CAc7J,CAAA;AAED,MAAM,UAAU,uBAAuB,CAAC,GAAG,GAAG,SAAS;IACrD,OAAO;QACL,sBAAsB;QACtB,OAAO,yBAAyB,yBAAyB,4BAA4B,cAAc;QACnG,OAAO,GAAG,0BAA0B,GAAG,uEAAuE;QAC9G,WAAW,GAAG,qEAAqE;QACnF,mFAAmF;QACnF,8GAA8G;KAC/G,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACd,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { applyAuthSet, getCicdAuthStatus, getCrtAuthStatus } from './auth-config.js';
|
|
1
|
+
import { applyAuthSet, getAiAuthStatus, getCicdAuthStatus, getCrtAuthStatus } from './auth-config.js';
|
|
2
2
|
import { type CursorMcpStatus, detectCursorInstall, getCursorMcpStatus, upsertAgentiaCursorMcp } from './cursor-mcp-config.js';
|
|
3
3
|
import { type ProjectAssetSetupResult, type SetupActionStatus, type SetupDeps, type SetupOptions } from './project-setup.js';
|
|
4
4
|
export type SetupWizardAuthResult = {
|
|
@@ -19,6 +19,7 @@ export type SetupWizardCursorResult = {
|
|
|
19
19
|
};
|
|
20
20
|
export type SetupResult = ProjectAssetSetupResult & {
|
|
21
21
|
auth: {
|
|
22
|
+
ai: SetupWizardAuthResult;
|
|
22
23
|
cicd: SetupWizardAuthResult;
|
|
23
24
|
crt: SetupWizardAuthResult;
|
|
24
25
|
};
|
|
@@ -31,6 +32,7 @@ export type SetupWizardOptions = SetupOptions & {
|
|
|
31
32
|
export type SetupWizardDeps = SetupDeps & {
|
|
32
33
|
applyAuthSet?: typeof applyAuthSet;
|
|
33
34
|
detectCursorInstall?: typeof detectCursorInstall;
|
|
35
|
+
getAiAuthStatus?: typeof getAiAuthStatus;
|
|
34
36
|
getCicdAuthStatus?: typeof getCicdAuthStatus;
|
|
35
37
|
getCrtAuthStatus?: typeof getCrtAuthStatus;
|
|
36
38
|
getCursorMcpStatus?: typeof getCursorMcpStatus;
|
package/dist/lib/setup-wizard.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { homedir } from 'node:os';
|
|
2
|
-
import {
|
|
2
|
+
import { normalizeAiDomain, normalizeAiOrgId } from './ai-config.js';
|
|
3
|
+
import { applyAuthSet, formatCicdApiKeyHelp, getAiAuthStatus, getCicdAuthStatus, getCrtAuthStatus, } from './auth-config.js';
|
|
4
|
+
import { readAuthProfile } from './auth-profile.js';
|
|
3
5
|
import { normalizeCicdBaseUrl } from './cicd-gateway.js';
|
|
4
6
|
import { detectCursorInstall, getCursorMcpStatus, globalCursorMcpPath, localCursorMcpPath, upsertAgentiaCursorMcp, } from './cursor-mcp-config.js';
|
|
5
7
|
import { resolveProjectContext, runProjectSetup, } from './project-setup.js';
|
|
@@ -18,6 +20,7 @@ function resolveWizardDeps(overrides = {}) {
|
|
|
18
20
|
...merged,
|
|
19
21
|
applyAuthSet: merged.applyAuthSet ?? applyAuthSet,
|
|
20
22
|
detectCursorInstall: merged.detectCursorInstall ?? detectCursorInstall,
|
|
23
|
+
getAiAuthStatus: merged.getAiAuthStatus ?? getAiAuthStatus,
|
|
21
24
|
getCicdAuthStatus: merged.getCicdAuthStatus ?? getCicdAuthStatus,
|
|
22
25
|
getCrtAuthStatus: merged.getCrtAuthStatus ?? getCrtAuthStatus,
|
|
23
26
|
getCursorMcpStatus: merged.getCursorMcpStatus ?? getCursorMcpStatus,
|
|
@@ -43,7 +46,8 @@ function formatCicdStatusLine(status) {
|
|
|
43
46
|
}
|
|
44
47
|
const endpoint = status.baseUrl ?? 'not set';
|
|
45
48
|
const localSuffix = status.local ? ', local' : '';
|
|
46
|
-
|
|
49
|
+
const sourceSuffix = status.source === undefined ? '' : `, source: ${status.source}`;
|
|
50
|
+
return `CICD: ${status.masked} (endpoint: ${endpoint}${localSuffix}${sourceSuffix})`;
|
|
47
51
|
}
|
|
48
52
|
function formatCrtStatusLine(status) {
|
|
49
53
|
const domain = status.domain ?? 'not set';
|
|
@@ -51,7 +55,88 @@ function formatCrtStatusLine(status) {
|
|
|
51
55
|
if (!status.set) {
|
|
52
56
|
return `CRT: not set (domain: ${domain}, org: ${orgId})`;
|
|
53
57
|
}
|
|
54
|
-
|
|
58
|
+
const sourceSuffix = status.source === undefined ? '' : `, source: ${status.source}`;
|
|
59
|
+
return `CRT: ${status.masked} (domain: ${domain}, org: ${orgId}${sourceSuffix})`;
|
|
60
|
+
}
|
|
61
|
+
function formatAiStatusLine(status) {
|
|
62
|
+
const context = `domain: ${status.domain ?? 'not set'}, org: ${status.orgId ?? 'not set'}, workspace: ${status.workspaceId ?? 'not set'}`;
|
|
63
|
+
const sourceSuffix = status.source === undefined ? '' : `, source: ${status.source}`;
|
|
64
|
+
return status.set ? `AI: ${status.masked} (${context}${sourceSuffix})` : `AI: not set (${context})`;
|
|
65
|
+
}
|
|
66
|
+
async function configureAi(context) {
|
|
67
|
+
const { deps, log, options, prompts } = context;
|
|
68
|
+
const current = deps.getAiAuthStatus();
|
|
69
|
+
log(formatAiStatusLine(current));
|
|
70
|
+
if (options.noPrompt || prompts === undefined) {
|
|
71
|
+
return { configured: current.set, domain: current.domain ?? undefined, orgId: current.orgId ?? undefined, status: current.set ? 'unchanged' : 'skipped' };
|
|
72
|
+
}
|
|
73
|
+
let shouldConfigure = await prompts.confirm({
|
|
74
|
+
default: !current.set,
|
|
75
|
+
message: setupAuthPrompt('ai', current.set),
|
|
76
|
+
});
|
|
77
|
+
let scope = hasLocalAuthProfile('ai') || current.set ? 'local' : undefined;
|
|
78
|
+
if (!shouldConfigure) {
|
|
79
|
+
shouldConfigure =
|
|
80
|
+
current.set && current.source === 'global' && !hasLocalAuthProfile('ai')
|
|
81
|
+
? await prompts.confirm({ default: false, message: 'Reconfigure global AI authentication?' })
|
|
82
|
+
: false;
|
|
83
|
+
if (shouldConfigure)
|
|
84
|
+
scope = 'global';
|
|
85
|
+
if (!shouldConfigure) {
|
|
86
|
+
log('Skipped AI authentication.');
|
|
87
|
+
return { configured: current.set, domain: current.domain ?? undefined, orgId: current.orgId ?? undefined, status: 'skipped' };
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
scope ??= await setupAuthScope('ai', false, prompts);
|
|
91
|
+
const pak = await prompts.password({
|
|
92
|
+
message: 'AI PAK',
|
|
93
|
+
validate: (value) => (value.trim().length > 0 ? true : 'AI PAK cannot be empty.'),
|
|
94
|
+
});
|
|
95
|
+
const domain = await prompts.input({
|
|
96
|
+
default: current.domain ?? undefined,
|
|
97
|
+
message: 'AI domain',
|
|
98
|
+
validate(value) {
|
|
99
|
+
try {
|
|
100
|
+
normalizeAiDomain(value);
|
|
101
|
+
return true;
|
|
102
|
+
}
|
|
103
|
+
catch (error) {
|
|
104
|
+
return error.message;
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
});
|
|
108
|
+
const orgRaw = await prompts.input({
|
|
109
|
+
default: current.orgId ?? undefined,
|
|
110
|
+
message: 'AI organization ID',
|
|
111
|
+
validate(value) {
|
|
112
|
+
try {
|
|
113
|
+
normalizeAiOrgId(value);
|
|
114
|
+
return true;
|
|
115
|
+
}
|
|
116
|
+
catch (error) {
|
|
117
|
+
return error.message;
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
});
|
|
121
|
+
const workspace = await prompts.input({
|
|
122
|
+
default: current.workspaceId ?? undefined,
|
|
123
|
+
message: 'AI workspace ID (optional; press Enter to auto-create)',
|
|
124
|
+
});
|
|
125
|
+
try {
|
|
126
|
+
const result = await runWithSpinner(options, 'Validating AI credentials', () => deps.applyAuthSet({
|
|
127
|
+
ai: pak,
|
|
128
|
+
aiDomain: domain,
|
|
129
|
+
aiOrg: normalizeAiOrgId(orgRaw),
|
|
130
|
+
aiWorkspace: workspace.trim().length === 0 ? undefined : workspace,
|
|
131
|
+
scope,
|
|
132
|
+
}));
|
|
133
|
+
log(`Stored AI domain: ${result.ai?.domain ?? domain}.`);
|
|
134
|
+
return { configured: true, domain: result.ai?.domain ?? domain, orgId: (result.ai?.orgId ?? normalizeAiOrgId(orgRaw)).toString(), status: current.set ? 'updated' : 'created' };
|
|
135
|
+
}
|
|
136
|
+
catch (error) {
|
|
137
|
+
log(error.message);
|
|
138
|
+
return { configured: current.set, domain: current.domain ?? undefined, orgId: current.orgId ?? undefined, status: 'failed' };
|
|
139
|
+
}
|
|
55
140
|
}
|
|
56
141
|
async function runWithSpinner(options, message, action) {
|
|
57
142
|
if (options.withSpinner === undefined) {
|
|
@@ -59,6 +144,27 @@ async function runWithSpinner(options, message, action) {
|
|
|
59
144
|
}
|
|
60
145
|
return options.withSpinner(message, action);
|
|
61
146
|
}
|
|
147
|
+
function hasLocalAuthProfile(type) {
|
|
148
|
+
return readAuthProfile('local')?.[type] !== undefined;
|
|
149
|
+
}
|
|
150
|
+
async function setupAuthScope(type, globalConfigured, prompts) {
|
|
151
|
+
if (hasLocalAuthProfile(type) || globalConfigured)
|
|
152
|
+
return 'local';
|
|
153
|
+
return prompts.select({
|
|
154
|
+
choices: [
|
|
155
|
+
{ name: 'Global (this machine)', value: 'global' },
|
|
156
|
+
{ name: 'Local (this project and user)', value: 'local' },
|
|
157
|
+
],
|
|
158
|
+
message: `Where should ${type.toUpperCase()} authentication be stored?`,
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
function setupAuthPrompt(type, configured) {
|
|
162
|
+
if (hasLocalAuthProfile(type))
|
|
163
|
+
return `Reconfigure local ${type.toUpperCase()} authentication?`;
|
|
164
|
+
if (configured)
|
|
165
|
+
return `Create local ${type.toUpperCase()} authentication?`;
|
|
166
|
+
return `Configure global ${type.toUpperCase()} authentication?`;
|
|
167
|
+
}
|
|
62
168
|
async function configureCicd(context) {
|
|
63
169
|
const { deps, log, options, prompts } = context;
|
|
64
170
|
const current = deps.getCicdAuthStatus();
|
|
@@ -70,18 +176,28 @@ async function configureCicd(context) {
|
|
|
70
176
|
status: current.set ? 'unchanged' : 'skipped',
|
|
71
177
|
};
|
|
72
178
|
}
|
|
73
|
-
|
|
179
|
+
let shouldConfigure = await prompts.confirm({
|
|
74
180
|
default: !current.set,
|
|
75
|
-
message: current.set
|
|
181
|
+
message: setupAuthPrompt('cicd', current.set),
|
|
76
182
|
});
|
|
183
|
+
let scope = hasLocalAuthProfile('cicd') || current.set ? 'local' : undefined;
|
|
77
184
|
if (!shouldConfigure) {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
185
|
+
shouldConfigure =
|
|
186
|
+
current.set && current.source === 'global' && !hasLocalAuthProfile('cicd')
|
|
187
|
+
? await prompts.confirm({ default: false, message: 'Reconfigure global CICD authentication?' })
|
|
188
|
+
: false;
|
|
189
|
+
if (shouldConfigure)
|
|
190
|
+
scope = 'global';
|
|
191
|
+
if (!shouldConfigure) {
|
|
192
|
+
log('Skipped CICD authentication.');
|
|
193
|
+
return {
|
|
194
|
+
baseUrl: current.baseUrl ?? undefined,
|
|
195
|
+
configured: current.set,
|
|
196
|
+
status: 'skipped',
|
|
197
|
+
};
|
|
198
|
+
}
|
|
84
199
|
}
|
|
200
|
+
scope ??= await setupAuthScope('cicd', false, prompts);
|
|
85
201
|
log(formatCicdApiKeyHelp());
|
|
86
202
|
while (true) {
|
|
87
203
|
// Sequential prompts are required to retry authentication with a new key.
|
|
@@ -120,6 +236,7 @@ async function configureCicd(context) {
|
|
|
120
236
|
const result = await runWithSpinner(options, endpointMode === 'custom' ? 'Validating CICD API key for custom endpoint' : 'Discovering CICD endpoint', () => deps.applyAuthSet({
|
|
121
237
|
cicd: apiKey,
|
|
122
238
|
customUrl,
|
|
239
|
+
scope,
|
|
123
240
|
}));
|
|
124
241
|
log(`Stored CICD endpoint: ${result.baseUrl}.`);
|
|
125
242
|
return {
|
|
@@ -159,19 +276,29 @@ async function configureCrt(context) {
|
|
|
159
276
|
status: current.set ? 'unchanged' : 'skipped',
|
|
160
277
|
};
|
|
161
278
|
}
|
|
162
|
-
|
|
279
|
+
let shouldConfigure = await prompts.confirm({
|
|
163
280
|
default: !current.set,
|
|
164
|
-
message: current.set
|
|
281
|
+
message: setupAuthPrompt('crt', current.set),
|
|
165
282
|
});
|
|
283
|
+
let scope = hasLocalAuthProfile('crt') || current.set ? 'local' : undefined;
|
|
166
284
|
if (!shouldConfigure) {
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
285
|
+
shouldConfigure =
|
|
286
|
+
current.set && current.source === 'global' && !hasLocalAuthProfile('crt')
|
|
287
|
+
? await prompts.confirm({ default: false, message: 'Reconfigure global CRT authentication?' })
|
|
288
|
+
: false;
|
|
289
|
+
if (shouldConfigure)
|
|
290
|
+
scope = 'global';
|
|
291
|
+
if (!shouldConfigure) {
|
|
292
|
+
log('Skipped CRT authentication.');
|
|
293
|
+
return {
|
|
294
|
+
configured: current.set,
|
|
295
|
+
domain: current.domain ?? undefined,
|
|
296
|
+
orgId: current.orgId ?? undefined,
|
|
297
|
+
status: 'skipped',
|
|
298
|
+
};
|
|
299
|
+
}
|
|
174
300
|
}
|
|
301
|
+
scope ??= await setupAuthScope('crt', false, prompts);
|
|
175
302
|
while (true) {
|
|
176
303
|
// Sequential prompts are required to retry authentication with new credentials.
|
|
177
304
|
// eslint-disable-next-line no-await-in-loop
|
|
@@ -226,6 +353,7 @@ async function configureCrt(context) {
|
|
|
226
353
|
crt: pat,
|
|
227
354
|
crtDomain,
|
|
228
355
|
crtOrg: orgId,
|
|
356
|
+
scope,
|
|
229
357
|
}));
|
|
230
358
|
const storedDomain = result.crt?.domain ?? crtDomain;
|
|
231
359
|
const storedOrgId = (result.crt?.orgId ?? orgId).toString();
|
|
@@ -331,7 +459,7 @@ async function configureCursorMcp(context, projectRoot) {
|
|
|
331
459
|
const filePath = target === 'local' ? localCursorMcpPath(projectRoot) : globalCursorMcpPath(deps.homedir?.() ?? homedir());
|
|
332
460
|
try {
|
|
333
461
|
const written = await deps.upsertAgentiaCursorMcp(filePath);
|
|
334
|
-
log(`Agentia MCP ${written.status} at ${written.path}. Restart Cursor
|
|
462
|
+
log(`Agentia MCP ${written.status} at ${written.path}. Restart Cursor, then enable the Agentia server in Cursor's MCP settings if it is shown as disabled.`);
|
|
335
463
|
return {
|
|
336
464
|
configured: true,
|
|
337
465
|
conflicting: false,
|
|
@@ -361,12 +489,6 @@ async function configureCursorMcp(context, projectRoot) {
|
|
|
361
489
|
}
|
|
362
490
|
function buildNextSteps(params) {
|
|
363
491
|
const steps = [];
|
|
364
|
-
if (!params.cicdConfigured) {
|
|
365
|
-
steps.push(`Run \`${params.bin} auth set --cicd <copado-api-key>\` (or \`${params.bin} setup\`) to store CICD credentials.`);
|
|
366
|
-
}
|
|
367
|
-
if (!params.crtConfigured) {
|
|
368
|
-
steps.push(`Run \`${params.bin} auth set --crt-pak <pak> --crt-org <org-id>\` to store CRT credentials.`);
|
|
369
|
-
}
|
|
370
492
|
if (!params.mcpConfigured) {
|
|
371
493
|
steps.push(`If you use Cursor, configure it to run \`${params.bin} mcp start\` as an MCP server.`);
|
|
372
494
|
}
|
|
@@ -388,6 +510,8 @@ export async function runSetupWizard(options = {}, deps = {}) {
|
|
|
388
510
|
const section = { deps: resolved, log, options, prompts };
|
|
389
511
|
logSection(log, 'CICD authentication');
|
|
390
512
|
const cicd = await configureCicd(section);
|
|
513
|
+
logSection(log, 'AI authentication');
|
|
514
|
+
const ai = await configureAi(section);
|
|
391
515
|
logSection(log, 'CRT authentication');
|
|
392
516
|
const crt = await configureCrt(section);
|
|
393
517
|
logSection(log, 'Cursor MCP');
|
|
@@ -403,8 +527,6 @@ export async function runSetupWizard(options = {}, deps = {}) {
|
|
|
403
527
|
});
|
|
404
528
|
const nextSteps = buildNextSteps({
|
|
405
529
|
bin,
|
|
406
|
-
cicdConfigured: cicd.configured,
|
|
407
|
-
crtConfigured: crt.configured,
|
|
408
530
|
mcpConfigured: cursorMcp.local.configured || cursorMcp.global.configured,
|
|
409
531
|
});
|
|
410
532
|
log('');
|
|
@@ -414,7 +536,7 @@ export async function runSetupWizard(options = {}, deps = {}) {
|
|
|
414
536
|
}
|
|
415
537
|
return {
|
|
416
538
|
...assets,
|
|
417
|
-
auth: { cicd, crt },
|
|
539
|
+
auth: { ai, cicd, crt },
|
|
418
540
|
cursorMcp,
|
|
419
541
|
nextSteps,
|
|
420
542
|
};
|