New adapter type for invoking OpenClaw agents via the gateway protocol. Registers in server, CLI, and UI adapter registries. Adds onboarding wizard support with gateway URL field and e2e smoke test script. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
27 lines
874 B
TypeScript
27 lines
874 B
TypeScript
import type { UIAdapterModule } from "./types";
|
|
import { claudeLocalUIAdapter } from "./claude-local";
|
|
import { codexLocalUIAdapter } from "./codex-local";
|
|
import { cursorLocalUIAdapter } from "./cursor";
|
|
import { openCodeLocalUIAdapter } from "./opencode-local";
|
|
import { openClawUIAdapter } from "./openclaw";
|
|
import { openClawGatewayUIAdapter } from "./openclaw-gateway";
|
|
import { processUIAdapter } from "./process";
|
|
import { httpUIAdapter } from "./http";
|
|
|
|
const adaptersByType = new Map<string, UIAdapterModule>(
|
|
[
|
|
claudeLocalUIAdapter,
|
|
codexLocalUIAdapter,
|
|
openCodeLocalUIAdapter,
|
|
cursorLocalUIAdapter,
|
|
openClawUIAdapter,
|
|
openClawGatewayUIAdapter,
|
|
processUIAdapter,
|
|
httpUIAdapter,
|
|
].map((a) => [a.type, a]),
|
|
);
|
|
|
|
export function getUIAdapter(type: string): UIAdapterModule {
|
|
return adaptersByType.get(type) ?? processUIAdapter;
|
|
}
|