Official

codex

Codex agent provider: runs the Codex CLI's app-server for each account.

The app opens the listing; nothing installs until an agent in your Plugins workspace has read the files and you enable the plugin. In a terminal: dvg install divergence/codex@0.2.5

Permissions in 0.2.5

  • Provide agents agents.provideMediumAdds agents to the app.Provide the Codex agent and pass its tool calls to plugin tools
  • Run named programs processMediumStarts the listed programs.Run the Codex CLI, and ask or tell the installer that owns it (npm or Homebrew) about a newer versionPrograms: codexnpmbrew
  • Environment variables envMediumReads the listed environment variables.Find each account's Codex home, and pass extra app-server arguments set in CODEX_ARGSVariables: HOMECODEX_HOMECODEX_ARGS
  • Read files fs.readMediumReads files in the listed places.Notice a conversation started in the Codex app or CLI, so it shows up at once, and read, once, the accounts the previous Codex provider keptPlaces: its own data folder~/.codex/sessions~/.codex/sessions/**~/.codex*/sessions~/.codex*/sessions/**

Files

items.ts2.3 KB
// Additional native display items use the same rows in live events and history.
import * as z from "zod";
import type { Item } from "./wire.ts";
import type { ToolCall, ToolContent } from "./types.ts";

export function referencedImage(fileId: unknown): ToolContent[] {
  return typeof fileId === "string" ? [{ type: "text", text: `Image attachment: ${fileId}. This image is unavailable in this client.` }] : [];
}

export function itemNotice(item: Item): string | null {
  if (item.type === "hookPrompt") {
    const fragments = z.array(z.object({ text: z.string(), hookRunId: z.string() })).parse(item.fragments);
    return fragments.map((fragment) => fragment.text).join("\n\n");
  }
  if (item.type === "enteredReviewMode") return `Entered review mode: ${String(item.review ?? "")}`;
  if (item.type === "exitedReviewMode") return String(item.review ?? "") || "Exited review mode.";
  return null;
}

const outputPart = z.looseObject({ type: z.string(), text: z.string().optional(), image_url: z.string().optional(), file_id: z.string().optional() });
function outputContent(output: unknown): ToolContent[] {
  if (typeof output === "string") return [{ type: "text", text: output }];
  return z.array(outputPart).parse(output).flatMap((part): ToolContent[] => {
    if (part.type === "input_text") return [{ type: "text", text: part.text ?? "" }];
    if (part.type === "input_image") {
      if (part.file_id) return referencedImage(part.file_id);
      const match = /^data:([^;]+);base64,(.*)$/s.exec(part.image_url ?? "");
      return match ? [{ type: "image", mimeType: match[1]!, data: match[2]! }] : [{ type: "text", text: part.image_url ?? "" }];
    }
    return part.type === "input_audio" ? [{ type: "text", text: "Codex returned audio output, which tool rows cannot play." }] : [];
  });
}

export function extraTool(item: Item): ToolCall | null {
  if (item.type === "sleep") return {
    id: item.id ?? "", name: "clock.sleep", kind: "other", title: `Sleep for ${Number(item.durationMs) / 1000} seconds`,
    status: "completed", input: { durationMs: item.durationMs }, content: [], locations: [],
  };
  if (item.type !== "functionCallOutput") return null;
  const name = [item.namespace, item.name].filter(Boolean).join(".");
  return { id: item.id ?? "", name, kind: "other", title: name, status: "completed", input: null, content: outputContent(item.output), locations: [] };
}

Versions

VersionPublishedPlugin APISizePermissionsStatus
0.2.5latestNov 21, 2026>=5 <6121.1 KB4 permissionsListed
0.2.4Nov 16, 2026>=5 <6120.2 KB4 permissionsListed
0.2.3Nov 11, 2026>=5 <695.2 KB4 permissionsListed
0.2.2Nov 9, 2026>=5 <688.9 KB4 permissionsListed
0.2.1Oct 27, 2026>=2 <484.1 KB4 permissionsListed

Reviews and comments

0 threads · 0 reviews

No comments yet.