delimit-cli 3.14.21 → 3.14.22
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/lib/cross-model-hooks.js +13 -3
- package/package.json +1 -1
package/lib/cross-model-hooks.js
CHANGED
|
@@ -136,14 +136,16 @@ function detectAITools() {
|
|
|
136
136
|
*/
|
|
137
137
|
function findClaudeHookGroup(hookGroups, commandSubstring) {
|
|
138
138
|
if (!Array.isArray(hookGroups)) return null;
|
|
139
|
+
// Match both "npx delimit-cli X" and "delimit-cli X" variants
|
|
140
|
+
const bare = commandSubstring.replace(/^npx /, '');
|
|
139
141
|
for (const group of hookGroups) {
|
|
140
142
|
// Support both nested format (group.hooks[].command) and flat format (group.command)
|
|
141
143
|
if (group.hooks && Array.isArray(group.hooks)) {
|
|
142
|
-
if (group.hooks.some(h => h.command && h.command.includes(commandSubstring))) {
|
|
144
|
+
if (group.hooks.some(h => h.command && (h.command.includes(commandSubstring) || h.command.includes(bare)))) {
|
|
143
145
|
return group;
|
|
144
146
|
}
|
|
145
147
|
}
|
|
146
|
-
if (group.command && group.command.includes(commandSubstring)) {
|
|
148
|
+
if (group.command && (group.command.includes(commandSubstring) || group.command.includes(bare))) {
|
|
147
149
|
return group;
|
|
148
150
|
}
|
|
149
151
|
}
|
|
@@ -204,7 +206,15 @@ function installClaudeHooks(tool, hookConfig) {
|
|
|
204
206
|
config.hooks = {};
|
|
205
207
|
}
|
|
206
208
|
|
|
207
|
-
|
|
209
|
+
// Use local binary if installed, fall back to npx
|
|
210
|
+
const { execSync: _exec } = require('child_process');
|
|
211
|
+
let npxCmd;
|
|
212
|
+
try {
|
|
213
|
+
_exec('delimit-cli --version', { stdio: 'pipe', timeout: 3000 });
|
|
214
|
+
npxCmd = 'delimit-cli';
|
|
215
|
+
} catch {
|
|
216
|
+
npxCmd = 'npx delimit-cli';
|
|
217
|
+
}
|
|
208
218
|
const changes = [];
|
|
209
219
|
|
|
210
220
|
// --- SessionStart hook (no condition) ---
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "delimit-cli",
|
|
3
3
|
"mcpName": "io.github.delimit-ai/delimit-mcp-server",
|
|
4
|
-
"version": "3.14.
|
|
4
|
+
"version": "3.14.22",
|
|
5
5
|
"description": "Unify Claude Code, Codex, Cursor, and Gemini CLI with persistent context, governance, and multi-model debate.",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"files": [
|