Skip to content

The micro-VM for AI agents — light enough to embed on your laptop, elastic enough to power an agentic cloud.

656 B
Raw Blame
// Advance the discovery process's retry clock while its HTTPS requests still cross a real socket.
const timers = require('node:timers/promises')
const { syncBuiltinESMExports } = require('node:module')
let elapsed = 0
timers.setTimeout = async (milliseconds) => {
  elapsed += milliseconds
  if (elapsed > 310_000) throw new Error('discovery exceeded its readiness budget')
}
syncBuiltinESMExports()
Object.defineProperty(performance, 'now', { value: () => elapsed })
const realFetch = globalThis.fetch
globalThis.fetch = (url, options) =>
  realFetch(url, {
    ...options,
    headers: { ...options.headers, 'x-test-elapsed-ms': String(elapsed) },
  })