@copado/agentia-cli 0.70.0-alpha.0 → 0.72.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.
Files changed (65) hide show
  1. package/LICENSE.md +9 -9
  2. package/README.md +172 -170
  3. package/dist/commands/cicd/work/done.js +36 -22
  4. package/dist/commands/cicd/work/done.js.map +1 -1
  5. package/dist/commands/cicd/work/get.js +19 -10
  6. package/dist/commands/cicd/work/get.js.map +1 -1
  7. package/dist/commands/cicd/work/push.js +26 -21
  8. package/dist/commands/cicd/work/push.js.map +1 -1
  9. package/dist/commands/cicd/work/set.js +11 -20
  10. package/dist/commands/cicd/work/set.js.map +1 -1
  11. package/dist/commands/cicd/work/submit.js +40 -23
  12. package/dist/commands/cicd/work/submit.js.map +1 -1
  13. package/dist/commands/cicd/work/test.js +4 -0
  14. package/dist/commands/cicd/work/test.js.map +1 -1
  15. package/dist/hooks/init/migrate-user-config.d.ts +3 -0
  16. package/dist/hooks/init/migrate-user-config.js +17 -0
  17. package/dist/hooks/init/migrate-user-config.js.map +1 -0
  18. package/dist/lib/agentia-command.d.ts +3 -0
  19. package/dist/lib/agentia-command.js +11 -0
  20. package/dist/lib/agentia-command.js.map +1 -1
  21. package/dist/lib/cicd-gateway.d.ts +3 -1
  22. package/dist/lib/cicd-gateway.js +34 -3
  23. package/dist/lib/cicd-gateway.js.map +1 -1
  24. package/dist/lib/defaults-store.d.ts +15 -0
  25. package/dist/lib/defaults-store.js +128 -21
  26. package/dist/lib/defaults-store.js.map +1 -1
  27. package/dist/lib/format.js +73 -26
  28. package/dist/lib/format.js.map +1 -1
  29. package/dist/lib/git-worktree.d.ts +18 -0
  30. package/dist/lib/git-worktree.js +44 -0
  31. package/dist/lib/git-worktree.js.map +1 -1
  32. package/dist/lib/mcp/server.js +4 -0
  33. package/dist/lib/mcp/server.js.map +1 -1
  34. package/dist/lib/mcp/work-tools.js +25 -57
  35. package/dist/lib/mcp/work-tools.js.map +1 -1
  36. package/dist/lib/project-setup.js +59 -7
  37. package/dist/lib/project-setup.js.map +1 -1
  38. package/dist/lib/setup-templates.d.ts +3 -1
  39. package/dist/lib/setup-templates.js +3 -1
  40. package/dist/lib/setup-templates.js.map +1 -1
  41. package/dist/lib/var-replacement.d.ts +47 -0
  42. package/dist/lib/var-replacement.js +150 -0
  43. package/dist/lib/var-replacement.js.map +1 -0
  44. package/dist/lib/work-get-selection.d.ts +6 -0
  45. package/dist/lib/work-get-selection.js +44 -0
  46. package/dist/lib/work-get-selection.js.map +1 -0
  47. package/dist/lib/work-local-run-tests.d.ts +3 -0
  48. package/dist/lib/work-local-run-tests.js +5 -0
  49. package/dist/lib/work-local-run-tests.js.map +1 -1
  50. package/dist/lib/work-push.d.ts +21 -1
  51. package/dist/lib/work-push.js +203 -40
  52. package/dist/lib/work-push.js.map +1 -1
  53. package/dist/lib/work-set-selection.d.ts +11 -0
  54. package/dist/lib/work-set-selection.js +27 -0
  55. package/dist/lib/work-set-selection.js.map +1 -0
  56. package/dist/lib/work-types.d.ts +26 -0
  57. package/dist/lib/work-types.js +16 -0
  58. package/dist/lib/work-types.js.map +1 -1
  59. package/dist/lib/yaml-replacement.d.ts +41 -0
  60. package/dist/lib/yaml-replacement.js +129 -0
  61. package/dist/lib/yaml-replacement.js.map +1 -0
  62. package/oclif.manifest.json +33 -33
  63. package/package.json +18 -4
  64. package/vendor/java/var-replace-command.jar +0 -0
  65. package/vendor/java/yaml-replace-command.jar +0 -0
