From bc7c5e54316dcbea7ef4bc37caa4bebc244abad4 Mon Sep 17 00:00:00 2001 From: nntrivi2001 Date: Thu, 6 Aug 2026 09:47:10 +0700 Subject: [PATCH] feat(lanes): add client API methods for F4 lane actions (F4) --- client/src/lib/api.ts | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/client/src/lib/api.ts b/client/src/lib/api.ts index 51ac13d..576c220 100644 --- a/client/src/lib/api.ts +++ b/client/src/lib/api.ts @@ -1072,6 +1072,13 @@ export const api = { purged_events: number; purged_agents: number; }>("/settings/cleanup", { method: "POST", body: JSON.stringify(params) }), + skillsInstall: () => + request<{ installed: true; path: string }>("/skills/install", { method: "POST", body: "{}" }), + gc: (body: { dryRun?: boolean } = {}) => + request<{ reaped: number[]; capped: { path: string; sizeBefore: number }[] }>("/lanes/gc", { + method: "POST", + body: JSON.stringify(body), + }), }, // ─────────────────────────────── Workflows API ────────────────────────────── @@ -2063,6 +2070,28 @@ export const api = { body: JSON.stringify(body), }), }, + agentsInstall: (id: number) => + request<{ installed: string[] }>(`/lanes/${id}/agents/install`, { + method: "POST", + body: "{}", + }), + mcpSync: (id: number) => + request<{ servers: string[]; profilesSeeded: string[] }>(`/lanes/${id}/mcp/sync`, { + method: "POST", + body: "{}", + }), + integration: (id: number, name: string) => + request<{ enabled: boolean }>(`/lanes/${id}/integrations/${encodeURIComponent(name)}`), + syncBaseCheck: (id: number, branch?: string) => + request<{ + code: number; + devDelta?: string[] | null; + overlap?: string[] | null; + collisions?: { file: string; collidesWith: string; suggestion: string }[]; + }>(`/lanes/${id}/sync-base`, { + method: "POST", + body: JSON.stringify({ mode: "check", branch }), + }), }, // ──────────────────────────────── Locks API ──────────────────────────────── /** Named locks across all lanes: used for serialization and gating.