Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/codex-plugin-capability-matrix.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"matrixVersion": 1,
"generatedFrom": {
"packageVersion": "2.32.0",
"pluginVersion": "0.1.5",
"pluginVersion": "0.1.6",
"auditedAt": "2026-07-14T00:00:00Z"
},
"dispositions": ["exposed", "withheld", "blocked_safer_api"],
Expand Down
2 changes: 1 addition & 1 deletion plugins/fclt/.codex-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fclt",
"version": "0.1.5",
"version": "0.1.6",
"description": "Codex workflows and MCP tools for evidence reconciliation, writeback, evolution, and outcome review.",
"author": {
"name": "Hack Dance",
Expand Down
2 changes: 1 addition & 1 deletion src/builtin-assets.ts

Large diffs are not rendered by default.

33 changes: 21 additions & 12 deletions src/manage.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,15 @@ import {
} from "./manage";
import { facultMachineStateDir, legacyFacultStateDirForRoot } from "./paths";

const BUNDLED_PLUGIN_VERSION = (
JSON.parse(
await readFile(
new URL("../plugins/fclt/.codex-plugin/plugin.json", import.meta.url),
"utf8"
)
) as { version: string }
).version;

const DOLLAR = "$";

function placeholder(name: string): string {
Expand Down Expand Up @@ -156,7 +165,7 @@ async function setupMutatedCodexPlugin(mutation: InstalledPluginMutation) {
codexBin,
home,
installedMutation: mutation,
selectedVersion: "0.1.5",
selectedVersion: BUNDLED_PLUGIN_VERSION,
});
return {
home,
Expand Down Expand Up @@ -3118,7 +3127,7 @@ describe("syncManagedTools", () => {
await writeCodexPluginStub({
codexBin,
home,
selectedVersion: "0.1.5",
selectedVersion: BUNDLED_PLUGIN_VERSION,
});
await writeJson(join(home, ".agents", "plugins", "marketplace.json"), {
name: "local",
Expand Down Expand Up @@ -3176,14 +3185,14 @@ describe("syncManagedTools", () => {
codexBin,
home,
listedVersion: "0.1.2",
selectedVersion: "0.1.5",
selectedVersion: BUNDLED_PLUGIN_VERSION,
});

const result = await setupCodexPlugin({ homeDir: home, codexBin });

expect(result.codexInstall.status).toBe("failed");
expect(result.codexInstall.stderr).toContain(
"expected fclt@local version 0.1.5 to be installed and enabled"
`expected fclt@local version ${BUNDLED_PLUGIN_VERSION} to be installed and enabled`
);
expect(result.codexInstall.verificationCommand).toEqual([
codexBin,
Expand All @@ -3205,14 +3214,14 @@ describe("syncManagedTools", () => {
"cache",
"local",
"fclt",
"0.1.5",
BUNDLED_PLUGIN_VERSION,
"selected.txt"
)
).exists()
).toBe(false);
});

it("upgrades to plugin 0.1.5 while preserving a cached 0.1.2 payload", async () => {
it("upgrades to the bundled plugin while preserving a cached 0.1.2 payload", async () => {
const home = await createTempDir();
const oldCache = join(
home,
Expand All @@ -3234,7 +3243,7 @@ describe("syncManagedTools", () => {
await writeCodexPluginStub({
codexBin,
home,
selectedVersion: "0.1.5",
selectedVersion: BUNDLED_PLUGIN_VERSION,
});

const result = await setupCodexPlugin({ homeDir: home, codexBin });
Expand All @@ -3245,15 +3254,15 @@ describe("syncManagedTools", () => {
"cache",
"local",
"fclt",
"0.1.5"
BUNDLED_PLUGIN_VERSION
);

expect(result.codexInstall.status).toBe("succeeded");
expect(
(await Bun.file(
join(installedPath, ".codex-plugin", "plugin.json")
).json()) as { version: string }
).toMatchObject({ version: "0.1.5" });
).toMatchObject({ version: BUNDLED_PLUGIN_VERSION });
expect(
await Bun.file(join(installedPath, "scripts", "fclt-mcp.cjs")).text()
).toContain("audit-read-only-v1");
Expand All @@ -3274,7 +3283,7 @@ describe("syncManagedTools", () => {
codexBin,
home,
installedMutation: "symlink",
selectedVersion: "0.1.5",
selectedVersion: BUNDLED_PLUGIN_VERSION,
});

const result = await setupCodexPlugin({ homeDir: home, codexBin });
Expand Down Expand Up @@ -3312,7 +3321,7 @@ describe("syncManagedTools", () => {
codexBin,
home,
installedMutation: "unreadable-subtree",
selectedVersion: "0.1.5",
selectedVersion: BUNDLED_PLUGIN_VERSION,
});

const result = await setupCodexPlugin({ homeDir: home, codexBin });
Expand All @@ -3333,7 +3342,7 @@ describe("syncManagedTools", () => {
"cache",
"local",
"fclt",
"0.1.5",
BUNDLED_PLUGIN_VERSION,
"unexpected-private"
),
0o700
Expand Down
11 changes: 10 additions & 1 deletion src/setup.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@ import {
import { facultMachineStateDir } from "./paths";
import { bootstrapFclt } from "./setup";

const BUNDLED_PLUGIN_VERSION = (
JSON.parse(
await readFile(
new URL("../plugins/fclt/.codex-plugin/plugin.json", import.meta.url),
"utf8"
)
) as { version: string }
).version;

const cleanupPaths: string[] = [];
const cliEntry = join(import.meta.dir, "index.ts");

Expand Down Expand Up @@ -693,7 +702,7 @@ describe("zero-config setup", () => {
'import { dirname, join } from "node:path";',
"const argv = process.argv.slice(2);",
'const pluginId = "fclt@hack-local";',
'const version = "0.1.5";',
`const version = ${JSON.stringify(BUNDLED_PLUGIN_VERSION)};`,
'const installedPath = join(process.env.HOME, ".codex", "plugins", "cache", "hack-local", "fclt", version);',
'mkdirSync(join(process.env.HOME, ".codex"), { recursive: true });',
'writeFileSync(join(process.env.HOME, ".codex", "config.toml"), `[plugins."` + pluginId + `"]\nenabled = true\n`);',
Expand Down
Loading