mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-17 19:11:38 +00:00
* refactor(browser): collapse Playwright export paths * refactor(browser): remove dead plugin exports * refactor(codex): remove dead app-server exports * refactor(codex): remove remaining dead exports * test(codex): use canonical private-type owners * test(browser): isolate proxy startup state * test(browser): remove stale chrome imports * refactor(codex): privatize remaining helpers * chore(deadcode): refresh export baseline after rebase * refactor(browser): finish canonical helper ownership * refactor: fix dead-export cleanup gates * refactor(codex): keep runtime facades LOC-neutral * chore(ci): refresh TypeScript LOC baseline * chore(deadcode): refresh ratchets after rebase * chore(ci): refresh LOC baseline after main advance * chore(deadcode): align ratchets with latest main
36 lines
1.5 KiB
TypeScript
36 lines
1.5 KiB
TypeScript
/**
|
|
* Registers the `/codex` plugin command and lazy-loads the app-server command
|
|
* handler implementation.
|
|
*/
|
|
import type { OpenClawPluginCommandDefinition } from "openclaw/plugin-sdk/plugin-entry";
|
|
import { handleCodexCommand } from "./command-dispatch.js";
|
|
import type { CodexCommandDepsOverride } from "./command-handlers.js";
|
|
|
|
type CodexCommandOptions = {
|
|
pluginConfig?: unknown;
|
|
resolvePluginConfig?: () => unknown;
|
|
deps: CodexCommandDepsOverride;
|
|
};
|
|
|
|
/** Creates the reserved `/codex` command definition exposed by the plugin. */
|
|
export function createCodexCommand(options: CodexCommandOptions): OpenClawPluginCommandDefinition {
|
|
return {
|
|
name: "codex",
|
|
description: "Inspect and control the Codex app-server harness",
|
|
ownership: "reserved",
|
|
agentPromptGuidance: [
|
|
{
|
|
text: "Native Codex app-server plugin is available (`/codex ...`). For Codex bind/control/thread/resume/steer/stop requests, prefer `/codex bind`, `/codex threads`, `/codex resume`, `/codex steer`, and `/codex stop` over ACP. When OpenClaw sandboxing is active, native Codex execution modes are unavailable; use normal Codex harness turns.",
|
|
surfaces: ["openclaw_main"],
|
|
},
|
|
{
|
|
text: "Use ACP for Codex only when the user explicitly asks for ACP/acpx or wants to test the ACP path.",
|
|
surfaces: ["openclaw_main"],
|
|
},
|
|
],
|
|
acceptsArgs: true,
|
|
requireAuth: true,
|
|
handler: (ctx) => handleCodexCommand(ctx, options),
|
|
};
|
|
}
|