@bakers-build/addon-codex 0.5.1-next.855 → 0.5.1-next.857

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -27,7 +27,9 @@ export declare class CodexAgent implements BbAgent {
27
27
  /** The launch flags a security mode owns (`docs/addons/codex.md`). */
28
28
  private securityFlags;
29
29
  private userMcpServers;
30
- launchCommand(prompt: string, _run?: AgentRunIdentity, workspacePath?: string): string;
30
+ launchCommand(prompt: string, _run?: AgentRunIdentity, workspacePath?: string, tools?: {
31
+ url: string;
32
+ }): string;
31
33
  getRunLog(worktreePath: string, run?: AgentRunIdentity): Promise<string>;
32
34
  parseFootprint(log: string): AgentFootprint;
33
35
  /** Codex brings its own sandbox runner; a missing binary fails at launch as before. */
package/dist/src/index.js CHANGED
@@ -3,7 +3,7 @@ import { readFileSync } from 'node:fs';
3
3
  import { readdir, readFile, stat } from 'node:fs/promises';
4
4
  import { homedir } from 'node:os';
5
5
  import { join } from 'node:path';
6
- import { lastLine, resolveAgentCliOptions, resolveSecurityOptions, systemSandboxHost, } from '@bakers-build/conductor/contract';
6
+ import { CONDUCTOR_TOKEN_ENV, CONDUCTOR_TOOLS_SERVER, lastLine, resolveAgentCliOptions, resolveSecurityOptions, systemSandboxHost, } from '@bakers-build/conductor/contract';
7
7
  import { shellQuote } from '@bakers-build/core';
8
8
  import { parseCodexTranscript } from './footprint.js';
9
9
  export { parseCodexTranscript } from './footprint.js';
@@ -186,7 +186,9 @@ export class CodexAgent {
186
186
  `permissions.bakers=${profile}`,
187
187
  ];
188
188
  for (const id of this.userMcpServers()) {
189
- if (!Object.hasOwn(sandbox.mcp_servers, id)) {
189
+ // The conductor's server is set per launch, never switched off.
190
+ if (!Object.hasOwn(sandbox.mcp_servers, id) &&
191
+ id !== CONDUCTOR_TOOLS_SERVER) {
190
192
  flags.push(...pairs([[`mcp_servers.${id}.enabled`, false]]));
191
193
  }
192
194
  }
@@ -203,10 +205,15 @@ export class CodexAgent {
203
205
  }
204
206
  return codexMcpServerIds(toml);
205
207
  }
206
- launchCommand(prompt, _run, workspacePath = process.cwd()) {
208
+ launchCommand(prompt, _run, workspacePath = process.cwd(), tools) {
207
209
  // Quote at assembly; a plain word has nothing for the shell to expand.
208
210
  const word = (t) => (/^[\w./=-]+$/.test(t) ? t : shellQuote(t));
209
211
  const parts = ['codex', ...this.securityFlags(workspacePath).map(word)];
212
+ if (tools) {
213
+ // Codex reads the token from the run env, so it never enters argv.
214
+ const server = `mcp_servers.${CONDUCTOR_TOOLS_SERVER}`;
215
+ parts.push('-c', word(`${server}.url=${JSON.stringify(tools.url)}`), '-c', word(`${server}.bearer_token_env_var=${JSON.stringify(CONDUCTOR_TOKEN_ENV)}`));
216
+ }
210
217
  if (this.model !== undefined && !this.overrides.model) {
211
218
  parts.push('--model', shellQuote(this.model));
212
219
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bakers-build/addon-codex",
3
- "version": "0.5.1-next.855",
3
+ "version": "0.5.1-next.857",
4
4
  "description": "bakers.build agent plugin for the Codex CLI.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -20,11 +20,11 @@
20
20
  "directory": "bakers-cli/addons/codex"
21
21
  },
22
22
  "peerDependencies": {
23
- "@bakers-build/conductor": "^0.5.1-next.855",
24
- "@bakers-build/core": "^0.5.1-next.855"
23
+ "@bakers-build/conductor": "^0.5.1-next.857",
24
+ "@bakers-build/core": "^0.5.1-next.857"
25
25
  },
26
26
  "bakersBuild": {
27
- "commit": "bea27960d8d0cfb827f72aae305ed5820ecd28f3",
27
+ "commit": "31830084e7db17fb0417b4681ec7dace42ae4138",
28
28
  "channel": "next"
29
29
  }
30
30
  }