{"_id":"@aotterclam/agent-bridge","_rev":"16-f886cab45b51fd718d33ee667a2b7f4b","name":"@aotterclam/agent-bridge","dist-tags":{"latest":"0.1.17"},"versions":{"0.1.1":{"name":"@aotterclam/agent-bridge","version":"0.1.1","license":"MIT","_id":"@aotterclam/agent-bridge@0.1.1","maintainers":[{"name":"guyspy","email":"guyspy@gmail.com"}],"homepage":"https://github.com/AotterClam/agent-bridge#readme","bugs":{"url":"https://github.com/AotterClam/agent-bridge/issues"},"bin":{"agent-bridge":"src/cli.ts"},"dist":{"shasum":"b18eb3f61017a67c33a78dea69e85985b12583a0","tarball":"https://registry.npmjs.org/@aotterclam/agent-bridge/-/agent-bridge-0.1.1.tgz","fileCount":8,"integrity":"sha512-ecszSg7TC+exoa5i49OfoGRPhNlj1pP4Z74Sqpkxr5iU6DW/D+f8VBKlVgADfdHRUodtsGL3JOu3o6n5W7z9/w==","signatures":[{"sig":"MEUCIQDam0odfsMY53RbSrx2eCdEP3mhFLTfvij1Le8BSkjD3AIgJpuw0P3MuM0HN1EPkhNGLLxX0CKb3q3W2H1D884b2wI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":48799},"type":"module","engines":{"bun":">=1.3.0"},"exports":{".":"./src/index.ts","./cli":"./src/cli.ts"},"gitHead":"679c984ecc3e50aab15b9f55ca1465e018d33867","scripts":{"test":"bun test","check":"tsc --noEmit","start":"bun src/cli.ts"},"_npmUser":{"name":"guyspy","email":"guyspy@gmail.com"},"repository":{"url":"git+https://github.com/AotterClam/agent-bridge.git","type":"git"},"_npmVersion":"10.8.2","description":"Local OpenAI-compatible bridge for official coding-agent runtimes","directories":{},"_nodeVersion":"20.19.6","dependencies":{"zod":"4.4.3","@anthropic-ai/claude-agent-sdk":"0.3.220"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","typescript":"6.0.3","@types/node":"26.1.2"},"_npmOperationalInternal":{"tmp":"tmp/agent-bridge_0.1.1_1785378571069_0.5115613556347329","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@aotterclam/agent-bridge","version":"0.1.2","license":"MIT","_id":"@aotterclam/agent-bridge@0.1.2","maintainers":[{"name":"guyspy","email":"guyspy@gmail.com"}],"homepage":"https://github.com/AotterClam/agent-bridge#readme","bugs":{"url":"https://github.com/AotterClam/agent-bridge/issues"},"bin":{"agent-bridge":"src/cli.ts"},"dist":{"shasum":"9983a7739d4ff4d33b56790613b2347aec4ba373","tarball":"https://registry.npmjs.org/@aotterclam/agent-bridge/-/agent-bridge-0.1.2.tgz","fileCount":8,"integrity":"sha512-3pzsg02RA9kJtpQR43EbQyP33Odgsa3gsIY6l0uU1ozEGW2/eHjfnQFh4gJD6G06mpzz7VipRj056mP65bJgFQ==","signatures":[{"sig":"MEQCICcHYSA5pW1/jeiLgGT3O9wTr6ksbeoxkRcauU142d6yAiAkPBdAyFSbyqjO5vFFglAhfRzgX9ZGd/ZRmFDqjalHmg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":50038},"type":"module","engines":{"bun":">=1.3.0"},"exports":{".":"./src/index.ts","./cli":"./src/cli.ts"},"gitHead":"d82ee1dec31c2b51ff2be08ed4fc7e1fec2d26e6","scripts":{"test":"bun test","check":"tsc --noEmit","start":"bun src/cli.ts"},"_npmUser":{"name":"guyspy","email":"guyspy@gmail.com"},"repository":{"url":"git+https://github.com/AotterClam/agent-bridge.git","type":"git"},"_npmVersion":"10.9.8","description":"Local OpenAI-compatible bridge for official coding-agent runtimes","directories":{},"_nodeVersion":"22.22.3","dependencies":{"zod":"4.4.3","@anthropic-ai/claude-agent-sdk":"0.3.220"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","typescript":"6.0.3","@types/node":"26.1.2"},"_npmOperationalInternal":{"tmp":"tmp/agent-bridge_0.1.2_1785409064053_0.42406398373258436","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@aotterclam/agent-bridge","version":"0.1.3","license":"MIT","_id":"@aotterclam/agent-bridge@0.1.3","maintainers":[{"name":"guyspy","email":"guyspy@gmail.com"}],"homepage":"https://github.com/AotterClam/agent-bridge#readme","bugs":{"url":"https://github.com/AotterClam/agent-bridge/issues"},"bin":{"agent-bridge":"src/cli.ts"},"dist":{"shasum":"d0ff49e8c4f02e240a7000eff0cd51f29d0ccb22","tarball":"https://registry.npmjs.org/@aotterclam/agent-bridge/-/agent-bridge-0.1.3.tgz","fileCount":8,"integrity":"sha512-MsuD+2CKJFnwrFP5ZcaWO8pxWZdLmfaUu4xZDTOeSQg7zAM5a3TPvk3hyGUn569R0u0VjhZD3KFR16YmZQy6Hg==","signatures":[{"sig":"MEUCIQDdN3H0k6AN5AlxsAnC1ZFSse1F4ageDVNieLNz+zUj0gIgRk6SFnN7TFXpWGmScg5TFYRyyZnQkz1a71ZzyQW1Kds=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":52722},"type":"module","engines":{"bun":">=1.3.0"},"exports":{".":"./src/index.ts","./cli":"./src/cli.ts"},"gitHead":"b651b8be6efd50e37c23e9a3fe958771b07d9ecb","scripts":{"test":"bun test","check":"tsc --noEmit","start":"bun src/cli.ts"},"_npmUser":{"name":"guyspy","email":"guyspy@gmail.com"},"repository":{"url":"git+https://github.com/AotterClam/agent-bridge.git","type":"git"},"_npmVersion":"11.16.0","description":"Local OpenAI-compatible bridge for official coding-agent runtimes","directories":{},"_nodeVersion":"26.3.0","dependencies":{"zod":"4.4.3","@anthropic-ai/claude-agent-sdk":"0.3.220"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","typescript":"6.0.3","@types/node":"26.1.2"},"_npmOperationalInternal":{"tmp":"tmp/agent-bridge_0.1.3_1785416162020_0.0752414418427052","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"@aotterclam/agent-bridge","version":"0.1.4","license":"MIT","_id":"@aotterclam/agent-bridge@0.1.4","maintainers":[{"name":"guyspy","email":"guyspy@gmail.com"}],"homepage":"https://github.com/AotterClam/agent-bridge#readme","bugs":{"url":"https://github.com/AotterClam/agent-bridge/issues"},"bin":{"agent-bridge":"src/cli.ts"},"dist":{"shasum":"143848058b279d48178ee088fe4d64612d4dda88","tarball":"https://registry.npmjs.org/@aotterclam/agent-bridge/-/agent-bridge-0.1.4.tgz","fileCount":8,"integrity":"sha512-zUp56IefGa6Aesk8g+zcokN0oWMv/wr6eh9pkFbNBbPzK0KWMwnUAHAcEP1HwRTuuo5xcxlLH6NV4Hw2g/GzIw==","signatures":[{"sig":"MEUCIQDe5KxVPTmA4Up7YSpAgFmOo/z0Qt9tHrWbqxTN1wEiZgIgQUajucj1iKLqLYGU3kIvTVEBwte5udwbxOTyFgO7M+4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":51878},"type":"module","engines":{"bun":">=1.3.0"},"exports":{".":"./src/index.ts","./cli":"./src/cli.ts"},"gitHead":"3465db213673be6d0a9bde3ff854c5aef833a9de","scripts":{"test":"bun test","check":"tsc --noEmit","start":"bun src/cli.ts"},"_npmUser":{"name":"guyspy","email":"guyspy@gmail.com"},"repository":{"url":"git+https://github.com/AotterClam/agent-bridge.git","type":"git"},"_npmVersion":"11.16.0","description":"Local OpenAI-compatible bridge for official coding-agent runtimes","directories":{},"_nodeVersion":"26.3.0","dependencies":{"zod":"4.4.3","@anthropic-ai/claude-agent-sdk":"0.3.220"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","typescript":"6.0.3","@types/node":"26.1.2"},"_npmOperationalInternal":{"tmp":"tmp/agent-bridge_0.1.4_1785475837822_0.8086220234379715","host":"s3://npm-registry-packages-npm-production"}},"0.1.5":{"name":"@aotterclam/agent-bridge","version":"0.1.5","license":"MIT","_id":"@aotterclam/agent-bridge@0.1.5","maintainers":[{"name":"guyspy","email":"guyspy@gmail.com"}],"homepage":"https://github.com/AotterClam/agent-bridge#readme","bugs":{"url":"https://github.com/AotterClam/agent-bridge/issues"},"bin":{"agent-bridge":"dist/cli.js"},"dist":{"shasum":"c30b67f4ac823346f2d01d9f68869ab9e4970564","tarball":"https://registry.npmjs.org/@aotterclam/agent-bridge/-/agent-bridge-0.1.5.tgz","fileCount":13,"integrity":"sha512-wdmHLZeBIJxActYhG1gzQR6XA9YWObireT3gboc03T9v7ocjj+V7SZA7LaoeW5pkWeKGDuAur2jYqcgTtJpx3A==","signatures":[{"sig":"MEUCIQCHmP1GHUA/ikdsQ4+r9dw3A4JxBVshhetaIGNrk0LJRwIgfuttOvCXK4CMzQ1Uyn9P6ULbP08+0g8kU7UMghqqs/c=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":62453},"type":"module","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./cli":{"types":"./dist/cli.d.ts","import":"./dist/cli.js"}},"gitHead":"4c4d9662368c03d91b41ae8c85aa44dab414301e","scripts":{"test":"bun test","build":"node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.build.json","check":"tsc --noEmit","start":"node dist/cli.js","prepack":"npm run build","prestart":"npm run build","test:node":"npm run build && node tests/node-smoke.mjs"},"_npmUser":{"name":"guyspy","email":"guyspy@gmail.com"},"repository":{"url":"git+https://github.com/AotterClam/agent-bridge.git","type":"git"},"_npmVersion":"11.16.0","description":"Local OpenAI-compatible bridge for official coding-agent runtimes","directories":{},"_nodeVersion":"26.3.0","dependencies":{"zod":"4.4.3","@anthropic-ai/claude-agent-sdk":"0.3.220"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","typescript":"6.0.3","@types/node":"26.1.2"},"_npmOperationalInternal":{"tmp":"tmp/agent-bridge_0.1.5_1785486440395_0.3638406113369197","host":"s3://npm-registry-packages-npm-production"}},"0.1.6":{"name":"@aotterclam/agent-bridge","version":"0.1.6","license":"MIT","_id":"@aotterclam/agent-bridge@0.1.6","maintainers":[{"name":"guyspy","email":"guyspy@gmail.com"}],"homepage":"https://github.com/AotterClam/agent-bridge#readme","bugs":{"url":"https://github.com/AotterClam/agent-bridge/issues"},"bin":{"agent-bridge":"dist/cli.js"},"dist":{"shasum":"8875d69f20a1729814eb21febf160e4c3869f7e0","tarball":"https://registry.npmjs.org/@aotterclam/agent-bridge/-/agent-bridge-0.1.6.tgz","fileCount":13,"integrity":"sha512-EqlIhn9ipo/CcOtbWwdUYVZR0FxfNG9CwvGWYgOAHnRe2xQvqlj1izV0H4GjRfWCnfUetmVtez7YAw5OZml0hw==","signatures":[{"sig":"MEQCIHNp4DzsDhjIUgjTJ3WHs2+Tsvt+VavWH7THX1Me2x9dAiBMP8X5jzBFWF5EYQfjSQf2XUMJ8fo2EFJcPWBTmUe+nw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":63675},"type":"module","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./cli":{"types":"./dist/cli.d.ts","import":"./dist/cli.js"}},"gitHead":"5feb721413102995afed8db3e30ec45bc6ab47b6","scripts":{"test":"bun test","build":"node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.build.json","check":"tsc --noEmit","start":"node dist/cli.js","prepack":"npm run build","prestart":"npm run build","test:node":"npm run build && node tests/node-smoke.mjs"},"_npmUser":{"name":"guyspy","email":"guyspy@gmail.com"},"repository":{"url":"git+https://github.com/AotterClam/agent-bridge.git","type":"git"},"_npmVersion":"10.8.2","description":"Local OpenAI-compatible bridge for official coding-agent runtimes","directories":{},"_nodeVersion":"20.19.6","dependencies":{"zod":"4.4.3","@anthropic-ai/claude-agent-sdk":"0.3.220"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","typescript":"6.0.3","@types/node":"26.1.2"},"_npmOperationalInternal":{"tmp":"tmp/agent-bridge_0.1.6_1785825768676_0.13044198779127547","host":"s3://npm-registry-packages-npm-production"}},"0.1.8":{"name":"@aotterclam/agent-bridge","version":"0.1.8","license":"MIT","_id":"@aotterclam/agent-bridge@0.1.8","maintainers":[{"name":"guyspy","email":"guyspy@gmail.com"}],"homepage":"https://github.com/AotterClam/agent-bridge#readme","bugs":{"url":"https://github.com/AotterClam/agent-bridge/issues"},"bin":{"agent-bridge":"dist/cli.js"},"dist":{"shasum":"e238911edec8aaa4f9af8304708c088df882d000","tarball":"https://registry.npmjs.org/@aotterclam/agent-bridge/-/agent-bridge-0.1.8.tgz","fileCount":13,"integrity":"sha512-k/cEq6uc+4nYvB140MKEipYAFFki2y7Gr3XjXtedDX0Uhi+42wABReUXeMgbWiXe/0tMhSZ3G2zB9Qo82t3wqQ==","signatures":[{"sig":"MEQCIEjPmGRb7VEX/ESOQxrfJ0o+OulJR9/sS/9TZQkkvafXAiApe8LhqdiMqEiSxuQ7ixGrbS6bMpD1qe4qmJuAHpm3Qw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":69635},"type":"module","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./cli":{"types":"./dist/cli.d.ts","import":"./dist/cli.js"}},"gitHead":"85ad5eccac4aa7c6438d1d08d46dbf897d2772d4","scripts":{"test":"bun test","build":"node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.build.json","check":"tsc --noEmit","start":"node dist/cli.js","prepack":"npm run build","prestart":"npm run build","test:node":"npm run build && node tests/node-smoke.mjs"},"_npmUser":{"name":"guyspy","email":"guyspy@gmail.com"},"repository":{"url":"git+https://github.com/AotterClam/agent-bridge.git","type":"git"},"_npmVersion":"11.16.0","description":"Local OpenAI-compatible bridge for official coding-agent runtimes","directories":{},"_nodeVersion":"26.3.0","dependencies":{"zod":"4.4.3","@anthropic-ai/claude-agent-sdk":"0.3.220"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","typescript":"6.0.3","@types/node":"26.1.2"},"_npmOperationalInternal":{"tmp":"tmp/agent-bridge_0.1.8_1785849119536_0.6220965169021142","host":"s3://npm-registry-packages-npm-production"}},"0.1.9":{"name":"@aotterclam/agent-bridge","version":"0.1.9","license":"MIT","_id":"@aotterclam/agent-bridge@0.1.9","maintainers":[{"name":"guyspy","email":"guyspy@gmail.com"}],"homepage":"https://github.com/AotterClam/agent-bridge#readme","bugs":{"url":"https://github.com/AotterClam/agent-bridge/issues"},"bin":{"agent-bridge":"dist/cli.js"},"dist":{"shasum":"9520eaf48c783c76448a0ac50562432f84b06d76","tarball":"https://registry.npmjs.org/@aotterclam/agent-bridge/-/agent-bridge-0.1.9.tgz","fileCount":15,"integrity":"sha512-pgCZz8lu0aNbLdMFt9WX+vi7bgR0NinQDB1hbpXbUPLpzRZim9WGKPR1/BDNKVyckemid1Pv9ZOvKtcHJHVqmg==","signatures":[{"sig":"MEUCIDyCJQayf26cQY7SnTTWpsjz46id0vaxDEBNYG0IHLetAiEAnMgVuxOKL+YzjwzqgOMK19tqqh1louoAzyMzYuyBFgs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":93210},"type":"module","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./cli":{"types":"./dist/cli.d.ts","import":"./dist/cli.js"}},"gitHead":"fba808bc2d0f4cfe7ceb1bfd291c6f9b8cf6ae86","scripts":{"test":"bun test","build":"node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.build.json","check":"tsc --noEmit","start":"node dist/cli.js","prepack":"npm run build","prestart":"npm run build","test:grok":"bun tests/grok-smoke.mjs","test:node":"npm run build && node tests/node-smoke.mjs"},"_npmUser":{"name":"guyspy","email":"guyspy@gmail.com"},"repository":{"url":"git+https://github.com/AotterClam/agent-bridge.git","type":"git"},"_npmVersion":"11.16.0","description":"Local OpenAI-compatible bridge for official coding-agent runtimes","directories":{},"_nodeVersion":"26.3.0","dependencies":{"zod":"4.4.3","@anthropic-ai/claude-agent-sdk":"0.3.220"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","typescript":"6.0.3","@types/node":"26.1.2"},"_npmOperationalInternal":{"tmp":"tmp/agent-bridge_0.1.9_1786939765955_0.7332079632539099","host":"s3://npm-registry-packages-npm-production"}},"0.1.10":{"name":"@aotterclam/agent-bridge","version":"0.1.10","license":"MIT","_id":"@aotterclam/agent-bridge@0.1.10","maintainers":[{"name":"guyspy","email":"guyspy@gmail.com"}],"homepage":"https://github.com/AotterClam/agent-bridge#readme","bugs":{"url":"https://github.com/AotterClam/agent-bridge/issues"},"bin":{"agent-bridge":"dist/cli.js"},"dist":{"shasum":"b341340315fc2d4da44ba743f260f5d9d49dfcf2","tarball":"https://registry.npmjs.org/@aotterclam/agent-bridge/-/agent-bridge-0.1.10.tgz","fileCount":15,"integrity":"sha512-+CJg6+bceV0eBfDL6DWt6UNAO4qiGHJVxAwBDlKRXWx2lOWlvm1MoTnKLJghi+6Z82dmn94vYNB1yvMFRAxPEQ==","signatures":[{"sig":"MEYCIQDU10b0RBynv3McPQH0lOhF1+4GLhS1GMN9ZeZXcgOoWgIhAM4GZRvrSaCG08Gmxz+JhF4jHHTIasM6OXGZf2ayE/DB","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":101787},"type":"module","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./cli":{"types":"./dist/cli.d.ts","import":"./dist/cli.js"}},"gitHead":"285efed2440c2512922863154095f9d0b7af74f9","scripts":{"test":"bun test","build":"node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.build.json","check":"tsc --noEmit","start":"node dist/cli.js","prepack":"npm run build","prestart":"npm run build","test:grok":"bun tests/grok-smoke.mjs","test:node":"npm run build && node tests/node-smoke.mjs"},"_npmUser":{"name":"guyspy","email":"guyspy@gmail.com"},"repository":{"url":"git+https://github.com/AotterClam/agent-bridge.git","type":"git"},"_npmVersion":"11.16.0","description":"Local OpenAI-compatible bridge for official coding-agent runtimes","directories":{},"_nodeVersion":"26.3.0","dependencies":{"zod":"4.4.3","@anthropic-ai/claude-agent-sdk":"0.3.220"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","typescript":"6.0.3","@types/node":"26.1.2"},"_npmOperationalInternal":{"tmp":"tmp/agent-bridge_0.1.10_1787042573523_0.35051065512336277","host":"s3://npm-registry-packages-npm-production"}},"0.1.11":{"name":"@aotterclam/agent-bridge","version":"0.1.11","license":"MIT","_id":"@aotterclam/agent-bridge@0.1.11","maintainers":[{"name":"guyspy","email":"guyspy@gmail.com"}],"homepage":"https://github.com/AotterClam/agent-bridge#readme","bugs":{"url":"https://github.com/AotterClam/agent-bridge/issues"},"bin":{"agent-bridge":"dist/cli.js"},"dist":{"shasum":"a4d6c9ac054a8ec83b2d0c060d66cbaa60fb58ff","tarball":"https://registry.npmjs.org/@aotterclam/agent-bridge/-/agent-bridge-0.1.11.tgz","fileCount":19,"integrity":"sha512-R9gkjAIQUUCXlaGvvbmGnnY5NT8ZCIFNNJUDXnWX2jXatyUlIQ05mAu/OGIvMylx/+TmLWHb0piT+d75ejhHVQ==","signatures":[{"sig":"MEUCICnPRH5hPaadgCjVDLEEV60avxocZQPLI12p7Hgmq590AiEA5CVHnrZMBblfBbenswqGgIAJ3KtPtUl/16ZEKr9ZDSw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":157876},"type":"module","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./cli":{"types":"./dist/cli.d.ts","import":"./dist/cli.js"}},"gitHead":"c08346fd0043b94a5dec756ebc5dce36497e070e","scripts":{"test":"bun test","build":"node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.build.json && node -e \"require('node:fs').chmodSync('dist/cli.js', 0o755)\"","check":"tsc --noEmit","start":"node dist/cli.js","prepack":"npm run build","prestart":"npm run build","test:grok":"bun tests/grok-smoke.mjs","test:node":"npm run build && node tests/node-smoke.mjs","test:antigravity":"bun tests/antigravity-smoke.mjs"},"_npmUser":{"name":"guyspy","email":"guyspy@gmail.com"},"repository":{"url":"git+https://github.com/AotterClam/agent-bridge.git","type":"git"},"_npmVersion":"10.8.2","description":"Local OpenAI-compatible bridge for official coding-agent runtimes","directories":{},"_nodeVersion":"20.19.6","dependencies":{"zod":"4.4.3","@anthropic-ai/claude-agent-sdk":"0.3.220"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","typescript":"6.0.3","@types/node":"26.1.2"},"_npmOperationalInternal":{"tmp":"tmp/agent-bridge_0.1.11_1787196832704_0.7474338154887341","host":"s3://npm-registry-packages-npm-production"}},"0.1.12":{"name":"@aotterclam/agent-bridge","version":"0.1.12","license":"MIT","_id":"@aotterclam/agent-bridge@0.1.12","maintainers":[{"name":"guyspy","email":"guyspy@gmail.com"}],"homepage":"https://github.com/AotterClam/agent-bridge#readme","bugs":{"url":"https://github.com/AotterClam/agent-bridge/issues"},"bin":{"agent-bridge":"dist/cli.js"},"dist":{"shasum":"7eb21cfc5b399c6a6e7913b06b1e777166180742","tarball":"https://registry.npmjs.org/@aotterclam/agent-bridge/-/agent-bridge-0.1.12.tgz","fileCount":21,"integrity":"sha512-NqRldX842fUm8X9fSc/Fh6UoYEFKspM9L+Ra1zeRN7pNUkXK5djk2t3VMqKJ2PaWjD66GsUzzzepraVr8+oP2w==","signatures":[{"sig":"MEUCIBEz0sPkKY+93jYh8FpF8QL7IYXnx3/WL6VzvQQsG+krAiEA0zpuXZnwqQGBFDu5qjGeBLUnodB67bbnY9g410FWjF4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":177515},"type":"module","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./cli":{"types":"./dist/cli.d.ts","import":"./dist/cli.js"}},"gitHead":"0c6377c720eaf09f5f6a906b3d8872b521fb025f","scripts":{"test":"bun test","build":"node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.build.json && node -e \"require('node:fs').chmodSync('dist/cli.js', 0o755)\"","check":"tsc --noEmit","start":"node dist/cli.js","prepack":"npm run build","prestart":"npm run build","test:grok":"bun tests/grok-smoke.mjs","test:node":"npm run build && node tests/node-smoke.mjs","test:antigravity":"bun tests/antigravity-smoke.mjs"},"_npmUser":{"name":"guyspy","email":"guyspy@gmail.com"},"repository":{"url":"git+https://github.com/AotterClam/agent-bridge.git","type":"git"},"_npmVersion":"11.16.0","description":"Local OpenAI-compatible bridge for official coding-agent runtimes","directories":{},"_nodeVersion":"26.3.0","dependencies":{"zod":"4.4.3","@anthropic-ai/claude-agent-sdk":"0.3.220"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","typescript":"6.0.3","@types/node":"26.1.2"},"_npmOperationalInternal":{"tmp":"tmp/agent-bridge_0.1.12_1787712926541_0.1650912538671867","host":"s3://npm-registry-packages-npm-production"}},"0.1.13":{"name":"@aotterclam/agent-bridge","version":"0.1.13","license":"MIT","_id":"@aotterclam/agent-bridge@0.1.13","maintainers":[{"name":"guyspy","email":"guyspy@gmail.com"}],"homepage":"https://github.com/AotterClam/agent-bridge#readme","bugs":{"url":"https://github.com/AotterClam/agent-bridge/issues"},"bin":{"agent-bridge":"dist/cli.js"},"dist":{"shasum":"887f3f6efce7bdb1e5ade9d32e36558e8904de3b","tarball":"https://registry.npmjs.org/@aotterclam/agent-bridge/-/agent-bridge-0.1.13.tgz","fileCount":27,"integrity":"sha512-KrYsVNohzMFKMbI1ZWbb16CNRSXWtv4uw3B/Vc6g/F2iELc6GCW74zxfqXgEebAdHpCwtfjh2L72/b0bNDAobw==","signatures":[{"sig":"MEYCIQCQ3tvud8bIYSar5146PeBomUnL0UMIUvhdQZgZoKikLQIhAJTSbqeH9buWD73WZbTj/6Q7tnYSs0mXfPV+mnL95p56","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":314366},"type":"module","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./cli":{"types":"./dist/cli.d.ts","import":"./dist/cli.js"}},"scripts":{"test":"bun test","build":"node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.build.json && node -e \"require('node:fs').chmodSync('dist/cli.js', 0o755)\"","check":"tsc --noEmit","start":"node dist/cli.js","prepack":"npm run build","prestart":"npm run build","test:grok":"bun tests/grok-smoke.mjs","test:node":"npm run build && node tests/node-smoke.mjs","test:antigravity":"bun tests/antigravity-smoke.mjs"},"_npmUser":{"name":"guyspy","email":"guyspy@gmail.com"},"repository":{"url":"git+https://github.com/AotterClam/agent-bridge.git","type":"git"},"_npmVersion":"11.16.0","description":"Local OpenAI-compatible bridge for official coding-agent runtimes","directories":{},"_nodeVersion":"26.3.0","dependencies":{"zod":"4.4.3","@anthropic-ai/claude-agent-sdk":"0.3.220"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","typescript":"6.0.3","@types/node":"26.1.2"},"_npmOperationalInternal":{"tmp":"tmp/agent-bridge_0.1.13_1787932200150_0.1469640564361332","host":"s3://npm-registry-packages-npm-production"}},"0.1.14":{"name":"@aotterclam/agent-bridge","version":"0.1.14","license":"MIT","_id":"@aotterclam/agent-bridge@0.1.14","maintainers":[{"name":"guyspy","email":"guyspy@gmail.com"}],"homepage":"https://github.com/AotterClam/agent-bridge#readme","bugs":{"url":"https://github.com/AotterClam/agent-bridge/issues"},"bin":{"agent-bridge":"dist/cli.js"},"dist":{"shasum":"97752dccc7edb80aa3fcf192f81553d2a7d2e121","tarball":"https://registry.npmjs.org/@aotterclam/agent-bridge/-/agent-bridge-0.1.14.tgz","fileCount":29,"integrity":"sha512-ccL/YsiOQcBOalTUvtWzqtB3rJX0+8TQrI6EPrAiQLfeJCl3YdY/JhrEsf7EoZQWcc7s/Afm9LZUN1HNvfqq/w==","signatures":[{"sig":"MEUCIDMSdEIDDY34NmPCBuv1DimxY5Pnb5q0JKt+4syY484ZAiEApFjyzbK6mSc0hMbUftbejQzccVoaYaUvMhXwOF34PFI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":364554},"type":"module","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./cli":{"types":"./dist/cli.d.ts","import":"./dist/cli.js"}},"gitHead":"31806db61e4b0d6f1f2f3c7ec051d03e4b0522c4","scripts":{"test":"bun test","build":"node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.build.json && node -e \"require('node:fs').chmodSync('dist/cli.js', 0o755)\"","check":"tsc --noEmit","start":"node dist/cli.js","prepack":"npm run build","prestart":"npm run build","test:grok":"bun tests/grok-smoke.mjs","test:node":"npm run build && node tests/node-smoke.mjs","test:antigravity":"bun tests/antigravity-smoke.mjs"},"_npmUser":{"name":"guyspy","email":"guyspy@gmail.com"},"repository":{"url":"git+https://github.com/AotterClam/agent-bridge.git","type":"git"},"_npmVersion":"11.16.0","description":"Local OpenAI-compatible bridge for official coding-agent runtimes","directories":{},"_nodeVersion":"26.3.0","dependencies":{"zod":"4.4.3","@anthropic-ai/claude-agent-sdk":"0.3.220"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","typescript":"6.0.3","@types/node":"26.1.2"},"_npmOperationalInternal":{"tmp":"tmp/agent-bridge_0.1.14_1788237953178_0.422669690541126","host":"s3://npm-registry-packages-npm-production"}},"0.1.15":{"name":"@aotterclam/agent-bridge","version":"0.1.15","license":"MIT","_id":"@aotterclam/agent-bridge@0.1.15","maintainers":[{"name":"guyspy","email":"guyspy@gmail.com"}],"homepage":"https://github.com/AotterClam/agent-bridge#readme","bugs":{"url":"https://github.com/AotterClam/agent-bridge/issues"},"bin":{"agent-bridge":"dist/cli.js"},"dist":{"shasum":"a8c705bc8f28d7e5e2d3ec0aa08b251eea35b201","tarball":"https://registry.npmjs.org/@aotterclam/agent-bridge/-/agent-bridge-0.1.15.tgz","fileCount":29,"integrity":"sha512-yNJKnWsP5sX1Z8vVvU5z3g9gj9CpROgAeCSvtIbkaCyrfSr4whBKg9MEA6a2YPzdY+cA9PdULnK2vn4nEE8ZHg==","signatures":[{"sig":"MEUCIEC6j78F+aiiPlUFNMqPA1k30OCNvpa2YAfAz7Q/PS1GAiEAy3TtXRri8uCIZEKfD8ZR3KZ/WNnEnPNUVdqVQ0liPcQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":369570},"type":"module","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./cli":{"types":"./dist/cli.d.ts","import":"./dist/cli.js"}},"gitHead":"b77652a1f0a754ffab40cbdf08d2e2a02b445682","scripts":{"test":"bun test","build":"node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.build.json && node -e \"require('node:fs').chmodSync('dist/cli.js', 0o755)\"","check":"tsc --noEmit","start":"node dist/cli.js","prepack":"npm run build","prestart":"npm run build","test:grok":"bun tests/grok-smoke.mjs","test:node":"npm run build && node tests/node-smoke.mjs","test:antigravity":"bun tests/antigravity-smoke.mjs"},"_npmUser":{"name":"guyspy","email":"guyspy@gmail.com"},"repository":{"url":"git+https://github.com/AotterClam/agent-bridge.git","type":"git"},"_npmVersion":"11.16.0","description":"Local OpenAI-compatible bridge for official coding-agent runtimes","directories":{},"_nodeVersion":"26.3.0","dependencies":{"zod":"4.4.3","@anthropic-ai/claude-agent-sdk":"0.3.220"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","typescript":"6.0.3","@types/node":"26.1.2"},"_npmOperationalInternal":{"tmp":"tmp/agent-bridge_0.1.15_1788417205296_0.626591002774131","host":"s3://npm-registry-packages-npm-production"}},"0.1.16":{"name":"@aotterclam/agent-bridge","version":"0.1.16","license":"MIT","_id":"@aotterclam/agent-bridge@0.1.16","maintainers":[{"name":"guyspy","email":"guyspy@gmail.com"}],"homepage":"https://github.com/AotterClam/agent-bridge#readme","bugs":{"url":"https://github.com/AotterClam/agent-bridge/issues"},"bin":{"agent-bridge":"dist/cli.js"},"dist":{"shasum":"75b1712d3c5826c08bbcb0916489e6db3505691b","tarball":"https://registry.npmjs.org/@aotterclam/agent-bridge/-/agent-bridge-0.1.16.tgz","fileCount":29,"integrity":"sha512-ofLVJfAubRgycsrvHK1QkP6NqOzk6Pfy3QQLQMFByBWsz5dRJMHaglWSaxYA+2RHtokWY9r2+Z3nF7+sVhv8VA==","signatures":[{"sig":"MEYCIQDGQGhSULju197MZK5BT6UASdEQFX9jtSzMdNd6NV/zIwIhAMbCGlzyBhqE1KTjy3dyM/Uxf7fFNi2JRVsaapVCqXi4","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":380145},"type":"module","_from":"file:/private/tmp/aotterclam-agent-bridge-0.1.16.tgz","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./cli":{"types":"./dist/cli.d.ts","import":"./dist/cli.js"}},"scripts":{"test":"bun test","build":"node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.build.json && node -e \"require('node:fs').chmodSync('dist/cli.js', 0o755)\"","check":"tsc --noEmit","start":"node dist/cli.js","prepack":"npm run build","prestart":"npm run build","test:grok":"bun tests/grok-smoke.mjs","test:node":"npm run build && node tests/node-smoke.mjs","test:codex":"bun tests/codex-smoke.mjs","test:antigravity":"bun tests/antigravity-smoke.mjs"},"_npmUser":{"name":"guyspy","email":"guyspy@gmail.com"},"_resolved":"/private/tmp/aotterclam-agent-bridge-0.1.16.tgz","_integrity":"sha512-ofLVJfAubRgycsrvHK1QkP6NqOzk6Pfy3QQLQMFByBWsz5dRJMHaglWSaxYA+2RHtokWY9r2+Z3nF7+sVhv8VA==","repository":{"url":"git+https://github.com/AotterClam/agent-bridge.git","type":"git"},"_npmVersion":"11.17.0","description":"Local OpenAI-compatible bridge for official coding-agent runtimes","directories":{},"_nodeVersion":"24.19.0","dependencies":{"zod":"4.4.3","@anthropic-ai/claude-agent-sdk":"0.3.220"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","typescript":"6.0.3","@types/node":"26.1.2"},"_npmOperationalInternal":{"tmp":"tmp/agent-bridge_0.1.16_1788952478362_0.9198387986627772","host":"s3://npm-registry-packages-npm-production"}},"0.1.17":{"name":"@aotterclam/agent-bridge","version":"0.1.17","description":"Local OpenAI-compatible bridge for official coding-agent runtimes","license":"MIT","repository":{"type":"git","url":"git+https://github.com/AotterClam/agent-bridge.git"},"bugs":{"url":"https://github.com/AotterClam/agent-bridge/issues"},"engines":{"node":">=22"},"type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./cli":{"types":"./dist/cli.d.ts","import":"./dist/cli.js"}},"bin":{"agent-bridge":"dist/cli.js"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"scripts":{"build":"node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.build.json && node -e \"require('node:fs').chmodSync('dist/cli.js', 0o755)\"","check":"tsc --noEmit","prepack":"npm run build","prestart":"npm run build","start":"node dist/cli.js","test":"bun test","test:node":"npm run build && node tests/node-smoke.mjs","test:codex":"bun tests/codex-smoke.mjs","test:grok":"bun tests/grok-smoke.mjs","test:antigravity":"bun tests/antigravity-smoke.mjs"},"dependencies":{"@anthropic-ai/claude-agent-sdk":"0.3.220","zod":"4.4.3"},"devDependencies":{"@types/bun":"latest","@types/node":"26.1.2","typescript":"6.0.3"},"_id":"@aotterclam/agent-bridge@0.1.17","homepage":"https://github.com/AotterClam/agent-bridge#readme","_nodeVersion":"26.3.0","_npmVersion":"11.16.0","dist":{"integrity":"sha512-SAFHvLnCn71EoR/a/uCp2J3hWMLO6PfUwG6K/ikfUYu+YshpyIPZcZryFe0DrNhs+Yt8Snrhamqy3QRI1MhmEQ==","shasum":"9b8a076d36b32d26da30d974cde50c5f2273a5ed","tarball":"https://registry.npmjs.org/@aotterclam/agent-bridge/-/agent-bridge-0.1.17.tgz","fileCount":29,"unpackedSize":381429,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCTYhN8af0Glo++SJ6lKdEirva7oZf8zwjtDPhjWRBtEwIgKXE7zYAjUPgnuolc6i5LefiLhALi6JUBfh0weYmtACE="}]},"_npmUser":{"name":"guyspy","email":"guyspy@gmail.com"},"directories":{},"maintainers":[{"name":"guyspy","email":"guyspy@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/agent-bridge_0.1.17_1789003194464_0.4503386211343572"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-30T02:29:30.958Z","modified":"2026-09-10T01:19:54.833Z","0.1.1":"2026-07-30T02:29:31.232Z","0.1.2":"2026-07-30T10:57:44.210Z","0.1.3":"2026-07-30T12:56:02.167Z","0.1.4":"2026-07-31T05:30:37.958Z","0.1.5":"2026-07-31T08:27:20.540Z","0.1.6":"2026-08-04T06:42:48.834Z","0.1.8":"2026-08-04T13:11:59.713Z","0.1.9":"2026-08-17T04:09:26.159Z","0.1.10":"2026-08-18T08:42:53.668Z","0.1.11":"2026-08-20T03:33:52.859Z","0.1.12":"2026-08-26T02:55:26.694Z","0.1.13":"2026-08-28T15:50:00.290Z","0.1.14":"2026-09-01T04:45:53.338Z","0.1.15":"2026-09-03T06:33:25.468Z","0.1.16":"2026-09-09T11:14:38.528Z","0.1.17":"2026-09-10T01:19:54.658Z"},"bugs":{"url":"https://github.com/AotterClam/agent-bridge/issues"},"license":"MIT","homepage":"https://github.com/AotterClam/agent-bridge#readme","repository":{"type":"git","url":"git+https://github.com/AotterClam/agent-bridge.git"},"description":"Local OpenAI-compatible bridge for official coding-agent runtimes","maintainers":[{"name":"guyspy","email":"guyspy@gmail.com"}],"readme":"# @aotterclam/agent-bridge\n\n[![npm version](https://img.shields.io/npm/v/%40aotterclam%2Fagent-bridge)](https://www.npmjs.com/package/@aotterclam/agent-bridge)\n\nA loopback OpenAI-compatible API bridge for local coding agents: **Antigravity (Gemini)**, **Claude Code**, **Codex**, and **Grok Build**. It uses official local runtimes and their existing sign-ins while preserving native model IDs, streaming SSE tokens, reasoning content, and function tool calls.\n\n---\n\n## Quick start\n\nYou can use Agent Bridge in two ways:\n\n### Option A: Standalone CLI (Zero Install)\n\nRun directly from any terminal to start a local server with auto-discovery, live status indicators, and ready-to-run cURL examples:\n\n```sh\nnpx @aotterclam/agent-bridge@latest\n# or with bunx:\nbunx @aotterclam/agent-bridge\n```\n\n👉 [Jump to Standalone CLI Guide](#1-standalone-cli) for flags (`--port`, `--token`, `--debug`, `--log-file`), cURL examples, and token routing.\n\n---\n\n### Option B: Embedded in Application (Library)\n\nInstall into your project to let your application control the bridge lifecycle directly:\n\n```sh\nbun add @aotterclam/agent-bridge\n# or: npm install @aotterclam/agent-bridge\n```\n\n```ts\nimport { startAgentBridge } from \"@aotterclam/agent-bridge\";\nimport { createOpenAICompatible } from \"@ai-sdk/openai-compatible\";\n\nconst bridge = await startAgentBridge();\nconst { adapter, baseUrl, apiKey } = await bridge.connection(\"antigravity\");\n\nconst model = createOpenAICompatible({\n  name: \"local-agent-bridge\",\n  baseURL: baseUrl,\n  apiKey,\n}).chatModel(adapter.models[0]!.id);\n```\n\n👉 [Jump to Embedded Library Guide](#2-embedded-library-mode) for multi-agent switching, discovery, and lifecycle management.\n\n---\n\n## Supported agents & requirements\n\n| Adapter ID | Agent Name | Local Requirement |\n| :--- | :--- | :--- |\n| `antigravity` | Antigravity (Gemini) | Antigravity CLI (`agy`) installed and signed in |\n| `claude` | Claude Code | Claude Code installed and signed in |\n| `codex` | Codex | Codex CLI 0.147.0+ installed and signed in |\n| `grok` | Grok Build | Grok Build CLI installed and signed in |\n\n*Requires Node.js 22+ or Bun 1.3+.*\n\n---\n\n## 1. Standalone CLI\n\n### Running the server\n\n```sh\n# Start on default port (3457) with random control token:\nnpx @aotterclam/agent-bridge@latest\n\n# Specify custom port, discovery token, and logging:\nnpx @aotterclam/agent-bridge@latest --port 8080 --token secret-token --debug --log-file ./agent-bridge.log\n```\n\nOr configure via environment variables:\n\n```sh\nexport AGENT_BRIDGE_PORT=3457\nexport AGENT_BRIDGE_CONTROL_TOKEN=\"$(openssl rand -hex 32)\"\nnpx @aotterclam/agent-bridge@latest\n```\n\n### CLI options\n\n| Option | Shorthand | Description |\n| :--- | :--- | :--- |\n| `--port <number>` | `-p` | Port to listen on (default: `3457` or `AGENT_BRIDGE_PORT`) |\n| `--token <string>` | `-t` | Control token for discovery (default: `AGENT_BRIDGE_CONTROL_TOKEN` or a random token per run) |\n| `--log-level <level>` | `-l` | Log verbosity: `debug`, `info`, `warn`, `error`, `silent` (default: `info`) |\n| `--debug` | `-d` | Shorthand for `--log-level debug` |\n| `--log-file <path>` | `-f` | Append structured logs to specified file path |\n| `--format <format>` | | Output format: `pretty` or `json` (default: `pretty`) |\n| `--quiet` | `-q` | Suppress startup banner and set log level to `silent` |\n| `--version` | `-v` | Show version number |\n| `--help` | `-h` | Show help and available options |\n\n### How provider switching works\n\nAgent Bridge routes requests using **Capability Tokens** derived from the master control token. There is no stateful switch endpoint; switching providers simply means passing that adapter's capability token in the `Authorization: Bearer <token>` header along with one of its native model IDs.\n\nBecause routing is token-scoped, identical model IDs across different providers never collide.\n\n### Ready-to-run cURL examples\n\n1. Query available adapters and their capability tokens:\n```sh\ncurl -H \"Authorization: Bearer my-control-token\" http://127.0.0.1:3457/capabilities\n```\n\n2. Send chat completion to **Antigravity (Gemini)**:\n```sh\ncurl http://127.0.0.1:3457/v1/chat/completions \\\n  -H \"Authorization: Bearer <ANTIGRAVITY_CAPABILITY_TOKEN>\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"model\": \"gemini-3.7-flash\",\n    \"messages\": [{\"role\": \"user\", \"content\": \"Explain quantum computing in one sentence.\"}]\n  }'\n```\n\n3. Send chat completion to **Codex**:\n```sh\ncurl http://127.0.0.1:3457/v1/chat/completions \\\n  -H \"Authorization: Bearer <CODEX_CAPABILITY_TOKEN>\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"model\": \"gpt-5.6-sol\",\n    \"messages\": [{\"role\": \"user\", \"content\": \"Explain quantum computing in one sentence.\"}]\n  }'\n```\n\n4. Send chat completion to **Claude Code**:\n```sh\ncurl http://127.0.0.1:3457/v1/chat/completions \\\n  -H \"Authorization: Bearer <CLAUDE_CAPABILITY_TOKEN>\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"model\": \"claude-opus-5[1m]\",\n    \"messages\": [{\"role\": \"user\", \"content\": \"Explain quantum computing in one sentence.\"}]\n  }'\n```\n\n5. Send chat completion to **Grok Build**:\n```sh\ncurl http://127.0.0.1:3457/v1/chat/completions \\\n  -H \"Authorization: Bearer <GROK_CAPABILITY_TOKEN>\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"model\": \"grok-4.6\",\n    \"messages\": [{\"role\": \"user\", \"content\": \"Explain quantum computing in one sentence.\"}]\n  }'\n```\n\n6. Same turn over the stateless **Responses API** (any adapter):\n```sh\ncurl http://127.0.0.1:3457/v1/responses \\\n  -H \"Authorization: Bearer <CLAUDE_CAPABILITY_TOKEN>\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"model\": \"claude-opus-5[1m]\",\n    \"input\": \"Explain quantum computing in one sentence.\"\n  }'\n```\n\nThe `store: false` lane accepts standard stateless reasoning controls,\nincluding `max_output_tokens` and\n`include: [\"reasoning.encrypted_content\"]`. Coding-agent runtimes expose\nneither a native output-token cap nor replayable encrypted reasoning state, so\nthe bridge applies the token budget through their shared system transcript and\nreturns reasoning summaries without fabricating encrypted content.\n\nBoth chat completions and text Responses accept optional `temperature` (0–2)\nand `top_p` (0–1), including `null`, for OpenAI client compatibility. The\ncoding-agent runtimes control sampling and expose no native overrides: these\nvalues are validated but ignored by the coding-agent backends, not forwarded\nas sampling controls or determinism guarantees.\nResponses report both fields as `null` because the effective settings are\nunknown. Invalid types or values still return `400`.\n\n### Client SDK connection\n\nConnect to a standalone bridge using the client SDK:\n\n```ts\nimport { createAgentBridgeClient } from \"@aotterclam/agent-bridge\";\n\nconst bridge = createAgentBridgeClient({\n  baseUrl: \"http://127.0.0.1:3457\",\n  controlToken: \"my-control-token\",\n});\n\n// Switch to Antigravity (Gemini)\nconst agy = await bridge.connection(\"antigravity\");\nconsole.log(agy.baseUrl, agy.apiKey, agy.adapter.models);\n\n// Switch to Codex\nconst codex = await bridge.connection(\"codex\");\nconsole.log(codex.baseUrl, codex.apiKey, codex.adapter.models);\n```\n\n---\n\n## 2. Embedded library mode\n\nWhen embedding Agent Bridge directly into a Node.js / Bun application (e.g. an Electron desktop app, backend service, or custom CLI):\n\n### Starting and stopping the bridge\n\n`startAgentBridge()` asks the OS for an unused random port and generates a unique control token:\n\n```ts\nimport { startAgentBridge } from \"@aotterclam/agent-bridge\";\n\nconst bridge = await startAgentBridge();\n\n// Query discovered adapters\nconst adapters = await bridge.adapters({ refresh: true });\n\n// Get connection for a specific provider\nconst { adapter, baseUrl, apiKey } = await bridge.connection(\"antigravity\");\n\n// Graceful shutdown on app exit\nawait bridge.close();\n```\n\nUse `startAgentBridge({ port: 3457 })` only when your host explicitly requires a fixed port. Lower-level `createAgentBridge()` and `listen()` exports remain available for custom lifecycle control.\n\n---\n\n## Logging & diagnostics (both modes)\n\nAgent Bridge features a unified, multi-transport logging subsystem aligned across both Standalone and Embedded modes.\n\nHTTP logs are emitted once at request completion or client disconnect. `status`\nis the actual HTTP status; `outcome` is `completed`, `failed`, or `canceled`.\nA failed SSE turn retains HTTP 200 and records `outcome: \"failed\"` with\n`errorStatus`, `category`, and the error message. `durationMs` covers the full\nrequest lifetime. Count failures by `outcome`, including for streaming clients.\nDisconnect logging uses Node's response-close event; Bun 1.3's HTTP shim does\nnot reliably emit that event for an unfinished response. Use the Node CLI when\nyou need cancellation accounting.\n\n### In standalone mode\n\n```sh\n# Enable verbose debug logs and append to file\nnpx @aotterclam/agent-bridge@latest --debug --log-file ./agent-bridge.log\n\n# Stream structured JSON for log aggregators (e.g. Datadog / Fluentd / CloudWatch)\nnpx @aotterclam/agent-bridge@latest --format json\n```\n\n### In embedded mode\n\nPass logger configuration or a custom log handler into `startAgentBridge()`:\n\n```ts\nimport { startAgentBridge } from \"@aotterclam/agent-bridge\";\n\nconst bridge = await startAgentBridge({\n  logger: {\n    level: \"debug\",                 // 'debug' | 'info' | 'warn' | 'error' | 'silent'\n    logFile: \"/var/log/bridge.log\", // Structured JSON Lines file output\n    onLog: (record) => {\n      // Forward to your application logger (e.g. Winston / Pino / Electron)\n      console.log(`[${record.scope}] ${record.message}`, record.meta);\n    }\n  }\n});\n```\n\n---\n\n## Reasoning effort and reasoning visibility\n\nEffort support and visible reasoning are separate capabilities. The bridge-specific `/capabilities` endpoint reports what each official runtime advertises:\n\n| Adapter | Effort Metadata | Reasoning Text |\n| :--- | :--- | :--- |\n| **Antigravity** | Per-model effort levels (`low`, `medium`, `high`) | Streamed tokens & thinking token metrics |\n| **Claude Code** | Per-model Agent SDK metadata; no default | Only when the SDK emits non-empty thinking |\n| **Codex** | Per-model app-server levels and default | Streamed when emitted |\n| **Grok Build** | ACP `initialize` metadata and default; empty on fallback | ACP `agent_thought_chunk` when emitted |\n\n*An empty `reasoningEfforts` list means the runtime did not advertise levels. `reasoning_effort` is forwarded unchanged when supplied by the caller.*\n\n### How to pass `reasoning_effort` in API calls\n\nPass `reasoning_effort` directly in the request payload using any OpenAI-compatible client or cURL:\n\n#### 1. Raw HTTP / cURL\n```sh\ncurl http://127.0.0.1:3457/v1/chat/completions \\\n  -H \"Authorization: Bearer <CAPABILITY_TOKEN>\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"model\": \"gemini-3.7-flash\",\n    \"reasoning_effort\": \"high\",\n    \"messages\": [{\"role\": \"user\", \"content\": \"Analyze time complexity of quicksort.\"}]\n  }'\n```\n\n#### 2. OpenAI SDK (TypeScript / JavaScript)\n```ts\nimport OpenAI from \"openai\";\n\nconst client = new OpenAI({\n  baseURL: `${baseUrl}/v1`,\n  apiKey: \"<CAPABILITY_TOKEN>\"\n});\n\nconst response = await client.chat.completions.create({\n  model: \"gemini-3.7-flash\",\n  reasoning_effort: \"high\", // 'low' | 'medium' | 'high' | 'xhigh' | 'max'\n  messages: [{ role: \"user\", content: \"Solve this complex puzzle...\" }]\n});\n```\n\n#### 3. OpenAI SDK (Python)\n```python\nfrom openai import OpenAI\n\nclient = OpenAI(\n    base_url=f\"{base_url}/v1\",\n    api_key=\"<CAPABILITY_TOKEN>\"\n)\n\nresponse = client.chat.completions.create(\n    model=\"gpt-5.6-sol\",\n    reasoning_effort=\"high\",\n    messages=[{\"role\": \"user\", \"content\": \"Explain step by step.\"}]\n)\n```\n\n#### 4. Vercel AI SDK\n```ts\nimport { streamText } from \"ai\";\n\nconst result = streamText({\n  model,\n  prompt: \"Explain step by step.\",\n  providerOptions: {\n    openaiCompatible: {\n      reasoningEffort: \"high\"\n    }\n  }\n});\n```\n\n---\n\n## Protocol\n\n```text\nGET  /health\nGET  /capabilities\nPOST /reconnect\nGET  /reconnect/{reconnect_id}\nPOST /reconnect/{reconnect_id}/cancel\nGET  /v1/models\nGET  /v1/model/info\nGET  /model/info\nPOST /v1/chat/completions\nPOST /v1/responses\nPOST /v1/images/generations\nPOST /v1/images/edits\nPOST /v1/files\nGET  /v1/files\nGET  /v1/files/{file_id}\nGET  /v1/files/{file_id}/content\nDELETE /v1/files/{file_id}\n```\n\nChat completions support standard JSON and SSE streaming responses, OpenAI function-tool calls, and reasoning deltas. The `/v1` routes form the OpenAI-compatible data plane; `/capabilities` and `/reconnect` use the separate control token for local discovery and sign-in.\n\n`/v1/responses` implements the **stateless subset** of the OpenAI Responses API (the [Open Responses](https://www.openresponses.org) shape): send the full `input` item array on every call. Streaming uses semantic events (`response.output_text.delta`, `response.function_call_arguments.delta`, `response.reasoning_summary_text.delta`, …), and function tool calls round-trip via `function_call` / `function_call_output` items. No response or item history is stored, so `previous_response_id` and `item_reference` are rejected with `400` — clients must run with `store: false` semantics (for the Vercel AI SDK, pass `providerOptions: { openai: { store: false } }`).\n\n### Image and file inputs\n\nThe bridge accepts OpenAI's binary input shapes rather than embedding bytes in a text prompt:\n\n- Chat Completions: `image_url`, `input_audio`, and `file` user content parts.\n- Responses: `input_image` and `input_file` user content parts.\n- Image bytes use a base64 data URL; PDF `file_data` accepts raw base64 or a data URL. HTTP(S) URLs are passed only where the provider transport supports them.\n- Base64 image, audio, and PDF inputs are limited to 20 MiB decoded; the JSON request body is limited to 30 MiB.\n\n| Adapter | Image input | Audio input | PDF input |\n| :--- | :--- | :--- | :--- |\n| Codex | URL or data URL; `detail=auto/low/high` | base64 WAV or MP3 | No |\n| Claude | URL or data URL; `detail=auto` | No | URL or base64 |\n| Grok | Data URL only; `detail=auto`, no selected tools, prompt JSON at most 192 KiB | No | Not enabled (`embeddedContext` alone is insufficient evidence) |\n| Antigravity | Data URL only; written to an isolated local path and exposed through an exact-path `read_file` grant; `detail=auto` | No | No |\n\nGrok and Antigravity image discovery starts at `unknown` where the advertised schema is incomplete; the first successful non-streaming image request promotes that cached cell to `supported` for the running bridge.\n\n```sh\ncurl http://127.0.0.1:3457/v1/responses \\\n  -H \"Authorization: Bearer <CAPABILITY_TOKEN>\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"model\":\"<MODEL_ID>\",\n    \"input\":[{\"role\":\"user\",\"content\":[\n      {\"type\":\"input_text\",\"text\":\"What is in this image?\"},\n      {\"type\":\"input_image\",\"image_url\":\"data:image/png;base64,<BASE64>\"}\n    ]}]\n  }'\n```\n\n`POST /v1/files` accepts OpenAI-style multipart uploads and returns a `file_id`. Files are private to the adapter capability token, limited to 20 MiB, kept in a process-local temporary directory, and deleted when the bridge closes. List, metadata, content download, and delete routes are also available. The top-level `files` cell in `/capabilities` reports this lifecycle and the content parts for which the bridge resolves `file_id`.\n\nAny MIME type can be stored and retrieved, but model ingestion is intentionally narrower: `input_image` must still be a valid provider-supported image, and `input_file` currently accepts valid PDFs only on PDF-capable adapters. Uploading a DOCX, archive, executable, or other opaque binary does not imply that a model can understand it.\n\n```sh\nFILE_ID=$(curl -s http://127.0.0.1:3457/v1/files \\\n  -H \"Authorization: Bearer <CAPABILITY_TOKEN>\" \\\n  -F purpose=vision -F file=@image.png | jq -r .id)\n\ncurl http://127.0.0.1:3457/v1/responses \\\n  -H \"Authorization: Bearer <CAPABILITY_TOKEN>\" \\\n  -H \"Content-Type: application/json\" \\\n  -d \"{\\\"model\\\":\\\"<MODEL_ID>\\\",\\\"input\\\":[{\\\"role\\\":\\\"user\\\",\\\"content\\\":[{\\\"type\\\":\\\"input_image\\\",\\\"file_id\\\":\\\"$FILE_ID\\\"}]}]}\"\n```\n\n### Images compatibility\n\nCodex and Grok expose the wire shape documented by OpenAI for [image generation](https://developers.openai.com/api/reference/resources/images/methods/generate) and [image edits](https://developers.openai.com/api/reference/resources/images/methods/edit). The bridge accepts `n=1`, `response_format=b64_json`, and PNG, JPEG, or WebP edit inputs. Multipart edits accept repeated `image` and `image[]` fields used by official SDK clients; JSON edits accept the official `images: [{file_id|image_url}]` references. `file_id` resolves through the caller's private bridge FileStore, and `image_url` currently accepts base64 data URLs. Remote HTTP(S) `image_url` values and edit masks are not yet supported and return `400` instead of being ignored.\n\nThe Codex wire parser accepts the OpenAI schema limit of 16 edit inputs and passes every one to the app-server as a local image. Codex does not report a provider-side reference limit, so `/capabilities` keeps `runtime_max_items` unknown instead of claiming that 16-image execution was host-verified. Grok's installed `image_edit` tool accepts one input and reports `runtime_max_items: 1`, so Grok returns `400` for a multi-image edit instead of reducing the request to the lowest common denominator. The current parser caps the complete edit request at 52 MiB; this and the 50 MiB per-image limit are reported in `parameter_constraints`. Unsupported optional controls are rejected rather than silently ignored.\n\n| Adapter | Generation `size` | Edit `size` |\n| :--- | :--- | :--- |\n| Codex | Not controllable through the current app-server image tool; its backend uses `auto` | Not controllable; backend uses `auto` |\n| Grok | Maps `WIDTHxHEIGHT` to native `aspect_ratio` (`1:1`, `16:9`, `9:16`, `3:2`, or `2:3`); exact output pixels are provider-selected | Not exposed because Grok ignores `aspect_ratio` for the bridge's single-image edit |\n\n```sh\ncurl http://127.0.0.1:3457/v1/images/generations \\\n  -H \"Authorization: Bearer <CAPABILITY_TOKEN>\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"prompt\":\"A pearl inside a friendly clam\"}'\n\ncurl http://127.0.0.1:3457/v1/images/edits \\\n  -H \"Authorization: Bearer <CAPABILITY_TOKEN>\" \\\n  -F 'image=@source.png' \\\n  -F 'image[]=@reference.png' \\\n  -F 'prompt=Make the pearl blue'\n\ncurl http://127.0.0.1:3457/v1/images/edits \\\n  -H \"Authorization: Bearer <CAPABILITY_TOKEN>\" \\\n  -H \"Content-Type: application/json\" \\\n  -d \"{\\\"prompt\\\":\\\"Combine the references\\\",\\\"images\\\":[{\\\"file_id\\\":\\\"$FILE_ID\\\"},{\\\"image_url\\\":\\\"data:image/png;base64,<BASE64>\\\"}]}\"\n```\n\nThe stateless Responses API also supports the hosted `image_generation` tool on those adapters:\n\n```sh\ncurl http://127.0.0.1:3457/v1/responses \\\n  -H \"Authorization: Bearer <CAPABILITY_TOKEN>\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"model\":\"<MODEL_ID>\",\n    \"input\":\"Draw a pearl inside a friendly clam\",\n    \"tools\":[{\"type\":\"image_generation\"}]\n  }'\n```\n\nImages streaming is part of the official OpenAI schema, but the local runtimes currently expose only terminal images. `/v1/images/*` therefore recognizes those official controls while returning `400` for `stream: true` and `partial_images > 0`. The bridge never emits a custom streaming dialect; exact official Images or Responses SSE can be added when a runtime exposes real partial frames.\n\n### Host capability detection\n\nCodex model discovery uses the signed-in app-server's paginated `model/list`,\nnot its bundled catalog. Refresh with `GET /capabilities?refresh=1` after an\nexternal account change; a successful bridge reconnect invalidates discovery\nautomatically. Discovery failures do not fall back to unverified model IDs.\n\nCodex function batches use `experimentalRawEvents` and `rawResponse/completed`\n(available in Codex 0.147.0) to return all calls from one model response before\nthe runtime waits for tool results. An internal batch function also lets models\nsubmit several independent host calls through a single native call. The bridge\nexpands it into ordinary `tool_calls` with distinct IDs; it does not execute the\nhost functions. Host tools are exposed directly instead of through code-mode.\nThe host executes the tools and sends every result with its original call ID\nin the next stateless request; the bridge\nreplays that transcript with the current tool list in a fresh session.\n\n`bun run test:codex` is an opt-in live smoke using the signed-in account. It\nchecks a two-call batch and replays both dummy results in reverse order. Set\n`AGENT_BRIDGE_CODEX_SMOKE_MODEL` to choose a model from the discovered catalog.\n\n`GET /capabilities` probes the CLI executable installed on the user's host. Its real path and version are returned only as a fingerprint; support is determined from the runtime's own capability response or tool catalog, not a version allowlist. Results are cached for the server lifetime; use `GET /capabilities?refresh=1` after changing a CLI installation.\n\nEach input type and image output operation reports `supported`, `unsupported`, or `unknown` with its probe and evidence. Input cells expose `supported_openai_content_parts`; image output cells expose LiteLLM's `supported_openai_params`. Both include strict `parameter_constraints` and the underlying runtime's unnormalized `provider_capabilities`, so consumers can use portable OpenAI fields without losing provider-specific controls and caveats. The separate top-level `files` cell describes bridge storage rather than pretending it is a native model capability.\n\nCodex currently self-reports image generation support, but its app-server image tool does not expose `size` even though its internal Images client has that field; the bridge reports the host-controllable surface, not a guessed backend maximum. Grok versions without a tool catalog start as `unknown` and are promoted after the first successful live image request. Claude image generation is unsupported. Antigravity's installed executable schema is reported under `provider_capabilities` (including edit/reference inputs and aspect ratios), while bridge execution remains disabled because the CLI does not offer safe single-tool authorization; the bridge does not enable its unrestricted permission bypass.\n\n`GET /v1/model/info` (and LiteLLM's `/model/info` alias) uses the caller's adapter capability token and returns LiteLLM-shaped `model_name`, `litellm_params`, `model_info.supports_vision`, `supports_audio_input`, `supports_pdf_input`, and `supported_openai_params`. Bridge-specific evidence stays namespaced under `model_info.agent_bridge.inputs` and `.images`.\n\nTo verify the wire shape with the official OpenAI SDK through an independent conformance runner:\n\n```sh\ndocker run --rm \\\n  -e OPENAI_BASE_URL=http://host.docker.internal:3457/v1 \\\n  -e OPENAI_API_KEY=<CAPABILITY_TOKEN> \\\n  -e OPENAI_IMAGE_MODEL=<MODEL_ID> \\\n  -e ALLOW_INSECURE_HTTP=true \\\n  -e TEST_SUITES=images_generations,images_edits \\\n  ghcr.io/beranekio/openai-compatibility-tester:latest\n```\n\nThe external runner covers `/v1/images/*`; the repository tests cover the `/v1/responses` `image_generation_call` shape and rejection of unsupported controls.\n\n---\n\n## Sign-in state and reconnect\n\nA discovered model catalog says nothing about whether the runtime is still\nsigned in, so an expired token reads as `available: true` right up until every\nturn fails. Each `/capabilities` adapter therefore also reports a\nprovider-neutral sign-in contract, and hosts that embed the bridge can trigger\na re-authentication without asking the user to open a terminal.\n\n| Field | Values | Meaning |\n| :--- | :--- | :--- |\n| `authState` | `ready` | The runtime answered that it is signed in |\n| | `auth_required` | The runtime answered that it is signed out |\n| | `reauth_pending` | A reconnect started through this bridge is in flight |\n| `actions` | `[\"reconnect\"]` | `POST /reconnect` can drive this adapter's login |\n| | `[]` | No scriptable login; sign in with the vendor CLI yourself |\n\n```sh\n# Start the adapter's own sign-in (202)\ncurl -X POST http://127.0.0.1:3457/reconnect \\\n  -H \"Authorization: Bearer <CONTROL_TOKEN>\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"adapter\":\"codex\"}'\n# => {\"reconnectId\":\"reconnect-…\",\"adapter\":\"codex\",\"state\":\"pending\"}\n\n# Poll until it leaves \"pending\"\ncurl -H \"Authorization: Bearer <CONTROL_TOKEN>\" \\\n  http://127.0.0.1:3457/reconnect/<RECONNECT_ID>\n# => {\"reconnectId\":\"…\",\"adapter\":\"codex\",\"state\":\"succeeded\",\"detail\":\"…\"}\n\n# Give up early (idempotent)\ncurl -X POST -H \"Authorization: Bearer <CONTROL_TOKEN>\" \\\n  http://127.0.0.1:3457/reconnect/<RECONNECT_ID>/cancel\n```\n\nA second start for an adapter that is already reconnecting returns `409`. An\nadapter with no scriptable login returns `400` with category `unsupported`.\n\n### Error categories\n\nEvery bridge error — control plane, `/v1` JSON, and both streaming lanes —\ncarries `error.category`, a provider-neutral classification a host can switch\non instead of pattern-matching a runtime's error prose:\n\n`auth_required`, `unsupported`, `conflict`, `invalid_request`, `not_found`,\n`unauthorized`, `rate_limited`, `server_error`.\n\nUpstream errors retain their HTTP status and message when available, with\nOpenAI-shaped `type` and `code` fields alongside `category`. Streaming errors\ncarry the same classification in the SSE body after HTTP headers are sent.\n\n### From a failed turn to `authState`\n\nA credential expires on the provider's clock. Nothing tells the bridge, so the\nfirst thing that observes it is a turn that fails. When an adapter turn fails,\nthe bridge discards that adapter's cached sign-in reading and re-probes; if the\nprobe confirms the runtime is signed out, the failure is reported as `401` with\ncategory `auth_required`, and the adapter reads `auth_required` in the very\nnext `/capabilities` — no `refresh=1` needed.\n\n```jsonc\n// POST /v1/chat/completions, credential expired\n// HTTP 401\n{\"error\": {\"message\": \"…\", \"category\": \"auth_required\"}}\n```\n\nStreaming has already sent its status line by then, so the same category rides\nthe existing stream terminators: `{\"error\":{\"message\":…,\"category\":…}}` in the\nchat SSE lane, and the `response.failed` event's error object on\n`/v1/responses`.\n\nTwo deliberate limits. A request the bridge itself rejected (any `4xx` — a\nmalformed body, an unsupported input) is not evidence about credentials: it\nnever re-probes and never claims `auth_required`. And an adapter with no probe\n(`actions: []`) stays `ready`, because the bridge will not assert a sign-in\nproblem it has no way to observe.\n\nCached readings are invalidated by every signal that can change them:\n`refresh=1`, a reconnect settling either way, a failed turn, and age — a\nreading older than 60 seconds is re-probed, so a host that polls\n`/capabilities` without running turns still converges. Concurrent failures and\nconcurrent discovery share one probe rather than each spawning a CLI.\n\nThe client SDK exposes the same three calls:\n\n```ts\nconst bridge = await startAgentBridge();\nconst [codex] = (await bridge.adapters()).filter((a) => a.id === \"codex\");\n\nif (codex.authState === \"auth_required\" && codex.actions.includes(\"reconnect\")) {\n  const { reconnectId } = await bridge.reconnect(\"codex\");\n  // poll bridge.reconnectStatus(reconnectId) until state !== \"pending\",\n  // or bridge.cancelReconnect(reconnectId) to abandon it\n}\n```\n\n### What each adapter can and cannot detect\n\n| Adapter | Detection probe | Login | Boundary |\n| :--- | :--- | :--- | :--- |\n| Codex | `codex login status` exit code | `codex login` | A missing executable and a signed-out host both read as `auth_required` |\n| Claude Code | `claude auth status --json` → `loggedIn` | `claude auth login` | An unreadable probe reports `ready`, not `auth_required` |\n| Grok Build | none | none | `actions: []`; sign in with `grok` yourself |\n| Antigravity | none | none | `actions: []`; sign in with `agy` yourself |\n\nHonest limits of this lane:\n\n- The login child runs with **all three stdio streams ignored**. An\n  authorization URL carries state and PKCE parameters, so nothing the child\n  writes is captured, logged, or returned, and `detail` is bridge-authored\n  text only. The consequence is that the CLI must open a browser and finish on\n  its own loopback callback; where it instead falls back to asking the user to\n  paste a code into the terminal, this endpoint cannot complete the flow and\n  fails on exit or timeout.\n- Neither CLI reports machine-readable progress while a login runs, so a\n  reconnect is `pending` until the process exits. Exit `0` is treated as\n  necessary but not sufficient: the bridge re-runs the detection probe and only\n  reports `succeeded` when the runtime confirms it is signed in.\n- The Claude lane runs the Agent SDK, which resolves its own executable.\n  Credentials are keyed to the config directory (`CLAUDE_CONFIG_DIR`), not to a\n  particular binary, so signing in through `AGENT_BRIDGE_CLAUDE_COMMAND` on the\n  same config directory is what the SDK reads back. Point that variable at the\n  matching install if you keep several.\n- The bridge does not list accounts, read quota, or store tokens. Those stay\n  with the CLIs that already own them.\n\n---\n\n## Configuration\n\n| Variable | Default | Purpose |\n| :--- | :--- | :--- |\n| `AGENT_BRIDGE_PORT` | `3457` | Standalone listener port |\n| `AGENT_BRIDGE_CONTROL_TOKEN` | random per run | Optional fixed standalone discovery token |\n| `AGENT_BRIDGE_LOG_LEVEL` | `info` | Default log level (`debug`, `info`, `warn`, `error`, `silent`) |\n| `AGENT_BRIDGE_LOG_FILE` | - | Default file path for structured log output |\n| `AGENT_BRIDGE_LOG_FORMAT` | `pretty` | Log output style (`pretty` or `json`) |\n| `AGENT_BRIDGE_RECONNECT_TIMEOUT_MS` | `300000` | Reconnect login timeout |\n| `AGENT_BRIDGE_ANTIGRAVITY_TIMEOUT_MS` | `300000` | Antigravity turn timeout |\n| `AGENT_BRIDGE_ANTIGRAVITY_COMMAND` | `agy` | Antigravity CLI executable |\n| `AGENT_BRIDGE_CLAUDE_TIMEOUT_MS` | `300000` | Claude turn timeout |\n| `AGENT_BRIDGE_CLAUDE_COMMAND` | `claude` | Claude CLI executable, used by reconnect only |\n| `AGENT_BRIDGE_CODEX_TIMEOUT_MS` | `300000` | Codex turn timeout |\n| `AGENT_BRIDGE_CODEX_HANDSHAKE_TIMEOUT_MS` | `60000` | Combined Codex `initialize` + `thread/start` timeout |\n| `AGENT_BRIDGE_CODEX_COMMAND` | `codex` | Codex executable |\n| `AGENT_BRIDGE_GROK_TIMEOUT_MS` | `300000` | Grok turn timeout |\n| `AGENT_BRIDGE_GROK_COMMAND` | `grok` | Grok executable |\n\nUpgrade notes: [v0.1.13](docs/migrations/v0.1.13.md).\n\n---\n\n## Safety & security\n\nThe bridge only accepts loopback HTTP URLs and uses credentials already owned by the official clients. Do not expose it through a public listener, proxy, tunnel, or remote port forward. Keep control and capability tokens out of logs, analytics, and project files.\n\nUsers remain responsible for provider, employer, and customer policies. This project is not affiliated with or endorsed by Anthropic, Google, OpenAI, or xAI.\n\n---\n\n## Development\n\n```sh\nbun install\nbun run check\nbun test\nnpm run test:node\nbun run test:grok\nbun run test:antigravity\n```\n\n`bun run test:grok` and `bun run test:antigravity` run live end-to-end smoke tests against locally installed CLIs.\n\n---\n\n## License\n\nMIT\n","readmeFilename":"README.md"}