agents-relay 2.0.192 → 2.0.193
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/usage.js +2 -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 = '
|
|
12
|
+
constructor(command = process.env.AGENTS_RELAY_WEBHELM_COMMAND || join(homedir(), '.local', 'bin', 'webhelm'), timeoutMs = 30_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,
|
|
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) => {
|