@eventmodelers/cli 1.0.142 → 1.0.144

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
@@ -3192,7 +3192,7 @@ program
3192
3192
  // dir: a modeling run falls back to the global install (see ensureGlobalKit) rather than
3193
3193
  // requiring one here, and the build-kit branch reports a better-targeted error of its own
3194
3194
  // than this generic gate can.
3195
- const NO_INIT_REQUIRED = new Set(['init', 'init-config', 'stacks', 'status', 'config', 'uninstall', 'fetch', 'activate-context', 'set-slice-status', 'release-notes', 'run']);
3195
+ const NO_INIT_REQUIRED = new Set(['init', 'init-config', 'stacks', 'status', 'config', 'uninstall', 'fetch', 'activate-context', 'set-slice-status', 'release-notes', 'run', 'listen']);
3196
3196
 
3197
3197
  // Commands that install or refresh the kit themselves — a "your kit is outdated" hint in
3198
3198
  // front of them would only be noise.
@@ -4005,22 +4005,24 @@ program
4005
4005
 
4006
4006
  program
4007
4007
  .command('listen')
4008
- .description('Start the code-export listener (code-export.mjs) from the installed kit dir — receives slice/screen data pushed from the eventmodelers board UI and writes it into .slices/')
4008
+ .description('Start the code-export listener (code-export.mjs) from the installed kit dir, or the bundled copy when no kit is installed — receives slice/screen data pushed from the eventmodelers board UI and writes it into .slices/')
4009
4009
  .option('--port <port>', 'Port to listen on (default 3001, or $PORT)')
