@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,513 @@
1
+ export type SocketEventEnvelope = {
2
+ orgId: string;
3
+ projectId?: string;
4
+ timestamp: string;
5
+ };
6
+ export type AgentStatusPayload = SocketEventEnvelope & {
7
+ agentId: string;
8
+ status: string;
9
+ /** Specific error reason when status is ERROR (e.g. "TOKEN_EXHAUSTED") */
10
+ errorReason?: string;
11
+ };
12
+ export type AgentStreamPayload = SocketEventEnvelope & {
13
+ agentId: string;
14
+ chunk: string;
15
+ /** Groups text chunks from the same API turn (incremented on message_start) */
16
+ turnIndex?: number;
17
+ };
18
+ export type AgentToolActivityPayload = SocketEventEnvelope & {
19
+ agentId: string;
20
+ toolName: string;
21
+ toolDetail: string;
22
+ /** For Agent tool_use blocks: the block's own id */
23
+ toolUseId?: string;
24
+ /** For sub-agent tools: the parent Agent tool_use id */
25
+ parentToolUseId?: string;
26
+ projectId: string;
27
+ };
28
+ export type TaskDependencyItem = {
29
+ id: string;
30
+ blockingTask?: {
31
+ id: string;
32
+ title: string;
33
+ completed: boolean;
34
+ };
35
+ blockedTask?: {
36
+ id: string;
37
+ title: string;
38
+ completed: boolean;
39
+ };
40
+ };
41
+ export type TaskUpdatePayload = SocketEventEnvelope & {
42
+ taskId: string;
43
+ completed?: boolean;
44
+ blockedBy?: TaskDependencyItem[];
45
+ blocking?: TaskDependencyItem[];
46
+ assigneeId?: string | null;
47
+ cliDeviceId?: string | null;
48
+ taskGroupId?: string | null;
49
+ taskGroupName?: string | null;
50
+ startedAt?: string | null;
51
+ taskBranch?: string | null;
52
+ prUrl?: string | null;
53
+ prNumber?: number | null;
54
+ prError?: string | null;
55
+ kanbanColumn?: string | null;
56
+ kanbanSubStatus?: string | null;
57
+ agentQuestion?: string | null;
58
+ agentQuestionAt?: string | null;
59
+ requeueCount?: number;
60
+ reviewFeedback?: string | null;
61
+ reviewFeedbackAt?: string | null;
62
+ dispatchPaused?: boolean;
63
+ fallbackAdvance?: boolean;
64
+ maxRequeueReached?: boolean;
65
+ };
66
+ export type TaskDispatchPayload = SocketEventEnvelope & {
67
+ taskId: string;
68
+ assigneeId: string;
69
+ taskCommand?: string;
70
+ skillSlug?: string;
71
+ workflowBaseBranch?: string;
72
+ taskSlug?: string;
73
+ projectSlug?: string;
74
+ repoUrl?: string;
75
+ };
76
+ export type CliHeartbeatPayload = SocketEventEnvelope & {
77
+ cliId: string;
78
+ status: "CONNECTED" | "DISCONNECTED" | "RECONNECTING";
79
+ name?: string;
80
+ agentSlots?: number;
81
+ activeAgents?: number;
82
+ runningAgents?: number;
83
+ memberId?: string;
84
+ removed?: boolean;
85
+ /** Whether the CLI's MCP server is healthy (can start and respond to initialize). */
86
+ mcpHealthy?: boolean;
87
+ /** ISO 8601 timestamp until which this CLI is excluded from dispatch (null = no cooldown). */
88
+ cooldownUntil?: string | null;
89
+ /** Reason for the last billing/token error that triggered cooldown. */
90
+ lastErrorReason?: string | null;
91
+ };
92
+ export type WorkflowArtifactPayload = SocketEventEnvelope & {
93
+ workflowId: string;
94
+ stepId: string;
95
+ fileName: string;
96
+ filePath: string;
97
+ artifactType: string;
98
+ stepKey: string;
99
+ content?: string;
100
+ };
101
+ export type WorkflowArtifactSavedPayload = SocketEventEnvelope & {
102
+ workflowId: string;
103
+ stepId: string;
104
+ artifactId: string;
105
+ filePath: string;
106
+ };
107
+ export type WorkflowArtifactErrorPayload = SocketEventEnvelope & {
108
+ workflowId: string;
109
+ stepId: string;
110
+ error: string;
111
+ };
112
+ export type WorkflowMessagePayload = SocketEventEnvelope & {
113
+ workflowId: string;
114
+ stepId: string;
115
+ conversationId: string;
116
+ messageId: string;
117
+ content: string;
118
+ role: "USER" | "ASSISTANT" | "SYSTEM";
119
+ command?: string;
120
+ };
121
+ export type WorkflowStreamPayload = SocketEventEnvelope & {
122
+ workflowId: string;
123
+ stepId: string;
124
+ conversationId: string;
125
+ messageId: string;
126
+ chunk: string;
127
+ index: number;
128
+ /** Groups text chunks from the same API turn (incremented on message_start) */
129
+ turnIndex?: number;
130
+ };
131
+ export type WorkflowStreamEndPayload = SocketEventEnvelope & {
132
+ workflowId: string;
133
+ stepId: string;
134
+ conversationId: string;
135
+ messageId: string;
136
+ finalContent: string;
137
+ };
138
+ export type WorkflowStreamCatchupPayload = {
139
+ workflowId: string;
140
+ stepId: string;
141
+ conversationId: string;
142
+ messageId: string;
143
+ content: string;
144
+ };
145
+ export type WorkflowQuestionOption = {
146
+ label: string;
147
+ description?: string;
148
+ };
149
+ export type WorkflowQuestion = {
150
+ question: string;
151
+ header?: string;
152
+ options?: WorkflowQuestionOption[];
153
+ multiSelect?: boolean;
154
+ };
155
+ export type WorkflowQuestionPayload = SocketEventEnvelope & {
156
+ workflowId: string;
157
+ stepId: string;
158
+ conversationId: string;
159
+ questions: WorkflowQuestion[];
160
+ };
161
+ export type CliSyncPayload = SocketEventEnvelope & {
162
+ cliId: string;
163
+ eventsSynced: number;
164
+ cursor: string;
165
+ };
166
+ export type TaskGenerateRequestPayload = SocketEventEnvelope & {
167
+ workflowId: string;
168
+ skillName?: string;
169
+ artifacts: Array<{
170
+ stepKey: string;
171
+ title: string;
172
+ fileName: string;
173
+ filePath: string;
174
+ artifactType: string;
175
+ }>;
176
+ };
177
+ export type TaskGenerateResultPayload = SocketEventEnvelope & {
178
+ projectId: string;
179
+ workflowId: string;
180
+ groups?: Array<{
181
+ name: string;
182
+ description?: string;
183
+ epicNumber?: number;
184
+ metadata?: Record<string, unknown>;
185
+ dependsOn: number[];
186
+ }>;
187
+ tasks: Array<{
188
+ title: string;
189
+ description: string;
190
+ priority: "LOW" | "MEDIUM" | "HIGH" | "CRITICAL";
191
+ storyPoints: number;
192
+ order: number;
193
+ dependsOn: number[];
194
+ groupIndex?: number;
195
+ }>;
196
+ };
197
+ export type TaskGenerateErrorPayload = SocketEventEnvelope & {
198
+ workflowId: string;
199
+ error: string;
200
+ };
201
+ export type TaskGroupCreatePayload = SocketEventEnvelope & {
202
+ id: string;
203
+ name: string;
204
+ description: string | null;
205
+ status: "OPEN" | "DONE";
206
+ metadata: Record<string, unknown> | null;
207
+ order: number;
208
+ workflowId?: string | null;
209
+ workflowName?: string | null;
210
+ workflowSlug?: string | null;
211
+ workflowStatus?: string | null;
212
+ dispatchPaused?: boolean;
213
+ };
214
+ export type TaskGroupUpdatePayload = Partial<Omit<TaskGroupCreatePayload, "orgId" | "projectId" | "timestamp">> & SocketEventEnvelope & {
215
+ id: string;
216
+ blockedBy?: {
217
+ id: string;
218
+ blockingGroup: {
219
+ id: string;
220
+ name: string;
221
+ status: string;
222
+ };
223
+ }[];
224
+ blocking?: {
225
+ id: string;
226
+ blockedGroup: {
227
+ id: string;
228
+ name: string;
229
+ status: string;
230
+ };
231
+ }[];
232
+ };
233
+ export type TaskGroupDeletePayload = SocketEventEnvelope & {
234
+ id: string;
235
+ };
236
+ export type WorkflowBranchCreatePayload = SocketEventEnvelope & {
237
+ workflowId: string;
238
+ sourceBranch: string;
239
+ baseBranch: string;
240
+ repoUrl: string;
241
+ projectSlug?: string;
242
+ };
243
+ export type WorkflowBranchCreatedPayload = SocketEventEnvelope & {
244
+ workflowId: string;
245
+ baseBranch: string;
246
+ success: boolean;
247
+ error?: string;
248
+ };
249
+ export type WorkflowBranchListRequestPayload = SocketEventEnvelope & {
250
+ repoUrl: string;
251
+ projectSlug?: string;
252
+ };
253
+ export type WorkflowBranchListResponsePayload = SocketEventEnvelope & {
254
+ branches: string[];
255
+ defaultBranch: string;
256
+ };
257
+ export type WorkflowBranchStatusPayload = SocketEventEnvelope & {
258
+ workflowId: string;
259
+ branchStatus: string;
260
+ branchError?: string | null;
261
+ };
262
+ export type TaskWorktreeCreatePayload = SocketEventEnvelope & {
263
+ taskId: string;
264
+ taskSlug: string;
265
+ taskBranch: string;
266
+ projectSlug: string;
267
+ workflowBaseBranch: string;
268
+ repoUrl: string;
269
+ };
270
+ export type TaskWorktreeCreatedPayload = SocketEventEnvelope & {
271
+ taskId: string;
272
+ taskBranch: string;
273
+ worktreePath: string;
274
+ success: boolean;
275
+ error?: string;
276
+ };
277
+ export type TaskWorktreeCleanupPayload = SocketEventEnvelope & {
278
+ taskId: string;
279
+ taskSlug: string;
280
+ projectSlug: string;
281
+ taskBranch: string;
282
+ repoUrl: string;
283
+ };
284
+ export type TaskWorktreeCleanedPayload = SocketEventEnvelope & {
285
+ taskId: string;
286
+ success: boolean;
287
+ error?: string;
288
+ };
289
+ export type WorkflowUpdatePayload = SocketEventEnvelope & {
290
+ workflowId: string;
291
+ stepId?: string;
292
+ status?: string;
293
+ branchStatus?: string | null;
294
+ finalPrUrl?: string | null;
295
+ finalPrNumber?: number | null;
296
+ mergeError?: string | null;
297
+ reason?: string;
298
+ };
299
+ export type WorkflowToolActivityPayload = SocketEventEnvelope & {
300
+ workflowId: string;
301
+ stepId: string;
302
+ toolName: string;
303
+ toolDetail: string;
304
+ /** For Agent tool_use blocks: the block's own id */
305
+ toolUseId?: string;
306
+ /** For sub-agent tools: the parent Agent tool_use id */
307
+ parentToolUseId?: string;
308
+ };
309
+ export type WorkflowTokenUsagePayload = SocketEventEnvelope & {
310
+ workflowId: string;
311
+ stepId: string;
312
+ inputTokens: number;
313
+ outputTokens: number;
314
+ };
315
+ export type WorkflowLockPayload = SocketEventEnvelope & {
316
+ workflowId: string;
317
+ lockedByMemberId: string | null;
318
+ lockedUntil: string | null;
319
+ };
320
+ export type WorkflowLockDeniedPayload = SocketEventEnvelope & {
321
+ workflowId: string;
322
+ };
323
+ export type WorkflowStepDispatchPayload = SocketEventEnvelope & {
324
+ projectId: string;
325
+ workflowId: string;
326
+ stepId: string;
327
+ stepKey: string;
328
+ stepTitle: string;
329
+ stepCommand?: string;
330
+ skillSlug?: string;
331
+ conversationId?: string;
332
+ repoUrl?: string;
333
+ projectSlug: string;
334
+ conversationHistory?: string;
335
+ hasSnapshot?: boolean;
336
+ };
337
+ export type WorkflowAgentIdlePayload = SocketEventEnvelope & {
338
+ workflowId: string;
339
+ stepId: string;
340
+ idleUntil: string;
341
+ };
342
+ export type WorkflowAgentTimeoutPayload = SocketEventEnvelope & {
343
+ workflowId: string;
344
+ stepId: string;
345
+ };
346
+ export type WorkflowAgentDismissPayload = SocketEventEnvelope & {
347
+ workflowId: string;
348
+ stepId: string;
349
+ };
350
+ export type WorkflowStepCompletePayload = SocketEventEnvelope & {
351
+ workflowId: string;
352
+ stepId: string;
353
+ deliverables: {
354
+ filePath: string;
355
+ label: string;
356
+ }[];
357
+ };
358
+ export type WorkflowStepDeliverablesPayload = SocketEventEnvelope & {
359
+ workflowId: string;
360
+ stepId: string;
361
+ deliverables: {
362
+ filePath: string;
363
+ label: string;
364
+ artifactId: string;
365
+ content?: string;
366
+ }[];
367
+ };
368
+ export type TaskAskHumanEventPayload = SocketEventEnvelope & {
369
+ taskId: string;
370
+ question: string;
371
+ agentId?: string;
372
+ context?: string;
373
+ };
374
+ export type TaskResumePayload = SocketEventEnvelope & {
375
+ taskId: string;
376
+ response?: string;
377
+ reassignedFrom?: string;
378
+ skillSlug?: string;
379
+ taskSlug?: string;
380
+ projectSlug?: string;
381
+ taskBranch?: string;
382
+ repoUrl?: string;
383
+ };
384
+ export type ProjectKanbanConfigPayload = SocketEventEnvelope & {
385
+ columns: {
386
+ id: string;
387
+ label: string;
388
+ command: string | null;
389
+ color?: string | null;
390
+ maxRequeue?: number;
391
+ }[];
392
+ };
393
+ export type CliConfigUpdatedPayload = {
394
+ agentSlots: number;
395
+ };
396
+ export type SocketErrorPayload = {
397
+ message: string;
398
+ };
399
+ export type ServerToClientEvents = {
400
+ "agent:status": (payload: AgentStatusPayload) => void;
401
+ "agent:stream": (payload: AgentStreamPayload) => void;
402
+ "agent:tool-activity": (payload: AgentToolActivityPayload) => void;
403
+ "task:update": (payload: TaskUpdatePayload) => void;
404
+ "task:dispatch": (payload: TaskDispatchPayload) => void;
405
+ "cli:heartbeat": (payload: CliHeartbeatPayload) => void;
406
+ "cli:sync": (payload: CliSyncPayload) => void;
407
+ "workflow:artifact": (payload: WorkflowArtifactPayload) => void;
408
+ "workflow:artifact:saved": (payload: WorkflowArtifactSavedPayload) => void;
409
+ "workflow:artifact:error": (payload: WorkflowArtifactErrorPayload) => void;
410
+ "workflow:message": (payload: WorkflowMessagePayload) => void;
411
+ "workflow:stream": (payload: WorkflowStreamPayload) => void;
412
+ "workflow:stream:end": (payload: WorkflowStreamEndPayload) => void;
413
+ "workflow:stream:catchup": (payload: WorkflowStreamCatchupPayload) => void;
414
+ "task:generate:request": (payload: TaskGenerateRequestPayload) => void;
415
+ "taskGroup:create": (payload: TaskGroupCreatePayload) => void;
416
+ "taskGroup:update": (payload: TaskGroupUpdatePayload) => void;
417
+ "taskGroup:delete": (payload: TaskGroupDeletePayload) => void;
418
+ "workflow:branch:create": (payload: WorkflowBranchCreatePayload) => void;
419
+ "workflow:branch:list:request": (payload: WorkflowBranchListRequestPayload) => void;
420
+ "workflow:branch:list:response": (payload: WorkflowBranchListResponsePayload) => void;
421
+ "workflow:branch:status": (payload: WorkflowBranchStatusPayload) => void;
422
+ "task:worktree:create": (payload: TaskWorktreeCreatePayload) => void;
423
+ "task:worktree:created": (payload: TaskWorktreeCreatedPayload) => void;
424
+ "task:worktree:cleanup": (payload: TaskWorktreeCleanupPayload) => void;
425
+ "task:worktree:cleaned": (payload: TaskWorktreeCleanedPayload) => void;
426
+ "workflow:update": (payload: WorkflowUpdatePayload) => void;
427
+ "project:kanban-config": (payload: ProjectKanbanConfigPayload) => void;
428
+ "task:ask-human": (payload: TaskAskHumanEventPayload) => void;
429
+ "task:resume": (payload: TaskResumePayload) => void;
430
+ "workflow:step:dispatch": (payload: WorkflowStepDispatchPayload) => void;
431
+ "workflow:step:deliverables": (payload: WorkflowStepDeliverablesPayload) => void;
432
+ "workflow:agent:idle": (payload: WorkflowAgentIdlePayload) => void;
433
+ "workflow:agent:timeout": (payload: WorkflowAgentTimeoutPayload) => void;
434
+ "workflow:agent:dismiss": (payload: WorkflowAgentDismissPayload) => void;
435
+ "workflow:question": (payload: WorkflowQuestionPayload) => void;
436
+ "workflow:lock": (payload: WorkflowLockPayload) => void;
437
+ "workflow:lock:denied": (payload: WorkflowLockDeniedPayload) => void;
438
+ "workflow:tool-activity": (payload: WorkflowToolActivityPayload) => void;
439
+ "workflow:token-usage": (payload: WorkflowTokenUsagePayload) => void;
440
+ "cli:config:updated": (payload: CliConfigUpdatedPayload) => void;
441
+ error: (payload: SocketErrorPayload) => void;
442
+ };
443
+ export type ClientToServerEvents = {
444
+ "join:project": (projectId: string) => void;
445
+ "leave:project": (projectId: string) => void;
446
+ "join:workflow": (workflowId: string) => void;
447
+ "leave:workflow": (workflowId: string) => void;
448
+ "join:member": (memberId: string) => void;
449
+ "leave:member": (memberId: string) => void;
450
+ "agent:status": (payload: AgentStatusPayload) => void;
451
+ "agent:stream": (payload: AgentStreamPayload) => void;
452
+ "agent:tool-activity": (payload: AgentToolActivityPayload) => void;
453
+ "task:update": (payload: TaskUpdatePayload) => void;
454
+ "cli:heartbeat": (payload: CliHeartbeatPayload) => void;
455
+ "workflow:message": (payload: WorkflowMessagePayload) => void;
456
+ "workflow:stream": (payload: WorkflowStreamPayload) => void;
457
+ "workflow:stream:end": (payload: WorkflowStreamEndPayload) => void;
458
+ "workflow:artifact": (payload: WorkflowArtifactPayload) => void;
459
+ "workflow:artifact:error": (payload: WorkflowArtifactErrorPayload) => void;
460
+ "task:generate:result": (payload: TaskGenerateResultPayload) => void;
461
+ "task:generate:error": (payload: TaskGenerateErrorPayload) => void;
462
+ "workflow:branch:created": (payload: WorkflowBranchCreatedPayload) => void;
463
+ "workflow:branch:list:request": (payload: WorkflowBranchListRequestPayload) => void;
464
+ "workflow:branch:list:response": (payload: WorkflowBranchListResponsePayload) => void;
465
+ "task:worktree:created": (payload: TaskWorktreeCreatedPayload) => void;
466
+ "task:worktree:cleaned": (payload: TaskWorktreeCleanedPayload) => void;
467
+ "task:ask-human": (payload: TaskAskHumanEventPayload) => void;
468
+ "workflow:step:complete": (payload: WorkflowStepCompletePayload) => void;
469
+ "workflow:agent:idle": (payload: WorkflowAgentIdlePayload) => void;
470
+ "workflow:agent:timeout": (payload: WorkflowAgentTimeoutPayload) => void;
471
+ "workflow:question": (payload: WorkflowQuestionPayload) => void;
472
+ "workflow:tool-activity": (payload: WorkflowToolActivityPayload) => void;
473
+ "workflow:token-usage": (payload: WorkflowTokenUsagePayload) => void;
474
+ "taskGroup:mcp:create": (payload: unknown, callback: (ack: unknown) => void) => void;
475
+ "taskGroup:mcp:add-dependency": (payload: unknown, callback: (ack: unknown) => void) => void;
476
+ "task:mcp:create": (payload: unknown, callback: (ack: unknown) => void) => void;
477
+ "task:mcp:add-dependency": (payload: unknown, callback: (ack: unknown) => void) => void;
478
+ "task:mcp:update": (payload: unknown, callback: (ack: unknown) => void) => void;
479
+ "task:mcp:delete": (payload: unknown, callback: (ack: unknown) => void) => void;
480
+ "taskGroup:mcp:update": (payload: unknown, callback: (ack: unknown) => void) => void;
481
+ "taskGroup:mcp:delete": (payload: unknown, callback: (ack: unknown) => void) => void;
482
+ "task:mcp:remove-dependency": (payload: unknown, callback: (ack: unknown) => void) => void;
483
+ "taskGroup:mcp:remove-dependency": (payload: unknown, callback: (ack: unknown) => void) => void;
484
+ "workflow:step:snapshot": (payload: {
485
+ orgId: string;
486
+ workflowId: string;
487
+ stepId: string;
488
+ snapshot: string;
489
+ }) => void;
490
+ "workflow:step:snapshot:fetch": (payload: {
491
+ workflowId: string;
492
+ stepId: string;
493
+ }, callback: (data: {
494
+ snapshot: string;
495
+ } | null) => void) => void;
496
+ };
497
+ export type InterServerEvents = {
498
+ ping: () => void;
499
+ };
500
+ export type SocketData = {
501
+ userId: string;
502
+ orgId: string;
503
+ orgSlug: string;
504
+ memberId: string;
505
+ role: string;
506
+ cliId?: string;
507
+ cliName?: string;
508
+ cliAgentSlots?: number;
509
+ cliActiveAgents?: number;
510
+ cliRunningAgents?: number;
511
+ serverAgentSlots?: number;
512
+ };
513
+ //# sourceMappingURL=socket-events.d.ts.map
@@ -0,0 +1,3 @@
1
+ // --- Event envelope (architecture-mandated: orgId always present for tenant isolation) ---
2
+ export {};
3
+ //# sourceMappingURL=socket-events.js.map
@@ -0,0 +1,19 @@
1
+ export { KANBAN_SUB_STATUS, DEFAULT_KANBAN_COLUMNS, KANBAN_COLUMN_COLORS, DEFAULT_MAX_REQUEUE, } from "./constants/task-status.js";
2
+ export type { KanbanColumnConfig } from "./constants/task-status.js";
3
+ export { AGENT_STATUS } from "./constants/agent-status.js";
4
+ export { CLI_STATUS } from "./constants/cli-status.js";
5
+ export { WORKFLOW_TYPE } from "./constants/workflow-type.js";
6
+ export type { WorkflowType } from "./constants/workflow-type.js";
7
+ export { WORKFLOW_SCOPE } from "./constants/workflow-scope.js";
8
+ export type { WorkflowScope } from "./constants/workflow-scope.js";
9
+ export { RELEASE_STATUS, RELEASE_TYPE } from "./constants/release-status.js";
10
+ export type { ReleaseStatus, ReleaseType } from "./constants/release-status.js";
11
+ export type { KanbanSubStatus, Task } from "./types/task.js";
12
+ export type { AgentStatus, Agent } from "./types/agent.js";
13
+ export type { ProjectMode } from "./types/project.js";
14
+ export type { WorkflowStatus } from "./types/workflow.js";
15
+ export type { Release } from "./types/release.js";
16
+ export type { SocketEventEnvelope, SocketErrorPayload, ServerToClientEvents, ClientToServerEvents, InterServerEvents, SocketData, AgentStatusPayload, AgentStreamPayload, AgentToolActivityPayload, TaskDependencyItem, TaskUpdatePayload, TaskDispatchPayload, CliHeartbeatPayload, CliConfigUpdatedPayload, CliSyncPayload, WorkflowArtifactPayload, WorkflowArtifactSavedPayload, WorkflowArtifactErrorPayload, WorkflowMessagePayload, WorkflowStreamPayload, WorkflowStreamEndPayload, TaskGenerateRequestPayload, TaskGenerateResultPayload, TaskGenerateErrorPayload, TaskGroupCreatePayload, TaskGroupUpdatePayload, TaskGroupDeletePayload, WorkflowBranchCreatePayload, WorkflowBranchCreatedPayload, WorkflowBranchListRequestPayload, WorkflowBranchListResponsePayload, WorkflowBranchStatusPayload, WorkflowUpdatePayload, TaskWorktreeCreatePayload, TaskWorktreeCreatedPayload, TaskWorktreeCleanupPayload, TaskWorktreeCleanedPayload, ProjectKanbanConfigPayload, TaskAskHumanEventPayload, WorkflowStepCompletePayload, WorkflowStepDeliverablesPayload, WorkflowStepDispatchPayload, WorkflowAgentIdlePayload, WorkflowAgentTimeoutPayload, WorkflowQuestionOption, WorkflowQuestion, WorkflowQuestionPayload, WorkflowToolActivityPayload, WorkflowTokenUsagePayload, JournalEventType, JournalEntry, } from "./events/index.js";
17
+ export { JournalEventTypeSchema, JournalEntrySchema } from "./events/index.js";
18
+ export * from "./validation/index.js";
19
+ //# sourceMappingURL=index.d.ts.map
package/dist/index.js ADDED
@@ -0,0 +1,11 @@
1
+ // Constants
2
+ export { KANBAN_SUB_STATUS, DEFAULT_KANBAN_COLUMNS, KANBAN_COLUMN_COLORS, DEFAULT_MAX_REQUEUE, } from "./constants/task-status.js";
3
+ export { AGENT_STATUS } from "./constants/agent-status.js";
4
+ export { CLI_STATUS } from "./constants/cli-status.js";
5
+ export { WORKFLOW_TYPE } from "./constants/workflow-type.js";
6
+ export { WORKFLOW_SCOPE } from "./constants/workflow-scope.js";
7
+ export { RELEASE_STATUS, RELEASE_TYPE } from "./constants/release-status.js";
8
+ export { JournalEventTypeSchema, JournalEntrySchema } from "./events/index.js";
9
+ // Validation
10
+ export * from "./validation/index.js";
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,12 @@
1
+ import type { AGENT_STATUS } from "../constants/agent-status.js";
2
+ export type AgentStatus = (typeof AGENT_STATUS)[number];
3
+ export type Agent = {
4
+ id: string;
5
+ name: string;
6
+ status: AgentStatus;
7
+ projectId: string;
8
+ currentTaskId: string | null;
9
+ createdAt: Date;
10
+ updatedAt: Date;
11
+ };
12
+ //# sourceMappingURL=agent.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=agent.js.map
@@ -0,0 +1,2 @@
1
+ export type ProjectMode = "GREENFIELD" | "BROWNFIELD";
2
+ //# sourceMappingURL=project.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=project.js.map
@@ -0,0 +1,18 @@
1
+ import type { ReleaseStatus, ReleaseType } from "../constants/release-status.js";
2
+ export type Release = {
3
+ id: string;
4
+ version: string | null;
5
+ status: ReleaseStatus;
6
+ type: ReleaseType;
7
+ targetBranch: string;
8
+ releaseBranch: string | null;
9
+ releaseNotes: string | null;
10
+ conflictsCount: number;
11
+ testsStatus: string | null;
12
+ mergeError: string | null;
13
+ projectId: string;
14
+ executionWorkflowId: string | null;
15
+ createdAt: Date;
16
+ completedAt: Date | null;
17
+ };
18
+ //# sourceMappingURL=release.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=release.js.map
@@ -0,0 +1,15 @@
1
+ import type { KANBAN_SUB_STATUS } from "../constants/task-status.js";
2
+ export type KanbanSubStatus = (typeof KANBAN_SUB_STATUS)[number];
3
+ export type Task = {
4
+ id: string;
5
+ title: string;
6
+ description: string;
7
+ completed: boolean;
8
+ kanbanColumn: string | null;
9
+ kanbanSubStatus: KanbanSubStatus | null;
10
+ assigneeId: string | null;
11
+ projectId: string;
12
+ createdAt: Date;
13
+ updatedAt: Date;
14
+ };
15
+ //# sourceMappingURL=task.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=task.js.map
@@ -0,0 +1,2 @@
1
+ export type WorkflowStatus = "DRAFT" | "IN_PROGRESS" | "COMPLETED" | "PAUSED" | "MERGED" | "RELEASED";
2
+ //# sourceMappingURL=workflow.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=workflow.js.map