agents-relay 2.0.187 → 2.0.188

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/usage.js +3 -4
  2. package/package.json +1 -1
package/dist/usage.js CHANGED
@@ -9,7 +9,7 @@ export class BrowserWorkspaceUsageReader {
9
9
  timeoutMs;
10
10
  now;
11
11
  staleAfterMs;
12
- constructor(command = 'browser-harness', timeoutMs = 10_000, now = () => new Date(), staleAfterMs = 15 * 60_000) {
12
+ constructor(command = join(homedir(), '.local', 'bin', 'webhelm'), timeoutMs = 10_000, now = () => new Date(), staleAfterMs = 15 * 60_000) {
13
13
  this.command = command;
14
14
  this.timeoutMs = timeoutMs;
15
15
  this.now = now;
@@ -18,7 +18,7 @@ export class BrowserWorkspaceUsageReader {
18
18
  async read() {
19
19
  const observedAt = this.now().toISOString();
20
20
  return await new Promise(resolve => {
21
- const child = spawnOwnedProcess(this.command, [], { invocation: 'usage.browser-workspace', timeoutMs: this.timeoutMs, spawn: { stdio: ['pipe', 'pipe', 'ignore'] } });
21
+ const child = spawnOwnedProcess(this.command, ['capacity'], { invocation: 'usage.browser-workspace', timeoutMs: this.timeoutMs, spawn: { stdio: ['ignore', 'pipe', 'ignore'] } });
22
22
  let output = '';
23
23
  let settled = false;
24
24
  const finish = (capacity) => {
@@ -61,11 +61,10 @@ export class BrowserWorkspaceUsageReader {
61
61
  return;
62
62
  }
63
63
  }
64
- catch { /* browser-harness may print startup diagnostics before JSON */ }
64
+ catch { /* Keep accepting the last valid JSON line from WebHelm. */ }
65
65
  }
66
66
  finish(unavailable(code === 0 ? 'Browser Workspace capacity probe returned no usable capacity.' : `Browser Workspace capacity probe exited with code ${code ?? 'unknown'}.`));
67
67
  });
68
- child.stdin?.end('import json\nprint(json.dumps(workspace_capacity()))\n');
69
68
  });
70
69
  }
71
70
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agents-relay",
3
- "version": "2.0.187",
3
+ "version": "2.0.188",
4
4
  "description": "Durable async agent jobs coordinated through GitHub pull requests",
5
5
  "repository": {
6
6
  "type": "git",