@melaya/runner 1.0.12 → 1.0.13

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.
@@ -133,15 +133,18 @@ export async function connect(opts) {
133
133
  proc.on("exit", (code) => {
134
134
  activeProcesses.delete(payload.runId);
135
135
  const status = code === 0 ? "done" : "failed";
136
- socket.emit("runner:runComplete", { runId: payload.runId, status });
137
- // Also emit a pushEvent so the frontend clears the LIVE state
138
- // (runner:runComplete only updates the DB, it doesn't broadcast)
136
+ // Emit run_status FIRST (before runComplete deletes from ownedRunIds)
139
137
  socket.emit("runner:event", {
140
138
  run_id: payload.runId,
141
139
  event_type: "run_status",
142
140
  status,
143
141
  project: payload.project,
144
142
  });
143
+ // Small delay so the server processes run_status before runComplete
144
+ // removes the runId from ownedRunIds
145
+ setTimeout(() => {
146
+ socket.emit("runner:runComplete", { runId: payload.runId, status });
147
+ }, 200);
145
148
  console.log(chalk.gray(` ■ Pipeline finished (exit ${code})\n`));
146
149
  console.log(chalk.gray(" Waiting for pipeline runs...\n"));
147
150
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@melaya/runner",
3
- "version": "1.0.12",
3
+ "version": "1.0.13",
4
4
  "description": "Run Melaya AI pipelines locally with your own LM Studio or Ollama models",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,