delimit-cli 4.1.11 → 4.1.12
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 +23 -1
- package/package.json +1 -1
package/lib/cross-model-hooks.js
CHANGED
|
@@ -295,10 +295,19 @@ function migrateToNestedFormat(hookGroup) {
|
|
|
295
295
|
* 3. PreToolUse (Bash) + deploy patterns -> delimit security-audit
|
|
296
296
|
*/
|
|
297
297
|
function installClaudeHooks(tool, hookConfig) {
|
|
298
|
+
// Write to global ~/.claude/settings.json
|
|
298
299
|
const configPath = tool.configPath;
|
|
299
300
|
const configDir = path.dirname(configPath);
|
|
300
301
|
fs.mkdirSync(configDir, { recursive: true });
|
|
301
302
|
|
|
303
|
+
// Also write to project .claude/settings.json if the dir exists
|
|
304
|
+
const projectConfigDir = path.join(process.cwd(), '.claude');
|
|
305
|
+
const projectConfigPath = path.join(projectConfigDir, 'settings.json');
|
|
306
|
+
const writeTargets = [configPath];
|
|
307
|
+
if (fs.existsSync(projectConfigDir)) {
|
|
308
|
+
writeTargets.push(projectConfigPath);
|
|
309
|
+
}
|
|
310
|
+
|
|
302
311
|
let config = {};
|
|
303
312
|
if (fs.existsSync(configPath)) {
|
|
304
313
|
try {
|
|
@@ -499,7 +508,20 @@ echo "=== Delimit Ready ==="
|
|
|
499
508
|
}
|
|
500
509
|
}
|
|
501
510
|
|
|
502
|
-
|
|
511
|
+
// Write hooks to all target settings files
|
|
512
|
+
const configJson = JSON.stringify(config, null, 2);
|
|
513
|
+
for (const target of writeTargets) {
|
|
514
|
+
try {
|
|
515
|
+
// For project settings, merge hooks into existing config
|
|
516
|
+
if (target !== configPath && fs.existsSync(target)) {
|
|
517
|
+
const existing = JSON.parse(fs.readFileSync(target, 'utf-8'));
|
|
518
|
+
existing.hooks = config.hooks;
|
|
519
|
+
fs.writeFileSync(target, JSON.stringify(existing, null, 2));
|
|
520
|
+
} else {
|
|
521
|
+
fs.writeFileSync(target, configJson);
|
|
522
|
+
}
|
|
523
|
+
} catch {}
|
|
524
|
+
}
|
|
503
525
|
return changes;
|
|
504
526
|
}
|
|
505
527
|
|
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": "4.1.
|
|
4
|
+
"version": "4.1.12",
|
|
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": [
|