@memnexus-ai/mx-agent-cli 0.1.212 → 0.1.214

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.
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Binary smoke test — exercises the BUILT CLI binary (dist/index.js) to catch
3
+ * defects that unit tests miss: unwired commander commands, broken imports in
4
+ * the bundle, missing shims, etc.
5
+ *
6
+ * Assumes `npm run build` has already run (CI builds before testing).
7
+ * Does NOT exercise commands that need network, worktree context, or credentials.
8
+ *
9
+ * Tracking: #4387 KI-NO-PREDEPLOY-SMOKE-GATE
10
+ */
11
+ export {};
12
+ //# sourceMappingURL=binary-smoke.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"binary-smoke.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/binary-smoke.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG"}
@@ -0,0 +1,88 @@
1
+ /**
2
+ * Binary smoke test — exercises the BUILT CLI binary (dist/index.js) to catch
3
+ * defects that unit tests miss: unwired commander commands, broken imports in
4
+ * the bundle, missing shims, etc.
5
+ *
6
+ * Assumes `npm run build` has already run (CI builds before testing).
7
+ * Does NOT exercise commands that need network, worktree context, or credentials.
8
+ *
9
+ * Tracking: #4387 KI-NO-PREDEPLOY-SMOKE-GATE
10
+ */
11
+ import { execFileSync } from 'node:child_process';
12
+ import { existsSync } from 'node:fs';
13
+ import path from 'node:path';
14
+ import { describe, it, expect } from 'vitest';
15
+ const CLI_ROOT = path.resolve(import.meta.dirname, '..', '..');
16
+ const BINARY = path.join(CLI_ROOT, 'dist', 'index.js');
17
+ const TIMEOUT = 5_000; // 5 s per invocation
18
+ /** Run the built binary with the given args; return stdout. Throws on non-zero exit. */
19
+ function run(...args) {
20
+ return execFileSync('node', [BINARY, ...args], {
21
+ timeout: TIMEOUT,
22
+ encoding: 'utf-8',
23
+ env: { ...process.env, NODE_NO_WARNINGS: '1' },
24
+ // Prevent commands from reading stdin (hangs)
25
+ stdio: ['ignore', 'pipe', 'pipe'],
26
+ }).trim();
27
+ }
28
+ describe('CLI binary smoke tests', () => {
29
+ it('dist/index.js exists (build prerequisite)', () => {
30
+ expect(existsSync(BINARY)).toBe(true);
31
+ });
32
+ it('--help exits 0 and lists expected top-level commands', () => {
33
+ const out = run('--help');
34
+ for (const cmd of ['start', 'sync', 'config', 'coordination', 'escalate', 'status']) {
35
+ expect(out).toContain(cmd);
36
+ }
37
+ });
38
+ it('--version exits 0 and outputs a semver-like string', () => {
39
+ const out = run('--version');
40
+ expect(out).toMatch(/^\d+\.\d+\.\d+/);
41
+ });
42
+ it('config list exits 0 (full commander → command → config-store path)', () => {
43
+ // config list reads ~/.mx-agent/config.json — no network or credentials needed
44
+ const out = run('config', 'list');
45
+ // It prints the config path at the bottom; exact content varies
46
+ expect(out).toBeDefined();
47
+ });
48
+ it('start --help exits 0 (start subcommand is wired)', () => {
49
+ const out = run('start', '--help');
50
+ expect(out).toContain('start');
51
+ });
52
+ it('every subcommand listed in --help responds to <subcommand> --help without error', () => {
53
+ const helpOutput = run('--help');
54
+ // Parse command names from the help output.
55
+ // Commander formats: " <command> [options] <description>"
56
+ const lines = helpOutput.split('\n');
57
+ const commandNames = [];
58
+ let inCommands = false;
59
+ for (const line of lines) {
60
+ if (/^\s*Commands:/i.test(line)) {
61
+ inCommands = true;
62
+ continue;
63
+ }
64
+ if (!inCommands)
65
+ continue;
66
+ // Each command line starts with whitespace then the command name
67
+ const m = line.match(/^\s{2,}(\S+)/);
68
+ if (m && m[1] !== 'help') {
69
+ commandNames.push(m[1]);
70
+ }
71
+ }
72
+ expect(commandNames.length).toBeGreaterThan(5); // sanity — we know there are 20+ commands
73
+ const failures = [];
74
+ for (const cmd of commandNames) {
75
+ try {
76
+ run(cmd, '--help');
77
+ }
78
+ catch (err) {
79
+ const msg = err instanceof Error ? err.message : String(err);
80
+ failures.push(`${cmd}: ${msg}`);
81
+ }
82
+ }
83
+ if (failures.length > 0) {
84
+ throw new Error(`${failures.length} subcommand(s) failed --help:\n${failures.join('\n')}`);
85
+ }
86
+ });
87
+ });
88
+ //# sourceMappingURL=binary-smoke.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"binary-smoke.test.js","sourceRoot":"","sources":["../../src/__tests__/binary-smoke.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAE9C,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AAC/D,MAAM,MAAM,GAAK,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC;AACzD,MAAM,OAAO,GAAI,KAAK,CAAC,CAAC,qBAAqB;AAE7C,wFAAwF;AACxF,SAAS,GAAG,CAAC,GAAG,IAAc;IAC5B,OAAO,YAAY,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,EAAE;QAC7C,OAAO,EAAE,OAAO;QAChB,QAAQ,EAAE,OAAO;QACjB,GAAG,EAAE,EAAE,GAAG,OAAO,CAAC,GAAG,EAAE,gBAAgB,EAAE,GAAG,EAAE;QAC9C,8CAA8C;QAC9C,KAAK,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC;KAClC,CAAC,CAAC,IAAI,EAAE,CAAC;AACZ,CAAC;AAED,QAAQ,CAAC,wBAAwB,EAAE,GAAG,EAAE;IACtC,EAAE,CAAC,2CAA2C,EAAE,GAAG,EAAE;QACnD,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,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CAAC"}
@@ -423,6 +423,26 @@ if [[ -z "$CHANGED_FILES" ]]; then
423
423
  exit 0 # No changed files detected — nothing to validate
