grepmax 0.21.2 → 0.22.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.
- package/.claude-plugin/marketplace.json +2 -4
- package/dist/commands/dead.js +2 -1
- package/dist/commands/impact.js +3 -3
- package/dist/commands/mcp.js +14 -7
- package/dist/commands/peek.js +17 -4
- package/dist/commands/plugin.js +34 -24
- package/dist/commands/search-run.js +2 -0
- package/dist/commands/search.js +21 -11
- package/dist/commands/test-find.js +2 -2
- package/dist/commands/trace.js +13 -5
- package/dist/config.js +6 -1
- package/dist/lib/daemon/ipc-handler.js +1 -0
- package/dist/lib/daemon/mlx-server-manager.js +52 -8
- package/dist/lib/daemon/process-manager.js +16 -17
- package/dist/lib/graph/graph-builder.js +111 -12
- package/dist/lib/graph/impact.js +66 -16
- package/dist/lib/index/batch-processor.js +45 -9
- package/dist/lib/index/chunker.js +30 -3
- package/dist/lib/llm/tools.js +3 -3
- package/dist/lib/search/searcher.js +26 -21
- package/dist/lib/store/vector-db.js +52 -23
- package/dist/lib/utils/daemon-client.js +35 -9
- package/dist/lib/workers/orchestrator.js +1 -0
- package/dist/lib/workers/pool.js +62 -20
- package/package.json +8 -3
- package/plugins/grepmax/.claude-plugin/plugin.json +2 -8
- package/scripts/postinstall.js +8 -115
package/scripts/postinstall.js
CHANGED
|
@@ -1,121 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
* Postinstall
|
|
4
|
-
*
|
|
5
|
-
* skills, hooks, and configs without manual re-installation.
|
|
3
|
+
* Postinstall intentionally does not modify user-home agent configuration.
|
|
4
|
+
* Users can install or update integrations explicitly with:
|
|
6
5
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* - OpenCode: re-run installer (regenerates tool shim + plugin)
|
|
10
|
-
* - Codex: re-run installer (updates AGENTS.md + MCP registration)
|
|
11
|
-
* - Factory Droid: re-run installer (updates skills + hooks)
|
|
6
|
+
* gmax plugin add
|
|
7
|
+
* gmax plugin update
|
|
12
8
|
*/
|
|
13
|
-
const fs = require("node:fs");
|
|
14
|
-
const path = require("node:path");
|
|
15
|
-
const os = require("node:os");
|
|
16
|
-
const { execSync } = require("node:child_process");
|
|
17
9
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
os.homedir(),
|
|
23
|
-
".claude",
|
|
24
|
-
"plugins",
|
|
25
|
-
"cache",
|
|
26
|
-
"grepmax",
|
|
27
|
-
"grepmax",
|
|
28
|
-
);
|
|
29
|
-
|
|
30
|
-
if (fs.existsSync(pluginCacheBase) && fs.existsSync(sourcePlugin)) {
|
|
31
|
-
let entries;
|
|
32
|
-
try {
|
|
33
|
-
entries = fs.readdirSync(pluginCacheBase, { withFileTypes: true });
|
|
34
|
-
} catch {
|
|
35
|
-
entries = [];
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
const versionDirs = entries
|
|
39
|
-
.filter((e) => e.isDirectory())
|
|
40
|
-
.map((e) => e.name);
|
|
41
|
-
|
|
42
|
-
function copyRecursive(src, dest) {
|
|
43
|
-
if (!fs.existsSync(src)) return;
|
|
44
|
-
const stat = fs.statSync(src);
|
|
45
|
-
if (stat.isDirectory()) {
|
|
46
|
-
fs.mkdirSync(dest, { recursive: true });
|
|
47
|
-
for (const entry of fs.readdirSync(src)) {
|
|
48
|
-
copyRecursive(path.join(src, entry), path.join(dest, entry));
|
|
49
|
-
}
|
|
50
|
-
} else {
|
|
51
|
-
fs.mkdirSync(path.dirname(dest), { recursive: true });
|
|
52
|
-
fs.copyFileSync(src, dest);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
for (const ver of versionDirs) {
|
|
57
|
-
const destDir = path.join(pluginCacheBase, ver);
|
|
58
|
-
try {
|
|
59
|
-
copyRecursive(
|
|
60
|
-
path.join(sourcePlugin, "skills"),
|
|
61
|
-
path.join(destDir, "skills"),
|
|
62
|
-
);
|
|
63
|
-
copyRecursive(
|
|
64
|
-
path.join(sourcePlugin, "hooks"),
|
|
65
|
-
path.join(destDir, "hooks"),
|
|
66
|
-
);
|
|
67
|
-
const hooksJson = path.join(sourcePlugin, "hooks.json");
|
|
68
|
-
if (fs.existsSync(hooksJson)) {
|
|
69
|
-
fs.copyFileSync(hooksJson, path.join(destDir, "hooks.json"));
|
|
70
|
-
}
|
|
71
|
-
} catch {
|
|
72
|
-
// Best-effort
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
// --- OpenCode: re-run installer if tool shim or plugin exists ---
|
|
78
|
-
const ocToolPath = path.join(
|
|
79
|
-
os.homedir(),
|
|
80
|
-
".config",
|
|
81
|
-
"opencode",
|
|
82
|
-
"tool",
|
|
83
|
-
"gmax.ts",
|
|
84
|
-
);
|
|
85
|
-
const ocPluginPath = path.join(
|
|
86
|
-
os.homedir(),
|
|
87
|
-
".config",
|
|
88
|
-
"opencode",
|
|
89
|
-
"plugins",
|
|
90
|
-
"gmax.ts",
|
|
91
|
-
);
|
|
92
|
-
if (fs.existsSync(ocToolPath) || fs.existsSync(ocPluginPath)) {
|
|
93
|
-
try {
|
|
94
|
-
execSync("gmax install-opencode", { stdio: "ignore", timeout: 10000 });
|
|
95
|
-
} catch {}
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
// --- Codex: re-run installer if AGENTS.md has gmax skill ---
|
|
99
|
-
const codexAgentsPath = path.join(os.homedir(), ".codex", "AGENTS.md");
|
|
100
|
-
if (fs.existsSync(codexAgentsPath)) {
|
|
101
|
-
try {
|
|
102
|
-
const content = fs.readFileSync(codexAgentsPath, "utf-8");
|
|
103
|
-
if (content.includes("gmax")) {
|
|
104
|
-
execSync("gmax install-codex", { stdio: "ignore", timeout: 10000 });
|
|
105
|
-
}
|
|
106
|
-
} catch {}
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
// --- Factory Droid: re-run installer if skill exists ---
|
|
110
|
-
const droidSkillPath = path.join(
|
|
111
|
-
os.homedir(),
|
|
112
|
-
".factory",
|
|
113
|
-
"skills",
|
|
114
|
-
"gmax",
|
|
115
|
-
"SKILL.md",
|
|
116
|
-
);
|
|
117
|
-
if (fs.existsSync(droidSkillPath)) {
|
|
118
|
-
try {
|
|
119
|
-
execSync("gmax install-droid", { stdio: "ignore", timeout: 10000 });
|
|
120
|
-
} catch {}
|
|
10
|
+
if (process.env.GMAX_POSTINSTALL_QUIET !== "1") {
|
|
11
|
+
console.log(
|
|
12
|
+
"gmax installed. To install or update editor plugins, run: gmax plugin update",
|
|
13
|
+
);
|
|
121
14
|
}
|