@@ -0,0 +1,129 @@
1
+ import { spawn } from 'node:child_process';
2
+ import { access, mkdtemp, rm, writeFile } from 'node:fs/promises';
3
+ import { tmpdir } from 'node:os';
4
+ import { dirname, join, resolve } from 'node:path';
5
+ import { fileURLToPath } from 'node:url';
6
+ import { CicdGateway } from './cicd-gateway.js';
7
+ import { logVerboseDebug } from './debug.js';
8
+ import { workPushReplacementRulesEndpoint, } from './work-types.js';
9
+ const packageRoot = resolve(dirname(fileURLToPath(import.meta.url)), '../..');
10
+ export const YAML_REPLACE_COMMAND_JAR_NAME = 'yaml-replace-command.jar';
11
+ function defaultRunProcess(command, args, options) {
12
+ return new Promise((resolvePromise, reject) => {
13
+ const child = spawn(command, args, {
14
+ cwd: options.cwd,
15
+ env: process.env,
16
+ });
17
+ let stdout = '';
18
+ let stderr = '';
19
+ child.stdout.on('data', (chunk) => {
20
+ stdout += String(chunk);
21
+ });
22
+ child.stderr.on('data', (chunk) => {
23
+ stderr += String(chunk);
24
+ });
25
+ child.on('error', (error) => {
26
+ reject(error);
27
+ });
28
+ child.on('close', (code) => {
29
+ resolvePromise({ exitCode: code, stderr, stdout });
30
+ });
31
+ });
32
+ }
33
+ export function resolveYamlReplaceCommandJar() {
34
+ const override = process.env.AGENTIA_YAML_REPLACE_COMMAND_JAR?.trim();
35
+ if (override !== undefined && override.length > 0) {
36
+ return override;
37
+ }
38
+ return join(packageRoot, 'vendor/java', YAML_REPLACE_COMMAND_JAR_NAME);
39
+ }
40
+ export function resolveYamlReplacementJavaCommand() {
41
+ const override = process.env.AGENTIA_JAVA?.trim();
42
+ return override !== undefined && override.length > 0 ? override : 'java';
43
+ }
44
+ /** JSON path list consumed by yaml-replace-command `-c` / `--include`. */
45
+ export function buildFilesInScopeJson(changedFiles) {
46
+ return `${JSON.stringify(changedFiles, null, 0)}\n`;
47
+ }
48
+ export function formatYamlReplacementCommand(command, args) {
49
+ return [command, ...args].join(' ');
50
+ }
51
+ function logYamlReplacementVerboseInput(options) {
52
+ logVerboseDebug('Yaml replacement command', formatYamlReplacementCommand(options.command, options.args));
53
+ logVerboseDebug('Yaml replacement rules', options.replacementRulesYml);
54
+ logVerboseDebug('Yaml replacement files in scope', options.changedFiles.length > 0 ? options.changedFiles.join('\n') : '(empty)');
55
+ }
56
+ /** Emit yaml-replace-command process streams for normal CLI output. */
57
+ export function emitYamlReplacementProcessOutput(result) {
58
+ for (const stream of [result.stdout, result.stderr]) {
59
+ const trimmed = stream.trimEnd();
60
+ if (trimmed.length > 0) {
61
+ process.stderr.write(`${trimmed}\n`);
62
+ }
63
+ }
64
+ }
65
+ export async function fetchWorkPushReplacementRules(workItemId) {
66
+ return CicdGateway.call({
67
+ endpoint: workPushReplacementRulesEndpoint(workItemId),
68
+ method: 'GET',
69
+ });
70
+ }
71
+ export async function runYamlReplacement(options) {
72
+ const jarPath = resolveYamlReplaceCommandJar();
73
+ try {
74
+ await access(jarPath);
75
+ }
76
+ catch {
77
+ throw new Error(`Yaml replacement JAR not found at ${jarPath}. Run \`npm run build-java-dependencies\` or set AGENTIA_YAML_REPLACE_COMMAND_JAR.`);
78
+ }
79
+ const tempDir = await mkdtemp(join(tmpdir(), 'agentia-yaml-replace-'));
80
+ const yamlPath = join(tempDir, 'copado.yml');
81
+ const includePath = join(tempDir, 'files-in-scope.json');
82
+ try {
83
+ await writeFile(yamlPath, options.replacementRulesYml, 'utf8');
84
+ await writeFile(includePath, buildFilesInScopeJson(options.changedFiles), 'utf8');
85
+ const javaCommand = resolveYamlReplacementJavaCommand();
86
+ const args = [
87
+ '-jar',
88
+ jarPath,
89
+ yamlPath,
90
+ options.targetFolder,
91
+ '-b',
92
+ options.branchName,
93
+ '-c',
94
+ includePath,
95
+ ];
96
+ logYamlReplacementVerboseInput({
97
+ args,
98
+ changedFiles: options.changedFiles,
99
+ command: javaCommand,
100
+ replacementRulesYml: options.replacementRulesYml,
101
+ });
102
+ const runProcess = options.runProcess ?? yamlReplacementProcessForTests() ?? defaultRunProcess;
103
+ const result = await runProcess(javaCommand, args, { cwd: options.cwd });
104
+ emitYamlReplacementProcessOutput(result);
105
+ return {
106
+ args,
107
+ command: javaCommand,
108
+ exitCode: result.exitCode,
109
+ stderr: result.stderr,
110
+ stdout: result.stdout,
111
+ };
112
+ }
113
+ finally {
114
+ await rm(tempDir, { force: true, recursive: true });
115
+ }
116
+ }
117
+ let runProcessForTests;
118
+ /** Test-only hook */
119
+ export function setYamlReplacementProcessForTests(runner) {
120
+ runProcessForTests = runner;
121
+ }
122
+ /** Test-only hook */
123
+ export function resetYamlReplacementProcessForTests() {
124
+ runProcessForTests = undefined;
125
+ }
126
+ export function yamlReplacementProcessForTests() {
127
+ return runProcessForTests;
128
+ }
129
+ //# sourceMappingURL=yaml-replacement.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"yaml-replacement.js","sourceRoot":"","sources":["../../src/lib/yaml-replacement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAC,MAAM,oBAAoB,CAAA;AACxC,OAAO,EAAC,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE,SAAS,EAAC,MAAM,kBAAkB,CAAA;AAC/D,OAAO,EAAC,MAAM,EAAC,MAAM,SAAS,CAAA;AAC9B,OAAO,EAAC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAC,MAAM,WAAW,CAAA;AAChD,OAAO,EAAC,aAAa,EAAC,MAAM,UAAU,CAAA;AAEtC,OAAO,EAAC,WAAW,EAAC,MAAM,mBAAmB,CAAA;AAC7C,OAAO,EAAC,eAAe,EAAC,MAAM,YAAY,CAAA;AAC1C,OAAO,EAEL,gCAAgC,GACjC,MAAM,iBAAiB,CAAA;AAExB,MAAM,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,CAAA;AAE7E,MAAM,CAAC,MAAM,6BAA6B,GAAG,0BAA0B,CAAA;AAyBvE,SAAS,iBAAiB,CACxB,OAAe,EACf,IAAc,EACd,OAAsB;IAEtB,OAAO,IAAI,OAAO,CAAC,CAAC,cAAc,EAAE,MAAM,EAAE,EAAE;QAC5C,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,EAAE,IAAI,EAAE;YACjC,GAAG,EAAE,OAAO,CAAC,GAAG;YAChB,GAAG,EAAE,OAAO,CAAC,GAAG;SACjB,CAAC,CAAA;QAEF,IAAI,MAAM,GAAG,EAAE,CAAA;QACf,IAAI,MAAM,GAAG,EAAE,CAAA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C,MAAM,CAAC,CAAA;QAExC,OAAO;YACL,IAAI;YACJ,OAAO,EAAE,WAAW;YACpB,QAAQ,EAAE,MAAM,CAAC,QAAQ;YACzB,MAAM,EAAE,MAAM,CAAC,MAAM;YACrB,MAAM,EAAE,MAAM,CAAC,MAAM;SACtB,CAAA;IACH,CAAC;YAAS,CAAC;QACT,MAAM,EAAE,CAAC,OAAO,EAAE,EAAC,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAC,CAAC,CAAA;IACnD,CAAC;AACH,CAAC;AAED,IAAI,kBAA4D,CAAA;AAEhE,qBAAqB;AACrB,MAAM,UAAU,iCAAiC,CAAC,MAAoC;IACpF,kBAAkB,GAAG,MAAM,CAAA;AAC7B,CAAC;AAED,qBAAqB;AACrB,MAAM,UAAU,mCAAmC;IACjD,kBAAkB,GAAG,SAAS,CAAA;AAChC,CAAC;AAED,MAAM,UAAU,8BAA8B;IAC5C,OAAO,kBAAkB,CAAA;AAC3B,CAAC"}
@@ -92,6 +92,31 @@
92
92
  "update.js"