424
424
  fi
425
425
 
426
+ # ── Dev-log required-sections check (advisory — warn, not block) ─────────────
427
+ # v2.60 (#4385): iteration dev-logs must contain Prior Art, Results, Gate
428
+ # reviews, and Known Issues sections. This check warns on push but does NOT
429
+ # block — advisory for the first iteration so teams can adapt.
430
+ DEVLOG_SCRIPT="$REPO_ROOT/dev-tools/scripts/validate-devlog-sections.sh"
431
+ if [[ -f "$DEVLOG_SCRIPT" ]]; then
432
+ DEVLOG_FILES=$(printf '%s\n' "$CHANGED_FILES" | grep -E '^product/dev-log/.*/v.*\.md$' || true)
433
+ if [[ -n "$DEVLOG_FILES" ]]; then
434
+ DEVLOG_PATHS=""
435
+ while IFS= read -r df; do
436
+ [[ -z "$df" ]] && continue
437
+ DEVLOG_PATHS="$DEVLOG_PATHS $REPO_ROOT/$df"
438
+ done <<< "$DEVLOG_FILES"
439
+ # shellcheck disable=SC2086
440
+ if ! bash "$DEVLOG_SCRIPT" $DEVLOG_PATHS 2>&1; then
441
+ echo "ci-validate: NOTE — dev-log section check found issues (advisory, not blocking push)." >&2
442
+ fi
443
+ fi
444
+ fi
445
+
426
446
  # ── Load the package→validate-script routing table ───────────────────────────
427
447
  # The map lives in ci-validate-routes.conf alongside this hook (portable projects
428
448
  # ship their own). Format: <path-prefix-glob>|<validate-script>|<label>, one rule
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memnexus-ai/mx-agent-cli",
3
- "version": "0.1.212",
3
+ "version": "0.1.214",
4
4
  "description": "CLI for creating and managing AI agent teams",
5
5
  "type": "module",
6
6
  "bin": {