diff --git a/.changeset/agent-plugin-safety-costs.md b/.changeset/agent-plugin-safety-costs.md index b33ed96b8..21cb52d38 100644 --- a/.changeset/agent-plugin-safety-costs.md +++ b/.changeset/agent-plugin-safety-costs.md @@ -1,6 +1,7 @@ --- "@aoagents/ao-plugin-agent-codex": patch "@aoagents/ao-plugin-agent-claude-code": patch +"@aoagents/ao-web": patch --- -Improve Claude Code and Codex session cost estimates to account for cached-token spend, and make Codex restore commands fall back to approval prompts for worker sessions instead of blindly reusing dangerous bypass flags. +Improve Claude Code and Codex session cost estimates to account for cached-token spend, make Codex restore commands fall back to approval prompts for worker sessions instead of blindly reusing dangerous bypass flags, and register the Codex plugin in the web dashboard so native activity detection works there. diff --git a/packages/web/next.config.js b/packages/web/next.config.js index c5c502a99..7526923da 100644 --- a/packages/web/next.config.js +++ b/packages/web/next.config.js @@ -3,6 +3,7 @@ const nextConfig = { transpilePackages: [ "@aoagents/ao-core", "@aoagents/ao-plugin-agent-claude-code", + "@aoagents/ao-plugin-agent-codex", "@aoagents/ao-plugin-agent-opencode", "@aoagents/ao-plugin-runtime-tmux", "@aoagents/ao-plugin-scm-github", diff --git a/packages/web/package.json b/packages/web/package.json index 0c2c5a0de..c1ba3caa4 100644 --- a/packages/web/package.json +++ b/packages/web/package.json @@ -30,6 +30,7 @@ "dependencies": { "@aoagents/ao-core": "workspace:*", "@aoagents/ao-plugin-agent-claude-code": "workspace:*", + "@aoagents/ao-plugin-agent-codex": "workspace:*", "@aoagents/ao-plugin-agent-cursor": "workspace:*", "@aoagents/ao-plugin-agent-opencode": "workspace:*", "@aoagents/ao-plugin-runtime-tmux": "workspace:*", diff --git a/packages/web/src/__tests__/services.test.ts b/packages/web/src/__tests__/services.test.ts index db3fe8869..38237e8f5 100644 --- a/packages/web/src/__tests__/services.test.ts +++ b/packages/web/src/__tests__/services.test.ts @@ -7,6 +7,7 @@ const { mockRegistry, tmuxPlugin, claudePlugin, + codexPlugin, opencodePlugin, worktreePlugin, scmPlugin, @@ -31,6 +32,7 @@ const { mockRegistry, tmuxPlugin: { manifest: { name: "tmux" } }, claudePlugin: { manifest: { name: "claude-code" } }, + codexPlugin: { manifest: { name: "codex" } }, opencodePlugin: { manifest: { name: "opencode" } }, worktreePlugin: { manifest: { name: "worktree" } }, scmPlugin: { manifest: { name: "github" } }, @@ -54,6 +56,7 @@ vi.mock("@aoagents/ao-core", () => ({ vi.mock("@aoagents/ao-plugin-runtime-tmux", () => ({ default: tmuxPlugin })); vi.mock("@aoagents/ao-plugin-agent-claude-code", () => ({ default: claudePlugin })); +vi.mock("@aoagents/ao-plugin-agent-codex", () => ({ default: codexPlugin })); vi.mock("@aoagents/ao-plugin-agent-opencode", () => ({ default: opencodePlugin })); vi.mock("@aoagents/ao-plugin-workspace-worktree", () => ({ default: worktreePlugin })); vi.mock("@aoagents/ao-plugin-scm-github", () => ({ default: scmPlugin })); @@ -94,6 +97,14 @@ describe("services", () => { expect(mockRegister).toHaveBeenCalledWith(opencodePlugin); }); + it("registers the Codex agent plugin with web services", async () => { + const { getServices } = await import("../lib/services"); + + await getServices(); + + expect(mockRegister).toHaveBeenCalledWith(codexPlugin); + }); + it("caches initialized services across repeated calls", async () => { const { getServices } = await import("../lib/services"); diff --git a/packages/web/src/lib/services.ts b/packages/web/src/lib/services.ts index bdd5541a8..027d5c718 100644 --- a/packages/web/src/lib/services.ts +++ b/packages/web/src/lib/services.ts @@ -33,6 +33,7 @@ import { // Static plugin imports — webpack needs these to be string literals import pluginRuntimeTmux from "@aoagents/ao-plugin-runtime-tmux"; import pluginAgentClaudeCode from "@aoagents/ao-plugin-agent-claude-code"; +import pluginAgentCodex from "@aoagents/ao-plugin-agent-codex"; import pluginAgentCursor from "@aoagents/ao-plugin-agent-cursor"; import pluginAgentOpencode from "@aoagents/ao-plugin-agent-opencode"; import pluginWorkspaceWorktree from "@aoagents/ao-plugin-workspace-worktree"; @@ -76,6 +77,7 @@ async function initServices(): Promise { // Register plugins explicitly (webpack can't handle dynamic import() in core) registry.register(pluginRuntimeTmux); registry.register(pluginAgentClaudeCode); + registry.register(pluginAgentCodex); registry.register(pluginAgentCursor); registry.register(pluginAgentOpencode); registry.register(pluginWorkspaceWorktree); diff --git a/packages/web/vitest.config.ts b/packages/web/vitest.config.ts index 7da000157..4c4fb58e0 100644 --- a/packages/web/vitest.config.ts +++ b/packages/web/vitest.config.ts @@ -44,6 +44,10 @@ export default defineConfig({ find: "@aoagents/ao-plugin-agent-claude-code", replacement: resolve(__dirname, "../plugins/agent-claude-code/src/index.ts"), }, + { + find: "@aoagents/ao-plugin-agent-codex", + replacement: resolve(__dirname, "../plugins/agent-codex/src/index.ts"), + }, { find: "@aoagents/ao-plugin-agent-opencode", replacement: resolve(__dirname, "../plugins/agent-opencode/src/index.ts"), diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0519908a9..43d624798 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -618,6 +618,9 @@ importers: '@aoagents/ao-plugin-agent-claude-code': specifier: workspace:* version: link:../plugins/agent-claude-code + '@aoagents/ao-plugin-agent-codex': + specifier: workspace:* + version: link:../plugins/agent-codex '@aoagents/ao-plugin-agent-cursor': specifier: workspace:* version: link:../plugins/agent-cursor