@eventmodelers/node-kit 0.0.8 → 0.0.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eventmodelers/node-kit",
3
- "version": "0.0.8",
3
+ "version": "0.0.9",
4
4
  "description": "Real-time Claude agent that reacts to slice:changed events on an Eventmodelers board",
5
5
  "type": "module",
6
6
  "bin": {
@@ -6,8 +6,19 @@ import { randomUUID } from 'crypto';
6
6
 
7
7
  const __dirname = dirname(fileURLToPath(import.meta.url));
8
8
 
9
+ function findConfigPath(startDir) {
10
+ let dir = startDir;
11
+ while (true) {
12
+ const candidate = join(dir, '.eventmodelers', 'config.json');
13
+ if (existsSync(candidate)) return candidate;
14
+ const parent = dirname(dir);
15
+ if (parent === dir) throw new Error('No .eventmodelers/config.json found in current directory or any parent directory');
16
+ dir = parent;
17
+ }
18
+ }
19
+
9
20
  function loadLocalConfig() {
10
- const configPath = resolve(__dirname, '../../.eventmodelers/config.json');
21
+ const configPath = findConfigPath(process.cwd());
11
22
  const raw = readFileSync(configPath, 'utf-8');
12
23
  const cfg = JSON.parse(raw);
13
24