
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
Expose OpenAI Codex as an A2A server with a thin, configurable wrapper.
npm install codex-a2a
import { CodexA2AServer } from 'codex-a2a'
const server = new CodexA2AServer({
port: 50002,
getThreadOptions: () => ({
workingDirectory: process.cwd(),
webSearchEnabled: true,
networkAccessEnabled: true,
}),
getTurnOptions: () => ({
outputSchema: undefined,
}),
})
await server.start()
console.log('A2A server running at', server.getUrl())
import { CodexA2AServer } from 'codex-a2a'
const server = new CodexA2AServer({
agentCard: {
name: 'Codex Local',
provider: { organization: 'My Org', url: 'https://example.com' },
},
})
await server.start()
Use configureApp to attach your own Express routes while keeping the built-in A2A endpoints.
import { CodexA2AServer } from 'codex-a2a'
const server = new CodexA2AServer({
configureApp: (app, { requestHandler }) => {
app.get('/health', (_req, res) => {
res.json({ ok: true })
})
app.get('/agent-card', async (_req, res) => {
res.json(await requestHandler.getAgentCard())
})
},
})
await server.start()
getThreadOptions(contextId) lets you override Codex thread options per context. The default values are exported as DEFAULT_THREAD_OPTIONS.
import { CodexA2AServer, DEFAULT_THREAD_OPTIONS } from 'codex-a2a'
const server = new CodexA2AServer({
getThreadOptions: () => ({
...DEFAULT_THREAD_OPTIONS,
sandboxMode: 'read-only',
approvalPolicy: 'never',
webSearchEnabled: false,
}),
})
getWorkingDirectory(contextId) provides a per-context working directory override.
getTurnOptions(contextId) lets you override per-turn options for runStreamed, such as outputSchema or signal.
By default, the server allows all origins. You can restrict it:
const server = new CodexA2AServer({
cors: {
origin: 'https://example.com',
methods: ['GET', 'POST'],
headers: ['Content-Type'],
},
})
Threads are cached per context. Set maxThreads to control the cache size (default 64). The least-recently-used thread is evicted when the limit is reached.
const server = new CodexA2AServer({
maxThreads: 32,
})
stop() waits for active connections to drain before closing. Set shutdownTimeout to control the max wait time in milliseconds (default 5000).
await server.stop()
new CodexA2AServer(options)
server.start()
server.stop()
server.getUrl()
server.isRunning()
server.cancelTask(taskId)
When connected to the A2A server, the following Codex items are surfaced as A2A updates:
thread.started -> status-updateagent_message -> status-update (text message)reasoning -> status-update (thought payload)command_execution -> status-update + artifact-update (stdout/stderr)mcp_tool_call -> status-update + artifact-update (tool result)file_change -> status-update + artifact-update (changes list)todo_list -> status-update + artifact-update (todo items)web_search -> status-updateerror -> status-update (failure)pnpm run build
pnpm run test
pnpm run typecheck
pnpm changeset # create a changeset before submitting a PR
FAQs
A2A server adapter for OpenAI Codex
The npm package codex-a2a receives a total of 12 weekly downloads. As such, codex-a2a popularity was classified as not popular.
We found that codex-a2a demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.