@bakers-build/addon-codex 0.4.1-next.513 → 0.5.0
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.
- package/dist/src/index.d.ts +3 -1
- package/dist/src/index.js +18 -1
- package/package.json +3 -3
package/dist/src/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type AgentFootprint, type AgentPlugin, type AgentRunIdentity, type BbAgent, type RunEnvPolicy, type SecurityOptions } from '@bakers-build/conductor/contract';
|
|
1
|
+
import { type AgentFootprint, type AgentPlugin, type AgentRunIdentity, type BbAgent, type RunEnvPolicy, type SandboxHost, type SandboxPreflight, type SecurityOptions } from '@bakers-build/conductor/contract';
|
|
2
2
|
export { parseCodexTranscript } from './footprint.js';
|
|
3
3
|
export interface CodexAgentOptions extends SecurityOptions {
|
|
4
4
|
model?: string;
|
|
@@ -30,6 +30,8 @@ export declare class CodexAgent implements BbAgent {
|
|
|
30
30
|
launchCommand(prompt: string, _run?: AgentRunIdentity): string;
|
|
31
31
|
getRunLog(worktreePath: string, run?: AgentRunIdentity): Promise<string>;
|
|
32
32
|
parseFootprint(log: string): AgentFootprint;
|
|
33
|
+
/** Codex brings its own sandbox runner; a missing binary fails at launch as before. */
|
|
34
|
+
sandboxPreflight(host?: SandboxHost): Promise<SandboxPreflight>;
|
|
33
35
|
}
|
|
34
36
|
/** Config-facing factory: `codexAgent({ model: 'gpt-5' })`. */
|
|
35
37
|
export declare function codexAgent(options?: CodexAgentOptions): AgentPlugin;
|
package/dist/src/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { readFileSync } from 'node:fs';
|
|
|
2
2
|
import { readdir, readFile, stat } from 'node:fs/promises';
|
|
3
3
|
import { homedir } from 'node:os';
|
|
4
4
|
import { join } from 'node:path';
|
|
5
|
-
import { resolveAgentCliOptions, resolveSecurityOptions, } from '@bakers-build/conductor/contract';
|
|
5
|
+
import { lastLine, resolveAgentCliOptions, resolveSecurityOptions, systemSandboxHost, } from '@bakers-build/conductor/contract';
|
|
6
6
|
import { shellQuote } from '@bakers-build/core';
|
|
7
7
|
import { parseCodexTranscript } from './footprint.js';
|
|
8
8
|
export { parseCodexTranscript } from './footprint.js';
|
|
@@ -259,6 +259,23 @@ export class CodexAgent {
|
|
|
259
259
|
parseFootprint(log) {
|
|
260
260
|
return parseCodexTranscript(log);
|
|
261
261
|
}
|
|
262
|
+
/** Codex brings its own sandbox runner; a missing binary fails at launch as before. */
|
|
263
|
+
async sandboxPreflight(host = systemSandboxHost()) {
|
|
264
|
+
if (this.security.mode !== 'sandbox' || !host.onPath('codex')) {
|
|
265
|
+
return { ok: true };
|
|
266
|
+
}
|
|
267
|
+
const probe = await host.run('codex', ['sandbox', 'true']);
|
|
268
|
+
// A release without this probe form is not proof the sandbox fails; launch decides.
|
|
269
|
+
return probe.ok || /unrecognized subcommand/.test(probe.stderr)
|
|
270
|
+
? { ok: true }
|
|
271
|
+
: {
|
|
272
|
+
ok: false,
|
|
273
|
+
cause: `codex sandbox cannot start: ${lastLine(probe.stderr)}`,
|
|
274
|
+
fix: host.platform === 'linux'
|
|
275
|
+
? 'allow unprivileged user namespaces on this host, or run the conductor where they are allowed'
|
|
276
|
+
: 'make `codex sandbox true` succeed on this host',
|
|
277
|
+
};
|
|
278
|
+
}
|
|
262
279
|
}
|
|
263
280
|
/** Config-facing factory: `codexAgent({ model: 'gpt-5' })`. */
|
|
264
281
|
export function codexAgent(options = {}) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bakers-build/addon-codex",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "bakers.build agent plugin for the Codex CLI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"directory": "bakers-cli/addons/codex"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
|
-
"@bakers-build/conductor": "^0.
|
|
24
|
-
"@bakers-build/core": "^0.
|
|
23
|
+
"@bakers-build/conductor": "^0.5.0",
|
|
24
|
+
"@bakers-build/core": "^0.5.0"
|
|
25
25
|
}
|
|
26
26
|
}
|