@melaya/runner 1.0.56 → 1.0.57
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.
- package/dist/connection.js +8 -2
- package/package.json +1 -1
package/dist/connection.js
CHANGED
|
@@ -490,6 +490,12 @@ export async function connect(opts) {
|
|
|
490
490
|
const runId = payload.run_id;
|
|
491
491
|
const sid = payload.strategy_id;
|
|
492
492
|
const cfg = payload.cfg ?? {};
|
|
493
|
+
// Live bundle hash from the server's getSharedBundleVersion. Falls
|
|
494
|
+
// back to "latest" for backward compat with older servers — but
|
|
495
|
+
// that path cache-locks the runner's ~/.melaya-runner/shared dir
|
|
496
|
+
// to whatever it first downloaded, so every server-side persona
|
|
497
|
+
// fix sits unused. Updated servers always pass this.
|
|
498
|
+
const sharedVersion = String(payload.shared_version ?? "latest");
|
|
493
499
|
console.log(chalk.hex("#10b981")(`\n ▶ Trading crew: ${sid.slice(0, 16)}… (run ${runId.slice(0, 10)}…)`));
|
|
494
500
|
try {
|
|
495
501
|
const mainPyContent = String(cfg.generated_code ?? "").trim();
|
|
@@ -522,10 +528,10 @@ export async function connect(opts) {
|
|
|
522
528
|
// `shared.runtime.trading_crew_personas` (per the codegen
|
|
523
529
|
// template's import_path) which lives in the same shared/ tree
|
|
524
530
|
// the pipeline runner uses.
|
|
525
|
-
await ensureSharedModules(opts.serverUrl,
|
|
531
|
+
await ensureSharedModules(opts.serverUrl, sharedVersion);
|
|
526
532
|
// Dedicated venv with agentscope + anthropic + openai installed.
|
|
527
533
|
const { ensurePythonEnv } = await import("./pythonEnv.js");
|
|
528
|
-
const envResult = await ensurePythonEnv(opts.pythonPath,
|
|
534
|
+
const envResult = await ensurePythonEnv(opts.pythonPath, sharedVersion, (msg) => {
|
|
529
535
|
console.log(chalk.gray(` [venv] ${msg}`));
|
|
530
536
|
socket.emit("runner:event", {
|
|
531
537
|
run_id: runId,
|