@moxxy/cli 0.0.12 → 0.1.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 (149) hide show
  1. package/README.md +278 -112
  2. package/bin/moxxy +10 -0
  3. package/package.json +36 -53
  4. package/src/api-client.js +286 -0
  5. package/src/cli.js +349 -0
  6. package/src/commands/agent.js +413 -0
  7. package/src/commands/auth.js +326 -0
  8. package/src/commands/channel.js +285 -0
  9. package/src/commands/doctor.js +261 -0
  10. package/src/commands/events.js +80 -0
  11. package/src/commands/gateway.js +428 -0
  12. package/src/commands/heartbeat.js +145 -0
  13. package/src/commands/init.js +954 -0
  14. package/src/commands/mcp.js +278 -0
  15. package/src/commands/plugin.js +583 -0
  16. package/src/commands/provider.js +1934 -0
  17. package/src/commands/settings.js +224 -0
  18. package/src/commands/skill.js +125 -0
  19. package/src/commands/template.js +237 -0
  20. package/src/commands/uninstall.js +196 -0
  21. package/src/commands/update.js +406 -0
  22. package/src/commands/vault.js +219 -0
  23. package/src/help.js +392 -0
  24. package/src/lib/plugin-registry.js +98 -0
  25. package/src/platform.js +40 -0
  26. package/src/sse-client.js +79 -0
  27. package/src/tui/action-wizards.js +130 -0
  28. package/src/tui/app.jsx +859 -0
  29. package/src/tui/components/action-picker.jsx +86 -0
  30. package/src/tui/components/chat-panel.jsx +120 -0
  31. package/src/tui/components/footer.jsx +13 -0
  32. package/src/tui/components/header.jsx +45 -0
  33. package/src/tui/components/input-area.jsx +384 -0
  34. package/src/tui/components/messages/ask-message.jsx +13 -0
  35. package/src/tui/components/messages/assistant-message.jsx +165 -0
  36. package/src/tui/components/messages/channel-message.jsx +18 -0
  37. package/src/tui/components/messages/event-message.jsx +22 -0
  38. package/src/tui/components/messages/hive-status.jsx +34 -0
  39. package/src/tui/components/messages/skill-message.jsx +31 -0
  40. package/src/tui/components/messages/system-message.jsx +12 -0
  41. package/src/tui/components/messages/thinking.jsx +25 -0
  42. package/src/tui/components/messages/tool-group.jsx +62 -0
  43. package/src/tui/components/messages/tool-message.jsx +66 -0
  44. package/src/tui/components/messages/user-message.jsx +12 -0
  45. package/src/tui/components/model-picker.jsx +138 -0
  46. package/src/tui/components/multiline-input.jsx +72 -0
  47. package/src/tui/events-handler.js +730 -0
  48. package/src/tui/helpers.js +59 -0
  49. package/src/tui/hooks/use-command-handler.js +451 -0
  50. package/src/tui/index.jsx +55 -0
  51. package/src/tui/input-utils.js +26 -0
  52. package/src/tui/markdown-renderer.js +66 -0
  53. package/src/tui/mcp-wizard.js +136 -0
  54. package/src/tui/model-picker.js +174 -0
  55. package/src/tui/slash-commands.js +26 -0
  56. package/src/tui/store.js +12 -0
  57. package/src/tui/theme.js +17 -0
  58. package/src/ui.js +109 -0
  59. package/bin/moxxy.js +0 -2
  60. package/dist/chunk-23LZYKQ6.mjs +0 -1131
  61. package/dist/chunk-2FZEA3NG.mjs +0 -457
  62. package/dist/chunk-3KDPLS22.mjs +0 -1131
  63. package/dist/chunk-3QRJTRBT.mjs +0 -1102
  64. package/dist/chunk-6DZX6EAA.mjs +0 -37
  65. package/dist/chunk-A4WRDUNY.mjs +0 -1242
  66. package/dist/chunk-C46NSEKG.mjs +0 -211
  67. package/dist/chunk-CAUXONEF.mjs +0 -1131
  68. package/dist/chunk-CPL5V56X.mjs +0 -1131
  69. package/dist/chunk-CTBVTTBG.mjs +0 -440
  70. package/dist/chunk-FHHLXTEZ.mjs +0 -1121
  71. package/dist/chunk-FXY3GPVA.mjs +0 -1126
  72. package/dist/chunk-GSNMMI3H.mjs +0 -530
  73. package/dist/chunk-HHOAOGUS.mjs +0 -1242
  74. package/dist/chunk-ITBO7BKI.mjs +0 -1243
  75. package/dist/chunk-J33O35WX.mjs +0 -532
  76. package/dist/chunk-N5JTPB6U.mjs +0 -820
  77. package/dist/chunk-NGVL4Q5C.mjs +0 -1102
  78. package/dist/chunk-Q2OCMNYI.mjs +0 -1131
  79. package/dist/chunk-QDVRLN6D.mjs +0 -1121
  80. package/dist/chunk-QO2JONHP.mjs +0 -1131
  81. package/dist/chunk-RVAPILHA.mjs +0 -1242
  82. package/dist/chunk-S7YBOV7E.mjs +0 -1131
  83. package/dist/chunk-SHIG6Y5L.mjs +0 -1074
  84. package/dist/chunk-SOFST2PV.mjs +0 -1242
  85. package/dist/chunk-SUNUYS6G.mjs +0 -1243
  86. package/dist/chunk-TMZWETMH.mjs +0 -1242
  87. package/dist/chunk-TYD7NMMI.mjs +0 -581
  88. package/dist/chunk-TYQ3YS42.mjs +0 -1068
  89. package/dist/chunk-UALWCJ7F.mjs +0 -1131
  90. package/dist/chunk-UQZKODNW.mjs +0 -1124
  91. package/dist/chunk-USC6R2ON.mjs +0 -1242
  92. package/dist/chunk-W32EQCVC.mjs +0 -823
  93. package/dist/chunk-WMB5ENMC.mjs +0 -1242
  94. package/dist/chunk-WNHA5JAP.mjs +0 -1242
  95. package/dist/cli-2AIWTL6F.mjs +0 -8
  96. package/dist/cli-2QKJ5UUL.mjs +0 -8
  97. package/dist/cli-4RIS6DQX.mjs +0 -8
  98. package/dist/cli-5RH4VBBL.mjs +0 -7
  99. package/dist/cli-7MK4YGOP.mjs +0 -7
  100. package/dist/cli-B4KH6MZI.mjs +0 -8
  101. package/dist/cli-CGO2LZ6Z.mjs +0 -8
  102. package/dist/cli-CVP26EL2.mjs +0 -8
  103. package/dist/cli-DDRVVNAV.mjs +0 -8
  104. package/dist/cli-E7U56QVQ.mjs +0 -8
  105. package/dist/cli-EQNRMLL3.mjs +0 -8
  106. package/dist/cli-F5RUHHH4.mjs +0 -8
  107. package/dist/cli-LX6FFSEF.mjs +0 -8
  108. package/dist/cli-LY74GWKR.mjs +0 -6
  109. package/dist/cli-MAT3ZJHI.mjs +0 -8
  110. package/dist/cli-NJXXTQYF.mjs +0 -8
  111. package/dist/cli-O4ZGFAZG.mjs +0 -8
  112. package/dist/cli-ORVLI3UQ.mjs +0 -8
  113. package/dist/cli-PV43ZVKA.mjs +0 -8
  114. package/dist/cli-REVD6ISM.mjs +0 -8
  115. package/dist/cli-TBX76KQX.mjs +0 -8
  116. package/dist/cli-THCGF7SQ.mjs +0 -8
  117. package/dist/cli-TLX5ENVM.mjs +0 -8
  118. package/dist/cli-TMNI5ZYE.mjs +0 -8
  119. package/dist/cli-TNJHCBQA.mjs +0 -6
  120. package/dist/cli-TUX22CZP.mjs +0 -8
  121. package/dist/cli-XJVH7EEP.mjs +0 -8
  122. package/dist/cli-XXOW4VXJ.mjs +0 -8
  123. package/dist/cli-XZ5RESNB.mjs +0 -6
  124. package/dist/cli-YCBYZ76Q.mjs +0 -8
  125. package/dist/cli-ZLMQCU7X.mjs +0 -8
  126. package/dist/dist-2VGKJRBH.mjs +0 -6820
  127. package/dist/dist-37BNX4QG.mjs +0 -7081
  128. package/dist/dist-7LTHRYKA.mjs +0 -11569
  129. package/dist/dist-7XJPQW5C.mjs +0 -6950
  130. package/dist/dist-AYMVOW7T.mjs +0 -7123
  131. package/dist/dist-BHUWCDRS.mjs +0 -7132
  132. package/dist/dist-FAXRJMEN.mjs +0 -6812
  133. package/dist/dist-HQGANM3P.mjs +0 -6976
  134. package/dist/dist-KATLOZQV.mjs +0 -7054
  135. package/dist/dist-KLSB6YHV.mjs +0 -6964
  136. package/dist/dist-LKIOZQ42.mjs +0 -17
  137. package/dist/dist-UYA4RJUH.mjs +0 -2792
  138. package/dist/dist-ZYHCBILM.mjs +0 -6993
  139. package/dist/index.d.mts +0 -23
  140. package/dist/index.d.ts +0 -23
  141. package/dist/index.js +0 -25531
  142. package/dist/index.mjs +0 -18
  143. package/dist/src-APP5P3UD.mjs +0 -1386
  144. package/dist/src-D5HMDDVE.mjs +0 -1324
  145. package/dist/src-EK3WD4AU.mjs +0 -1327
  146. package/dist/src-LSZFLMFN.mjs +0 -1400
  147. package/dist/src-T77DFTFP.mjs +0 -1407
  148. package/dist/src-WIOCZRAC.mjs +0 -1397
  149. package/dist/src-YK6CHCMW.mjs +0 -1400
