mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-01 12:03:52 +00:00
* feat: add codex supervisor plugin * fix: restore merged branch checks * fix: unblock supervisor extension CI * fix: restore merged agent checks
44 lines
1.3 KiB
TypeScript
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" },
|
|
},
|
|
});
|
|
});
|
|
});
|