delimit-cli 4.1.14 → 4.1.15

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.
@@ -767,23 +767,44 @@ exit 127
767
767
  fs.chmodSync(shimPath, '755');
768
768
  }
769
769
 
770
- // Add to PATH in shell rc files
770
+ // Add to PATH in shell rc files (create if missing)
771
771
  const pathLine = `export PATH="${shimsDir}:$PATH" # Delimit governance wrapping`;
772
- for (const rc of ['.bashrc', '.zshrc']) {
772
+ let pathWritten = false;
773
+ for (const rc of ['.bashrc', '.zshrc', '.profile']) {
773
774
  const rcPath = path.join(os.homedir(), rc);
774
- if (fs.existsSync(rcPath)) {
775
- const content = fs.readFileSync(rcPath, 'utf-8');
776
- if (!content.includes('.delimit/shims')) {
777
- fs.appendFileSync(rcPath, `\n# Delimit governance wrapping\n${pathLine}\n`);
775
+ try {
776
+ if (fs.existsSync(rcPath)) {
777
+ const content = fs.readFileSync(rcPath, 'utf-8');
778
+ if (!content.includes('.delimit/shims')) {
779
+ fs.appendFileSync(rcPath, `\n# Delimit governance wrapping\n${pathLine}\n`);
780
+ }
781
+ pathWritten = true;
778
782
  }
779
- }
783
+ } catch { /* skip unreadable files */ }
780
784
  }
785
+ // If no rc files exist, create .bashrc with the PATH export
786
+ if (!pathWritten) {
787
+ const bashrc = path.join(os.homedir(), '.bashrc');
788
+ fs.writeFileSync(bashrc, `# Delimit governance wrapping\n${pathLine}\n`);
789
+ pathWritten = true;
790
+ }
791
+ // Also write to /etc/profile.d/ if writable (login shells)
792
+ try {
793
+ const profileD = '/etc/profile.d/delimit-shims.sh';
794
+ if (!fs.existsSync(profileD)) {
795
+ fs.writeFileSync(profileD, `# Delimit governance wrapping\n${pathLine}\n`);
796
+ }
797
+ } catch { /* not writable, skip */ }
781
798
 
782
799
  if (shimsInstalled) {
783
800
  await logp(` ${green('✓')} Governance shims updated`);
784
801
  } else {
785
802
  log(` ${green('✓')} Governance wrapping enabled`);
786
- log(` ${dim(' Restart your terminal or run: source ~/.bashrc')}`);
803
+ log('');
804
+ log(` ${bold('To activate now, run:')}`);
805
+ log(` ${green('source ~/.bashrc')}`);
806
+ log('');
807
+ log(` ${dim('Or restart your terminal. The banner appears before each AI session.')}`);
787
808
  }
788
809
  } else {
789
810
  log(` ${dim(' Skipped. Enable later: delimit shims enable')}`);
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.14",
4
+ "version": "4.1.15",
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": [