@copado/agentia-cli 1.0.0-rc.0 → 1.1.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/CHANGELOG.md +26 -0
- package/README.md +494 -284
- package/dist/commands/cicd/cloud/commit.js +7 -2
- package/dist/commands/cicd/extension/create.js +53 -0
- package/dist/commands/cicd/extension/install.js +127 -0
- package/dist/commands/cicd/extension/package.js +35 -0
- package/dist/commands/cicd/extension/publish.js +61 -0
- package/dist/commands/cicd/extension/uninstall.js +99 -0
- package/dist/commands/cicd/extension/validate.js +47 -0
- package/dist/commands/cicd/work/get.js +18 -2
- package/dist/commands/setup/skills/create.js +1 -1
- package/dist/commands/setup/skills/update.js +1 -1
- package/dist/commands/setup.js +15 -3
- package/dist/commands/update.js +11 -4
- package/dist/lib/cli-update.js +6 -1
- package/dist/lib/defaults-store.js +3 -1
- package/dist/lib/extension/assets.js +4 -0
- package/dist/lib/extension/create.js +3 -0
- package/dist/lib/extension/git.js +17 -0
- package/dist/lib/extension/index.js +27 -0
- package/dist/lib/extension/install.js +4 -0
- package/dist/lib/extension/manifest.js +21 -0
- package/dist/lib/extension/package.js +3 -0
- package/dist/lib/extension/paths.js +5 -0
- package/dist/lib/extension/publish.js +3 -0
- package/dist/lib/extension/sf-deploy.js +8 -0
- package/dist/lib/extension/source.js +7 -0
- package/dist/lib/extension/uninstall.js +3 -0
- package/dist/lib/function-types.js +3 -1
- package/dist/lib/mcp/work-tools.js +19 -6
- package/dist/lib/project-setup.js +5 -4
- package/dist/lib/runtime.js +1 -1
- package/dist/lib/setup-skills.js +4 -1
- package/dist/lib/setup-templates.js +1 -4
- package/dist/lib/template-types.js +3 -1
- package/dist/lib/version-warning.js +3 -0
- package/dist/lib/work-committed-metadata.js +4 -0
- package/dist/lib/work-get.js +2 -1
- package/oclif.manifest.json +886 -471
- package/package.json +1 -1
- package/templates/rules/cursor/agentia.mdc +29 -0
- package/templates/skills/agentia/SKILL.md +29 -0
- package/templates/skills/agentia-cicd/SKILL.md +3 -1
- package/templates/skills/agentia-cicd/references/extensions.md +49 -0
- package/templates/skills/agentia-cicd/references/pipelines.md +1 -1
- package/templates/skills/agentia-cicd/references/work.md +6 -4
- package/templates/AGENTS.md +0 -24
package/package.json
CHANGED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Use Agentia for Copado CICD, Testing, AI, and advanced pipeline workflows
|
|
3
|
+
alwaysApply: false
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<!-- Agentia managed rules: agentia setup skills -->
|
|
7
|
+
|
|
8
|
+
# Agentia CLI
|
|
9
|
+
|
|
10
|
+
Use Agentia to manage Copado work items. Prefer registered Agentia MCP tools; otherwise use the CLI with `--json`.
|
|
11
|
+
|
|
12
|
+
Authentication must be configured before operational commands. Never print credentials, tokens, or unmasked environment variables.
|
|
13
|
+
|
|
14
|
+
## Copado workflow
|
|
15
|
+
|
|
16
|
+
`list → get → set → (implement & git commit) → test → publish → submit [--done|--deploy]`
|
|
17
|
+
|
|
18
|
+
Read records before changing them and use IDs returned by Copado. Do not skip `work set` before coding; use one story per feature branch. Keep the working tree clean for lifecycle commands, and confirm promotion/deployment intent before `done`.
|
|
19
|
+
|
|
20
|
+
## Agent Skills
|
|
21
|
+
|
|
22
|
+
Load exactly one copy of each applicable installed Agentia skill:
|
|
23
|
+
|
|
24
|
+
- `agentia-cicd`: Copado stories, commits, publish, submit, done, promotions, jobs, Functions, Job Templates, environments, pipelines, Slack notification configure, and data.
|
|
25
|
+
- `agentia-testing`: Copado Robotic Testing operations.
|
|
26
|
+
- `agentia-ai`: Copado AI operations.
|
|
27
|
+
- `agentia-adv`: advanced pipeline workflows.
|
|
28
|
+
|
|
29
|
+
Project-specific instructions take precedence over managed Agentia skills. Refresh managed skills with `agentia setup skills update`; do not hand-edit managed files.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agentia
|
|
3
|
+
description: Use when working with Agentia or Copado CICD, Robotic Testing, AI, pipelines, user stories, commits, promotions, deployments, jobs, environments, credentials, or data templates.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<!-- Agentia managed skill file: agentia setup skills -->
|
|
7
|
+
|
|
8
|
+
# Agentia CLI
|
|
9
|
+
|
|
10
|
+
Use Agentia to manage Copado work items. Prefer registered Agentia MCP tools; otherwise use the CLI with `--json`.
|
|
11
|
+
|
|
12
|
+
Authentication must be configured before operational commands. Never print credentials, tokens, or unmasked environment variables.
|
|
13
|
+
|
|
14
|
+
## Copado workflow
|
|
15
|
+
|
|
16
|
+
`list → get → set → (implement & git commit) → test → publish → submit [--done|--deploy]`
|
|
17
|
+
|
|
18
|
+
Read records before changing them and use IDs returned by Copado. Do not skip `work set` before coding; use one story per feature branch. Keep the working tree clean for lifecycle commands, and confirm promotion/deployment intent before `done`.
|
|
19
|
+
|
|
20
|
+
## Agent Skills
|
|
21
|
+
|
|
22
|
+
Use the applicable installed domain skill for detailed instructions:
|
|
23
|
+
|
|
24
|
+
- `agentia-cicd`: Copado stories, commits, publish, submit, done, promotions, jobs, Functions, Job Templates, environments, pipelines, Slack notification configure, and data.
|
|
25
|
+
- `agentia-testing`: Copado Robotic Testing operations.
|
|
26
|
+
- `agentia-ai`: Copado AI operations.
|
|
27
|
+
- `agentia-adv`: advanced pipeline workflows.
|
|
28
|
+
|
|
29
|
+
Project-specific instructions take precedence over managed Agentia skills. Refresh managed skills with `agentia setup skills update`; do not hand-edit managed files.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: agentia-cicd
|
|
3
|
-
description: Use this skill when managing Copado CICD work with the Agentia CLI or Agentia MCP tools: user stories (including current/active story context), cloud commit/promote, work publish/submit/done, promotion runs and conflicts, job executions, Copado Functions, Job Templates, environments, credentials, pipelines, stages, Slack pipeline notification subscriptions, and release data templates. Use it whenever the user asks an agent to operate Copado CICD from a terminal, IDE, or headless workflow.
|
|
3
|
+
description: Use this skill when managing Copado CICD work with the Agentia CLI or Agentia MCP tools: user stories (including current/active story context), cloud commit/promote, work publish/submit/done, promotion runs and conflicts, job executions, Copado Functions, Job Templates, git-hosted CICD extensions, environments, credentials, pipelines, stages, Slack pipeline notification subscriptions, and release data templates. Use it whenever the user asks an agent to operate Copado CICD from a terminal, IDE, or headless workflow.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
<!-- Agentia managed skill file: agentia setup skills -->
|
|
@@ -24,6 +24,7 @@ Prefer Agentia MCP tools when they are available and match the task. Use CLI exa
|
|
|
24
24
|
- Promotion lookup, run, resume, merge conflicts, and story-centric promotion: [references/promotions.md](references/promotions.md)
|
|
25
25
|
- Copado JobExecution lookup, actions, logs, and monitoring: [references/jobs.md](references/jobs.md)
|
|
26
26
|
- Copado Functions lifecycle, remote run/results, and local Docker run: [references/functions.md](references/functions.md)
|
|
27
|
+
- Git-hosted Copado CICD extensions (`cicd extension`, experimental): [references/extensions.md](references/extensions.md)
|
|
27
28
|
- Copado Job Templates (`cicd template`, not data templates): [references/templates.md](references/templates.md)
|
|
28
29
|
- Copado environments, environment credentials, and browser authentication: [references/environments-and-credentials.md](references/environments-and-credentials.md)
|
|
29
30
|
- Pipelines, environment connections, stages, and stage connections: [references/pipelines.md](references/pipelines.md)
|
|
@@ -38,6 +39,7 @@ Prefer Agentia MCP tools when they are available and match the task. Use CLI exa
|
|
|
38
39
|
- For local project work, keep the tracked working tree clean before commands that require it: `work set`, `work publish`, and `work submit`. If `work set` returns `status: "warning"`, show the message and do not assume a feature branch was created; branch keys are cleared and the work item id/name/title are still recorded in config.user.json.
|
|
39
40
|
- Treat `cicd job` as Copado CICD JobExecution. It is different from CRT `testing job`.
|
|
40
41
|
- Treat `cicd function` as Copado Function definitions and runs. It is different from JobExecution (`cicd job`) and Job Templates (`cicd template`).
|
|
42
|
+
- Treat `cicd extension` as experimental git-hosted packaging of Functions/Templates (plus optional `force-app`). It is different from per-asset `cicd function` / `cicd template` upserts.
|
|
41
43
|
- Treat `cicd template` as Copado Job Templates via `/release/jobs/templates`. It is different from Release Data Templates (`cicd data template`).
|
|
42
44
|
- Treat `cicd work test` as local quality gates (`--local` is the default). It is different from CRT `testing test run`.
|
|
43
45
|
- Treat `cicd work test apex` as the Apex test runner that local quality gates (`.agentia_quality_gates.*`) usually call. An empty `--apex-test-classes` list skips Salesforce CLI. It can also be invoked directly. It is different from CRT.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Copado CICD Extensions
|
|
2
|
+
|
|
3
|
+
Use this reference for experimental git-hosted extension commands under `agentia cicd extension ...`.
|
|
4
|
+
|
|
5
|
+
## Scope
|
|
6
|
+
|
|
7
|
+
`cicd extension` packages Copado Functions and Job Templates (plus optional `force-app`) as a git repository with a semver tag. It is not the same as individual `cicd function` / `cicd template` upserts, Salesforce unlocked packages, or MCP tools (none in v1).
|
|
8
|
+
|
|
9
|
+
Layout:
|
|
10
|
+
|
|
11
|
+
- `copado/extension_manifest.json` (includes additive semver `version`)
|
|
12
|
+
- `copado/functions/`
|
|
13
|
+
- `copado/templates/`
|
|
14
|
+
- optional `force-app/`
|
|
15
|
+
|
|
16
|
+
## Author workflow
|
|
17
|
+
|
|
18
|
+
```sh
|
|
19
|
+
agentia cicd extension create --name my-extension --version 1.0.0
|
|
20
|
+
agentia cicd extension validate --require-version
|
|
21
|
+
agentia cicd extension package --json
|
|
22
|
+
# commit the manifest version before publish
|
|
23
|
+
agentia cicd extension publish --remote origin
|
|
24
|
+
agentia cicd extension publish --local --force # offline tag only
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
`publish --version` fails if the bump is still uncommitted. Prefer committing the version, then publishing without rewriting it.
|
|
28
|
+
|
|
29
|
+
## Install and uninstall
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
agentia cicd extension install https://gitlab.com/org/my-ext.git --version 1.0.0 --dry-run
|
|
33
|
+
agentia cicd extension install https://gitlab.com/org/my-ext.git --version 1.0.0 --yes --sf-alias destOrg
|
|
34
|
+
agentia cicd extension install ./my-extension --version 1.0.0 --exclude-sf-deploy --yes --json
|
|
35
|
+
agentia cicd extension uninstall ./my-extension --version 1.0.0 --yes --json
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Rules:
|
|
39
|
+
|
|
40
|
+
- Install and uninstall need `--yes` (or a prompt) except `--dry-run`.
|
|
41
|
+
- `force-app` needs `--sf-alias` or `--exclude-sf-deploy`.
|
|
42
|
+
- Symlinks and paths outside the extension root are rejected.
|
|
43
|
+
- Uninstall deletes listed Functions/Templates only (404 = already gone); it does not undeploy `force-app`.
|
|
44
|
+
|
|
45
|
+
## Related
|
|
46
|
+
|
|
47
|
+
- Individual Functions: [functions.md](functions.md)
|
|
48
|
+
- Individual Job Templates: [templates.md](templates.md)
|
|
49
|
+
- Customer enablement: `docs/enablement/features/agentia-cli-cicd-extensions.md`
|
|
@@ -11,7 +11,7 @@ Pipeline connections, stage connections, and stages are related but distinct. Re
|
|
|
11
11
|
| Command | Use For | Notes |
|
|
12
12
|
| --- | --- | --- |
|
|
13
13
|
| `pipeline list` | Find pipelines | Filter by `--active`, `--name`, `--platform`, cursor, and page size. |
|
|
14
|
-
| `pipeline get ID` | Inspect one pipeline | Returns describe-style details, including embedded connections. |
|
|
14
|
+
| `pipeline get ID` | Inspect one pipeline | Returns describe-style details, including embedded connections. JSON may also include redesigned `automations` / `qualityGates` rule aggregates (one quality-gate entry per condition row). |
|
|
15
15
|
| `pipeline create NAME` | Create a pipeline | Common flags: `--platform`, `--main-branch`, `--git-repository-id`. |
|
|
16
16
|
| `pipeline update ID` | Sparse pipeline changes | Set `--name`, branch, repository, or conflict strategy fields. |
|
|
17
17
|
| `pipeline open ID` | Open in browser | CLI-only navigation helper. |
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
+
<!-- Agentia managed skill file: agentia setup skills -->
|
|
4
|
+
|
|
3
5
|
# CICD Work Reference
|
|
4
6
|
|
|
5
7
|
Use this reference for `agentia cicd work ...`, `agentia cicd cloud ...`, and matching MCP tools such as `agentia_work_get`, `agentia_cloud_commit`, `agentia_work_publish`, and `agentia_work_submit`.
|
|
@@ -47,7 +49,7 @@ Use this path when the change exists in the local repository:
|
|
|
47
49
|
Use this path when Copado should retrieve metadata from a configured source environment instead of using local Git changes:
|
|
48
50
|
|
|
49
51
|
1. Inspect the Story and pass its Salesforce ID explicitly when possible. An active Story from `work set` is optional, not a prerequisite for the cloud operation.
|
|
50
|
-
2. Start a cloud commit with `agentia cicd cloud commit <story-id> ... --json`. Use the simple metadata flags for one change, or `--file`/`--stdin` for a multi-change request.
|
|
52
|
+
2. Start a cloud commit with `agentia cicd cloud commit <story-id> ... --json`. Use the simple metadata flags for one change, or `--file`/`--stdin` for a multi-change request. Always pass `--metadata-category` (use `SFDX` for Salesforce metadata). With `--file`/`--stdin`, each change requires `c` (or `category`).
|
|
51
53
|
3. Let the command wait for its Job Execution by default. After a timeout, use the returned execution ID with `agentia cicd job get` and `agentia cicd job log get`; do not immediately submit a duplicate commit.
|
|
52
54
|
4. When explicitly approved to promote an existing Promotion, use `agentia cicd cloud promote <story-id> --json`; add `--deploy` only for promote-and-deploy. This is independent of local `work submit`.
|
|
53
55
|
|
|
@@ -59,11 +61,11 @@ Cloud commit checks Story readiness and source credentials before submission. Av
|
|
|
59
61
|
| Command | Use For | Notes |
|
|
60
62
|
| ------------------ | ---------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
61
63
|
| `work list` | Find candidate stories | Use `--assigned-to-me`, `--status`, `--project-name`, `--name`, pagination flags. |
|
|
62
|
-
| `work get [ID]` | Read story details | ID is optional after `work set`. Human output redacts OAuth signatures; JSON preserves structured fields.
|
|
64
|
+
| `work get [ID]` | Read story details | ID is optional after `work set`. Human output redacts OAuth signatures; JSON preserves structured fields. `--committed-metadata` also includes the Story committed metadata list as `committedMetadata` in the result. |
|
|
63
65
|
| `work create` | Create a story | Use `--title`, project/team/assignee/theme fields, specs, and short acceptance criteria. `--source-credential` sends `sourceEnvironment` as null so Salesforce assigns the environment. |
|
|
64
66
|
| `work update [ID]` | Mutate story fields or status | ID is optional after `work set`. Acceptance criteria must be fewer than 255 chars. `--source-credential` sends `sourceEnvironment` as null. |
|
|
65
67
|
| `work set ID` | Mark active and prepare branch | Fetches the base branch and, when present, the remote feature branch; creates/checks out `feature/<story-name>` from `origin/feature` when that ref exists, otherwise from the base; stores local context. A gateway warning prints the message, skips git, clears branch keys, and records work-item id/name/title. Warns without PATCHing when the Story credential differs from the project default; use `work update --source-credential` to change it. `--none` clears every `last*` key and checks out `lastBaseBranch`, else `main`, else `master`. |
|
|
66
|
-
| `cloud commit` | Copado cloud metadata commit | For local Git work, use `git commit` then `work publish`. `work commit`
|
|
68
|
+
| `cloud commit` | Copado cloud metadata commit | Prefer `agentia cicd cloud commit`. Requires `--metadata-category` (or `c`/`category` per `--file` change); use `SFDX` for Salesforce metadata. For local Git work, use `git commit` then `work publish`. `cicd work commit` remains a hidden compatibility alias. |
|
|
67
69
|
| `work publish` | Publish local commits and register with Copado | Requires active story context and clean tree. Accepts `--permissions` and `--full-metadata` when nested detection is not enough. `work push` is a compatibility alias. |
|
|
68
70
|
| `work test` | Run local quality gate scripts | `--local` is default. Runs `.agentia_quality_gates.sh` or `.agentia_quality_gates.cmd` from repo root. If missing, warns and runs the stock setup sample from a temp file. `--cloud` is not implemented yet. |
|
|
69
71
|
| `work test apex` | Run named Apex test classes | Optional `--apex-test-classes`. Omit or pass empty to log a skip and exit 0 without calling Salesforce CLI. `--rerun-failed-apex-tests` reruns classes from `.agentia/apex.tests.<user-story>.json`. Optional `--wait` minutes (default 60). Usually invoked from `.agentia_quality_gates.*`. |
|
|
@@ -105,7 +107,7 @@ agentia cicd cloud commit <story-id> --message "Commit AccountService" --metadat
|
|
|
105
107
|
agentia cicd cloud commit <story-id> --file commit-request.json --json
|
|
106
108
|
```
|
|
107
109
|
|
|
108
|
-
For Salesforce metadata,
|
|
110
|
+
`--metadata-category` is required on simple flag input. Each `--file`/`--stdin` change requires `c` (or `category`). For Salesforce metadata, use `SFDX`. Without `c:SFDX`, Copado deploy logs can report "Salesforce changes not found."
|
|
109
111
|
|
|
110
112
|
For a cloud promotion, the Story must already belong to a Promotion:
|
|
111
113
|
|
package/templates/AGENTS.md
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# Agentia CLI for AI Agents
|
|
2
|
-
|
|
3
|
-
<!-- agentia:managed:start -->
|
|
4
|
-
|
|
5
|
-
Use Agentia to manage Copado work items. Prefer registered Agentia MCP tools; otherwise use the CLI with `--json`.
|
|
6
|
-
|
|
7
|
-
Authentication must be configured before operational commands. Never print credentials, tokens, or unmasked environment variables.
|
|
8
|
-
|
|
9
|
-
## Copado workflow
|
|
10
|
-
|
|
11
|
-
`list → get → set → (implement & git commit) → test → publish → submit [--done|--deploy]`
|
|
12
|
-
|
|
13
|
-
Read records before changing them and use IDs returned by Copado. Do not skip `work set` before coding; use one story per feature branch. Keep the working tree clean for lifecycle commands, and confirm promotion/deployment intent before `done`.
|
|
14
|
-
|
|
15
|
-
## Agent Skills
|
|
16
|
-
|
|
17
|
-
Load exactly one copy of each applicable Agentia skill. Prefer the client-specific root when available (`.cursor/skills` in Cursor or `.claude/skills` in Claude); otherwise use `.agents/skills`.
|
|
18
|
-
|
|
19
|
-
- `agentia-cicd/SKILL.md`: Copado stories, commits, publish, submit, done, promotions, jobs, Functions, Job Templates, environments, pipelines, Slack notification configure, and data.
|
|
20
|
-
- `agentia-testing/SKILL.md`: Copado Robotic Testing operations.
|
|
21
|
-
- `agentia-ai/SKILL.md`: Copado AI operations.
|
|
22
|
-
|
|
23
|
-
Project rules in this file take precedence over managed skill guidance. Refresh managed skills with `agentia setup skills update`; do not hand-edit managed files.
|
|
24
|
-
<!-- agentia:managed:end -->
|