feat: add experimental Boat configuration and computer viewer surfaces

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
DottaandPaperclip committed 2026-10-10 08:30:54 -05:00
1 parent 1dec4c13d1
commit 9525aa80e5
19 files changed
+500 -18

No files matched your search

+15
View File
@@ -0,0 +1,15 @@
import type { ComputerViewer, TaskComputer } from "@paperclipai/shared";
import { api } from "./client";
const path = (issueId: string) => `/issues/${encodeURIComponent(issueId)}/computer`;
export const computersApi = {
get: (issueId: string) => api.get<TaskComputer | null>(path(issueId), { cache: "no-store" }),
connect: (issueId: string, environmentId: string) =>
api.post<ComputerViewer>(`${path(issueId)}/connect`, { environmentId }),
presence: (issueId: string, environmentId: string, owner: ComputerViewer["owner"]) =>
api.post<ComputerViewer>(`${path(issueId)}/presence`, { environmentId, owner }),
disconnect: (issueId: string, environmentId: string, owner: ComputerViewer["owner"]) =>
api.post<void>(`${path(issueId)}/disconnect`, { environmentId, owner }),
preview: (issueId: string, environmentId: string, port: number) =>
api.post<{ url: string }>(`${path(issueId)}/preview`, { environmentId, port }),
};