@copado/agentia-cli 1.0.0-beta.0 → 1.0.0-beta.2

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 (43) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/README.md +505 -329
  3. package/dist/commands/auth/get.js +45 -136
  4. package/dist/commands/auth/set.js +3 -3
  5. package/dist/commands/cicd/cloud/commit.js +252 -0
  6. package/dist/commands/cicd/cloud/promote.js +139 -0
  7. package/dist/commands/cicd/health-check.js +77 -0
  8. package/dist/commands/cicd/work/commit.js +10 -324
  9. package/dist/commands/cicd/work/environment-sync.js +120 -0
  10. package/dist/commands/cicd/work/get.js +25 -4
  11. package/dist/commands/cicd/work/promote.js +93 -97
  12. package/dist/commands/cicd/work/set.js +4 -2
  13. package/dist/commands/cicd/work/submit.js +7 -0
  14. package/dist/lib/ai-config.js +2 -1
  15. package/dist/lib/auth-status-format.js +6 -0
  16. package/dist/lib/defaults-store.js +2 -1
  17. package/dist/lib/git-sizer.js +5 -0
  18. package/dist/lib/git-worktree.js +16 -1
  19. package/dist/lib/health-check.js +3 -0
  20. package/dist/lib/mcp/command-id.js +1 -0
  21. package/dist/lib/mcp/health-check-tools.js +16 -0
  22. package/dist/lib/mcp/server.js +2 -1
  23. package/dist/lib/mcp/tool-annotations.js +265 -0
  24. package/dist/lib/mcp/tools.js +3 -0
  25. package/dist/lib/mcp/work-tools.js +96 -78
  26. package/dist/lib/metadata-pathspecs.js +4 -0
  27. package/dist/lib/metadataRegistry.json +5427 -0
  28. package/dist/lib/promotion-types.js +4 -1
  29. package/dist/lib/runtime.js +1 -1
  30. package/dist/lib/work-environment-sync-errors.js +4 -0
  31. package/dist/lib/work-environment-sync-ready.js +18 -0
  32. package/dist/lib/work-environment-sync.js +42 -0
  33. package/dist/lib/work-promote-deploy.js +13 -0
  34. package/dist/lib/work-promote-errors.js +5 -0
  35. package/dist/lib/work-promote.js +12 -0
  36. package/dist/lib/work-set-selection.js +2 -1
  37. package/dist/lib/work-submit-ahead-behind.js +8 -0
  38. package/dist/lib/work-types.js +2 -1
  39. package/oclif.manifest.json +2725 -2282
  40. package/package.json +5 -2
  41. package/templates/skills/agentia-cicd/SKILL.md +2 -2
  42. package/templates/skills/agentia-cicd/references/promotions.md +8 -8
  43. package/templates/skills/agentia-cicd/references/work.md +16 -14
package/CHANGELOG.md CHANGED
@@ -4,6 +4,46 @@ All published sections are mapped to immutable npm publication metadata. New use
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [1.0.0-beta.2] - 2026-10-02
8
+
9
+ ### Added
10
+
11
+ - Add `--user-stories-ahead-behind` to `cicd work get`. When the user story has a pipeline and source environment with one next environment, it compares ahead/behind counts via `/agentia/headless/work/user-stories-ahead-behind` and includes them in human and `--json` output.
12
+ - Require `enableLocalPromote: true` in `.agentia/config.json` (or `.agentia/config.user.json`) before `cicd work promote` runs. The command is experimental because it skips Quality Gates; when the option is missing or not `true`, it fails with an error that tells you to set that option.
13
+ - Add `cicd work promote` to create a forward promotion, or a back promotion with `--backpromote --destination-branch`, for one or more user stories. A back promotion infers the destination environment from that pipeline connection branch. The command merges each `feature/<name>` branch in order into `promotion/<promotionName>` created from the destination environment branch, then sets the promotion status to Completed or Merge Conflict. After a merge conflict, resolve the files and re-run `cicd work promote --promotion=<name-or-id> --continue` to commit the merge and finish the remaining stories. The continue hint repeats `--validate` or `--deploy` and `--sf-alias` when the original command used them. `--validate` and `--deploy` require `--sf-alias` and deploy the promotion metadata with `sf project deploy start --test-level NoTestRun`. `--validate` uses `--dry-run`, skips the destination-branch merge, and sets the status to Validated. `--deploy` merges the promotion branch into the destination branch and sets the status to Completed only after that deployment succeeds. User story records are left unchanged.
14
+ - Add `cicd work environment-sync`. It creates a Copado `back_promotion` for every user story behind the destination environment. Continue after conflicts with `cicd work environment-sync --promotion=<name> --continue`.
15
+ - Add `--abort` to `cicd work promote` and `cicd work environment-sync`. With `--promotion`, it runs `git merge --abort` and patches the promotion status to Draft (`Cancelled` is reserved by Salesforce). Conflict error suggestions include the matching `--abort` command.
16
+ - Add organization-scoped governance health checks with optional local git-sizer analysis.
17
+
18
+ ### Changed
19
+
20
+ - Declare standard MCP tool annotations (`readOnlyHint`, `destructiveHint`, `idempotentHint`, `openWorldHint`) on every Agentia MCP tool so MCP clients can auto-approve safe reads and prompt before destructive tools. The hints are advisory and do not add a server-side confirmation. Tool names, inputs, and outputs are unchanged.
21
+ - Rename `cicd work commit` to `cicd cloud commit` so Copado cloud commits are distinct from local work-item commands. `--cloud` is no longer required. `cicd work commit` remains a hidden compatibility alias and still accepts `--cloud`. MCP tools follow the same split (`agentia_cloud_commit`), with `agentia_work_commit` kept as an alias.
22
+ - Move Copado cloud promotion runs to `cicd cloud promote` / MCP `agentia_cloud_promote`. `cicd work promote` is the experimental local promotion command (previously drafted as `quick-promote`), not a cloud alias. The former MCP `agentia_work_promote` cloud alias is removed; use `agentia_cloud_promote`.
23
+ - `cicd work environment-sync` always syncs every user story behind the destination environment. It no longer accepts user story IDs or `--next-env-branch`. The next environment branch is resolved from `--destination-environment` or `--dev-org-branch`.
24
+ - `cicd work submit` (including `--done` / `--deploy` and MCP `agentia_work_submit`) counts user stories ahead and behind the next pipeline environment and warns when stories behind might cause promotion conflicts.
25
+
26
+ ### Fixed
27
+
28
+ - Allow `cicd function upsert --file <payload.json> --json` without treating `--json` as a payload flag conflict (`US-0632393` — CLI v1.1.0-alpha.0).
29
+ - Show the Salesforce component, file, and problem when `cicd work promote --validate` or `--deploy` fails, instead of only the deploy status.
30
+ - Tolerate SSE keepalive comment lines (for example `: heartbeat`) and `data:` prefixes in the Copado AI NDJSON stream instead of failing with `malformed NDJSON`, and keep the received answer with a warning when the stream closes without a `stream_complete` record.
31
+ - On a `cicd work set` / `agentia_work_set` gateway warning, clear `lastBaseBranch`, `lastDevOrgBranch`, and `lastPullRequestBaseUrl`, and record `lastWorkItemId`, `lastWorkItem`, and `lastWorkItemTitle` from the returned work item instead of leaving user config unchanged.
32
+ - Cast the `tty-table` v7 default export so TypeScript accepts the callable factory used by table formatting after the security bump.
33
+
34
+ ### Security
35
+
36
+ - Bump `brace-expansion` and bundled `npm` overrides, and apply `npm audit fix --force` (including `tty-table` to v7) so `security:gate` clears the current high advisories.
37
+
38
+ ## [1.0.0-beta.1] - 2026-09-29
39
+
40
+ ### Changed
41
+
42
+ - Standardize human-readable `auth get` authentication details with the scoped multiline presentation used by `agentia setup`.
43
+ - Show global and project-scoped authentication separately when both are configured, with colored authentication section titles.
44
+ - Auto-discover the Copado AI domain from an AI PAK and organization ID in `auth set` and interactive setup when no domain is supplied.
45
+ - Require a CRT organization ID when storing a CRT PAK, validating or discovering its domain before persistence.
46
+
7
47
  ## [1.0.0-beta.0] - 2026-09-23
8
48
 
9
49
  ### Added