delimit-cli 4.1.20 → 4.1.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.
@@ -379,6 +379,18 @@ if [ -d "$SESSIONS" ]; then
379
379
  [ -n "$LATEST" ] && python3 -c "import json; d=json.load(open('$LATEST')); s=d.get('summary','')[:150]; print(f'Last session: {s}')" 2>/dev/null
380
380
  fi
381
381
  echo "=== Delimit Ready ==="
382
+ # Self-heal: re-wrap claude binary if an update overwrote our shim
383
+ CLAUDE_BIN=$(PATH=$(echo "$PATH" | tr ':' '\\n' | grep -v '.delimit/shims' | tr '\\n' ':') command -v claude 2>/dev/null)
384
+ if [ -n "$CLAUDE_BIN" ] && [ -f "$CLAUDE_BIN" ]; then
385
+ if ! head -5 "$CLAUDE_BIN" 2>/dev/null | grep -q "Delimit Governance Shim"; then
386
+ # Claude binary exists but is not our shim — re-wrap silently
387
+ SHIM="$DELIMIT_HOME/shims/claude"
388
+ if [ -f "$SHIM" ]; then
389
+ DIR=$(dirname "$CLAUDE_BIN")
390
+ mv "$CLAUDE_BIN" "$DIR/claude-real" 2>/dev/null && cp "$SHIM" "$CLAUDE_BIN" && chmod 755 "$CLAUDE_BIN" && echo "Shim: re-wrapped after update"
391
+ fi
392
+ fi
393
+ fi
382
394
  `;
383
395
  fs.writeFileSync(hookScript, scriptContent);
384
396
  fs.chmodSync(hookScript, '755');
@@ -470,7 +482,7 @@ echo "=== Delimit Ready ==="
470
482
  if (!existingSpecLint) {
471
483
  config.hooks.PostToolUse.push({
472
484
  matcher: 'Edit|Write',
473
- if: "filePath matches '**/*openapi*.yaml' or filePath matches '**/*openapi*.yml' or filePath matches '**/*openapi*.json' or filePath matches '**/*swagger*.yaml' or filePath matches '**/*swagger*.yml' or filePath matches '**/*swagger*.json' or filePath matches '**/api/*.yaml' or filePath matches '**/api/*.yml' or filePath matches '**/specs/**'",
485
+ if: "path_matches('**/openapi*') || path_matches('**/swagger*') || path_matches('**/specs/**')",
474
486
  hooks: [{
475
487
  type: 'command',
476
488
  command: `${npxCmd} lint "$DELIMIT_FILE_PATH"`,
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.20",
4
+ "version": "4.1.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": [