Refactor Foundry GitHub and sandbox flows

This commit is contained in:
Nathan Flurry 2026-03-12 10:51:33 -07:00
parent 4bccd5fc8d
commit ec8e816d0d
112 changed files with 4026 additions and 2715 deletions

View file

@ -4,6 +4,8 @@ export type FoundryGithubInstallationStatus = "connected" | "install_required" |
export type FoundryGithubSyncStatus = "pending" | "syncing" | "synced" | "error";
export type FoundryOrganizationKind = "personal" | "organization";
export type FoundryStarterRepoStatus = "pending" | "starred" | "skipped";
export type FoundryActorRuntimeStatus = "healthy" | "error";
export type FoundryActorRuntimeType = "organization" | "repository" | "task" | "history" | "sandbox_instance" | "task_status_sync";
export interface FoundryUser {
id: string;
@ -50,6 +52,27 @@ export interface FoundryGithubState {
lastSyncAt: number | null;
}
export interface FoundryActorRuntimeIssue {
actorId: string;
actorType: FoundryActorRuntimeType;
scopeId: string | null;
scopeLabel: string;
message: string;
workflowId: string | null;
stepName: string | null;
attempt: number | null;
willRetry: boolean;
retryDelayMs: number | null;
occurredAt: number;
}
export interface FoundryActorRuntimeState {
status: FoundryActorRuntimeStatus;
errorCount: number;
lastErrorAt: number | null;
issues: FoundryActorRuntimeIssue[];
}
export interface FoundryOrganizationSettings {
displayName: string;
slug: string;
@ -65,6 +88,7 @@ export interface FoundryOrganization {
kind: FoundryOrganizationKind;
settings: FoundryOrganizationSettings;
github: FoundryGithubState;
runtime: FoundryActorRuntimeState;
billing: FoundryBillingState;
members: FoundryOrganizationMember[];
seatAssignments: string[];

View file

@ -1,6 +1,16 @@
import type { TaskStatus } from "./contracts.js";
export type WorkbenchTaskStatus = "running" | "idle" | "new" | "archived";
export type WorkbenchAgentKind = "Claude" | "Codex" | "Cursor";
export type WorkbenchModelId = "claude-sonnet-4" | "claude-opus-4" | "gpt-4o" | "o3";
export type WorkbenchTaskLifecycleState = "starting" | "ready" | "error" | "archived" | "killed";
export interface WorkbenchTaskLifecycle {
code: TaskStatus;
state: WorkbenchTaskLifecycleState;
label: string;
message: string | null;
}
export interface WorkbenchTranscriptEvent {
id: string;
@ -73,7 +83,7 @@ export interface WorkbenchParsedDiffLine {
export interface WorkbenchPullRequestSummary {
number: number;
status: "draft" | "ready";
status: "draft" | "ready" | "closed" | "merged";
}
export interface WorkbenchTask {
@ -81,6 +91,7 @@ export interface WorkbenchTask {
repoId: string;
title: string;
status: WorkbenchTaskStatus;
lifecycle?: WorkbenchTaskLifecycle;
repoName: string;
updatedAtMs: number;
branch: string | null;