feat(help): #690 bootstrap-plan help JSON schema

This commit is contained in:
YeonGyu-Kim
2026-05-25 11:13:37 +09:00
parent 9fd52cb609
commit 69460564cf
3 changed files with 165 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
import { z } from "zod"
export const BootstrapStepSchema = z.object({
id: z.string().describe("Step identifier"),
title: z.string().describe("Step display title"),
description: z.string().describe("Step description"),
status: z.enum(["pending", "in_progress", "completed", "skipped", "failed"]).describe("Step execution status"),
duration: z.number().nullable().optional().describe("Step execution duration in ms"),
error: z.string().nullable().optional().describe("Error message if failed"),
}).meta({ ref: "BootstrapStep" })
export const BootstrapPlanSchema = z.object({
version: z.string().describe("Plan version"),
createdAt: z.number().describe("Plan creation timestamp (epoch ms)"),
completedAt: z.number().nullable().optional().describe("Completion timestamp (epoch ms)"),
totalSteps: z.number().describe("Total number of steps"),
completedSteps: z.number().describe("Number of completed steps"),
steps: z.array(BootstrapStepSchema).describe("Bootstrap steps"),
summary: z.string().optional().describe("Overall summary of the bootstrap plan"),
}).meta({ ref: "BootstrapPlan" })
export const BootstrapPlanResultSchema = z.object({
plan: BootstrapPlanSchema.describe("The bootstrap plan"),
timestamp: z.number().describe("Snapshot timestamp (epoch ms)"),
}).meta({ ref: "BootstrapPlanResult" })
export type BootstrapStep = z.infer<typeof BootstrapStepSchema>
export type BootstrapPlan = z.infer<typeof BootstrapPlanSchema>
export type BootstrapPlanResult = z.infer<typeof BootstrapPlanResultSchema>