@melaya/runner 1.0.60 → 1.0.62
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 +13 -6
- package/package.json +1 -1
package/dist/connection.js
CHANGED
|
@@ -496,6 +496,13 @@ export async function connect(opts) {
|
|
|
496
496
|
// to whatever it first downloaded, so every server-side persona
|
|
497
497
|
// fix sits unused. Updated servers always pass this.
|
|
498
498
|
const sharedVersion = String(payload.shared_version ?? "latest");
|
|
499
|
+
// Pipeline name + project mirror what the Node server's POST
|
|
500
|
+
// /pipelines call just created — required so the Monitoring page
|
|
501
|
+
// can tie the live run to its tile (registerRun + every event we
|
|
502
|
+
// emit during this run). Falls back to the synthesised crew-<sid>
|
|
503
|
+
// slug only for the legacy spawn path that didn't ship these.
|
|
504
|
+
const project = String(cfg.project_name ?? "") || `crew-${sid.slice(-12)}`;
|
|
505
|
+
const pipelineName = String(cfg.pipeline_name ?? "") || project;
|
|
499
506
|
console.log(chalk.hex("#10b981")(`\n ▶ Trading crew: ${sid.slice(0, 16)}… (run ${runId.slice(0, 10)}…)`));
|
|
500
507
|
try {
|
|
501
508
|
const mainPyContent = String(cfg.generated_code ?? "").trim();
|
|
@@ -536,7 +543,7 @@ export async function connect(opts) {
|
|
|
536
543
|
socket.emit("runner:event", {
|
|
537
544
|
run_id: runId,
|
|
538
545
|
event_type: "pipeline_phase",
|
|
539
|
-
project
|
|
546
|
+
project,
|
|
540
547
|
step: 1,
|
|
541
548
|
total: 5,
|
|
542
549
|
label: `venv: ${msg}`,
|
|
@@ -548,7 +555,7 @@ export async function connect(opts) {
|
|
|
548
555
|
socket.emit("runner:event", {
|
|
549
556
|
run_id: runId,
|
|
550
557
|
event_type: "agent_message",
|
|
551
|
-
project
|
|
558
|
+
project,
|
|
552
559
|
replyId: `venv-${runId}`,
|
|
553
560
|
replyName: "Runner",
|
|
554
561
|
replyRole: "system",
|
|
@@ -564,14 +571,14 @@ export async function connect(opts) {
|
|
|
564
571
|
socket.emit("runner:runComplete", { runId, status: "failed" });
|
|
565
572
|
return;
|
|
566
573
|
}
|
|
567
|
-
// Register run + set relay project
|
|
568
|
-
//
|
|
569
|
-
|
|
574
|
+
// Register run + set relay project (project + pipelineName
|
|
575
|
+
// hoisted to the top of the handler so the early-exit failure
|
|
576
|
+
// emits above use the SAME values).
|
|
570
577
|
setActiveProject(project);
|
|
571
578
|
socket.emit("runner:registerRun", {
|
|
572
579
|
runId,
|
|
573
580
|
project,
|
|
574
|
-
pipelineName
|
|
581
|
+
pipelineName,
|
|
575
582
|
});
|
|
576
583
|
// Write main.py + config.json to a per-run scratch dir.
|
|
577
584
|
const runDir = join(tmpdir(), `melaya-crew-${runId}`);
|