@eventmodelers/cli 0.0.20 → 0.0.21

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.
Files changed (2) hide show
  1. package/cli.js +18 -7
  2. package/package.json +1 -1
package/cli.js CHANGED
@@ -1217,8 +1217,14 @@ program
1217
1217
  .option('--modeling', 'Keep one Claude process warm across prompts instead of spawning a fresh one per task, for low-latency voice/live use. Modeling-kit installs only — there is no cold-spawn/tasks.json loop for modeling-kit. Built into the CLI, not a per-project file.')
1218
1218
  .action(async (opts) => {
1219
1219
  const cwd = process.cwd();
1220
- const kitDir = findInstalledKitDir(cwd);
1221
- const isModelingKit = kitDir.endsWith(MODELING_KIT.kitDirName);
1220
+ // Both kit dirs can be installed side by side (e.g. running a build-kit and a
1221
+ // modeling-kit agent from the same project). findInstalledKitDir only ever
1222
+ // returns its first fixed-order match, which would silently prefer one stack
1223
+ // over the other regardless of which the caller actually asked for — so here
1224
+ // we resolve each stack's dir independently instead of relying on that order.
1225
+ const installedKitDirs = findAllInstalledKitDirs(cwd);
1226
+ const modelingKitDir = installedKitDirs.find((d) => d.endsWith(MODELING_KIT.kitDirName)) ?? null;
1227
+ const buildKitDir = installedKitDirs.find((d) => d !== modelingKitDir) ?? null;
1222
1228
 
1223
1229
  // No overlap between the two stacks' runtimes: modeling-kit only ever runs the
1224
1230
  // warm, direct-dispatch loop (--modeling); build-kit only ever runs the
@@ -1230,7 +1236,7 @@ program
1230
1236
  console.error('❌ --modeling is mutually exclusive with --bash/--ollama — those select a build-kit runner, which --modeling has no use for.');
1231
1237
  process.exit(1);
1232
1238
  }
1233
- if (!isModelingKit) {
1239
+ if (!modelingKitDir) {
1234
1240
  console.error(`❌ --modeling only supports a modeling-kit install (${MODELING_KIT.kitDirName}/) — it subscribes to the org-wide prompt queue, which build-kit stacks don't have. Use \`eventmodelers run\` (optionally with --ollama/--bash) for build-kit's slice-status loop instead.`);
1235
1241
  process.exit(1);
1236
1242
  }
@@ -1239,9 +1245,9 @@ program
1239
1245
  // does right after (dynamic imports, config reads) can eat the event-loop tick
1240
1246
  // this write needed to drain, so a piped watcher sees the ping arrive after
1241
1247
  // runModeling's own [modeling] log lines instead of before them.
1242
- await new Promise((res) => process.stdout.write(`▶ Starting modeling loop (warm Claude process) for ${relative(cwd, kitDir)}...\n\n`, res));
1248
+ await new Promise((res) => process.stdout.write(`▶ Starting modeling loop (warm Claude process) for ${relative(cwd, modelingKitDir)}...\n\n`, res));
1243
1249
  try {
1244
- await runModeling(kitDir, resolve(kitDir, '..'));
1250
+ await runModeling(modelingKitDir, resolve(modelingKitDir, '..'));
1245
1251
  } catch (err) {
1246
1252
  console.error('[modeling] Fatal:', err);
1247
1253
  process.exit(1);
@@ -1249,10 +1255,15 @@ program
1249
1255
  return;
1250
1256
  }
1251
1257
 
1252
- if (isModelingKit) {
1253
- console.error(`❌ A modeling-kit install (${MODELING_KIT.kitDirName}/) only runs via \`eventmodelers run --modeling\` — there is no cold-spawn/tasks.json loop for modeling-only projects.`);
1258
+ if (!buildKitDir) {
1259
+ if (modelingKitDir) {
1260
+ console.error(`❌ A modeling-kit install (${MODELING_KIT.kitDirName}/) only runs via \`eventmodelers run --modeling\` — there is no cold-spawn/tasks.json loop for modeling-only projects.`);
1261
+ } else {
1262
+ console.error(`❌ No kit installed in ${cwd} — run \`eventmodelers install\` first.`);
1263
+ }
1254
1264
  process.exit(1);
1255
1265
  }
1266
+ const kitDir = buildKitDir;
1256
1267
 
1257
1268
  const pickedCount = [opts.bash, opts.ollama].filter(Boolean).length;
1258
1269
  if (pickedCount > 1) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eventmodelers/cli",
3
- "version": "0.0.20",
3
+ "version": "0.0.21",
4
4
  "description": "Eventmodelers CLI — real-time Claude agent + skills for Claude Code, for any stack (Node, Supabase, Axon, Cratis, or modeling-only)",
5
5
  "type": "module",
6
6
  "bin": {