@melaya/runner 1.0.62 → 1.0.64

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.
@@ -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/dist/pythonEnv.js CHANGED
@@ -143,6 +143,18 @@ const PIP_DEPS = [
143
143
  // pipeline Python — see getCertBundlePath() + spawn env merging in
144
144
  // connection.ts.
145
145
  "certifi",
146
+ // ── Trading-crew WSS realtime layer (P0 of the WSS realtime plan) ──
147
+ // websockets — hard module-level import in
148
+ // shared/runtime/ws_ingress_watcher.py, which shared/tools/melaya_ws.py
149
+ // pulls in via shared.runtime.registry. Without it EVERY crew run dies
150
+ // at `from shared.runtime.registry import build_toolkit` with
151
+ // ModuleNotFoundError: websockets (crew exit 1 before the first cycle).
152
+ "websockets",
153
+ // httpx — direct module-level import in shared/runtime/crew_managed_risk.py
154
+ // and shared/runtime/private_ticket.py. It already arrives transitively
155
+ // via the anthropic/openai wheels; pinned explicitly so a future dep
156
+ // shuffle in those SDKs can't silently break the crew risk watcher.
157
+ "httpx",
146
158
  ];
147
159
  export function venvPython() {
148
160
  return platform() === "win32"
package/package.json CHANGED
@@ -1,41 +1,41 @@
1
- {
2
- "name": "@melaya/runner",
3
- "version": "1.0.62",
4
- "description": "Run Melaya AI pipelines locally with your own LM Studio or Ollama models",
5
- "license": "UNLICENSED",
6
- "private": false,
7
- "type": "module",
8
- "bin": {
9
- "melaya-runner": "dist/cli.js"
10
- },
11
- "main": "dist/index.js",
12
- "files": [
13
- "dist/**/*.js",
14
- "dist/**/*.d.ts",
15
- "dist/**/*.py",
16
- "localRagIngest.py",
17
- "nltk_data/**",
18
- "README.md"
19
- ],
20
- "scripts": {
21
- "build": "tsc && node -e \"require('fs').copyFileSync('localRagIngest.py','dist/localRagIngest.py')\"",
22
- "prepublishOnly": "npm run build"
23
- },
24
- "dependencies": {
25
- "socket.io-client": "^4.8.0",
26
- "commander": "^12.0.0",
27
- "chalk": "^5.3.0",
28
- "ora": "^8.0.0",
29
- "playwright": "^1.47.0"
30
- },
31
- "devDependencies": {
32
- "typescript": "^5.5.0",
33
- "@types/node": "^20.0.0"
34
- },
35
- "engines": {
36
- "node": ">=18"
37
- },
38
- "publishConfig": {
39
- "access": "public"
40
- }
41
- }
1
+ {
2
+ "name": "@melaya/runner",
3
+ "version": "1.0.64",
4
+ "description": "Run Melaya AI pipelines locally with your own LM Studio or Ollama models",
5
+ "license": "UNLICENSED",
6
+ "private": false,
7
+ "type": "module",
8
+ "bin": {
9
+ "melaya-runner": "dist/cli.js"
10
+ },
11
+ "main": "dist/index.js",
12
+ "files": [
13
+ "dist/**/*.js",
14
+ "dist/**/*.d.ts",
15
+ "dist/**/*.py",
16
+ "localRagIngest.py",
17
+ "nltk_data/**",
18
+ "README.md"
19
+ ],
20
+ "scripts": {
21
+ "build": "tsc && node -e \"require('fs').copyFileSync('localRagIngest.py','dist/localRagIngest.py')\"",
22
+ "prepublishOnly": "npm run build"
23
+ },
24
+ "dependencies": {
25
+ "socket.io-client": "^4.8.0",
26
+ "commander": "^12.0.0",
27
+ "chalk": "^5.3.0",
28
+ "ora": "^8.0.0",
29
+ "playwright": "^1.47.0"
30
+ },
31
+ "devDependencies": {
32
+ "typescript": "^5.5.0",
33
+ "@types/node": "^20.0.0"
34
+ },
35
+ "engines": {
36
+ "node": ">=18"
37
+ },
38
+ "publishConfig": {
39
+ "access": "public"
40
+ }
41
+ }