@memnexus-ai/mx-agent-cli 0.1.35 → 0.1.37
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/dist/index.js
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memnexus-ai/mx-agent-cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.37",
|
|
4
4
|
"description": "CLI for creating and managing AI agent teams",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
"dev": "tsc --watch",
|
|
12
12
|
"start": "node dist/index.js",
|
|
13
13
|
"prepublishOnly": "npm run build",
|
|
14
|
+
"postpublish": "npm access set status=public @memnexus-ai/mx-agent-cli",
|
|
14
15
|
"test": "vitest run",
|
|
15
16
|
"test:watch": "vitest"
|
|
16
17
|
},
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"init-validation.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/init-validation.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect } from 'vitest';
|
|
2
|
-
import { validateProjectConfig } from '../lib/project-config.js';
|
|
3
|
-
/**
|
|
4
|
-
* Tests for the init CLI option validation path (PLAT-032).
|
|
5
|
-
*
|
|
6
|
-
* The mx-agent init command builds a partial ProjectConfig from its CLI opts
|
|
7
|
-
* (--base-branch, --worktree-dir, --config-source) and passes them through
|
|
8
|
-
* validateProjectConfig() before writing mx-agent.config.json.
|
|
9
|
-
*
|
|
10
|
-
* These tests exercise validateProjectConfig() directly with the same values
|
|
11
|
-
* the CLI would pass, confirming that shell metacharacters and path traversal
|
|
12
|
-
* are rejected before any file is written.
|
|
13
|
-
*/
|
|
14
|
-
describe('init CLI option validation (PLAT-032)', () => {
|
|
15
|
-
it('rejects --base-branch value containing a shell metacharacter', () => {
|
|
16
|
-
const configFromOpts = { baseBranch: 'main; rm -rf /' };
|
|
17
|
-
expect(() => validateProjectConfig(configFromOpts)).toThrow(/disallowed characters/);
|
|
18
|
-
});
|
|
19
|
-
it('rejects --config-source value containing path traversal (..)', () => {
|
|
20
|
-
const configFromOpts = { configSource: '../../etc/passwd' };
|
|
21
|
-
expect(() => validateProjectConfig(configFromOpts)).toThrow(/path traversal/);
|
|
22
|
-
});
|
|
23
|
-
it('accepts valid CLI option values without throwing', () => {
|
|
24
|
-
const configFromOpts = {
|
|
25
|
-
baseBranch: 'feature/my-branch',
|
|
26
|
-
worktreeDir: '.worktrees',
|
|
27
|
-
configSource: 'mx-agent-system/agent-config',
|
|
28
|
-
};
|
|
29
|
-
expect(() => validateProjectConfig(configFromOpts)).not.toThrow();
|
|
30
|
-
});
|
|
31
|
-
});
|
|
32
|
-
//# sourceMappingURL=init-validation.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"init-validation.test.js","sourceRoot":"","sources":["../../src/__tests__/init-validation.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAEjE;;;;;;;;;;GAUG;AAEH,QAAQ,CAAC,uCAAuC,EAAE,GAAG,EAAE;IACrD,EAAE,CAAC,8DAA8D,EAAE,GAAG,EAAE;QACtE,MAAM,cAAc,GAAG,EAAE,UAAU,EAAE,gBAAgB,EAAE,CAAC;QACxD,MAAM,CAAC,GAAG,EAAE,CAAC,qBAAqB,CAAC,cAAc,CAAC,CAAC,CAAC,OAAO,CAAC,uBAAuB,CAAC,CAAC;IACvF,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,8DAA8D,EAAE,GAAG,EAAE;QACtE,MAAM,cAAc,GAAG,EAAE,YAAY,EAAE,kBAAkB,EAAE,CAAC;QAC5D,MAAM,CAAC,GAAG,EAAE,CAAC,qBAAqB,CAAC,cAAc,CAAC,CAAC,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAChF,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,kDAAkD,EAAE,GAAG,EAAE;QAC1D,MAAM,cAAc,GAAG;YACrB,UAAU,EAAE,mBAAmB;YAC/B,WAAW,EAAE,YAAY;YACzB,YAAY,EAAE,8BAA8B;SAC7C,CAAC;QACF,MAAM,CAAC,GAAG,EAAE,CAAC,qBAAqB,CAAC,cAAc,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC;IACpE,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|