@copado/agentia-cli 1.0.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.
Files changed (42) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.md +481 -278
  3. package/dist/commands/cicd/cloud/commit.js +7 -2
  4. package/dist/commands/cicd/extension/create.js +53 -0
  5. package/dist/commands/cicd/extension/install.js +127 -0
  6. package/dist/commands/cicd/extension/package.js +35 -0
  7. package/dist/commands/cicd/extension/publish.js +61 -0
  8. package/dist/commands/cicd/extension/uninstall.js +99 -0
  9. package/dist/commands/cicd/extension/validate.js +47 -0
  10. package/dist/commands/cicd/work/get.js +18 -2
  11. package/dist/commands/setup/skills/create.js +1 -1
  12. package/dist/commands/setup/skills/update.js +1 -1
  13. package/dist/commands/setup.js +1 -1
  14. package/dist/lib/extension/assets.js +4 -0
  15. package/dist/lib/extension/create.js +3 -0
  16. package/dist/lib/extension/git.js +17 -0
  17. package/dist/lib/extension/index.js +27 -0
  18. package/dist/lib/extension/install.js +4 -0
  19. package/dist/lib/extension/manifest.js +21 -0
  20. package/dist/lib/extension/package.js +3 -0
  21. package/dist/lib/extension/paths.js +5 -0
  22. package/dist/lib/extension/publish.js +3 -0
  23. package/dist/lib/extension/sf-deploy.js +8 -0
  24. package/dist/lib/extension/source.js +7 -0
  25. package/dist/lib/extension/uninstall.js +3 -0
  26. package/dist/lib/function-types.js +3 -1
  27. package/dist/lib/mcp/work-tools.js +19 -6
  28. package/dist/lib/project-setup.js +5 -4
  29. package/dist/lib/runtime.js +1 -1
  30. package/dist/lib/setup-skills.js +4 -1
  31. package/dist/lib/setup-templates.js +1 -4
  32. package/dist/lib/template-types.js +3 -1
  33. package/dist/lib/work-committed-metadata.js +4 -0
  34. package/dist/lib/work-get.js +2 -1
  35. package/oclif.manifest.json +414 -7
  36. package/package.json +1 -1
  37. package/templates/rules/cursor/agentia.mdc +29 -0
  38. package/templates/skills/agentia/SKILL.md +29 -0
  39. package/templates/skills/agentia-cicd/SKILL.md +3 -1
  40. package/templates/skills/agentia-cicd/references/extensions.md +49 -0
  41. package/templates/skills/agentia-cicd/references/work.md +6 -4
  42. package/templates/AGENTS.md +0 -24
@@ -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`
@@ -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. Salesforce metadata requires `--metadata-category SFDX`.
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` is a hidden compatibility alias. |
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, include `--metadata-category SFDX`. Without the SFDX category, Copado deploy logs can report "Salesforce changes not found."
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
 
@@ -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 -->