@eventmodelers/cli 1.0.146 → 1.0.148

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/cli.js CHANGED
@@ -462,6 +462,14 @@ function getSharedRl() {
462
462
  if (!sharedRl) {
463
463
  sharedRl = createInterface({ input: process.stdin, output: process.stdout });
464
464
  sharedRlLines = sharedRl[Symbol.asyncIterator]();
465
+ // On a TTY readline puts stdin in raw mode, so Ctrl-C arrives as a keypress and the kernel
466
+ // never raises SIGINT — with no 'SIGINT' listener on the interface readline just pauses
467
+ // input and swallows it. The interface lives for the whole process (the loop included), so
468
+ // forward it as the real signal to whatever shutdown handlers are installed.
469
+ sharedRl.on('SIGINT', () => {
470
+ if (process.listenerCount('SIGINT') === 0) process.exit(130);
471
+ process.emit('SIGINT', 'SIGINT');
472
+ });
465
473
  }
466
474
  return sharedRl;
467
475
  }
@@ -48,12 +48,38 @@ export async function latestPublishedVersion({ cachePath, now = Date.now(), fetc
48
48
  }
49
49
  }
50
50
 
51
+ // A loud banner, so a stale CLI is not missed among the startup output — an old CLI can lack
52
+ // features the board expects (e.g. chat), and npx happily reuses a cached copy. Bold yellow
53
+ // when stderr is a terminal (NO_COLOR respected); plain box otherwise, so piped output stays clean.
54
+ function updateBanner(currentVersion, latestVersion) {
55
+ const paint = process.stderr.isTTY && !process.env.NO_COLOR ? (t) => `\x1b[1;33m${t}\x1b[0m` : (t) => t;
56
+ const lines = [
57
+ '!! UPDATE REQUIRED — YOUR EVENTMODELERS CLI IS OUT OF DATE !!',
58
+ '',
59
+ `Installed: ${currentVersion} Latest: ${latestVersion}`,
60
+ '',
61
+ 'Update now:',
62
+ '',
63
+ ' npx @eventmodelers/cli@latest <command>',
64
+ ' (still old? clear the npx cache: rm -rf ~/.npm/_npx)',
65
+ '',
66
+ ' npm i -g @eventmodelers/cli@latest (global install)',
67
+ '',
68
+ 'Old versions miss features the board expects —',
69
+ 'e.g. agents that do not reply in the board chat.',
70
+ ];
71
+ const width = Math.max(...lines.map((l) => l.length));
72
+ const bar = '█'.repeat(width + 6);
73
+ const body = lines.map((l) => `██ ${l.padEnd(width)} ██`);
74
+ return paint(['', bar, ...body, bar, ''].join('\n'));
75
+ }
76
+
51
77
  // Hint lines for everything that's behind: this CLI against npm, and each installed kit
52
78
  // against the CLI running now (its install manifest records the version that wrote it).
53
79
  export function updateHints({ currentVersion, latestVersion, kitDirs = [], cwd = process.cwd() }) {
54
80
  const hints = [];
55
81
  if (latestVersion && compareVersions(currentVersion, latestVersion) < 0) {
56
- hints.push(`💡 A new eventmodelers CLI is available: ${currentVersion} → ${latestVersion}. Update with: npm i -g @eventmodelers/cli@latest (or use npx @eventmodelers/cli@latest)`);
82
+ hints.push(updateBanner(currentVersion, latestVersion));
57
83
  }
58
84
  for (const kitDir of kitDirs) {
59
85
  const reinit = REINIT_COMMANDS[basename(kitDir)];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eventmodelers/cli",
3
- "version": "1.0.146",
3
+ "version": "1.0.148",
4
4
  "description": "Eventmodelers CLI — real-time Claude agent + skills for Claude Code, for any stack (Node, Supabase, Axon, OpenCQRS, UmaDB, Kurrent, or modeling-only)",
5
5
  "type": "module",
6
6
  "bin": {