@melaya/runner 1.0.101 → 1.0.102

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.
@@ -1034,7 +1034,12 @@ export async function connect(opts) {
1034
1034
  }
1035
1035
  });
1036
1036
  proc.on("exit", (code) => {
1037
- activeAssistants.delete(sid);
1037
+ // Only evict if WE are still the registered host. A config-drift reboot
1038
+ // (e.g. the user added a connector) kills this host and spawns a REPLACEMENT
1039
+ // under the same sid; if this late exit deleted the map entry blindly it
1040
+ // would orphan the newcomer and make the next turn "session_not_found".
1041
+ if (activeAssistants.get(sid) === session)
1042
+ activeAssistants.delete(sid);
1038
1043
  const detail = code !== 0 && stderrTail.length ? stderrTail.slice(-12).join("\n") : "";
1039
1044
  socket.emit("runner:assistant_event", { sessionId: sid, turnId: "", kind: "session_closed", code, detail });
1040
1045
  console.log(chalk.gray(` ■ Assistant session ${sid.slice(0, 10)}… closed (exit ${code})`));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@melaya/runner",
3
- "version": "1.0.101",
3
+ "version": "1.0.102",
4
4
  "description": "Run Melaya AI pipelines locally with your own LM Studio or Ollama models",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,