mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-16 17:01:06 +00:00
Add star repo onboarding flow (#232)
This commit is contained in:
parent
d2346bafb3
commit
34a0587cbc
9 changed files with 330 additions and 89 deletions
|
|
@ -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 });
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue