@getforgeai/protocol 0.1.0-beta.1

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.
Files changed (54) hide show
  1. package/LICENSE +201 -0
  2. package/dist/constants/agent-status.d.ts +2 -0
  3. package/dist/constants/agent-status.js +8 -0
  4. package/dist/constants/cli-status.d.ts +2 -0
  5. package/dist/constants/cli-status.js +6 -0
  6. package/dist/constants/release-status.d.ts +5 -0
  7. package/dist/constants/release-status.js +10 -0
  8. package/dist/constants/task-status.d.ts +16 -0
  9. package/dist/constants/task-status.js +50 -0
  10. package/dist/constants/workflow-scope.d.ts +3 -0
  11. package/dist/constants/workflow-scope.js +7 -0
  12. package/dist/constants/workflow-type.d.ts +3 -0
  13. package/dist/constants/workflow-type.js +2 -0
  14. package/dist/events/index.d.ts +4 -0
  15. package/dist/events/index.js +2 -0
  16. package/dist/events/journal-events.d.ts +29 -0
  17. package/dist/events/journal-events.js +22 -0
  18. package/dist/events/socket-events.d.ts +513 -0
  19. package/dist/events/socket-events.js +3 -0
  20. package/dist/index.d.ts +19 -0
  21. package/dist/index.js +11 -0
  22. package/dist/types/agent.d.ts +12 -0
  23. package/dist/types/agent.js +2 -0
  24. package/dist/types/project.d.ts +2 -0
  25. package/dist/types/project.js +2 -0
  26. package/dist/types/release.d.ts +18 -0
  27. package/dist/types/release.js +2 -0
  28. package/dist/types/task.d.ts +15 -0
  29. package/dist/types/task.js +2 -0
  30. package/dist/types/workflow.d.ts +2 -0
  31. package/dist/types/workflow.js +2 -0
  32. package/dist/validation/cli-api.schema.d.ts +94 -0
  33. package/dist/validation/cli-api.schema.js +73 -0
  34. package/dist/validation/index.d.ts +19 -0
  35. package/dist/validation/index.js +19 -0
  36. package/dist/validation/mcp-tools.schema.d.ts +299 -0
  37. package/dist/validation/mcp-tools.schema.js +248 -0
  38. package/dist/validation/release.schema.d.ts +50 -0
  39. package/dist/validation/release.schema.js +29 -0
  40. package/dist/validation/skill-pull.schema.d.ts +94 -0
  41. package/dist/validation/skill-pull.schema.js +54 -0
  42. package/dist/validation/task-generation.schema.d.ts +63 -0
  43. package/dist/validation/task-generation.schema.js +39 -0
  44. package/dist/validation/task-worktree.schema.d.ts +32 -0
  45. package/dist/validation/task-worktree.schema.js +32 -0
  46. package/dist/validation/workflow-branch.schema.d.ts +26 -0
  47. package/dist/validation/workflow-branch.schema.js +26 -0
  48. package/dist/validation/workflow-dispatch.schema.d.ts +22 -0
  49. package/dist/validation/workflow-dispatch.schema.js +22 -0
  50. package/dist/validation/workflow-merge.schema.d.ts +65 -0
  51. package/dist/validation/workflow-merge.schema.js +61 -0
  52. package/dist/validation/workflow-stream.schema.d.ts +112 -0
  53. package/dist/validation/workflow-stream.schema.js +100 -0
  54. package/package.json +52 -0
