meetsoma 0.1.5 → 0.1.6

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/dist/thin-cli.js +32 -1
  2. package/package.json +1 -1
package/dist/thin-cli.js CHANGED
@@ -50,7 +50,9 @@ function isInstalled() {
50
50
  // Check both layouts: soma-beta (dist/extensions) and dev setup (extensions/)
51
51
  const hasDist = existsSync(join(CORE_DIR, "dist", "extensions")) && existsSync(join(CORE_DIR, "dist", "core"));
52
52
  const hasDev = existsSync(join(CORE_DIR, "extensions")) && existsSync(join(CORE_DIR, "core"));
53
- return hasDist || hasDev;
53
+ // Check deps exist — Pi is the critical dependency
54
+ const hasDeps = existsSync(join(CORE_DIR, "node_modules", "@mariozechner"));
55
+ return (hasDist || hasDev) && hasDeps;
54
56
  }
55
57
 
56
58
  // ── Browser ──────────────────────────────────────────────────────────
@@ -1179,6 +1181,27 @@ function showStatus() {
1179
1181
  // ── Delegation ───────────────────────────────────────────────────────
1180
1182
 
1181
1183
  async function delegateToCore() {
1184
+ // Pre-flight: verify runtime can start before delegating
1185
+ const piPkg = join(CORE_DIR, "node_modules", "@mariozechner", "pi-coding-agent");
1186
+ if (!existsSync(piPkg)) {
1187
+ console.log(` ${red("✗")} Runtime dependencies missing.`);
1188
+ console.log(` ${dim("Run")} ${green("soma init")} ${dim("to repair the installation.")}`);
1189
+ console.log("");
1190
+ return;
1191
+ }
1192
+ const cliEntry = existsSync(join(CORE_DIR, "dist", "cli.js"))
1193
+ ? join(CORE_DIR, "dist", "cli.js")
1194
+ : null;
1195
+ const mainEntry = existsSync(join(CORE_DIR, "dist", "main.js"))
1196
+ ? join(CORE_DIR, "dist", "main.js")
1197
+ : null;
1198
+ if (!cliEntry && !mainEntry) {
1199
+ console.log(` ${red("✗")} Runtime entry point missing.`);
1200
+ console.log(` ${dim("Run")} ${green("soma init")} ${dim("to repair the installation.")}`);
1201
+ console.log("");
1202
+ return;
1203
+ }
1204
+
1182
1205
  const { execFileSync: execF } = await import("child_process");
1183
1206
  const passArgs = process.argv.slice(2);
1184
1207
 
@@ -1225,7 +1248,15 @@ async function delegateToCore() {
1225
1248
  }
1226
1249
  return;
1227
1250
  } catch (err) {
1251
+ // Non-zero exit from session is normal (user quit, ctrl+c)
1228
1252
  if (err.status) process.exit(err.status);
1253
+ // Module errors = broken install
1254
+ if (err.message && err.message.includes("MODULE_NOT_FOUND")) {
1255
+ console.log("");
1256
+ console.log(` ${red("✗")} Soma failed to start — missing dependencies.`);
1257
+ console.log(` ${dim("Run")} ${green("soma init")} ${dim("to repair the installation.")}`);
1258
+ console.log("");
1259
+ }
1229
1260
  return;
1230
1261
  }
1231
1262
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "meetsoma",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "Soma \u2014 the AI coding agent with self-growing memory",
5
5
  "type": "module",
6
6
  "bin": {