@melaya/runner 1.1.5 → 1.1.6

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.
@@ -948,6 +948,17 @@ export async function startBrowserBridge(opts) {
948
948
  stopWatchLease(sessionId);
949
949
  return;
950
950
  }
951
+ // Idempotent: the trusted UI re-affirms the watch on a heartbeat (every few
952
+ // seconds) and on every reconnect, so browser:watch active=true arrives
953
+ // repeatedly for the SAME session. Restarting the producer each time churned
954
+ // the capture loop and spammed the log. If a producer is already running for
955
+ // this session, just refresh the delivery params and keep the existing loop.
956
+ const existingLease = watchLeases.get(sessionId);
957
+ if (existingLease && existingLease.active) {
958
+ existingLease.framePostUrl = framePostUrl;
959
+ existingLease.runAuthHeader = runAuthHeader;
960
+ return;
961
+ }
951
962
  // Find which runId corresponds to this sessionId.
952
963
  // Priority order:
953
964
  // 1. Interactive session: sessionId is both the key in interactiveSessions
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@melaya/runner",
3
- "version": "1.1.5",
3
+ "version": "1.1.6",
4
4
  "description": "Run Melaya AI pipelines locally with your own LM Studio or Ollama models",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,