sw-plan 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.ts ADDED
@@ -0,0 +1,90 @@
1
+ /**
2
+ * Planner CLI Library
3
+ *
4
+ * Exports schemas and types for integration planning.
5
+ */
6
+
7
+ import { z } from 'zod';
8
+
9
+ // Define the schema for questions
10
+ export const QuestionSchema = z.object({
11
+ question: z.string(),
12
+ options: z.array(z.string()).length(3),
13
+ additionalInfo: z.string().optional()
14
+ });
15
+
16
+ // Stage 1: Questions only
17
+ export const QuestionsOutputSchema = z.object({
18
+ questions: z.array(QuestionSchema)
19
+ });
20
+
21
+ // Stage 2: Single plan metadata
22
+ export const PlanMetadataSchema = z.object({
23
+ id: z.number(),
24
+ title: z.string(),
25
+ description: z.string(),
26
+ estimatedTime: z.string(),
27
+ difficulty: z.enum(['Easy', 'Medium', 'Hard'])
28
+ });
29
+
30
+ export const PlanMetadataOutputSchema = z.object({
31
+ plan: PlanMetadataSchema
32
+ });
33
+
34
+ // Stage 3: Setup section for single plan
35
+ export const PlanSetupOutputSchema = z.object({
36
+ setup: z.array(z.string())
37
+ });
38
+
39
+ // Stage 4: Integration section for single plan
40
+ export const PlanIntegrationOutputSchema = z.object({
41
+ integration: z.array(z.string())
42
+ });
43
+
44
+ // Stage 5: Verification section for single plan
45
+ export const PlanVerificationOutputSchema = z.object({
46
+ verification: z.array(z.string())
47
+ });
48
+
49
+ // Stage 6: Next steps section for single plan
50
+ export const PlanNextStepsOutputSchema = z.object({
51
+ nextSteps: z.array(z.string())
52
+ });
53
+
54
+ // Summary schema for section summarization
55
+ export const SectionSummarySchema = z.object({
56
+ summary: z.string()
57
+ });
58
+
59
+ // Complete plan structure (for final output)
60
+ export const IntegrationPlanSchema = z.object({
61
+ id: z.number(),
62
+ title: z.string(),
63
+ description: z.string(),
64
+ estimatedTime: z.string(),
65
+ difficulty: z.enum(['Easy', 'Medium', 'Hard']),
66
+ sections: z.object({
67
+ setup: z.array(z.string()),
68
+ integration: z.array(z.string()),
69
+ verification: z.array(z.string()),
70
+ nextSteps: z.array(z.string())
71
+ }),
72
+ summaries: z.object({
73
+ setup: z.string(),
74
+ integration: z.string(),
75
+ verification: z.string(),
76
+ nextSteps: z.string()
77
+ })
78
+ });
79
+
80
+ // Infer TypeScript types from Zod schemas
81
+ export type Question = z.infer<typeof QuestionSchema>;
82
+ export type QuestionsOutput = z.infer<typeof QuestionsOutputSchema>;
83
+ export type PlanMetadata = z.infer<typeof PlanMetadataSchema>;
84
+ export type PlanMetadataOutput = z.infer<typeof PlanMetadataOutputSchema>;
85
+ export type PlanSetupOutput = z.infer<typeof PlanSetupOutputSchema>;
86
+ export type PlanIntegrationOutput = z.infer<typeof PlanIntegrationOutputSchema>;
87
+ export type PlanVerificationOutput = z.infer<typeof PlanVerificationOutputSchema>;
88
+ export type PlanNextStepsOutput = z.infer<typeof PlanNextStepsOutputSchema>;
89
+ export type SectionSummary = z.infer<typeof SectionSummarySchema>;
90
+ export type IntegrationPlan = z.infer<typeof IntegrationPlanSchema>;