@eventmodelers/cli 0.0.20 → 0.0.22
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
|
@@ -835,7 +835,7 @@ async function configureMcp(options = {}) {
|
|
|
835
835
|
// read-only config resolution (`loadLocalConfig`/`fetchPlatformConfig`) is reused
|
|
836
836
|
// from the kit's lib/config.js, to avoid duplicating the config-file-walk logic.
|
|
837
837
|
// See `claude-modeling.md` in the kit's project root for the per-turn instructions
|
|
838
|
-
// this mode's
|
|
838
|
+
// this mode's modeling session follows.
|
|
839
839
|
async function runModeling(kitDir, projectDir) {
|
|
840
840
|
const configLibPath = join(kitDir, 'lib', 'config.js');
|
|
841
841
|
if (!existsSync(configLibPath)) {
|
|
@@ -866,7 +866,7 @@ async function runModeling(kitDir, projectDir) {
|
|
|
866
866
|
'relevant slice or column node on the board, then continue with your best interpretation of the prompt.\n\n';
|
|
867
867
|
|
|
868
868
|
// Sent once, on the first turn only — it's what tells CLAUDE.md's dispatcher to
|
|
869
|
-
// follow claude-modeling.md instead of claude-ralph.md, and gives the
|
|
869
|
+
// follow claude-modeling.md instead of claude-ralph.md, and gives the modeling
|
|
870
870
|
// session its one-time connect credentials. Every later turn only carries the
|
|
871
871
|
// per-prompt fields that actually vary (board_id, comment_id, ...).
|
|
872
872
|
let firstTurn = true;
|
|
@@ -952,7 +952,7 @@ async function runModeling(kitDir, projectDir) {
|
|
|
952
952
|
turn.reject(new Error(`claude process exited (${code}) mid-turn`));
|
|
953
953
|
}
|
|
954
954
|
});
|
|
955
|
-
log('
|
|
955
|
+
log('modeling session started');
|
|
956
956
|
}
|
|
957
957
|
|
|
958
958
|
function runClaudeWarm(text) {
|
|
@@ -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
|
-
|
|
1221
|
-
|
|
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 (!
|
|
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,
|
|
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(
|
|
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 (
|
|
1253
|
-
|
|
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,4 +1,4 @@
|
|
|
1
|
-
# Modeling Direct-Dispatch —
|
|
1
|
+
# Modeling Direct-Dispatch — Modeling Session Mode
|
|
2
2
|
|
|
3
3
|
Used by `npx @eventmodelers/cli run --modeling`. The CLI itself subscribes to the board's realtime channel and writes each incoming prompt directly to your stdin as a new turn — there is **no `tasks.json` queue** in this mode. Each user message you receive already IS the one prompt to handle; there's nothing to read, pre-filter, or pick from.
|
|
4
4
|
|
|
@@ -12,7 +12,7 @@ You are a long-lived process handling many turns in a row. Don't redo one-time s
|
|
|
12
12
|
- if this turn's `board_id` differs from the one you last connected with, or
|
|
13
13
|
- if the last API call returned `401`/`403`.
|
|
14
14
|
|
|
15
|
-
Otherwise skip straight to executing the prompt — re-running `/connect` every turn defeats the point of a
|
|
15
|
+
Otherwise skip straight to executing the prompt — re-running `/connect` every turn defeats the point of a modeling session.
|
|
16
16
|
3. **Resolve `BOARD_ID`** from this turn's `board_id` field; if absent, fall back to `boardId` in `.eventmodelers/config.json`.
|
|
17
17
|
4. Execute the prompt using the skill matched in CLAUDE.md's Skill Selection table.
|
|
18
18
|
**Questioning rule**: you are running autonomously — no human is available to answer questions. If you need clarification, do not pause or ask interactively — post a `QUESTION`-type comment (`/handle-comment` with `action=place`, `type=QUESTION`) on the most relevant node, then continue with your best interpretation.
|