mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-01 22:25:45 +00:00
* feat: add codex supervisor plugin * fix: restore merged branch checks * fix: unblock supervisor extension CI * fix: restore merged agent checks
37 lines
1.2 KiB
TypeScript
37 lines
1.2 KiB
TypeScript
import { buildJsonPluginConfigSchema, definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
|
|
import {
|
|
CodexSupervisorPluginConfigSchema,
|
|
resolveCodexSupervisorPluginConfig,
|
|
} from "./src/config.js";
|
|
import { createCodexSupervisorTools } from "./src/plugin-tools.js";
|
|
import { CodexSupervisor } from "./src/supervisor.js";
|
|
|
|
export default definePluginEntry({
|
|
id: "codex-supervisor",
|
|
name: "Codex Supervisor",
|
|
description: "Supervise Codex app-server sessions from OpenClaw.",
|
|
configSchema: buildJsonPluginConfigSchema(
|
|
CodexSupervisorPluginConfigSchema as unknown as Parameters<
|
|
typeof buildJsonPluginConfigSchema
|
|
>[0],
|
|
),
|
|
register(api) {
|
|
const config = resolveCodexSupervisorPluginConfig(api.pluginConfig);
|
|
const supervisor = new CodexSupervisor(config.endpoints);
|
|
api.lifecycle.registerRuntimeLifecycle({
|
|
id: "codex-supervisor",
|
|
description: "Close Codex supervisor app-server connections.",
|
|
cleanup: () => supervisor.close(),
|
|
});
|
|
for (const tool of createCodexSupervisorTools({
|
|
supervisor,
|
|
policy: {
|
|
allowRawTranscripts: config.allowRawTranscripts,
|
|
allowWriteControls: config.allowWriteControls,
|
|
},
|
|
})) {
|
|
api.registerTool(tool);
|
|
}
|
|
},
|
|
});
|