forked from farhoodlabs/paperclip
Improve execution workspace detail editing
Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -186,6 +186,7 @@ export type {
|
||||
ProjectGoalRef,
|
||||
ProjectWorkspace,
|
||||
ExecutionWorkspace,
|
||||
ExecutionWorkspaceConfig,
|
||||
WorkspaceRuntimeService,
|
||||
WorkspaceOperation,
|
||||
WorkspaceOperationPhase,
|
||||
|
||||
@@ -50,6 +50,7 @@ export type { AssetImage } from "./asset.js";
|
||||
export type { Project, ProjectCodebase, ProjectCodebaseOrigin, ProjectGoalRef, ProjectWorkspace } from "./project.js";
|
||||
export type {
|
||||
ExecutionWorkspace,
|
||||
ExecutionWorkspaceConfig,
|
||||
WorkspaceRuntimeService,
|
||||
ExecutionWorkspaceStrategyType,
|
||||
ExecutionWorkspaceMode,
|
||||
|
||||
@@ -40,6 +40,13 @@ export interface ExecutionWorkspaceStrategy {
|
||||
teardownCommand?: string | null;
|
||||
}
|
||||
|
||||
export interface ExecutionWorkspaceConfig {
|
||||
provisionCommand: string | null;
|
||||
teardownCommand: string | null;
|
||||
cleanupCommand: string | null;
|
||||
workspaceRuntime: Record<string, unknown> | null;
|
||||
}
|
||||
|
||||
export interface ProjectExecutionWorkspacePolicy {
|
||||
enabled: boolean;
|
||||
defaultMode?: ProjectExecutionWorkspaceDefaultMode;
|
||||
@@ -81,7 +88,9 @@ export interface ExecutionWorkspace {
|
||||
closedAt: Date | null;
|
||||
cleanupEligibleAt: Date | null;
|
||||
cleanupReason: string | null;
|
||||
config: ExecutionWorkspaceConfig | null;
|
||||
metadata: Record<string, unknown> | null;
|
||||
runtimeServices?: WorkspaceRuntimeService[];
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
}
|
||||
|
||||
@@ -8,10 +8,24 @@ export const executionWorkspaceStatusSchema = z.enum([
|
||||
"cleanup_failed",
|
||||
]);
|
||||
|
||||
export const executionWorkspaceConfigSchema = z.object({
|
||||
provisionCommand: z.string().optional().nullable(),
|
||||
teardownCommand: z.string().optional().nullable(),
|
||||
cleanupCommand: z.string().optional().nullable(),
|
||||
workspaceRuntime: z.record(z.unknown()).optional().nullable(),
|
||||
}).strict();
|
||||
|
||||
export const updateExecutionWorkspaceSchema = z.object({
|
||||
name: z.string().min(1).optional(),
|
||||
cwd: z.string().optional().nullable(),
|
||||
repoUrl: z.string().optional().nullable(),
|
||||
baseRef: z.string().optional().nullable(),
|
||||
branchName: z.string().optional().nullable(),
|
||||
providerRef: z.string().optional().nullable(),
|
||||
status: executionWorkspaceStatusSchema.optional(),
|
||||
cleanupEligibleAt: z.string().datetime().optional().nullable(),
|
||||
cleanupReason: z.string().optional().nullable(),
|
||||
config: executionWorkspaceConfigSchema.optional().nullable(),
|
||||
metadata: z.record(z.unknown()).optional().nullable(),
|
||||
}).strict();
|
||||
|
||||
|
||||
@@ -151,6 +151,7 @@ export {
|
||||
} from "./work-product.js";
|
||||
|
||||
export {
|
||||
executionWorkspaceConfigSchema,
|
||||
updateExecutionWorkspaceSchema,
|
||||
executionWorkspaceStatusSchema,
|
||||
type UpdateExecutionWorkspace,
|
||||
|
||||
Reference in New Issue
Block a user