/** * Tauri adapter for {@link TemplateGateway} (L7). * * Commands use snake_case (Tauri convention); payload keys are camelCase * (matching the backend DTO `#[serde(rename_all = "camelCase")]`), consistent * with the other adapters in this directory. * * NOTE: The Tauri commands wired here are defined in the backend `app-tauri` * crate and will be registered in a subsequent lot. This adapter is complete * on the frontend side; the mock gateway covers tests and offline dev today. */ import { invoke } from "@tauri-apps/api/core"; import type { Agent, AgentDrift, Template } from "@/domain"; import type { CreateTemplateInput, TemplateGateway } from "@/ports"; export class TauriTemplateGateway implements TemplateGateway { listTemplates(): Promise { return invoke("list_templates"); } createTemplate(input: CreateTemplateInput): Promise