4010
4010
  .action((opts) => {
4011
4011
  const cwd = process.cwd();
4012
4012
  const kitDir = findInstalledKitDir(cwd);
4013
4013
 
4014
- const serverPath = join(kitDir, 'code-export.mjs');
4014
+ // With a kit installed, run its own code-export.mjs. Without one, run the copy bundled
4015
+ // in this CLI, rooted at the current directory so .slices/ lands here, not in the npx cache.
4016
+ const serverPath = kitDir ? join(kitDir, 'code-export.mjs') : join(__dirname, 'shared', 'build-kit', 'code-export.mjs');
4015
4017
  if (!existsSync(serverPath)) {
4016
4018
  console.error(`❌ ${relative(cwd, serverPath)} not found.`);
4017
4019
  process.exit(1);
4018
4020
  }
4019
4021
 
4020
4022
  console.log(`▶ Starting ${relative(cwd, serverPath)}...\n`);
4021
- const env = opts.port ? { ...process.env, PORT: opts.port } : process.env;
4023
+ const env = { ...process.env, ...(opts.port && { PORT: opts.port }), ...(!kitDir && { SLICES_ROOT: cwd, WORKSPACE_PATH: cwd }) };
4022
4024
  try {
4023
- execSync(`node "${serverPath}"`, { cwd: kitDir, stdio: 'inherit', env });
4025
+ execSync(`node "${serverPath}"`, { cwd: kitDir ?? cwd, stdio: 'inherit', env });
4024
4026
  } catch (err) {
4025
4027
  process.exit(err.status || 1);
4026
4028
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eventmodelers/cli",
3
- "version": "1.0.142",
3
+ "version": "1.0.144",
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": {
@@ -7,7 +7,9 @@ import { fileURLToPath } from 'url';
7
7
 
8
8
  const __filename = fileURLToPath(import.meta.url);
9
9
  const __dirname = dirname(__filename);
10
- const ROOT = __dirname;
10
+ // SLICES_ROOT lets `eventmodelers listen` run this bundled copy outside an installed kit,
11
+ // writing .slices/ into the caller's directory instead of next to this file.
12
+ const ROOT = process.env.SLICES_ROOT ?? __dirname;
11
13
  const CONFIG_PATH = join(ROOT, 'config.json');
12
14
  const SLICES_DIR = join(ROOT, '.slices');
13
15
  const repoPath = process.env.WORKSPACE_PATH ?? join(__dirname, '..');
@@ -151,7 +151,7 @@ If ALL slices in the current context are Done, reply with:
151
151
 
152
152
  ## Important
153
153
 
154
- - If `.build-kit/.eventmodelers/config.json` is absent, skip all platform communication (MCP calls, `update-slice-status`, board sync) and continue working locally.
154
+ - If no `.eventmodelers/config.json` exists anywhere (project root or an ancestor directory, or `~/.eventmodelers/config.json` — the one inside `.build-kit/` is only an optional override, so its absence means nothing), skip all platform communication (MCP calls, `update-slice-status`, board sync) and continue working locally.
155
155
  - Work on ONE slice per iteration
156
156
  - Commit frequently
157
157
  - update progress.txt frequently
@@ -121,7 +121,7 @@ If ALL slices in the current context are Done, reply with:
121
121
 
122
122
  ## Important
123
123
 
124
- - If `.build-kit/.eventmodelers/config.json` is absent, skip all platform communication (MCP calls, `update-slice-status`, board sync) and continue working locally.
124
+ - If no `.eventmodelers/config.json` exists anywhere (project root or an ancestor directory, or `~/.eventmodelers/config.json` — the one inside `.build-kit/` is only an optional override, so its absence means nothing), skip all platform communication (MCP calls, `update-slice-status`, board sync) and continue working locally.
125
125
  - Work on ONE slice per iteration
126
126
  - Commit frequently
127
127
  - update progress.txt frequently
@@ -127,7 +127,7 @@ If ALL slices in the current context are Done, reply with:
127
127
 
128
128
  ## Important
129
129
 
130
- - If `.build-kit/.eventmodelers/config.json` is absent, skip all platform communication (MCP calls, `update-slice-status`, board sync) and continue working locally.
130
+ - If no `.eventmodelers/config.json` exists anywhere (project root or an ancestor directory, or `~/.eventmodelers/config.json` — the one inside `.build-kit/` is only an optional override, so its absence means nothing), skip all platform communication (MCP calls, `update-slice-status`, board sync) and continue working locally.
131
131
  - Work on ONE slice per iteration
132
132
  - Commit frequently
133
133
  - update progress.txt frequently
@@ -151,7 +151,7 @@ If ALL slices in the current context are Done, reply with:
151
151
 
152
152
  ## Important
153
153
 
154
- - If `.build-kit/.eventmodelers/config.json` is absent, skip all platform communication (MCP calls, `update-slice-status`, board sync) and continue working locally.
154
+ - If no `.eventmodelers/config.json` exists anywhere (project root or an ancestor directory, or `~/.eventmodelers/config.json` — the one inside `.build-kit/` is only an optional override, so its absence means nothing), skip all platform communication (MCP calls, `update-slice-status`, board sync) and continue working locally.
155
155
  - Work on ONE slice per iteration
156
156
  - Commit frequently
157
157
  - update progress.txt frequently
@@ -145,7 +145,7 @@ If ALL slices in the current context are Done, reply with:
145
145
 
146
146
  ## Important
147
147
 
148
- - If `.build-kit/.eventmodelers/config.json` is absent, skip all platform communication (MCP calls, `update-slice-status`, board sync) and continue working locally.
148
+ - If no `.eventmodelers/config.json` exists anywhere (project root or an ancestor directory, or `~/.eventmodelers/config.json` — the one inside `.build-kit/` is only an optional override, so its absence means nothing), skip all platform communication (MCP calls, `update-slice-status`, board sync) and continue working locally.
149
149
  - Work on ONE slice per iteration
150
150
  - Commit frequently
151
151
  - update progress.txt frequently
@@ -151,7 +151,7 @@ If ALL slices in the current context are Done, reply with:
151
151
 
152
152
  ## Important
153
153
 
154
- - If `.build-kit/.eventmodelers/config.json` is absent, skip all platform communication (MCP calls, `update-slice-status`, board sync) and continue working locally.
154
+ - If no `.eventmodelers/config.json` exists anywhere (project root or an ancestor directory, or `~/.eventmodelers/config.json` — the one inside `.build-kit/` is only an optional override, so its absence means nothing), skip all platform communication (MCP calls, `update-slice-status`, board sync) and continue working locally.
155
155
  - Work on ONE slice per iteration
156
156
  - Commit frequently
157
157
  - update progress.txt frequently
@@ -121,7 +121,7 @@ If ALL slices in the current context are Done, reply with:
121
121
 
122
122
  ## Important
123
123
 
124
- - If `.build-kit/.eventmodelers/config.json` is absent, skip all platform communication (MCP calls, `update-slice-status`, board sync) and continue working locally.
124
+ - If no `.eventmodelers/config.json` exists anywhere (project root or an ancestor directory, or `~/.eventmodelers/config.json` — the one inside `.build-kit/` is only an optional override, so its absence means nothing), skip all platform communication (MCP calls, `update-slice-status`, board sync) and continue working locally.
125
125
  - Work on ONE slice per iteration
126
126
  - Commit frequently
127
127
  - update progress.txt frequently
@@ -145,7 +145,7 @@ If ALL slices in the current context are Done, reply with:
145
145
 
146
146
  ## Important
147
147
 
148
- - If `.build-kit/.eventmodelers/config.json` is absent, skip all platform communication (MCP calls, `update-slice-status`, board sync) and continue working locally.
148
+ - If no `.eventmodelers/config.json` exists anywhere (project root or an ancestor directory, or `~/.eventmodelers/config.json` — the one inside `.build-kit/` is only an optional override, so its absence means nothing), skip all platform communication (MCP calls, `update-slice-status`, board sync) and continue working locally.
149
149
  - Work on ONE slice per iteration
150
150
  - Commit frequently
151
151
  - update progress.txt frequently
@@ -121,7 +121,7 @@ If ALL slices in the current context are Done, reply with:
121
121
 
122
122
  ## Important
123
123
 
124
- - If `.build-kit/.eventmodelers/config.json` is absent, skip all platform communication (MCP calls, `update-slice-status`, board sync) and continue working locally.
124
+ - If no `.eventmodelers/config.json` exists anywhere (project root or an ancestor directory, or `~/.eventmodelers/config.json` — the one inside `.build-kit/` is only an optional override, so its absence means nothing), skip all platform communication (MCP calls, `update-slice-status`, board sync) and continue working locally.
125
125
  - Work on ONE slice per iteration
126
126
  - Commit frequently
127
127
  - update progress.txt frequently
@@ -151,7 +151,7 @@ If ALL slices in the current context are Done, reply with:
151
151
 
152
152
  ## Important
153
153
 
154
- - If `.build-kit/.eventmodelers/config.json` is absent, skip all platform communication (MCP calls, `update-slice-status`, board sync) and continue working locally.
154
+ - If no `.eventmodelers/config.json` exists anywhere (project root or an ancestor directory, or `~/.eventmodelers/config.json` — the one inside `.build-kit/` is only an optional override, so its absence means nothing), skip all platform communication (MCP calls, `update-slice-status`, board sync) and continue working locally.
155
155
  - Work on ONE slice per iteration
156
156
  - Commit frequently
157
157
  - update progress.txt frequently