@volter/supercode-health 0.1.9 → 0.1.10

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/lib/sample.mjs +4 -1
  2. package/package.json +1 -1
package/lib/sample.mjs CHANGED
@@ -3,6 +3,7 @@
3
3
  import { cpus, homedir, loadavg } from 'node:os';
4
4
  import { existsSync, readFileSync, statSync } from 'node:fs';
5
5
  import { run } from './run.mjs';
6
+ import { daemonCall } from './mail.mjs';
6
7
  import { rendererOrigins, originOf, localPort } from './chrome.mjs';
7
8
  import { expiredFailures, failureSummary, keyFor, Ledger, runningRelease, sayOnChanges, slowFailures } from './failures.mjs';
8
9
  import { healthDir } from './paths.mjs';
@@ -423,7 +424,9 @@ export class Sampler {
423
424
  run(bin, ['teams', 'describe'], { timeoutMs: 15_000, env: this.env }).then((r) => ({ ...r, ms: Date.now() - t0 })),
424
425
  run(bin, ['teams', 'launches', 'list'], { timeoutMs: 45_000, env: this.env }),
425
426
  run(bin, ['teams', 'machines', 'list', '--json'], { timeoutMs: 20_000, env: this.env }),
426
- run(bin, ['message', 'expired', '--json'], { timeoutMs: 20_000, env: this.env }),
427
+ // the mailbox's expiries are the daemon's own records (mail step 1): asked of it, never of the native binary
428
+ daemonCall('harness.v1.mail.expired', {}, { env: this.env, timeoutMs: 20_000 })
429
+ .then((answer) => ({ stdout: JSON.stringify(answer?.rows ?? []), error: null }), (error) => ({ stdout: '', error: error.message })),
427
430
  ]);
428
431
  let described = null; try { described = JSON.parse(describe.stdout); } catch { /* the daemon did not answer */ }
429
432
  let data = null; try { data = JSON.parse(status.stdout).data; } catch { /* unreadable */ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volter/supercode-health",
3
- "version": "0.1.9",
3
+ "version": "0.1.10",
4
4
  "type": "module",
5
5
  "description": "Optional machine pack: a cheap, deterministic probe of a machine's vitals that mails the machine's maintainer when a threshold is crossed. Each feature sits behind its own permission barrier.",
6
6
  "license": "MIT",