delimit-cli 3.14.21 → 3.14.23
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/bin/delimit-setup.js +14 -10
- package/lib/cross-model-hooks.js +13 -3
- package/package.json +1 -1
package/bin/delimit-setup.js
CHANGED
|
@@ -571,12 +571,12 @@ Run full governance compliance checks. Verify security, policy compliance, evide
|
|
|
571
571
|
const shimsDir = path.join(DELIMIT_HOME, 'shims');
|
|
572
572
|
const shimsInstalled = fs.existsSync(shimsDir) && fs.readdirSync(shimsDir).length > 0;
|
|
573
573
|
|
|
574
|
-
if (
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
//
|
|
574
|
+
let enableShims = shimsInstalled; // Auto-yes if already installed (just update)
|
|
575
|
+
|
|
576
|
+
if (!shimsInstalled) {
|
|
577
|
+
// First install — prompt
|
|
578
578
|
const inquirer = (() => { try { return require('inquirer'); } catch { return null; } })();
|
|
579
|
-
|
|
579
|
+
enableShims = true;
|
|
580
580
|
|
|
581
581
|
if (inquirer && process.stdin.isTTY) {
|
|
582
582
|
try {
|
|
@@ -588,12 +588,13 @@ Run full governance compliance checks. Verify security, policy compliance, evide
|
|
|
588
588
|
}]);
|
|
589
589
|
enableShims = answer.enable;
|
|
590
590
|
} catch {
|
|
591
|
-
enableShims = true;
|
|
591
|
+
enableShims = true;
|
|
592
592
|
}
|
|
593
593
|
}
|
|
594
|
+
}
|
|
594
595
|
|
|
595
596
|
if (enableShims) {
|
|
596
|
-
// Create shims
|
|
597
|
+
// Create/update shims with latest template
|
|
597
598
|
fs.mkdirSync(shimsDir, { recursive: true });
|
|
598
599
|
|
|
599
600
|
const shimTemplate = (toolName, displayName) => `#!/bin/sh
|
|
@@ -663,12 +664,15 @@ exit 127
|
|
|
663
664
|
}
|
|
664
665
|
}
|
|
665
666
|
|
|
666
|
-
|
|
667
|
-
|
|
667
|
+
if (shimsInstalled) {
|
|
668
|
+
await logp(` ${green('✓')} Governance shims updated`);
|
|
669
|
+
} else {
|
|
670
|
+
log(` ${green('✓')} Governance wrapping enabled`);
|
|
671
|
+
log(` ${dim(' Restart your terminal or run: source ~/.bashrc')}`);
|
|
672
|
+
}
|
|
668
673
|
} else {
|
|
669
674
|
log(` ${dim(' Skipped. Enable later: delimit shims enable')}`);
|
|
670
675
|
}
|
|
671
|
-
}
|
|
672
676
|
log('');
|
|
673
677
|
|
|
674
678
|
// Step 7: Install cross-model governance hooks (LED-202)
|
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.23",
|
|
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": [
|