@memnexus-ai/mx-agent-cli 0.1.19 → 0.1.21
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/__tests__/project-config.test.d.ts +2 -0
- package/dist/__tests__/project-config.test.d.ts.map +1 -0
- package/dist/__tests__/project-config.test.js +133 -0
- package/dist/__tests__/project-config.test.js.map +1 -0
- package/dist/commands/create.d.ts.map +1 -1
- package/dist/commands/create.js +10 -8
- package/dist/commands/create.js.map +1 -1
- package/dist/commands/init.d.ts +26 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +120 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/list.d.ts.map +1 -1
- package/dist/commands/list.js +4 -2
- package/dist/commands/list.js.map +1 -1
- package/dist/commands/start.d.ts.map +1 -1
- package/dist/commands/start.js +18 -16
- package/dist/commands/start.js.map +1 -1
- package/dist/index.js +15 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/catalog.d.ts +5 -5
- package/dist/lib/catalog.d.ts.map +1 -1
- package/dist/lib/catalog.js +11 -11
- package/dist/lib/catalog.js.map +1 -1
- package/dist/lib/claude.d.ts +16 -8
- package/dist/lib/claude.d.ts.map +1 -1
- package/dist/lib/claude.js +43 -27
- package/dist/lib/claude.js.map +1 -1
- package/dist/lib/project-config.d.ts +38 -0
- package/dist/lib/project-config.d.ts.map +1 -0
- package/dist/lib/project-config.js +90 -0
- package/dist/lib/project-config.js.map +1 -0
- package/dist/lib/templates.d.ts +24 -0
- package/dist/lib/templates.d.ts.map +1 -0
- package/dist/lib/templates.js +88 -0
- package/dist/lib/templates.js.map +1 -0
- package/dist/lib/worktree.d.ts +5 -5
- package/dist/lib/worktree.d.ts.map +1 -1
- package/dist/lib/worktree.js +36 -30
- package/dist/lib/worktree.js.map +1 -1
- package/package.json +6 -3
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Embedded template strings used by `mx-agent init`.
|
|
3
|
+
*
|
|
4
|
+
* These are inline string constants — no file bundling, no network calls.
|
|
5
|
+
* They provide minimal-but-valid stubs that a user can customise after init.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Minimal settings.json for Claude Code agent permissions.
|
|
9
|
+
* Grants bash access and restricts to the worktree directory.
|
|
10
|
+
*/
|
|
11
|
+
export const SETTINGS_JSON_TEMPLATE = JSON.stringify({
|
|
12
|
+
permissions: {
|
|
13
|
+
allow: [
|
|
14
|
+
'Bash(*)',
|
|
15
|
+
'Read(*)',
|
|
16
|
+
'Write(*)',
|
|
17
|
+
'Edit(*)',
|
|
18
|
+
'Glob(*)',
|
|
19
|
+
'Grep(*)',
|
|
20
|
+
],
|
|
21
|
+
deny: [
|
|
22
|
+
'Bash(git checkout main)',
|
|
23
|
+
'Bash(git checkout master)',
|
|
24
|
+
'Bash(git push origin main)',
|
|
25
|
+
'Bash(git push origin master)',
|
|
26
|
+
'Bash(git switch main)',
|
|
27
|
+
'Bash(git switch master)',
|
|
28
|
+
],
|
|
29
|
+
},
|
|
30
|
+
}, null, 2);
|
|
31
|
+
/**
|
|
32
|
+
* Stub worktree-guard.sh hook.
|
|
33
|
+
* Blocks branch switching to main and force-pushes.
|
|
34
|
+
*/
|
|
35
|
+
export const WORKTREE_GUARD_SH_TEMPLATE = `#!/usr/bin/env bash
|
|
36
|
+
# worktree-guard.sh — Claude Code PreToolUse hook
|
|
37
|
+
# Blocks dangerous git operations in worktrees.
|
|
38
|
+
# Customise this file for your project's safety requirements.
|
|
39
|
+
|
|
40
|
+
set -euo pipefail
|
|
41
|
+
|
|
42
|
+
TOOL_NAME="\${CLAUDE_TOOL_NAME:-}"
|
|
43
|
+
TOOL_INPUT="\${CLAUDE_TOOL_INPUT:-}"
|
|
44
|
+
|
|
45
|
+
if [[ "\$TOOL_NAME" != "Bash" ]]; then
|
|
46
|
+
exit 0
|
|
47
|
+
fi
|
|
48
|
+
|
|
49
|
+
# Block checkout/switch to base branch
|
|
50
|
+
if echo "\$TOOL_INPUT" | grep -qE 'git (checkout|switch) (main|master|develop)'; then
|
|
51
|
+
echo "Blocked: cannot switch to base branch from a worktree." >&2
|
|
52
|
+
exit 1
|
|
53
|
+
fi
|
|
54
|
+
|
|
55
|
+
# Block force push to base branch
|
|
56
|
+
if echo "\$TOOL_INPUT" | grep -qE 'git push .*(--force|-f).*(main|master|develop)'; then
|
|
57
|
+
echo "Blocked: force push to base branch is not allowed." >&2
|
|
58
|
+
exit 1
|
|
59
|
+
fi
|
|
60
|
+
|
|
61
|
+
exit 0
|
|
62
|
+
`;
|
|
63
|
+
/**
|
|
64
|
+
* Stub CLAUDE.md.template — the template that gets deployed into each worktree
|
|
65
|
+
* as CLAUDE.md when running mx-agent create / mx-agent start.
|
|
66
|
+
*
|
|
67
|
+
* Users should replace this with project-specific instructions.
|
|
68
|
+
*/
|
|
69
|
+
export const CLAUDE_MD_TEMPLATE = `# Agent Instructions
|
|
70
|
+
|
|
71
|
+
This file is deployed automatically into each agent worktree by \`mx-agent\`.
|
|
72
|
+
Replace the contents below with your project-specific agent instructions.
|
|
73
|
+
|
|
74
|
+
## Project Overview
|
|
75
|
+
|
|
76
|
+
<!-- Describe your project here -->
|
|
77
|
+
|
|
78
|
+
## Workflow
|
|
79
|
+
|
|
80
|
+
<!-- Describe the expected workflow for agents -->
|
|
81
|
+
|
|
82
|
+
## Rules
|
|
83
|
+
|
|
84
|
+
1. Stay within your worktree directory.
|
|
85
|
+
2. Do not push to the base branch directly — create a PR.
|
|
86
|
+
3. Follow the project's coding conventions.
|
|
87
|
+
`;
|
|
88
|
+
//# sourceMappingURL=templates.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"templates.js","sourceRoot":"","sources":["../../src/lib/templates.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,CAAC,SAAS,CAClD;IACE,WAAW,EAAE;QACX,KAAK,EAAE;YACL,SAAS;YACT,SAAS;YACT,UAAU;YACV,SAAS;YACT,SAAS;YACT,SAAS;SACV;QACD,IAAI,EAAE;YACJ,yBAAyB;YACzB,2BAA2B;YAC3B,4BAA4B;YAC5B,8BAA8B;YAC9B,uBAAuB;YACvB,yBAAyB;SAC1B;KACF;CACF,EACD,IAAI,EACJ,CAAC,CACF,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2BzC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;;;;;;;;;;;;;;;;;;CAkBjC,CAAC"}
|
package/dist/lib/worktree.d.ts
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
*/
|
|
5
5
|
export declare function findProjectRoot(): string;
|
|
6
6
|
type SlotMap = Record<string, number>;
|
|
7
|
-
export declare function loadSlots(projectRoot: string): SlotMap;
|
|
8
|
-
export declare function assignSlot(projectRoot: string, worktreeName: string, maxWorktrees?: number): number;
|
|
9
|
-
export declare function getSlot(projectRoot: string, worktreeName: string): number | null;
|
|
7
|
+
export declare function loadSlots(projectRoot: string, worktreeDir?: string): SlotMap;
|
|
8
|
+
export declare function assignSlot(projectRoot: string, worktreeName: string, worktreeDir?: string, maxWorktrees?: number): number;
|
|
9
|
+
export declare function getSlot(projectRoot: string, worktreeName: string, worktreeDir?: string): number | null;
|
|
10
10
|
export declare function getCurrentBranch(cwd: string): string | null;
|
|
11
11
|
export declare function fetchOrigin(cwd: string): void;
|
|
12
12
|
/**
|
|
@@ -35,8 +35,8 @@ export declare function generateBranchName(teamSlug: string): string;
|
|
|
35
35
|
export declare function generateWorktreeDirName(teamSlug: string): string;
|
|
36
36
|
/**
|
|
37
37
|
* Find the worktree directory for a team.
|
|
38
|
-
* Looks for an exact match `<name>` or a prefix match `<name>-*` under
|
|
38
|
+
* Looks for an exact match `<name>` or a prefix match `<name>-*` under worktreeDir/.
|
|
39
39
|
*/
|
|
40
|
-
export declare function findWorktreePath(projectRoot: string, teamName: string): string | null;
|
|
40
|
+
export declare function findWorktreePath(projectRoot: string, teamName: string, worktreeDir?: string): string | null;
|
|
41
41
|
export {};
|
|
42
42
|
//# sourceMappingURL=worktree.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worktree.d.ts","sourceRoot":"","sources":["../../src/lib/worktree.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA+BH,wBAAgB,eAAe,IAAI,MAAM,
|
|
1
|
+
{"version":3,"file":"worktree.d.ts","sourceRoot":"","sources":["../../src/lib/worktree.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA+BH,wBAAgB,eAAe,IAAI,MAAM,CAwBxC;AAMD,KAAK,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAMtC,wBAAgB,SAAS,CAAC,WAAW,EAAE,MAAM,EAAE,WAAW,GAAE,MAAqB,GAAG,OAAO,CAQ1F;AAQD,wBAAgB,UAAU,CAAC,WAAW,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,WAAW,GAAE,MAAqB,EAAE,YAAY,GAAE,MAAW,GAAG,MAAM,CAa3I;AAED,wBAAgB,OAAO,CAAC,WAAW,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,WAAW,GAAE,MAAqB,GAAG,MAAM,GAAG,IAAI,CAGpH;AAID,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAU3D;AAED,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAM7C;AAiBD;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,EAClB,GAAG,EAAE,MAAM,GACV,IAAI,CAiBN;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,IAAI,CAUlF;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,CAWhE;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAG3D;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAGhE;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,GAAE,MAAqB,GAAG,MAAM,GAAG,IAAI,CAyBzH"}
|
package/dist/lib/worktree.js
CHANGED
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
* Git worktree operations for the agent CLI.
|
|
3
3
|
* Borrowed and simplified from dev-tools/worktree-cli/src/git.ts and config.ts.
|
|
4
4
|
*/
|
|
5
|
-
import { execSync } from 'child_process';
|
|
6
|
-
import { existsSync, readFileSync, writeFileSync, mkdirSync, statSync, symlinkSync } from 'fs';
|
|
5
|
+
import { execSync, spawnSync } from 'child_process';
|
|
6
|
+
import { existsSync, readFileSync, readdirSync, writeFileSync, mkdirSync, statSync, symlinkSync } from 'fs';
|
|
7
7
|
import { join, dirname } from 'path';
|
|
8
8
|
// ── Project root detection ────────────────────────────────────────────
|
|
9
9
|
/**
|
|
10
10
|
* Walk up from cwd to find the repo root (directory containing .git).
|
|
11
11
|
*
|
|
12
12
|
* Strategy:
|
|
13
|
-
* 1. Walk up from cwd looking for a directory with both .git AND mx-agent-system/ or worktree.toml
|
|
14
|
-
* This finds the actual "agent platform" project root even when
|
|
15
|
-
* nested .worktrees/ sub-path.
|
|
13
|
+
* 1. Walk up from cwd looking for a directory with both .git AND mx-agent-system/ or worktree.toml
|
|
14
|
+
* or mx-agent.config.json. This finds the actual "agent platform" project root even when
|
|
15
|
+
* running from inside a nested .worktrees/ sub-path.
|
|
16
16
|
* 2. If no such directory found, any directory with .git qualifies.
|
|
17
17
|
*/
|
|
18
18
|
/**
|
|
@@ -40,7 +40,8 @@ export function findProjectRoot() {
|
|
|
40
40
|
if (firstMainGit === null)
|
|
41
41
|
firstMainGit = candidate;
|
|
42
42
|
if (existsSync(join(candidate, 'mx-agent-system')) ||
|
|
43
|
-
existsSync(join(candidate, 'worktree.toml'))
|
|
43
|
+
existsSync(join(candidate, 'worktree.toml')) ||
|
|
44
|
+
existsSync(join(candidate, 'mx-agent.config.json'))) {
|
|
44
45
|
return candidate;
|
|
45
46
|
}
|
|
46
47
|
}
|
|
@@ -52,11 +53,11 @@ export function findProjectRoot() {
|
|
|
52
53
|
}
|
|
53
54
|
// ── Slot management (mirrors dev-tools/worktree-cli/src/ports.ts) ─────
|
|
54
55
|
const SLOTS_FILENAME = '.slots.json';
|
|
55
|
-
function getSlotsPath(projectRoot) {
|
|
56
|
-
return join(projectRoot,
|
|
56
|
+
function getSlotsPath(projectRoot, worktreeDir = '.worktrees') {
|
|
57
|
+
return join(projectRoot, worktreeDir, SLOTS_FILENAME);
|
|
57
58
|
}
|
|
58
|
-
export function loadSlots(projectRoot) {
|
|
59
|
-
const filePath = getSlotsPath(projectRoot);
|
|
59
|
+
export function loadSlots(projectRoot, worktreeDir = '.worktrees') {
|
|
60
|
+
const filePath = getSlotsPath(projectRoot, worktreeDir);
|
|
60
61
|
if (!existsSync(filePath))
|
|
61
62
|
return {};
|
|
62
63
|
try {
|
|
@@ -66,28 +67,28 @@ export function loadSlots(projectRoot) {
|
|
|
66
67
|
return {};
|
|
67
68
|
}
|
|
68
69
|
}
|
|
69
|
-
function saveSlots(projectRoot, slots) {
|
|
70
|
-
const dir = join(projectRoot,
|
|
70
|
+
function saveSlots(projectRoot, worktreeDir = '.worktrees', slots) {
|
|
71
|
+
const dir = join(projectRoot, worktreeDir);
|
|
71
72
|
if (!existsSync(dir))
|
|
72
73
|
mkdirSync(dir, { recursive: true });
|
|
73
|
-
writeFileSync(getSlotsPath(projectRoot), JSON.stringify(slots, null, 2));
|
|
74
|
+
writeFileSync(getSlotsPath(projectRoot, worktreeDir), JSON.stringify(slots, null, 2));
|
|
74
75
|
}
|
|
75
|
-
export function assignSlot(projectRoot, worktreeName, maxWorktrees = 25) {
|
|
76
|
-
const slots = loadSlots(projectRoot);
|
|
76
|
+
export function assignSlot(projectRoot, worktreeName, worktreeDir = '.worktrees', maxWorktrees = 25) {
|
|
77
|
+
const slots = loadSlots(projectRoot, worktreeDir);
|
|
77
78
|
if (slots[worktreeName] !== undefined)
|
|
78
79
|
return slots[worktreeName];
|
|
79
80
|
const used = new Set(Object.values(slots));
|
|
80
81
|
for (let i = 1; i <= maxWorktrees; i++) {
|
|
81
82
|
if (!used.has(i)) {
|
|
82
83
|
slots[worktreeName] = i;
|
|
83
|
-
saveSlots(projectRoot, slots);
|
|
84
|
+
saveSlots(projectRoot, worktreeDir, slots);
|
|
84
85
|
return i;
|
|
85
86
|
}
|
|
86
87
|
}
|
|
87
88
|
throw new Error(`No available slots (max: ${maxWorktrees}). Remove a worktree first.`);
|
|
88
89
|
}
|
|
89
|
-
export function getSlot(projectRoot, worktreeName) {
|
|
90
|
-
const slots = loadSlots(projectRoot);
|
|
90
|
+
export function getSlot(projectRoot, worktreeName, worktreeDir = '.worktrees') {
|
|
91
|
+
const slots = loadSlots(projectRoot, worktreeDir);
|
|
91
92
|
return slots[worktreeName] ?? null;
|
|
92
93
|
}
|
|
93
94
|
// ── Git helpers ───────────────────────────────────────────────────────
|
|
@@ -116,8 +117,10 @@ export function fetchOrigin(cwd) {
|
|
|
116
117
|
*/
|
|
117
118
|
function branchExists(branch, cwd) {
|
|
118
119
|
try {
|
|
119
|
-
const
|
|
120
|
-
const
|
|
120
|
+
const localR = spawnSync('git', ['branch', '--list', branch], { cwd, encoding: 'utf-8', stdio: 'pipe' });
|
|
121
|
+
const remoteR = spawnSync('git', ['branch', '-r', '--list', `origin/${branch}`], { cwd, encoding: 'utf-8', stdio: 'pipe' });
|
|
122
|
+
const local = localR.status === 0 ? localR.stdout.trim() : '';
|
|
123
|
+
const remote = remoteR.status === 0 ? remoteR.stdout.trim() : '';
|
|
121
124
|
return Boolean(local || remote);
|
|
122
125
|
}
|
|
123
126
|
catch {
|
|
@@ -134,15 +137,21 @@ export function createGitWorktree(worktreePath, branch, baseBranch, cwd) {
|
|
|
134
137
|
}
|
|
135
138
|
catch { /* non-fatal */ }
|
|
136
139
|
if (branchExists(branch, cwd)) {
|
|
137
|
-
|
|
140
|
+
const r = spawnSync('git', ['worktree', 'add', worktreePath, branch], { cwd, stdio: 'inherit' });
|
|
141
|
+
if (r.status !== 0)
|
|
142
|
+
throw new Error(`git worktree add failed with status ${r.status}`);
|
|
138
143
|
}
|
|
139
144
|
else {
|
|
140
145
|
try {
|
|
141
|
-
|
|
146
|
+
const r = spawnSync('git', ['worktree', 'add', worktreePath, '-b', branch, `origin/${baseBranch}`], { cwd, stdio: 'inherit' });
|
|
147
|
+
if (r.status !== 0)
|
|
148
|
+
throw new Error(`git worktree add failed with status ${r.status}`);
|
|
142
149
|
}
|
|
143
150
|
catch {
|
|
144
151
|
// Fall back to local branch if origin doesn't have it
|
|
145
|
-
|
|
152
|
+
const r = spawnSync('git', ['worktree', 'add', worktreePath, '-b', branch, baseBranch], { cwd, stdio: 'inherit' });
|
|
153
|
+
if (r.status !== 0)
|
|
154
|
+
throw new Error(`git worktree add failed with status ${r.status}`);
|
|
146
155
|
}
|
|
147
156
|
}
|
|
148
157
|
}
|
|
@@ -199,10 +208,10 @@ export function generateWorktreeDirName(teamSlug) {
|
|
|
199
208
|
}
|
|
200
209
|
/**
|
|
201
210
|
* Find the worktree directory for a team.
|
|
202
|
-
* Looks for an exact match `<name>` or a prefix match `<name>-*` under
|
|
211
|
+
* Looks for an exact match `<name>` or a prefix match `<name>-*` under worktreeDir/.
|
|
203
212
|
*/
|
|
204
|
-
export function findWorktreePath(projectRoot, teamName) {
|
|
205
|
-
const worktreesDir = join(projectRoot,
|
|
213
|
+
export function findWorktreePath(projectRoot, teamName, worktreeDir = '.worktrees') {
|
|
214
|
+
const worktreesDir = join(projectRoot, worktreeDir);
|
|
206
215
|
if (!existsSync(worktreesDir))
|
|
207
216
|
return null;
|
|
208
217
|
// Try exact match first
|
|
@@ -211,10 +220,7 @@ export function findWorktreePath(projectRoot, teamName) {
|
|
|
211
220
|
return exact;
|
|
212
221
|
// Prefix match: teamName-YYYYMMDD
|
|
213
222
|
try {
|
|
214
|
-
const entries =
|
|
215
|
-
.trim()
|
|
216
|
-
.split('\n')
|
|
217
|
-
.filter(Boolean);
|
|
223
|
+
const entries = readdirSync(worktreesDir);
|
|
218
224
|
for (const entry of entries) {
|
|
219
225
|
if (entry === teamName || entry.startsWith(`${teamName}-`)) {
|
|
220
226
|
const candidate = join(worktreesDir, entry);
|
package/dist/lib/worktree.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worktree.js","sourceRoot":"","sources":["../../src/lib/worktree.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"worktree.js","sourceRoot":"","sources":["../../src/lib/worktree.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,SAAS,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,IAAI,CAAC;AAC5G,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAErC,yEAAyE;AAEzE;;;;;;;;GAQG;AACH;;;;GAIG;AACH,SAAS,cAAc,CAAC,GAAW;IACjC,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IAClC,IAAI,CAAC;QACH,OAAO,QAAQ,CAAC,OAAO,CAAC,CA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YAC5B,IAAI,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,UAAU,CAAC,GAAG,QAAQ,GAAG,CAAC,EAAE,CAAC;gBAC3D,MAAM,SAAS,GAAG,IAAI,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;gBAC5C,uDAAuD;gBACvD,IAAI,UAAU,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC;oBACxC,OAAO,SAAS,CAAC;gBACnB,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,SAAS;IACX,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
|
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.21",
|
|
4
4
|
"description": "CLI for creating and managing AI agent teams",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -10,7 +10,9 @@
|
|
|
10
10
|
"build": "tsc",
|
|
11
11
|
"dev": "tsc --watch",
|
|
12
12
|
"start": "node dist/index.js",
|
|
13
|
-
"prepublishOnly": "npm run build"
|
|
13
|
+
"prepublishOnly": "npm run build",
|
|
14
|
+
"test": "vitest run",
|
|
15
|
+
"test:watch": "vitest"
|
|
14
16
|
},
|
|
15
17
|
"files": [
|
|
16
18
|
"dist/",
|
|
@@ -39,7 +41,8 @@
|
|
|
39
41
|
},
|
|
40
42
|
"devDependencies": {
|
|
41
43
|
"@types/node": "^20.11.0",
|
|
42
|
-
"typescript": "^5.3.0"
|
|
44
|
+
"typescript": "^5.3.0",
|
|
45
|
+
"vitest": "^2.0.0"
|
|
43
46
|
},
|
|
44
47
|
"engines": {
|
|
45
48
|
"node": ">=18.0.0"
|