monomind 1.13.0 → 1.14.1
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/.claude/agents/generated/churn-analyst.md +53 -0
- package/.claude/agents/generated/code-reviewer.md +55 -0
- package/.claude/agents/generated/code-validator.md +57 -0
- package/.claude/agents/generated/complexity-scanner.md +56 -0
- package/.claude/agents/generated/devbot-orchestrator.md +58 -0
- package/.claude/agents/generated/devbot-planner.md +63 -0
- package/.claude/agents/generated/impact-assessor.md +54 -0
- package/.claude/commands/mastermind/master.md +88 -24
- package/.claude/helpers/control-start.cjs +60 -1
- package/.claude/helpers/event-logger.cjs +43 -2
- package/.claude/helpers/handlers/capture-handler.cjs +336 -0
- package/.claude/helpers/handlers/route-handler.cjs +11 -11
- package/.claude/helpers/hook-handler.cjs +17 -1
- package/.claude/helpers/session.cjs +20 -2
- package/.claude/settings.json +10 -0
- package/.claude/skills/mastermind/createorg.md +227 -16
- package/.claude/skills/mastermind/idea.md +15 -3
- package/.claude/skills/mastermind/runorg.md +2 -1
- package/package.json +1 -1
- package/packages/@monomind/cli/dist/src/commands/index.js +2 -0
- package/packages/@monomind/cli/dist/src/commands/org.d.ts +4 -0
- package/packages/@monomind/cli/dist/src/commands/org.js +93 -0
- package/packages/@monomind/cli/dist/src/mcp-tools/memory-tools.js +6 -6
- package/packages/@monomind/cli/dist/src/mcp-tools/session-tools.js +9 -10
- package/packages/@monomind/cli/dist/src/mcp-tools/task-tools.js +7 -8
- package/packages/@monomind/cli/dist/src/mcp-tools/types.d.ts +1 -0
- package/packages/@monomind/cli/dist/src/mcp-tools/types.js +49 -0
- package/packages/@monomind/cli/package.json +1 -1
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Local type definitions to avoid external imports outside package boundary.
|
|
5
5
|
*/
|
|
6
|
+
import { statSync, readFileSync } from 'node:fs';
|
|
7
|
+
import { join, dirname, resolve } from 'node:path';
|
|
6
8
|
/**
|
|
7
9
|
* Returns the effective project working directory.
|
|
8
10
|
* Prefers MONOMIND_CWD (set by the install script for global/MCP installs
|
|
@@ -11,4 +13,51 @@
|
|
|
11
13
|
export function getProjectCwd() {
|
|
12
14
|
return process.env.MONOMIND_CWD || process.cwd();
|
|
13
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* Returns the stable Monomind data root that survives branch switches and is
|
|
18
|
+
* shared across all git worktrees of the same repository.
|
|
19
|
+
*
|
|
20
|
+
* Resolution order:
|
|
21
|
+
* 1. MONOMIND_DATA_DIR env var — allows overriding to e.g. ~/.monomind/<project>
|
|
22
|
+
* 2. <repo>/.git/monomind/ — regular repo (branch-agnostic, shared by design)
|
|
23
|
+
* 3. <main-repo>/.git/monomind/— worktree: .git is a pointer file → resolve to
|
|
24
|
+
* the shared .git dir of the main worktree
|
|
25
|
+
* 4. <cwd>/.monomind/ — fallback when git is unavailable
|
|
26
|
+
*
|
|
27
|
+
* Mirrors the _getGitMonomindDir() function in server.mjs so session, task,
|
|
28
|
+
* memory, and org data all land in the same stable location.
|
|
29
|
+
*/
|
|
30
|
+
const _dataRootCache = new Map();
|
|
31
|
+
export function getMonomindDataRoot(cwd) {
|
|
32
|
+
if (process.env.MONOMIND_DATA_DIR)
|
|
33
|
+
return process.env.MONOMIND_DATA_DIR;
|
|
34
|
+
const workDir = cwd || getProjectCwd();
|
|
35
|
+
if (_dataRootCache.has(workDir))
|
|
36
|
+
return _dataRootCache.get(workDir);
|
|
37
|
+
let result;
|
|
38
|
+
try {
|
|
39
|
+
const gitEntry = join(workDir, '.git');
|
|
40
|
+
const st = statSync(gitEntry);
|
|
41
|
+
if (st.isDirectory()) {
|
|
42
|
+
result = join(gitEntry, 'monomind');
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
// Worktree: .git is a text file "gitdir: /main/.git/worktrees/name"
|
|
46
|
+
const m = readFileSync(gitEntry, 'utf8').match(/^gitdir:\s*(.+)/m);
|
|
47
|
+
if (m) {
|
|
48
|
+
const worktreeDir = resolve(workDir, m[1].trim());
|
|
49
|
+
const commonGitDir = dirname(dirname(worktreeDir));
|
|
50
|
+
result = join(commonGitDir, 'monomind');
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
result = join(workDir, '.monomind');
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
catch {
|
|
58
|
+
result = join(workDir, '.monomind');
|
|
59
|
+
}
|
|
60
|
+
_dataRootCache.set(workDir, result);
|
|
61
|
+
return result;
|
|
62
|
+
}
|
|
14
63
|
//# sourceMappingURL=types.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@monoes/monomindcli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.14.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Monomind CLI - Enterprise AI agent orchestration with 60+ specialized agents, swarm coordination, MCP server, self-learning hooks, and vector memory for Claude Code",
|
|
6
6
|
"main": "dist/src/index.js",
|