Add worktree-aware workspace runtime support

This commit is contained in:
Dotta
2026-03-10 10:58:38 -05:00
parent 7934952a77
commit 3120c72372
35 changed files with 8750 additions and 61 deletions

View File

@@ -77,6 +77,7 @@ export type {
Project,
ProjectGoalRef,
ProjectWorkspace,
WorkspaceRuntimeService,
Issue,
IssueAssigneeAdapterOverrides,
IssueComment,

View File

@@ -11,6 +11,7 @@ export type {
} from "./agent.js";
export type { AssetImage } from "./asset.js";
export type { Project, ProjectGoalRef, ProjectWorkspace } from "./project.js";
export type { WorkspaceRuntimeService } from "./workspace-runtime.js";
export type {
Issue,
IssueAssigneeAdapterOverrides,

View File

@@ -1,4 +1,5 @@
import type { ProjectStatus } from "../constants.js";
import type { WorkspaceRuntimeService } from "./workspace-runtime.js";
export interface ProjectGoalRef {
id: string;
@@ -15,6 +16,7 @@ export interface ProjectWorkspace {
repoRef: string | null;
metadata: Record<string, unknown> | null;
isPrimary: boolean;
runtimeServices?: WorkspaceRuntimeService[];
createdAt: Date;
updatedAt: Date;
}

View File

@@ -0,0 +1,28 @@
export interface WorkspaceRuntimeService {
id: string;
companyId: string;
projectId: string | null;
projectWorkspaceId: string | null;
issueId: string | null;
scopeType: "project_workspace" | "execution_workspace" | "run" | "agent";
scopeId: string | null;
serviceName: string;
status: "starting" | "running" | "stopped" | "failed";
lifecycle: "shared" | "ephemeral";
reuseKey: string | null;
command: string | null;
cwd: string | null;
port: number | null;
url: string | null;
provider: "local_process" | "adapter_managed";
providerRef: string | null;
ownerAgentId: string | null;
startedByRunId: string | null;
lastUsedAt: Date;
startedAt: Date;
stoppedAt: Date | null;
stopPolicy: Record<string, unknown> | null;
healthStatus: "unknown" | "healthy" | "unhealthy";
createdAt: Date;
updatedAt: Date;
}