@@ -1,530 +0,0 @@
1
- // ../types/dist/index.mjs
2
- import { z as z2 } from "zod";
3
- import { z } from "zod";
4
- import { z as z3 } from "zod";
5
- import { z as z4 } from "zod";
6
- import { z as z5 } from "zod";
7
- import { z as z6 } from "zod";
8
- import { z as z7 } from "zod";
9
- import { z as z8 } from "zod";
10
- import { z as z10 } from "zod";
11
- import { z as z9 } from "zod";
12
- import { z as z11 } from "zod";
13
- var uuidSchema = z.string().uuid();
14
- var timestampSchema = z.number().int().positive();
15
- var paginationSchema = z.object({
16
- page: z.number().int().positive().optional().default(1),
17
- limit: z.number().int().positive().max(100).optional().default(20),
18
- orderBy: z.string().optional(),
19
- order: z.enum(["asc", "desc"]).optional().default("desc")
20
- });
21
- var activityTypeSchema = z2.enum([
22
- "created",
23
- "assigned",
24
- "status_change",
25
- "comment",
26
- "commit",
27
- "pr_created",
28
- "pr_merged",
29
- "pr_closed"
30
- ]);
31
- var taskActivitySchema = z2.object({
32
- id: uuidSchema,
33
- taskId: uuidSchema,
34
- agentId: uuidSchema.nullable(),
35
- activityType: activityTypeSchema,
36
- description: z2.string().max(500),
37
- metadata: z2.record(z2.any()),
38
- createdAt: timestampSchema
39
- });
40
- var createActivitySchema = z2.object({
41
- taskId: uuidSchema,
42
- agentId: uuidSchema.nullable().optional(),
43
- activityType: activityTypeSchema,
44
- description: z2.string().max(500),
45
- metadata: z2.record(z2.any()).optional().default({})
46
- });
47
- var agentStatusSchema = z3.enum(["available", "busy", "offline"]);
48
- var agentTypeSchema = z3.enum([
49
- "developer",
50
- "prd",
51
- "code-review",
52
- "orchestrator",
53
- "custom"
54
- ]);
55
- var agentCapabilitySchema = z3.enum([
56
- "frontend",
57
- "backend",
58
- "fullstack",
59
- "devops",
60
- "testing",
61
- "documentation"
62
- ]);
63
- var agentIdentitySchema = z3.object({
64
- /** Display name for the agent (persona name) */
65
- displayName: z3.string().max(100).optional(),
66
- /** Theme/persona description */
67
- theme: z3.string().max(500).optional(),
68
- /** Emoji representation */
69
- emoji: z3.string().max(10).optional(),
70
- /** Avatar path or URL */
71
- avatar: z3.string().url().optional().or(z3.string().max(0)),
72
- /** Custom system prompt */
73
- systemPrompt: z3.string().max(1e4).optional()
74
- });
75
- var agentModelConfigSchema = z3.object({
76
- /** Primary model (provider/model format) */
77
- primary: z3.string().optional(),
78
- /** Fallback models in order of preference */
79
- fallbacks: z3.array(z3.string()).optional()
80
- });
81
- var agentSchema = z3.object({
82
- id: uuidSchema,
83
- name: z3.string().min(1).max(100),
84
- moltAgentId: z3.string().min(1),
85
- githubToken: z3.string().min(1),
86
- githubUsername: z3.string().min(1),
87
- workspace: z3.string().min(1),
88
- capabilities: z3.array(agentCapabilitySchema),
89
- status: agentStatusSchema,
90
- currentTaskId: uuidSchema.nullable(),
91
- agentType: agentTypeSchema.optional(),
92
- identity: agentIdentitySchema.optional(),
93
- modelConfig: agentModelConfigSchema.optional(),
94
- projectId: uuidSchema.optional(),
95
- lastSyncAt: timestampSchema,
96
- createdAt: timestampSchema,
97
- updatedAt: timestampSchema
98
- });
99
- var createAgentSchema = z3.object({
100
- name: z3.string().min(1).max(100),
101
- githubToken: z3.string().min(1),
102
- githubUsername: z3.string().min(1),
103
- capabilities: z3.array(agentCapabilitySchema).min(1),
104
- workspace: z3.string().min(1),
105
- /** Agent type for specialized behaviors */
106
- agentType: agentTypeSchema.optional(),
107
- /** Agent identity/persona configuration */
108
- identity: agentIdentitySchema.optional()
109
- });
110
- var updateAgentSchema = z3.object({
111
- name: z3.string().min(1).max(100).optional(),
112
- status: agentStatusSchema.optional(),
113
- workspace: z3.string().min(1).optional(),
114
- capabilities: z3.array(agentCapabilitySchema).optional(),
115
- /** Agent type for specialized behaviors */
116
- agentType: agentTypeSchema.optional(),
117
- /** Agent identity/persona configuration */
118
- identity: agentIdentitySchema.optional(),
119
- /** Model configuration update */
120
- modelConfig: agentModelConfigSchema.optional(),
121
- /** Update GitHub PAT token */
122
- githubToken: z3.string().min(1).optional(),
123
- /** Update GitHub username */
124
- githubUsername: z3.string().min(1).optional()
125
- });
126
- var taskFiltersSchema = z4.object({
127
- projectId: z4.string().uuid().optional(),
128
- status: z4.string().optional(),
129
- type: z4.string().optional(),
130
- priority: z4.string().optional(),
131
- assignedAgentId: z4.string().uuid().optional()
132
- });
133
- var INTEGRATION_TYPES = ["slack", "discord", "email", "github"];
134
- var NOTIFICATION_EVENTS = [
135
- "task:created",
136
- "task:completed",
137
- "task:failed",
138
- "task:assigned",
139
- "task:status_changed",
140
- "agent:status_changed",
141
- "pr:created",
142
- "pr:merged"
143
- ];
144
- var createIntegrationSchema = z5.object({
145
- type: z5.enum(INTEGRATION_TYPES),
146
- name: z5.string().min(1).max(100),
147
- enabled: z5.boolean().optional().default(false),
148
- config: z5.record(z5.unknown()),
149
- enabledEvents: z5.array(z5.enum(NOTIFICATION_EVENTS)).optional().default([])
150
- });
151
- var updateIntegrationSchema = z5.object({
152
- name: z5.string().min(1).max(100).optional(),
153
- enabled: z5.boolean().optional(),
154
- config: z5.record(z5.unknown()).optional(),
155
- enabledEvents: z5.array(z5.enum(NOTIFICATION_EVENTS)).optional()
156
- });
157
- var projectStatusSchema = z6.enum(["active", "archived", "paused"]);
158
- var workflowModeSchema = z6.enum(["manual", "automatic"]);
159
- var validationSettingsSchema = z6.object({
160
- runInstall: z6.boolean().optional(),
161
- runTests: z6.boolean().optional(),
162
- runBuild: z6.boolean().optional(),
163
- runLint: z6.boolean().optional(),
164
- blockOnFailure: z6.boolean().optional(),
165
- installCommand: z6.string().max(500).optional(),
166
- testCommand: z6.string().max(500).optional(),
167
- buildCommand: z6.string().max(500).optional(),
168
- lintCommand: z6.string().max(500).optional(),
169
- maxRetries: z6.number().int().min(0).max(100).optional(),
170
- preferSameAgent: z6.boolean().optional(),
171
- timeout: z6.number().int().min(1e3).max(36e5).optional()
172
- // 1s to 1h
173
- });
174
- var workflowSettingsSchema = z6.object({
175
- mode: workflowModeSchema,
176
- previewBranch: z6.string().min(1).max(100),
177
- autoMerge: z6.boolean().optional(),
178
- validation: validationSettingsSchema.optional()
179
- });
180
- var prdStatusSchema = z6.enum([
181
- "idle",
182
- "generating",
183
- "completed",
184
- "failed",
185
- "tasks_generating",
186
- "tasks_completed",
187
- "tasks_failed"
188
- ]);
189
- var prdTemplateSchema = z6.enum(["mobile", "web", "api", "feature", "data-pipeline"]);
190
- var prdTaskSchema = z6.object({
191
- id: z6.string(),
192
- prdId: z6.string(),
193
- step: z6.number(),
194
- title: z6.string(),
195
- description: z6.string(),
196
- status: z6.enum(["todo", "in_progress", "done", "blocked"]),
197
- priority: z6.enum(["P0", "P1", "P2"]),
198
- estimatedHours: z6.number().optional(),
199
- phase: z6.enum(["discovery", "design", "development", "testing", "deployment"]).optional(),
200
- createdAt: z6.string(),
201
- updatedAt: z6.string(),
202
- completedAt: z6.string().optional()
203
- });
204
- var projectSchema = z6.object({
205
- id: uuidSchema,
206
- name: z6.string().min(1).max(100),
207
- description: z6.string().max(500),
208
- githubRepoUrl: z6.string().url(),
209
- githubOwner: z6.string().min(1),
210
- githubRepo: z6.string().min(1),
211
- status: projectStatusSchema,
212
- defaultBranch: z6.string().min(1).max(100).optional(),
213
- workflowSettings: workflowSettingsSchema.optional(),
214
- assignedAgentIds: z6.array(uuidSchema).optional(),
215
- prd: z6.string().optional(),
216
- prdGeneratedAt: timestampSchema.optional(),
217
- prdStatus: prdStatusSchema.optional(),
218
- prdError: z6.string().optional(),
219
- prdTemplate: prdTemplateSchema.optional(),
220
- prdTasks: z6.array(prdTaskSchema).optional(),
221
- createdAt: timestampSchema,
222
- updatedAt: timestampSchema
223
- });
224
- var generatePRDInputSchema = z6.object({
225
- template: prdTemplateSchema.optional().default("feature")
226
- });
227
- var importPRDTasksInputSchema = z6.object({
228
- tasks: z6.array(
229
- z6.object({
230
- title: z6.string(),
231
- description: z6.string(),
232
- priority: z6.enum(["P0", "P1", "P2"]).optional(),
233
- estimatedHours: z6.number().optional(),
234
- phase: z6.string().optional()
235
- })
236
- ),
237
- taskType: z6.enum(["feature", "bug", "research", "refactor", "documentation"])
238
- });
239
- var updatePRDInputSchema = z6.object({
240
- prd: z6.string()
241
- });
242
- var createProjectSchema = z6.object({
243
- name: z6.string().min(1).max(100),
244
- description: z6.string().max(500),
245
- githubRepoUrl: z6.string().url()
246
- });
247
- var updateProjectSchema = z6.object({
248
- name: z6.string().min(1).max(100).optional(),
249
- description: z6.string().max(500).optional(),
250
- status: projectStatusSchema.optional(),
251
- defaultBranch: z6.string().min(1).max(100).optional(),
252
- workflowSettings: workflowSettingsSchema.optional()
253
- });
254
- var taskStatusSchema = z7.enum(["todo", "in_progress", "review", "done", "blocked"]);
255
- var taskTypeSchema = z7.enum(["feature", "bug", "research", "refactor", "documentation"]);
256
- var taskPrioritySchema = z7.enum(["low", "medium", "high", "urgent"]);
257
- var agentNoteTypeSchema = z7.enum([
258
- "progress",
259
- "summary",
260
- "error",
261
- "completion",
262
- "feedback"
263
- ]);
264
- var agentNoteSchema = z7.object({
265
- id: uuidSchema,
266
- agentId: uuidSchema,
267
- agentName: z7.string(),
268
- content: z7.string(),
269
- type: agentNoteTypeSchema,
270
- createdAt: timestampSchema,
271
- isUserFeedback: z7.boolean().optional()
272
- });
273
- var taskSchema = z7.object({
274
- id: uuidSchema,
275
- projectId: uuidSchema,
276
- title: z7.string().min(1).max(200),
277
- description: z7.string().max(2e3),
278
- type: taskTypeSchema,
279
- status: taskStatusSchema,
280
- priority: taskPrioritySchema,
281
- position: z7.number().int().default(0),
282
- // Manual ordering within status
283
- assignedAgentId: uuidSchema.nullable(),
284
- autoAssign: z7.boolean().default(true),
285
- // Whether agents should auto-pick this task
286
- agentNotes: z7.array(agentNoteSchema).default([]),
287
- githubIssueNumber: z7.number().int().positive().nullable(),
288
- githubPrNumber: z7.number().int().positive().nullable(),
289
- metadata: z7.record(z7.any()),
290
- blockedBy: z7.array(uuidSchema).default([]),
291
- // Task IDs that must be completed before this task
292
- blocking: z7.array(uuidSchema).default([]),
293
- // Task IDs that depend on this task
294
- createdAt: timestampSchema,
295
- updatedAt: timestampSchema,
296
- completedAt: timestampSchema.nullable()
297
- });
298
- var createTaskSchema = z7.object({
299
- projectId: uuidSchema,
300
- title: z7.string().min(1).max(200),
301
- description: z7.string().max(2e3),
302
- type: taskTypeSchema,
303
- priority: taskPrioritySchema.optional().default("medium"),
304
- assignedAgentId: uuidSchema.optional(),
305
- // Optional agent to assign on creation
306
- autoAssign: z7.boolean().optional().default(true),
307
- // Auto-assign to agents (default: true)
308
- blockedBy: z7.array(uuidSchema).optional()
309
- // Task IDs that must be completed before this task
310
- });
311
- var updateTaskSchema = z7.object({
312
- title: z7.string().min(1).max(200).optional(),
313
- description: z7.string().max(2e3).optional(),
314
- type: taskTypeSchema.optional(),
315
- status: taskStatusSchema.optional(),
316
- priority: taskPrioritySchema.optional(),
317
- position: z7.number().int().optional(),
318
- // Manual ordering within status
319
- assignedAgentId: uuidSchema.nullable().optional(),
320
- autoAssign: z7.boolean().optional(),
321
- // Whether agents should auto-pick this task
322
- githubIssueNumber: z7.number().int().positive().nullable().optional(),
323
- githubPrNumber: z7.number().int().positive().nullable().optional(),
324
- metadata: z7.record(z7.any()).optional(),
325
- blockedBy: z7.array(uuidSchema).optional()
326
- // Task IDs that must be completed before this task
327
- });
328
- var clientEventTypeSchema = z8.enum([
329
- "subscribe:project",
330
- "unsubscribe:project",
331
- "subscribe:task",
332
- "unsubscribe:task"
333
- ]);
334
- var serverEventTypeSchema = z8.enum([
335
- "task:created",
336
- "task:updated",
337
- "task:status_changed",
338
- "task:assigned",
339
- "task:progress",
340
- "task:stream",
341
- "task:note_added",
342
- "task:execution_cancelled",
343
- "task:dependencies_updated",
344
- "tasks:reordered",
345
- "agent:created",
346
- "agent:updated",
347
- "agent:status_changed",
348
- "agent:log",
349
- "activity:created",
350
- "project:updated",
351
- "project:prd_status_changed",
352
- "error"
353
- ]);
354
- var githubIssuePayloadSchema = z9.object({
355
- action: z9.string(),
356
- issueNumber: z9.number().int().positive(),
357
- title: z9.string(),
358
- body: z9.string().nullable(),
359
- labels: z9.array(z9.string()),
360
- author: z9.string(),
361
- repo: z9.object({
362
- owner: z9.string(),
363
- name: z9.string(),
364
- fullName: z9.string(),
365
- defaultBranch: z9.string(),
366
- cloneUrl: z9.string()
367
- }),
368
- url: z9.string().url(),
369
- createdAt: z9.string()
370
- });
371
- var ISSUE_TYPES = ["feature", "bug", "refactor", "docs", "test", "chore"];
372
- var ISSUE_PRIORITIES = ["low", "medium", "high", "urgent"];
373
- var ISSUE_COMPLEXITIES = ["trivial", "small", "medium", "large", "epic"];
374
- var issueClassificationSchema = z9.object({
375
- type: z9.enum(ISSUE_TYPES),
376
- priority: z9.enum(ISSUE_PRIORITIES),
377
- complexity: z9.enum(ISSUE_COMPLEXITIES),
378
- confidence: z9.number().min(0).max(1),
379
- reasoning: z9.string()
380
- });
381
- var PIPELINE_STAGES = [
382
- "triage",
383
- "research",
384
- "inspect",
385
- "plan",
386
- "implement"
387
- ];
388
- var PIPELINE_STATUSES = [
389
- "pending",
390
- "running",
391
- "completed",
392
- "failed",
393
- "cancelled"
394
- ];
395
- var pipelineStageResultSchema = z9.object({
396
- stage: z9.enum(PIPELINE_STAGES),
397
- status: z9.enum(PIPELINE_STATUSES),
398
- output: z9.unknown().optional(),
399
- error: z9.string().optional(),
400
- duration_ms: z9.number().optional()
401
- });
402
- var pipelineRunSchema = z9.object({
403
- id: z9.string(),
404
- issueNumber: z9.number().int().positive(),
405
- repo: z9.object({
406
- owner: z9.string(),
407
- name: z9.string()
408
- }),
409
- stages: z9.array(pipelineStageResultSchema),
410
- status: z9.enum(PIPELINE_STATUSES),
411
- branchName: z9.string().optional(),
412
- prNumber: z9.number().int().positive().optional(),
413
- classification: issueClassificationSchema.optional(),
414
- createdAt: z9.number(),
415
- updatedAt: z9.number()
416
- });
417
- var gatewayConfigSchema = z10.object({
418
- url: z10.string().url(),
419
- authToken: z10.string().optional(),
420
- deviceId: z10.string().optional(),
421
- devicePrivateKey: z10.string().optional()
422
- });
423
- var githubAuthConfigSchema = z10.object({
424
- token: z10.string(),
425
- webhookSecret: z10.string().optional(),
426
- appId: z10.string().optional(),
427
- privateKey: z10.string().optional()
428
- });
429
- var webhookServerConfigSchema = z10.object({
430
- port: z10.number().int().positive().default(3456),
431
- host: z10.string().default("0.0.0.0"),
432
- path: z10.string().default("/webhook/github")
433
- });
434
- var watchedRepoSchema = z10.object({
435
- owner: z10.string(),
436
- repo: z10.string(),
437
- defaultBranch: z10.string().default("main"),
438
- enabledEvents: z10.array(z10.string()).default(["issues.opened", "issues.labeled"]),
439
- labels: z10.array(z10.string()).optional()
440
- });
441
- var agentRunConfigSchema = z10.object({
442
- moltAgentId: z10.string().optional(),
443
- maxConcurrentTasks: z10.number().int().positive().default(1)
444
- });
445
- var sdkProviderSchema = z10.enum(["molt", "claude"]).default("molt");
446
- var claudeConfigSchema = z10.object({
447
- apiKey: z10.string().optional(),
448
- cliPath: z10.string().default("claude"),
449
- model: z10.string().default("claude-sonnet-4-5"),
450
- timeout: z10.number().int().positive().default(3e5),
451
- permissionMode: z10.string().default("default")
452
- });
453
- var pipelineConfigSchema = z10.object({
454
- enabledStages: z10.array(z10.enum(PIPELINE_STAGES)).default(["triage", "research", "inspect", "plan", "implement"])
455
- });
456
- var moxxyConfigSchema = z10.object({
457
- version: z10.number().int().positive().default(1),
458
- sdk: sdkProviderSchema,
459
- gateway: gatewayConfigSchema.optional(),
460
- github: githubAuthConfigSchema,
461
- webhook: webhookServerConfigSchema.optional(),
462
- repos: z10.array(watchedRepoSchema).default([]),
463
- agent: agentRunConfigSchema.optional(),
464
- pipeline: pipelineConfigSchema.optional(),
465
- claude: claudeConfigSchema.optional()
466
- });
467
- var agentCommandResultSchema = z11.object({
468
- success: z11.boolean(),
469
- command: z11.string(),
470
- data: z11.unknown().optional(),
471
- error: z11.object({
472
- code: z11.string(),
473
- message: z11.string(),
474
- details: z11.string().optional()
475
- }).optional(),
476
- duration_ms: z11.number()
477
- });
478
- var argDefSchema = z11.object({
479
- name: z11.string(),
480
- description: z11.string(),
481
- required: z11.boolean().default(false),
482
- type: z11.enum(["string", "number", "boolean"]).default("string")
483
- });
484
- var optionDefSchema = z11.object({
485
- name: z11.string(),
486
- short: z11.string().optional(),
487
- description: z11.string(),
488
- required: z11.boolean().default(false),
489
- type: z11.enum(["string", "number", "boolean"]).default("string"),
490
- defaultValue: z11.unknown().optional()
491
- });
492
- var agentCLICommandDefSchema = z11.object({
493
- name: z11.string(),
494
- description: z11.string(),
495
- args: z11.array(argDefSchema),
496
- options: z11.array(optionDefSchema),
497
- examples: z11.array(z11.string())
498
- });
499
- var workflowStepSchema = z11.object({
500
- id: z11.string(),
501
- plugin: z11.string(),
502
- command: z11.string(),
503
- args: z11.record(z11.unknown()),
504
- description: z11.string(),
505
- dependsOn: z11.array(z11.string()).optional(),
506
- optional: z11.boolean().optional()
507
- });
508
- var workflowSchema = z11.object({
509
- id: z11.string(),
510
- name: z11.string(),
511
- description: z11.string(),
512
- steps: z11.array(workflowStepSchema),
513
- context: z11.record(z11.unknown())
514
- });
515
- var workflowStepResultSchema = z11.object({
516
- stepId: z11.string(),
517
- result: agentCommandResultSchema,
518
- skipped: z11.boolean().default(false)
519
- });
520
- var workflowResultSchema = z11.object({
521
- workflowId: z11.string(),
522
- success: z11.boolean(),
523
- stepResults: z11.array(workflowStepResultSchema),
524
- duration_ms: z11.number()
525
- });
526
-
527
- export {
528
- PIPELINE_STAGES,
529
- moxxyConfigSchema
530
- };