@bakers-build/addon-codex 0.10.1-next.11 → 0.10.1-next.12

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.
@@ -26,6 +26,7 @@ export declare function trustedCommandRules(entries: readonly string[]): string;
26
26
  export declare class CodexAgent implements BbAgent {
27
27
  private readonly home;
28
28
  readonly id = "codex";
29
+ readonly secretEnv: readonly ["CODEX_API_KEY", "OPENAI_API_KEY"];
29
30
  private readonly args;
30
31
  private readonly model;
31
32
  private readonly effort;
package/dist/src/index.js CHANGED
@@ -8,7 +8,7 @@ import { promisify } from 'node:util';
8
8
  import { CONDUCTOR_TOKEN_ENV, CONDUCTOR_TOOL_TIMEOUT_MS, CONDUCTOR_TOOLS_SERVER, ensureHome, homeKey, homePath, lastLine, resolveAgentCliOptions, resolveSecurityOptions, systemSandboxHost, validateOptionalBoolean, } from '@bakers-build/conductor/contract';
9
9
  import { gitSandboxPaths, shellQuote, withoutGitDirs, } from '@bakers-build/core';
10
10
  import { parseCodexTranscript } from './footprint.js';
11
- import { prepareCodexRun } from './run.js';
11
+ import { CODEX_SECRET_ENV, prepareCodexRun } from './run.js';
12
12
  export { parseCodexTranscript } from './footprint.js';
13
13
  const run = promisify(execFile);
14
14
  /** Run `codex <args>` in `codexHome`; a failure names `what` and the CLI's output. */
@@ -136,6 +136,7 @@ const CODEX_KNOWN = [
136
136
  export class CodexAgent {
137
137
  home;
138
138
  id = 'codex';
139
+ secretEnv = CODEX_SECRET_ENV;
139
140
  args;
140
141
  model;
141
142
  effort;
@@ -429,6 +430,7 @@ export function codexAgent(options = {}) {
429
430
  id: 'codex',
430
431
  requiredModules: [],
431
432
  permissions: agent.security.report,
433
+ secretEnv: agent.secretEnv,
432
434
  async createAgent(config) {
433
435
  agent.useMarketplaces(config.marketplaces ?? []);
434
436
  return agent;
package/dist/src/run.d.ts CHANGED
@@ -1,3 +1,5 @@
1
1
  import type { AgentRunContext, AgentRunPreparation } from '@bakers-build/conductor/contract';
2
+ /** The model credentials a Codex run may receive from the secrets file. */
3
+ export declare const CODEX_SECRET_ENV: readonly ["CODEX_API_KEY", "OPENAI_API_KEY"];
2
4
  /** Prepare Codex's files in the home supplied by any execution backend. */
3
5
  export declare function prepareCodexRun(context: AgentRunContext, configDir: string, hostEnv?: Readonly<Record<string, string | undefined>>): AgentRunPreparation;
package/dist/src/run.js CHANGED
@@ -6,8 +6,11 @@ import { dirname, join } from 'node:path';
6
6
  * thread-writer-locks at startup. Marketplace clones live in .tmp/marketplaces.
7
7
  */
8
8
  const SHARED = ['plugins', 'skills', 'packages', '.tmp/marketplaces'];
9
+ /** The model credentials a Codex run may receive from the secrets file. */
10
+ export const CODEX_SECRET_ENV = ['CODEX_API_KEY', 'OPENAI_API_KEY'];
9
11
  /** Prepare Codex's files in the home supplied by any execution backend. */
10
- export function prepareCodexRun(context, configDir, hostEnv = process.env) {
12
+ export function prepareCodexRun(context, configDir, hostEnv = context.secrets ??
13
+ process.env) {
11
14
  const source = context.env.CODEX_HOME ?? configDir;
12
15
  const home = join(context.homePath, '.codex');
13
16
  mkdirSync(home, { recursive: true });
@@ -37,7 +40,7 @@ export function prepareCodexRun(context, configDir, hostEnv = process.env) {
37
40
  symlinkSync(path, join(home, name));
38
41
  readPaths.push(path);
39
42
  }
40
- const keys = ['CODEX_API_KEY', 'OPENAI_API_KEY'];
43
+ const keys = CODEX_SECRET_ENV;
41
44
  const env = { CODEX_HOME: home };
42
45
  const bindPaths = [];
43
46
  if (!keys.some((key) => context.env[key])) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bakers-build/addon-codex",
3
- "version": "0.10.1-next.11",
3
+ "version": "0.10.1-next.12",
4
4
  "description": "bakers.build agent plugin for the Codex CLI.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -22,11 +22,11 @@
22
22
  "directory": "bakers-cli/addons/codex"
23
23
  },
24
24
  "peerDependencies": {
25
- "@bakers-build/conductor": "^0.10.1-next.11",
26
- "@bakers-build/core": "^0.10.1-next.11"
25
+ "@bakers-build/conductor": "^0.10.1-next.12",
26
+ "@bakers-build/core": "^0.10.1-next.12"
27
27
  },
28
28
  "bakersBuild": {
29
- "commit": "a17110983f32ae027848c103b31ddb07fbf21a8e",
29
+ "commit": "460f5570442a0b09af52a1d4450b879075302e57",
30
30
  "channel": "next"
31
31
  }
32
32
  }