Skip to content

Open-source Grok Bot alternative with a virtual machine that bots can use

469 B
Raw Blame
// The ACP driver's config decode, moved out of core.ts (file-size ratchet).
import type { AcpConfig } from "./core.ts";

export function decodeAcpConfig(defaultCli: string) {
  return (raw: unknown): AcpConfig => {
    const o = (raw ?? {}) as Record<string, unknown>;
    return {
      cli: typeof o.cli === "string" ? o.cli : defaultCli,
      fullAuto: o.fullAuto === true,
      workspace: typeof o.workspace === "string" ? o.workspace : undefined,
    };
  };
}