feat(vm): add provisioned root recipe contract (#14352)

This commit is contained in:
Jinwoo Hong
2026-08-13 16:23:21 -07:00
committed by GitHub
parent a5a998ea77
commit 99d19d4635
18 changed files with 586 additions and 6 deletions
@@ -11,6 +11,7 @@ describe('plugin VM recipe artifacts', () => {
schemaVersion: 1,
id: 'cloud-sandbox',
name: 'Cloud Sandbox',
checkoutMode: 'provisioned-root',
create: './scripts/create.sh',
suspend: './scripts/suspend.sh',
resume: './scripts/resume.sh',
@@ -18,7 +19,11 @@ describe('plugin VM recipe artifacts', () => {
})
)
expect(recipe).toMatchObject({ id: 'cloud-sandbox', name: 'Cloud Sandbox' })
expect(recipe).toMatchObject({
id: 'cloud-sandbox',
name: 'Cloud Sandbox',
checkoutMode: 'provisioned-root'
})
expect(listPluginVmRecipeCommands(recipe)).toEqual([
{ phase: 'create', command: './scripts/create.sh' },
{ phase: 'suspend', command: './scripts/suspend.sh' },
@@ -15,6 +15,7 @@ const pluginVmRecipeArtifactSchema = z
id: z.string().regex(ORCA_VM_RECIPE_ID_PATTERN, ORCA_VM_RECIPE_ID_RULE),
name: z.string().trim().min(1).max(128),
description: z.string().trim().min(1).max(1024).optional(),
checkoutMode: z.enum(['orca-worktree', 'provisioned-root']).optional(),
create: recipeCommandSchema,
suspend: recipeCommandSchema.optional(),
resume: recipeCommandSchema.optional(),
@@ -43,6 +44,7 @@ export function parsePluginVmRecipeArtifact(raw: string): OrcaVmRecipe {
id: parsed.id,
name: parsed.name,
create: parsed.create,
...(parsed.checkoutMode ? { checkoutMode: parsed.checkoutMode } : {}),
...(parsed.description ? { description: parsed.description } : {}),
...(parsed.suspend ? { suspend: parsed.suspend } : {}),
...(parsed.resume ? { resume: parsed.resume } : {}),