Skip to content

The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.

570 B
Raw Blame
// Private fixture: make only publication of an engine-home adoption unavailable until its flag is moved.
import fs from 'node:fs'
import { syncBuiltinESMExports } from 'node:module'

const link = fs.linkSync
fs.linkSync = function (from, to) {
  const flag = process.env.HARNESS_HOME_ADOPTION_FAULT_FILE
  if (flag && fs.existsSync(flag) && /engine-homes\.json\.adoptions\/\d{3}\.json$/.test(String(to))) {
    throw Object.assign(new Error('fixture home adoption storage unavailable'), { code: 'EIO' })
  }
  return link.call(this, from, to)
}
syncBuiltinESMExports()