import type { OpenClawPluginApi } from 'openclaw/plugin-sdk/core' import type { ProcessManager } from './process-manager.js' import type { SessionMapping } from './session-mapping.js' import type { SynthesisConfig } from './config.js' interface CliDeps { processManager: ProcessManager mapping: SessionMapping config: SynthesisConfig } /** * `openclaw synthesis ...` admin commands. Used to inspect & poke the running * pool from outside (helpful for testing without a real channel inbound). * * Subcommands (planned): * list — show live processes + mapping * push — fake an inbound message * kill — terminate a process (mapping preserved) * forget — drop mapping entirely (next msg = new claude session) */ export function registerCli(api: OpenClawPluginApi, deps: CliDeps): void { // The exact API shape for command registration depends on the OpenClaw // plugin-sdk version. Two common forms seen in existing plugins: // // api.commands?.register('synthesis', { describe, handler }) // api.cli?.command('synthesis', sub => sub.command('list', '...', () => {...})) // // Both are stubbed below — pick whichever the loaded SDK exposes when // wiring this for real. const _ = { api, deps } // TODO: wire actual command registration once the surrounding plugin // patterns are confirmed (see contractor-agent/commands/register-cli.ts // for the canonical example in this codebase). void _ }