@melaya/runner 1.0.62 → 1.0.63

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/connection.js +31 -0
  2. package/package.json +1 -1
@@ -1158,6 +1158,37 @@ export async function connect(opts) {
1158
1158
  console.log(chalk.yellow(` ■ Killed run ${data.runId.slice(0, 10)}...`));
1159
1159
  }
1160
1160
  });
1161
+ // ── Pause / resume crew strategy (local-runner only) ───────────────
1162
+ // For local-runner crew strategies, the Redis-flag pause path used by
1163
+ // the cloud pool doesn't reach the container — the container has no
1164
+ // route to prod Redis. SIGSTOP / SIGCONT pause the spawned crew loop
1165
+ // at the process level (same primitive `docker pause` uses); the
1166
+ // crew_halts.py `paused` rail isn't required at all in this mode.
1167
+ // Unix only — Windows runners would need Job-object suspend, deferred.
1168
+ socket.on("runner:pauseStrategy", (data) => {
1169
+ const proc = activeProcesses.get(data.run_id);
1170
+ if (proc && proc.pid && process.platform !== "win32") {
1171
+ try {
1172
+ process.kill(proc.pid, "SIGSTOP");
1173
+ console.log(chalk.yellow(` ⏸ Paused crew ${data.run_id.slice(0, 10)} (sid=${data.strategy_id?.slice(0, 16) ?? "?"})`));
1174
+ }
1175
+ catch (e) {
1176
+ console.log(chalk.red(` ! pause failed for ${data.run_id.slice(0, 10)}: ${e.message}`));
1177
+ }
1178
+ }
1179
+ });
1180
+ socket.on("runner:resumeStrategy", (data) => {
1181
+ const proc = activeProcesses.get(data.run_id);
1182
+ if (proc && proc.pid && process.platform !== "win32") {
1183
+ try {
1184
+ process.kill(proc.pid, "SIGCONT");
1185
+ console.log(chalk.green(` ▶ Resumed crew ${data.run_id.slice(0, 10)} (sid=${data.strategy_id?.slice(0, 16) ?? "?"})`));
1186
+ }
1187
+ catch (e) {
1188
+ console.log(chalk.red(` ! resume failed for ${data.run_id.slice(0, 10)}: ${e.message}`));
1189
+ }
1190
+ }
1191
+ });
1161
1192
  // ── AI build-pipeline LLM-relay ────────────────────────────────────
1162
1193
  //
1163
1194
  // No new socket events — the build-pipeline relay rides on the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@melaya/runner",
3
- "version": "1.0.62",
3
+ "version": "1.0.63",
4
4
  "description": "Run Melaya AI pipelines locally with your own LM Studio or Ollama models",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,