INNER CODE UNIT · JavaScript
createAdapters
chadbyte/clay · lib/yoke/index.js:346
function createAdapters(opts) {
opts = opts || {};
// Gate adapter creation on binary installation, not OAuth auth status.
// Claude Code supports multiple auth modes (OAuth, Bedrock, Vertex, API key)
// that `claude auth status` does not always detect. Runtime auth failures are
// handled downstream via query-level error detection.
// Tests can supply a fixed installation snapshot without probing or spawning
// vendor binaries; production callers always use the cached host scan.
var installed = opts._installed || checkInstalled();
var auth = { claude: false, codex: false, antigravity: false, opencode: false, kimi: false, grok: false, copilot: false, qwen: false, junie: false, kiro: false };
var adapters = {};
function supportsConfiguredIsolation(vendor) {
var info = vendorRegistry.getVendorInfo(vendor);
return !opts.osUsers || !info || info.osUserIsolation;
}
if (installed.claude && supportsConfiguredIsolation("claude")) {