@@ -0,0 +1,248 @@
1
+ import { z } from "zod";
2
+ import { KANBAN_SUB_STATUS } from "../constants/task-status.js";
3
+ // --- forge_get_task ---
4
+ export const ForgeGetTaskInputSchema = z.object({
5
+ taskId: z.string().min(1, "taskId is required"),
6
+ });
7
+ export const ForgeGetTaskOutputSchema = z.object({
8
+ id: z.string(),
9
+ title: z.string(),
10
+ description: z.string(),
11
+ completed: z.boolean(),
12
+ kanbanSubStatus: z.string().nullable().optional(),
13
+ acceptanceCriteria: z.string().optional(),
14
+ checkpoints: z.array(z.string()).optional(),
15
+ handoffContext: z.string().optional(),
16
+ assigneeId: z.string().nullable().optional(),
17
+ cliDeviceId: z.string().nullable().optional(),
18
+ });
19
+ // --- forge_update_status ---
20
+ export const ForgeUpdateStatusInputSchema = z.object({
21
+ taskId: z.string().min(1, "taskId is required"),
22
+ kanbanSubStatus: z.enum(KANBAN_SUB_STATUS),
23
+ });
24
+ export const ForgeUpdateStatusOutputSchema = z.object({
25
+ taskId: z.string(),
26
+ previousStatus: z.string(),
27
+ newStatus: z.string(),
28
+ success: z.boolean(),
29
+ });
30
+ // --- forge_ask_human ---
31
+ export const ForgeAskHumanInputSchema = z.object({
32
+ taskId: z.string().min(1, "taskId is required"),
33
+ question: z.string().min(1, "question is required"),
34
+ context: z.string().optional(),
35
+ });
36
+ export const ForgeAskHumanOutputSchema = z.object({
37
+ taskId: z.string(),
38
+ status: z.literal("waiting"),
39
+ message: z.string(),
40
+ });
41
+ // --- forge_requeue ---
42
+ export const ForgeRequeueInputSchema = z.object({
43
+ taskId: z.string().min(1, "taskId is required"),
44
+ reason: z.string().optional(),
45
+ });
46
+ export const TaskRequeueResponseSchema = z.object({
47
+ allowed: z.boolean(),
48
+ count: z.number(),
49
+ max: z.number(),
50
+ reason: z.string().optional(),
51
+ });
52
+ // --- forge_complete_step (Story 6b.4) ---
53
+ export const ForgeCompleteStepDeliverableSchema = z.object({
54
+ filePath: z.string().min(1, "filePath is required"),
55
+ label: z.string().min(1, "label is required"),
56
+ content: z.string().max(102_400).optional(),
57
+ });
58
+ export const ForgeCompleteStepInputSchema = z.object({
59
+ deliverables: z
60
+ .array(ForgeCompleteStepDeliverableSchema)
61
+ .min(1, "At least one deliverable is required"),
62
+ });
63
+ export const ForgeCompleteStepPayloadSchema = z.object({
64
+ orgId: z.string(),
65
+ projectId: z.string(),
66
+ workflowId: z.string(),
67
+ stepId: z.string(),
68
+ deliverables: z.array(ForgeCompleteStepDeliverableSchema).min(1),
69
+ timestamp: z.string(),
70
+ });
71
+ // --- agent:status Socket.io payload (Story 6.5 — Zod validation for runtime safety) ---
72
+ export const AgentStatusPayloadSchema = z.object({
73
+ agentId: z.string(),
74
+ status: z.enum(["RUNNING", "COMPLETED", "ERROR", "QUEUED"]),
75
+ orgId: z.string(),
76
+ projectId: z.string().optional(),
77
+ timestamp: z.string(),
78
+ });
79
+ // --- agent:stream Socket.io payload (Story 6.6 — Zod validation for runtime safety) ---
80
+ export const AgentStreamPayloadSchema = z.object({
81
+ agentId: z.string(),
82
+ chunk: z.string().max(8192),
83
+ turnIndex: z.number().int().optional(),
84
+ orgId: z.string(),
85
+ projectId: z.string().optional(),
86
+ timestamp: z.string(),
87
+ });
88
+ export const AgentToolActivityPayloadSchema = z.object({
89
+ agentId: z.string(),
90
+ toolName: z.string(),
91
+ toolDetail: z.string().max(200),
92
+ toolUseId: z.string().optional(),
93
+ parentToolUseId: z.string().optional(),
94
+ orgId: z.string(),
95
+ projectId: z.string(),
96
+ timestamp: z.string(),
97
+ });
98
+ // --- Socket.io event payloads for new events ---
99
+ export const TaskAskHumanPayloadSchema = z.object({
100
+ orgId: z.string(),
101
+ projectId: z.string().optional(),
102
+ timestamp: z.string(),
103
+ taskId: z.string(),
104
+ question: z.string(),
105
+ agentId: z.string().optional(),
106
+ context: z.string().optional(),
107
+ });
108
+ // --- forge_create_task_group (Story 6b.4b) ---
109
+ export const ForgeCreateTaskGroupInputSchema = z.object({
110
+ name: z.string().min(1).max(100),
111
+ description: z.string().max(500).optional(),
112
+ order: z.number().int().min(0).optional(),
113
+ });
114
+ export const ForgeCreateTaskGroupPayloadSchema = z.object({
115
+ orgId: z.string(),
116
+ projectId: z.string(),
117
+ workflowId: z.string().optional(),
118
+ name: z.string().min(1).max(100),
119
+ description: z.string().max(500).optional(),
120
+ order: z.number().int().min(0).optional(),
121
+ timestamp: z.string(),
122
+ });
123
+ // --- forge_add_group_dependency (Story 6b.4b) ---
124
+ export const ForgeAddGroupDependencyInputSchema = z.object({
125
+ blockingGroupName: z.string().min(1),
126
+ blockedGroupName: z.string().min(1),
127
+ });
128
+ export const ForgeAddGroupDependencyPayloadSchema = z.object({
129
+ orgId: z.string(),
130
+ projectId: z.string(),
131
+ workflowId: z.string().optional(),
132
+ blockingGroupName: z.string().min(1),
133
+ blockedGroupName: z.string().min(1),
134
+ timestamp: z.string(),
135
+ });
136
+ // --- forge_create_task (Story 6b.4b) ---
137
+ export const ForgeCreateTaskInputSchema = z.object({
138
+ title: z.string().min(2).max(200),
139
+ description: z.string().min(1),
140
+ priority: z.enum(["LOW", "MEDIUM", "HIGH", "CRITICAL"]),
141
+ storyPoints: z.number().int().min(1).max(100),
142
+ groupName: z.string().optional(),
143
+ order: z.number().int().min(0).optional(),
144
+ });
145
+ export const ForgeCreateTaskPayloadSchema = z.object({
146
+ orgId: z.string(),
147
+ projectId: z.string(),
148
+ workflowId: z.string().optional(),
149
+ title: z.string().min(2).max(200),
150
+ description: z.string().min(1),
151
+ priority: z.enum(["LOW", "MEDIUM", "HIGH", "CRITICAL"]),
152
+ storyPoints: z.number().int().min(1).max(100),
153
+ groupName: z.string().optional(),
154
+ order: z.number().int().min(0).optional(),
155
+ timestamp: z.string(),
156
+ });
157
+ // --- forge_add_task_dependency (Story 6b.4b) ---
158
+ export const ForgeAddTaskDependencyInputSchema = z.object({
159
+ blockingTaskTitle: z.string().min(1),
160
+ blockedTaskTitle: z.string().min(1),
161
+ });
162
+ export const ForgeAddTaskDependencyPayloadSchema = z.object({
163
+ orgId: z.string(),
164
+ projectId: z.string(),
165
+ workflowId: z.string().optional(),
166
+ blockingTaskTitle: z.string().min(1),
167
+ blockedTaskTitle: z.string().min(1),
168
+ timestamp: z.string(),
169
+ });
170
+ // --- forge_update_task (CRUD extension) ---
171
+ export const ForgeUpdateTaskInputSchema = z.object({
172
+ name: z.string().min(1, "Task name/title is required"),
173
+ title: z.string().min(2).max(200).optional(),
174
+ description: z.string().min(1).optional(),
175
+ priority: z.enum(["LOW", "MEDIUM", "HIGH", "CRITICAL"]).optional(),
176
+ storyPoints: z.number().int().min(1).max(100).optional(),
177
+ });
178
+ export const ForgeUpdateTaskPayloadSchema = z.object({
179
+ orgId: z.string(),
180
+ projectId: z.string(),
181
+ name: z.string().min(1),
182
+ title: z.string().min(2).max(200).optional(),
183
+ description: z.string().min(1).optional(),
184
+ priority: z.enum(["LOW", "MEDIUM", "HIGH", "CRITICAL"]).optional(),
185
+ storyPoints: z.number().int().min(1).max(100).optional(),
186
+ timestamp: z.string(),
187
+ });
188
+ // --- forge_delete_task (CRUD extension) ---
189
+ export const ForgeDeleteTaskInputSchema = z.object({
190
+ name: z.string().min(1, "Task name/title is required"),
191
+ });
192
+ export const ForgeDeleteTaskPayloadSchema = z.object({
193
+ orgId: z.string(),
194
+ projectId: z.string(),
195
+ name: z.string().min(1),
196
+ timestamp: z.string(),
197
+ });
198
+ // --- forge_update_task_group (CRUD extension) ---
199
+ export const ForgeUpdateTaskGroupInputSchema = z.object({
200
+ name: z.string().min(1, "Current group name is required"),
201
+ newName: z.string().min(1).max(100).optional(),
202
+ description: z.string().max(500).optional(),
203
+ });
204
+ export const ForgeUpdateTaskGroupPayloadSchema = z.object({
205
+ orgId: z.string(),
206
+ projectId: z.string(),
207
+ name: z.string().min(1),
208
+ newName: z.string().min(1).max(100).optional(),
209
+ description: z.string().max(500).optional(),
210
+ timestamp: z.string(),
211
+ });
212
+ // --- forge_delete_task_group (CRUD extension) ---
213
+ export const ForgeDeleteTaskGroupInputSchema = z.object({
214
+ name: z.string().min(1, "Group name is required"),
215
+ });
216
+ export const ForgeDeleteTaskGroupPayloadSchema = z.object({
217
+ orgId: z.string(),
218
+ projectId: z.string(),
219
+ name: z.string().min(1),
220
+ timestamp: z.string(),
221
+ });
222
+ // --- forge_remove_task_dependency (CRUD extension) ---
223
+ export const ForgeRemoveTaskDependencyInputSchema = z.object({
224
+ taskName: z.string().min(1, "Task name/title is required"),
225
+ dependsOnTaskName: z
226
+ .string()
227
+ .min(1, "Dependency task name/title is required"),
228
+ });
229
+ export const ForgeRemoveTaskDependencyPayloadSchema = z.object({
230
+ orgId: z.string(),
231
+ projectId: z.string(),
232
+ taskName: z.string().min(1),
233
+ dependsOnTaskName: z.string().min(1),
234
+ timestamp: z.string(),
235
+ });
236
+ // --- forge_remove_group_dependency (CRUD extension) ---
237
+ export const ForgeRemoveGroupDependencyInputSchema = z.object({
238
+ groupName: z.string().min(1, "Group name is required"),
239
+ dependsOnGroupName: z.string().min(1, "Dependency group name is required"),
240
+ });
241
+ export const ForgeRemoveGroupDependencyPayloadSchema = z.object({
242
+ orgId: z.string(),
243
+ projectId: z.string(),
244
+ groupName: z.string().min(1),
245
+ dependsOnGroupName: z.string().min(1),
246
+ timestamp: z.string(),
247
+ });
248
+ //# sourceMappingURL=mcp-tools.schema.js.map
@@ -0,0 +1,50 @@
1
+ import { z } from "zod";
2
+ export declare const CreateReleaseSchema: z.ZodObject<{
3
+ type: z.ZodEnum<{
4
+ RELEASE: "RELEASE";
5
+ MERGE_BACK: "MERGE_BACK";
6
+ }>;
7
+ targetBranch: z.ZodString;
8
+ workflowIds: z.ZodArray<z.ZodString>;
9
+ version: z.ZodOptional<z.ZodString>;
10
+ }, z.core.$strip>;
11
+ export type CreateRelease = z.infer<typeof CreateReleaseSchema>;
12
+ export declare const UpdateReleaseStatusSchema: z.ZodObject<{
13
+ releaseId: z.ZodString;
14
+ status: z.ZodEnum<{
15
+ PREPARING: "PREPARING";
16
+ REVIEW: "REVIEW";
17
+ RELEASING: "RELEASING";
18
+ RELEASED: "RELEASED";
19
+ FAILED: "FAILED";
20
+ CANCELLED: "CANCELLED";
21
+ }>;
22
+ }, z.core.$strip>;
23
+ export type UpdateReleaseStatus = z.infer<typeof UpdateReleaseStatusSchema>;
24
+ export declare const ReleaseMergeProgressSchema: z.ZodObject<{
25
+ releaseId: z.ZodString;
26
+ branch: z.ZodString;
27
+ status: z.ZodEnum<{
28
+ merged: "merged";
29
+ conflict: "conflict";
30
+ failed: "failed";
31
+ }>;
32
+ }, z.core.$strip>;
33
+ export type ReleaseMergeProgress = z.infer<typeof ReleaseMergeProgressSchema>;
34
+ export declare const ReleaseReadySchema: z.ZodObject<{
35
+ releaseId: z.ZodString;
36
+ testsStatus: z.ZodEnum<{
37
+ failed: "failed";
38
+ pending: "pending";
39
+ passed: "passed";
40
+ }>;
41
+ conflictsResolved: z.ZodNumber;
42
+ }, z.core.$strip>;
43
+ export type ReleaseReady = z.infer<typeof ReleaseReadySchema>;
44
+ export declare const ReleaseFinalizedSchema: z.ZodObject<{
45
+ releaseId: z.ZodString;
46
+ tagName: z.ZodOptional<z.ZodString>;
47
+ mergeCommit: z.ZodString;
48
+ }, z.core.$strip>;
49
+ export type ReleaseFinalized = z.infer<typeof ReleaseFinalizedSchema>;
50
+ //# sourceMappingURL=release.schema.d.ts.map
@@ -0,0 +1,29 @@
1
+ import { z } from "zod";
2
+ import { RELEASE_STATUS } from "../constants/release-status.js";
3
+ import { RELEASE_TYPE } from "../constants/release-status.js";
4
+ export const CreateReleaseSchema = z.object({
5
+ type: z.enum(RELEASE_TYPE),
6
+ targetBranch: z.string().min(1),
7
+ workflowIds: z.array(z.string().min(1)).min(1),
8
+ version: z.string().optional(),
9
+ });
10
+ export const UpdateReleaseStatusSchema = z.object({
11
+ releaseId: z.string().min(1),
12
+ status: z.enum(RELEASE_STATUS),
13
+ });
14
+ export const ReleaseMergeProgressSchema = z.object({
15
+ releaseId: z.string().min(1),
16
+ branch: z.string().min(1),
17
+ status: z.enum(["merged", "conflict", "failed"]),
18
+ });
19
+ export const ReleaseReadySchema = z.object({
20
+ releaseId: z.string().min(1),
21
+ testsStatus: z.enum(["pending", "passed", "failed"]),
22
+ conflictsResolved: z.number().int().min(0),
23
+ });
24
+ export const ReleaseFinalizedSchema = z.object({
25
+ releaseId: z.string().min(1),
26
+ tagName: z.string().optional(),
27
+ mergeCommit: z.string().min(1),
28
+ });
29
+ //# sourceMappingURL=release.schema.js.map
@@ -0,0 +1,94 @@
1
+ import { z } from "zod";
2
+ export declare const WORKFLOW_APPLICABILITY_VALUES: readonly ["GREENFIELD", "BROWNFIELD_MAJOR", "BROWNFIELD_MINOR", "BROWNFIELD_PATCH", "MERGE_BACK", "RELEASE"];
3
+ export declare const WorkflowApplicabilitySchema: z.ZodEnum<{
4
+ RELEASE: "RELEASE";
5
+ MERGE_BACK: "MERGE_BACK";
6
+ GREENFIELD: "GREENFIELD";
7
+ BROWNFIELD_MAJOR: "BROWNFIELD_MAJOR";
8
+ BROWNFIELD_MINOR: "BROWNFIELD_MINOR";
9
+ BROWNFIELD_PATCH: "BROWNFIELD_PATCH";
10
+ }>;
11
+ export type WorkflowApplicability = z.infer<typeof WorkflowApplicabilitySchema>;
12
+ export declare const WORKFLOW_APPLICABILITY_LABELS: Record<WorkflowApplicability, string>;
13
+ export declare const SkillWorkflowStepSchema: z.ZodObject<{
14
+ key: z.ZodString;
15
+ title: z.ZodString;
16
+ description: z.ZodOptional<z.ZodString>;
17
+ command: z.ZodOptional<z.ZodString>;
18
+ isOptional: z.ZodDefault<z.ZodBoolean>;
19
+ }, z.core.$strip>;
20
+ export type SkillWorkflowStep = z.infer<typeof SkillWorkflowStepSchema>;
21
+ export declare const SkillWorkflowPipelineColumnSchema: z.ZodObject<{
22
+ id: z.ZodString;
23
+ label: z.ZodString;
24
+ command: z.ZodOptional<z.ZodString>;
25
+ color: z.ZodOptional<z.ZodString>;
26
+ order: z.ZodOptional<z.ZodNumber>;
27
+ }, z.core.$strip>;
28
+ export type SkillWorkflowPipelineColumn = z.infer<typeof SkillWorkflowPipelineColumnSchema>;
29
+ export declare const SkillWorkflowSchema: z.ZodObject<{
30
+ key: z.ZodString;
31
+ name: z.ZodString;
32
+ description: z.ZodOptional<z.ZodString>;
33
+ applicability: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodEnum<{
34
+ RELEASE: "RELEASE";
35
+ MERGE_BACK: "MERGE_BACK";
36
+ GREENFIELD: "GREENFIELD";
37
+ BROWNFIELD_MAJOR: "BROWNFIELD_MAJOR";
38
+ BROWNFIELD_MINOR: "BROWNFIELD_MINOR";
39
+ BROWNFIELD_PATCH: "BROWNFIELD_PATCH";
40
+ }>>>>;
41
+ steps: z.ZodArray<z.ZodObject<{
42
+ key: z.ZodString;
43
+ title: z.ZodString;
44
+ description: z.ZodOptional<z.ZodString>;
45
+ command: z.ZodOptional<z.ZodString>;
46
+ isOptional: z.ZodDefault<z.ZodBoolean>;
47
+ }, z.core.$strip>>;
48
+ pipeline: z.ZodArray<z.ZodObject<{
49
+ id: z.ZodString;
50
+ label: z.ZodString;
51
+ command: z.ZodOptional<z.ZodString>;
52
+ color: z.ZodOptional<z.ZodString>;
53
+ order: z.ZodOptional<z.ZodNumber>;
54
+ }, z.core.$strip>>;
55
+ }, z.core.$strip>;
56
+ export type SkillWorkflow = z.infer<typeof SkillWorkflowSchema>;
57
+ export declare const SkillPullResponseSchema: z.ZodObject<{
58
+ id: z.ZodString;
59
+ name: z.ZodString;
60
+ version: z.ZodNumber;
61
+ files: z.ZodArray<z.ZodObject<{
62
+ path: z.ZodString;
63
+ content: z.ZodString;
64
+ }, z.core.$strip>>;
65
+ workflows: z.ZodArray<z.ZodObject<{
66
+ key: z.ZodString;
67
+ name: z.ZodString;
68
+ description: z.ZodOptional<z.ZodString>;
69
+ applicability: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodEnum<{
70
+ RELEASE: "RELEASE";
71
+ MERGE_BACK: "MERGE_BACK";
72
+ GREENFIELD: "GREENFIELD";
73
+ BROWNFIELD_MAJOR: "BROWNFIELD_MAJOR";
74
+ BROWNFIELD_MINOR: "BROWNFIELD_MINOR";
75
+ BROWNFIELD_PATCH: "BROWNFIELD_PATCH";
76
+ }>>>>;
77
+ steps: z.ZodArray<z.ZodObject<{
78
+ key: z.ZodString;
79
+ title: z.ZodString;
80
+ description: z.ZodOptional<z.ZodString>;
81
+ command: z.ZodOptional<z.ZodString>;
82
+ isOptional: z.ZodDefault<z.ZodBoolean>;
83
+ }, z.core.$strip>>;
84
+ pipeline: z.ZodArray<z.ZodObject<{
85
+ id: z.ZodString;
86
+ label: z.ZodString;
87
+ command: z.ZodOptional<z.ZodString>;
88
+ color: z.ZodOptional<z.ZodString>;
89
+ order: z.ZodOptional<z.ZodNumber>;
90
+ }, z.core.$strip>>;
91
+ }, z.core.$strip>>;
92
+ }, z.core.$strip>;
93
+ export type SkillPullResponse = z.infer<typeof SkillPullResponseSchema>;
94
+ //# sourceMappingURL=skill-pull.schema.d.ts.map
@@ -0,0 +1,54 @@
1
+ import { z } from "zod";
2
+ // --- Workflow Applicability ---
3
+ export const WORKFLOW_APPLICABILITY_VALUES = [
4
+ "GREENFIELD",
5
+ "BROWNFIELD_MAJOR",
6
+ "BROWNFIELD_MINOR",
7
+ "BROWNFIELD_PATCH",
8
+ "MERGE_BACK",
9
+ "RELEASE",
10
+ ];
11
+ export const WorkflowApplicabilitySchema = z.enum(WORKFLOW_APPLICABILITY_VALUES);
12
+ export const WORKFLOW_APPLICABILITY_LABELS = {
13
+ GREENFIELD: "Greenfield",
14
+ BROWNFIELD_MAJOR: "Brownfield — Major",
15
+ BROWNFIELD_MINOR: "Brownfield — Minor",
16
+ BROWNFIELD_PATCH: "Brownfield — Patch",
17
+ MERGE_BACK: "Merge Back",
18
+ RELEASE: "Release",
19
+ };
20
+ // --- Skill Workflow schemas (Story 6b.1) ---
21
+ export const SkillWorkflowStepSchema = z.object({
22
+ key: z.string().min(1),
23
+ title: z.string().min(1),
24
+ description: z.string().optional(),
25
+ command: z.string().optional(),
26
+ isOptional: z.boolean().default(false),
27
+ });
28
+ export const SkillWorkflowPipelineColumnSchema = z.object({
29
+ id: z.string().min(1),
30
+ label: z.string().min(1),
31
+ command: z.string().optional(),
32
+ color: z.string().optional(),
33
+ order: z.number().int().optional(),
34
+ });
35
+ export const SkillWorkflowSchema = z.object({
36
+ key: z.string().min(1),
37
+ name: z.string().min(1),
38
+ description: z.string().optional(),
39
+ applicability: z.array(WorkflowApplicabilitySchema).optional().default([]),
40
+ steps: z.array(SkillWorkflowStepSchema),
41
+ pipeline: z.array(SkillWorkflowPipelineColumnSchema),
42
+ });
43
+ // --- Skill Pull Response (Story 5d.2, updated Story 6b.1) ---
44
+ export const SkillPullResponseSchema = z.object({
45
+ id: z.string().min(1),
46
+ name: z.string().min(1),
47
+ version: z.number().int().positive("Version must be a positive integer"),
48
+ files: z.array(z.object({
49
+ path: z.string().min(1, "File path cannot be empty"),
50
+ content: z.string().max(5_000_000, "File content exceeds 5MB limit"),
51
+ })),
52
+ workflows: z.array(SkillWorkflowSchema),
53
+ });
54
+ //# sourceMappingURL=skill-pull.schema.js.map
@@ -0,0 +1,63 @@
1
+ import { z } from "zod";
2
+ export declare const GeneratedTaskGroupSchema: z.ZodObject<{
3
+ name: z.ZodString;
4
+ description: z.ZodOptional<z.ZodString>;
5
+ epicNumber: z.ZodOptional<z.ZodNumber>;
6
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
7
+ dependsOn: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
8
+ }, z.core.$strip>;
9
+ export type GeneratedTaskGroup = z.infer<typeof GeneratedTaskGroupSchema>;
10
+ export declare const GeneratedTaskSchema: z.ZodObject<{
11
+ title: z.ZodString;
12
+ description: z.ZodString;
13
+ priority: z.ZodEnum<{
14
+ LOW: "LOW";
15
+ MEDIUM: "MEDIUM";
16
+ HIGH: "HIGH";
17
+ CRITICAL: "CRITICAL";
18
+ }>;
19
+ storyPoints: z.ZodNumber;
20
+ order: z.ZodNumber;
21
+ dependsOn: z.ZodArray<z.ZodNumber>;
22
+ groupIndex: z.ZodOptional<z.ZodNumber>;
23
+ }, z.core.$strip>;
24
+ export type GeneratedTask = z.infer<typeof GeneratedTaskSchema>;
25
+ export declare const TaskGenerationResultSchema: z.ZodObject<{
26
+ workflowId: z.ZodString;
27
+ projectId: z.ZodString;
28
+ groups: z.ZodOptional<z.ZodArray<z.ZodObject<{
29
+ name: z.ZodString;
30
+ description: z.ZodOptional<z.ZodString>;
31
+ epicNumber: z.ZodOptional<z.ZodNumber>;
32
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
33
+ dependsOn: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
34
+ }, z.core.$strip>>>;
35
+ tasks: z.ZodArray<z.ZodObject<{
36
+ title: z.ZodString;
37
+ description: z.ZodString;
38
+ priority: z.ZodEnum<{
39
+ LOW: "LOW";
40
+ MEDIUM: "MEDIUM";
41
+ HIGH: "HIGH";
42
+ CRITICAL: "CRITICAL";
43
+ }>;
44
+ storyPoints: z.ZodNumber;
45
+ order: z.ZodNumber;
46
+ dependsOn: z.ZodArray<z.ZodNumber>;
47
+ groupIndex: z.ZodOptional<z.ZodNumber>;
48
+ }, z.core.$strip>>;
49
+ }, z.core.$strip>;
50
+ export type TaskGenerationResult = z.infer<typeof TaskGenerationResultSchema>;
51
+ export declare const TaskGenerationRequestSchema: z.ZodObject<{
52
+ workflowId: z.ZodString;
53
+ skillName: z.ZodOptional<z.ZodString>;
54
+ artifacts: z.ZodArray<z.ZodObject<{
55
+ stepKey: z.ZodString;
56
+ title: z.ZodString;
57
+ fileName: z.ZodString;
58
+ filePath: z.ZodString;
59
+ artifactType: z.ZodString;
60
+ }, z.core.$strip>>;
61
+ }, z.core.$strip>;
62
+ export type TaskGenerationRequest = z.infer<typeof TaskGenerationRequestSchema>;
63
+ //# sourceMappingURL=task-generation.schema.d.ts.map
@@ -0,0 +1,39 @@
1
+ import { z } from "zod";
2
+ // --- Generated Task Group (CLI → Cloud contract, Story 5b-4) ---
3
+ export const GeneratedTaskGroupSchema = z.object({
4
+ name: z.string().min(1).max(100),
5
+ description: z.string().max(500).optional(),
6
+ epicNumber: z.number().int().positive().optional(),
7
+ metadata: z.record(z.string(), z.unknown()).optional(),
8
+ dependsOn: z.array(z.number().int().min(0)).default([]),
9
+ });
10
+ // --- Generated Task (CLI → Cloud contract) ---
11
+ export const GeneratedTaskSchema = z.object({
12
+ title: z.string().min(2).max(200),
13
+ description: z.string(),
14
+ priority: z.enum(["LOW", "MEDIUM", "HIGH", "CRITICAL"]),
15
+ storyPoints: z.number().int().min(1).max(100),
16
+ order: z.number().int().min(0),
17
+ dependsOn: z.array(z.number().int().min(0)),
18
+ groupIndex: z.number().int().min(0).optional(),
19
+ });
20
+ // --- Task Generation Result (CLI POST body) ---
21
+ export const TaskGenerationResultSchema = z.object({
22
+ workflowId: z.string(),
23
+ projectId: z.string(),
24
+ groups: z.array(GeneratedTaskGroupSchema).optional(),
25
+ tasks: z.array(GeneratedTaskSchema).min(1),
26
+ });
27
+ // --- Task Generation Request (Cloud → CLI via Socket.io) ---
28
+ export const TaskGenerationRequestSchema = z.object({
29
+ workflowId: z.string(),
30
+ skillName: z.string().optional(),
31
+ artifacts: z.array(z.object({
32
+ stepKey: z.string(),
33
+ title: z.string(),
34
+ fileName: z.string(),
35
+ filePath: z.string(),
36
+ artifactType: z.string(),
37
+ })),
38
+ });
39
+ //# sourceMappingURL=task-generation.schema.js.map
@@ -0,0 +1,32 @@
1
+ import { z } from "zod";
2
+ export declare const TaskWorktreeCreateSchema: z.ZodObject<{
3
+ taskId: z.ZodString;
4
+ taskSlug: z.ZodString;
5
+ projectSlug: z.ZodString;
6
+ workflowBaseBranch: z.ZodString;
7
+ repoUrl: z.ZodString;
8
+ }, z.core.$strip>;
9
+ export type TaskWorktreeCreate = z.infer<typeof TaskWorktreeCreateSchema>;
10
+ export declare const TaskWorktreeCreatedSchema: z.ZodObject<{
11
+ taskId: z.ZodString;
12
+ taskBranch: z.ZodString;
13
+ worktreePath: z.ZodString;
14
+ success: z.ZodBoolean;
15
+ error: z.ZodOptional<z.ZodString>;
16
+ }, z.core.$strip>;
17
+ export type TaskWorktreeCreated = z.infer<typeof TaskWorktreeCreatedSchema>;
18
+ export declare const TaskWorktreeCleanupSchema: z.ZodObject<{
19
+ taskId: z.ZodString;
20
+ taskSlug: z.ZodString;
21
+ projectSlug: z.ZodString;
22
+ taskBranch: z.ZodString;
23
+ repoUrl: z.ZodString;
24
+ }, z.core.$strip>;
25
+ export type TaskWorktreeCleanup = z.infer<typeof TaskWorktreeCleanupSchema>;
26
+ export declare const TaskWorktreeCleanedSchema: z.ZodObject<{
27
+ taskId: z.ZodString;
28
+ success: z.ZodBoolean;
29
+ error: z.ZodOptional<z.ZodString>;
30
+ }, z.core.$strip>;
31
+ export type TaskWorktreeCleaned = z.infer<typeof TaskWorktreeCleanedSchema>;
32
+ //# sourceMappingURL=task-worktree.schema.d.ts.map
@@ -0,0 +1,32 @@
1
+ import { z } from "zod";
2
+ // --- Task Worktree Create (Cloud Server → CLI, Story 5c.2) ---
3
+ export const TaskWorktreeCreateSchema = z.object({
4
+ taskId: z.string(),
5
+ taskSlug: z.string().min(1),
6
+ projectSlug: z.string().min(1),
7
+ workflowBaseBranch: z.string().min(1),
8
+ repoUrl: z.string().min(1),
9
+ });
10
+ // --- Task Worktree Created (CLI → Cloud Server, Story 5c.2) ---
11
+ export const TaskWorktreeCreatedSchema = z.object({
12
+ taskId: z.string(),
13
+ taskBranch: z.string().min(1),
14
+ worktreePath: z.string().min(1),
15
+ success: z.boolean(),
16
+ error: z.string().optional(),
17
+ });
18
+ // --- Task Worktree Cleanup (Cloud Server → CLI, Story 5c.2) ---
19
+ export const TaskWorktreeCleanupSchema = z.object({
20
+ taskId: z.string(),
21
+ taskSlug: z.string().min(1),
22
+ projectSlug: z.string().min(1),
23
+ taskBranch: z.string().min(1),
24
+ repoUrl: z.string().min(1),
25
+ });
26
+ // --- Task Worktree Cleaned (CLI → Cloud Server, Story 5c.2) ---
27
+ export const TaskWorktreeCleanedSchema = z.object({
28
+ taskId: z.string(),
29
+ success: z.boolean(),
30
+ error: z.string().optional(),
31
+ });
32
+ //# sourceMappingURL=task-worktree.schema.js.map
@@ -0,0 +1,26 @@
1
+ import { z } from "zod";
2
+ export declare const WorkflowBranchCreateSchema: z.ZodObject<{
3
+ workflowId: z.ZodString;
4
+ sourceBranch: z.ZodString;
5
+ baseBranch: z.ZodString;
6
+ repoUrl: z.ZodString;
7
+ }, z.core.$strip>;
8
+ export type WorkflowBranchCreate = z.infer<typeof WorkflowBranchCreateSchema>;
9
+ export declare const WorkflowBranchCreatedSchema: z.ZodObject<{
10
+ workflowId: z.ZodString;
11
+ baseBranch: z.ZodString;
12
+ success: z.ZodBoolean;
13
+ error: z.ZodOptional<z.ZodString>;
14
+ }, z.core.$strip>;
15
+ export type WorkflowBranchCreated = z.infer<typeof WorkflowBranchCreatedSchema>;
16
+ export declare const WorkflowBranchListRequestSchema: z.ZodObject<{
17
+ repoUrl: z.ZodString;
18
+ projectSlug: z.ZodOptional<z.ZodString>;
19
+ }, z.core.$strip>;
20
+ export type WorkflowBranchListRequest = z.infer<typeof WorkflowBranchListRequestSchema>;
21
+ export declare const WorkflowBranchListResponseSchema: z.ZodObject<{
22
+ branches: z.ZodArray<z.ZodString>;
23
+ defaultBranch: z.ZodString;
24
+ }, z.core.$strip>;
25
+ export type WorkflowBranchListResponse = z.infer<typeof WorkflowBranchListResponseSchema>;
26
+ //# sourceMappingURL=workflow-branch.schema.d.ts.map