Files
openclaw/extensions/codex-supervisor/index.test.ts
Peter Steinberger 9dd3bce549 feat: add codex supervisor extension
* feat: add codex supervisor plugin

* fix: restore merged branch checks

* fix: unblock supervisor extension CI

* fix: restore merged agent checks
2026-05-29 03:49:43 +01:00

44 lines
1.3 KiB
TypeScript

import { createCapturedPluginRegistration } from "openclaw/plugin-sdk/plugin-test-runtime";
import { describe, expect, it } from "vitest";
import entry from "./index.js";
describe("codex-supervisor plugin entry", () => {
it("registers supervisor tools from plugin config", () => {
const captured = createCapturedPluginRegistration({ id: "codex-supervisor" });
captured.api.pluginConfig = {
endpoints: [
{
id: "test",
transport: "websocket",
url: "ws://127.0.0.1:12345",
},
],
allowRawTranscripts: true,
allowWriteControls: true,
};
entry.register(captured.api);
expect(captured.tools.map((tool) => tool.name).toSorted()).toEqual([
"codex_endpoint_probe",
"codex_session_interrupt",
"codex_session_read",
"codex_session_send",
"codex_sessions_list",
]);
expect(captured.runtimeLifecycles).toHaveLength(1);
expect(captured.runtimeLifecycles[0]).toMatchObject({
id: "codex-supervisor",
description: "Close Codex supervisor app-server connections.",
});
expect(entry.configSchema.jsonSchema).toMatchObject({
type: "object",
properties: {
endpoints: { type: "array" },
allowRawTranscripts: { type: "boolean" },
allowWriteControls: { type: "boolean" },
},
});
});
});