93
93
  ]
94
94
  },
95
+ "mcp:start": {
96
+ "aliases": [],
97
+ "args": {},
98
+ "description": "Start the local Agentia MCP server over stdio",
99
+ "examples": [
100
+ "<%= config.bin %> <%= command.id %>",
101
+ "<%= config.bin %> <%= command.id %> # long-running stdio MCP server for Cursor and other clients"
102
+ ],
103
+ "flags": {},
104
+ "hasDynamicHelp": false,
105
+ "hiddenAliases": [],
106
+ "id": "mcp:start",
107
+ "pluginAlias": "@copado/agentia-cli",
108
+ "pluginName": "@copado/agentia-cli",
109
+ "pluginType": "core",
110
+ "strict": true,
111
+ "enableJsonFlag": false,
112
+ "isESM": true,
113
+ "relativePath": [
114
+ "dist",
115
+ "commands",
116
+ "mcp",
117
+ "start.js"
118
+ ]
119
+ },
95
120
  "auth:get": {
96
121
  "aliases": [],
97
122
  "args": {},
@@ -336,31 +361,6 @@
336
361
  "unset.js"
337
362
  ]
338
363
  },
339
- "mcp:start": {
340
- "aliases": [],
341
- "args": {},
342
- "description": "Start the local Agentia MCP server over stdio",
343
- "examples": [
344
- "<%= config.bin %> <%= command.id %>",
345
- "<%= config.bin %> <%= command.id %> # long-running stdio MCP server for Cursor and other clients"
346
- ],
347
- "flags": {},
348
- "hasDynamicHelp": false,
349
- "hiddenAliases": [],
350
- "id": "mcp:start",
351
- "pluginAlias": "@copado/agentia-cli",
352
- "pluginName": "@copado/agentia-cli",
353
- "pluginType": "core",
354
- "strict": true,
355
- "enableJsonFlag": false,
356
- "isESM": true,
357
- "relativePath": [
358
- "dist",
359
- "commands",
360
- "mcp",
361
- "start.js"
362
- ]
363
- },
364
364
  "testing:create": {
365
365
  "aliases": [],
366
366
  "args": {},
@@ -4791,7 +4791,7 @@
4791
4791
  "cicd:work:done": {
4792
4792
  "aliases": [],
4793
4793
  "args": {},
4794
- "description": "Mark the current feature/US-XXXX work item done and promote it to the next environment. Pushes and registers commits when the branch is ahead of origin, then calls headless work/done (Promote Action with validate=false).",
4794
+ "description": "Mark the current feature/<lastWorkItem> work item done and promote it to the next environment. Pushes and registers commits when the branch is ahead of origin, then calls headless work/done (Promote Action with validate=false).",
4795
4795
  "examples": [
4796
4796
  "<%= config.bin %> <%= command.id %>",
4797
4797
  "<%= config.bin %> <%= command.id %> --json"
@@ -4826,16 +4826,16 @@
4826
4826
  "aliases": [],
4827
4827
  "args": {
4828
4828
  "id": {
4829
- "description": "User story ID (defaults to the active work item from `work set`)",
4829
+ "description": "User story ID or name (defaults to the active work item from `work set`)",
4830
4830
  "name": "id",
4831
4831
  "required": false
4832
4832
  }
4833
4833
  },
4834
- "description": "Get a Copado user story by ID",
4834
+ "description": "Get a Copado user story by ID or name via headless work/get. When the response includes `devOrgBranch` for the active work item, persists it as `lastDevOrgBranch`.",
4835
4835
  "examples": [
4836
4836
  "<%= config.bin %> <%= command.id %>",
4837
4837
  "<%= config.bin %> <%= command.id %> a0SKC000000CmZ2AU",
4838
- "<%= config.bin %> <%= command.id %> a0SKC000000CmZ2AU --json"
4838
+ "<%= config.bin %> <%= command.id %> US-0001 --json"
4839
4839
  ],
4840
4840
  "flags": {
4841
4841
  "json": {
@@ -5134,7 +5134,7 @@
5134
5134
  "cicd:work:push": {
5135
5135
  "aliases": [],
5136
5136
  "args": {},
5137
- "description": "Push the current feature/US-XXXX branch and register commits with Copado. Requires a clean working tree and a base branch from `agentia cicd work set`. Locks the tip commit, runs `git push origin <branch>`, then calls headless work/push.",
5137
+ "description": "Push the current feature/<lastWorkItem> branch and register commits with Copado. Requires a clean working tree, base branch, and dev org branch from `.agentia/config.user.json`. Applies Copado environment-variable then yaml replacements when needed, commits both as a single follow-up commit, locks the tip commit, runs `git push origin <branch>`, calls headless work/push, then merges the feature branch into the recorded dev org branch.",
5138
5138
  "examples": [
5139
5139
  "<%= config.bin %> <%= command.id %>",
5140
5140
  "<%= config.bin %> <%= command.id %> --json"
@@ -5257,7 +5257,7 @@
5257
5257
  "cicd:work:submit": {
5258
5258
  "aliases": [],
5259
5259
  "args": {},
5260
- "description": "Submit the current feature/US-XXXX work item for pipeline quality gates and validation. Runs project-root .agentia_quality_gates.sh (macOS/Linux) or .agentia_quality_gates.cmd (Windows) when present, pushes and registers commits when the branch is ahead of origin, then calls headless work/submit (Promote Action with validate=true).",
5260
+ "description": "Submit the current feature/<lastWorkItem> work item for pipeline quality gates and validation. Runs project-root .agentia_quality_gates.sh (macOS/Linux) or .agentia_quality_gates.cmd (Windows) when present, pushes and registers commits when the branch is ahead of origin, then calls headless work/submit (Promote Action with validate=true).",
5261
5261
  "examples": [
5262
5262
  "<%= config.bin %> <%= command.id %>",
5263
5263
  "<%= config.bin %> <%= command.id %> --apex-test-classes=MyTest,OtherTest",
@@ -5287,7 +5287,7 @@
5287
5287
  "type": "boolean"
5288
5288
  },
5289
5289
  "skip-pull-request": {
5290
- "description": "Do not open the pull request compare URL after submit (also configurable via skipPullRequest in .agentia/config.json)",
5290
+ "description": "Do not open the pull request compare URL after submit (also configurable via skipPullRequest in .agentia/config.json or .agentia/config.user.json)",
5291
5291
  "name": "skip-pull-request",
5292
5292
  "allowNo": false,
5293
5293
  "type": "boolean"
@@ -12098,5 +12098,5 @@
12098
12098
  ]
12099
12099
  }
12100
12100
  },
12101
- "version": "0.70.0-alpha.0"
12101
+ "version": "0.72.0-alpha.0"
12102
12102
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@copado/agentia-cli",
3
3
  "description": "Command-line interface for Agentia",
4
- "version": "0.70.0-alpha.0",
4
+ "version": "0.72.0-alpha.0",
5
5
  "author": "Copado Solutions",
6
6
  "bin": {
7
7
  "agentia": "./bin/run.js"
@@ -43,7 +43,8 @@
43
43
  "files": [
44
44
  "./bin",
45
45
  "./dist",
46
- "./oclif.manifest.json"
46
+ "./oclif.manifest.json",
47
+ "./vendor/java"
47
48
  ],
48
49
  "homepage": "https://github.com/Copado/agentia-cli",
49
50
  "keywords": [
@@ -61,7 +62,8 @@
61
62
  "./dist/hooks/finally/ide-command-event"
62
63
  ],
63
64
  "init": [
64
- "./dist/hooks/init/version-warning"
65
+ "./dist/hooks/init/version-warning",
66
+ "./dist/hooks/init/migrate-user-config"
65
67
  ]
66
68
  },
67
69
  "plugins": [
@@ -188,7 +190,8 @@
188
190
  },
189
191
  "repository": "Copado/agentia-cli",
190
192
  "scripts": {
191
- "build": "shx rm -rf dist && tsc -b",
193
+ "build": "node scripts/build.mjs",
194
+ "build-java-dependencies": "node scripts/build-java-dependencies.mjs",
192
195
  "dev": "node --loader ts-node/esm --disable-warning=ExperimentalWarning --disable-warning=DeprecationWarning bin/dev.js",
193
196
  "dev:debug": "tsc -b && node --inspect-brk=9229 --enable-source-maps --disable-warning=ExperimentalWarning --disable-warning=DeprecationWarning bin/run.js",
194
197
  "docs:readme": "npm run package:prepare && shx rm -f oclif.manifest.json",
@@ -204,6 +207,17 @@
204
207
  "smoke:local-gateway": "node scripts/smoke-local-gateway.mjs",
205
208
  "test": "mocha --forbid-only \"test/**/*.test.ts\"",
206
209
  "test:integration": "mocha --forbid-only \"test/integration/**/*.integration.ts\"",
210
+ "test:integration:ai": "mocha --forbid-only \"test/integration/ai.integration.ts\"",
211
+ "test:integration:core": "mocha --forbid-only \"test/integration/core.integration.ts\"",
212
+ "test:integration:data": "mocha --forbid-only \"test/integration/data.integration.ts\"",
213
+ "test:integration:function": "mocha --forbid-only \"test/integration/function.integration.ts\"",
214
+ "test:integration:job": "mocha --forbid-only \"test/integration/job.integration.ts\"",
215
+ "test:integration:metadata": "mocha --forbid-only \"test/integration/metadata.integration.ts\"",
216
+ "test:integration:mutation": "mocha --forbid-only \"test/integration/ai.integration.ts\" \"test/integration/function.integration.ts\" \"test/integration/promotion.integration.ts\" \"test/integration/testing-regression.integration.ts\"",
217
+ "test:integration:pipeline": "mocha --forbid-only \"test/integration/pipeline.integration.ts\"",
218
+ "test:integration:promotion": "mocha --forbid-only \"test/integration/promotion.integration.ts\"",
219
+ "test:integration:read": "mocha --forbid-only \"test/integration/core.integration.ts\" \"test/integration/data.integration.ts\" \"test/integration/job.integration.ts\" \"test/integration/metadata.integration.ts\" \"test/integration/pipeline.integration.ts\" \"test/integration/promotion.integration.ts\" \"test/integration/testing.integration.ts\"",
220
+ "test:integration:testing": "mocha --forbid-only \"test/integration/testing.integration.ts\" \"test/integration/testing-regression.integration.ts\"",
207
221
  "version": "oclif readme && node scripts/align-alpha-readme.mjs && git add README.md"
208
222
  },
209
223
  "types": "dist/index.d.ts"