Add star repo onboarding flow (#232)

This commit is contained in:
Nathan Flurry 2026-03-10 23:47:33 -07:00 committed by GitHub
parent d2346bafb3
commit 34a0587cbc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 330 additions and 89 deletions

View file

@ -25,6 +25,8 @@ import type {
RepoStackActionInput,
RepoStackActionResult,
RepoRecord,
StarSandboxAgentRepoInput,
StarSandboxAgentRepoResult,
SwitchResult,
} from "@openhandoff/shared";
import { sandboxInstanceKey, workspaceKey } from "./keys.js";
@ -76,6 +78,7 @@ interface WorkspaceHandle {
archiveHandoff(input: { workspaceId: string; handoffId: string; reason?: string }): Promise<void>;
killHandoff(input: { workspaceId: string; handoffId: string; reason?: string }): Promise<void>;
useWorkspace(input: { workspaceId: string }): Promise<{ workspaceId: string }>;
starSandboxAgentRepo(input: StarSandboxAgentRepoInput): Promise<StarSandboxAgentRepoResult>;
getWorkbench(input: { workspaceId: string }): Promise<HandoffWorkbenchSnapshot>;
createWorkbenchHandoff(input: HandoffWorkbenchCreateHandoffInput): Promise<HandoffWorkbenchCreateHandoffResponse>;
markWorkbenchUnread(input: HandoffWorkbenchSelectInput): Promise<void>;
@ -197,6 +200,7 @@ export interface BackendClient {
revertWorkbenchFile(workspaceId: string, input: HandoffWorkbenchDiffInput): Promise<void>;
health(): Promise<{ ok: true }>;
useWorkspace(workspaceId: string): Promise<{ workspaceId: string }>;
starSandboxAgentRepo(workspaceId: string): Promise<StarSandboxAgentRepoResult>;
}
export function rivetEndpoint(config: AppConfig): string {
@ -504,6 +508,10 @@ export function createBackendClient(options: BackendClientOptions): BackendClien
return (await workspace(input.workspaceId)).createHandoff(input);
},
async starSandboxAgentRepo(workspaceId: string): Promise<StarSandboxAgentRepoResult> {
return (await workspace(workspaceId)).starSandboxAgentRepo({ workspaceId });
},
async listHandoffs(workspaceId: string, repoId?: string): Promise<HandoffSummary[]> {
return (await workspace(workspaceId)).listHandoffs({ workspaceId, repoId });
},