@kya-os/contracts 1.7.20 → 1.7.22

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.
@@ -0,0 +1,837 @@
1
+ /**
2
+ * Molti Deployment Zod Validation Schemas
3
+ *
4
+ * Runtime validation schemas for the Molti deployment API.
5
+ * These schemas ensure request/response validation at API boundaries.
6
+ *
7
+ * @package @kya-os/contracts/molti
8
+ */
9
+ import { z } from "zod";
10
+ /**
11
+ * Molti identity configuration schema
12
+ */
13
+ export declare const moltiIdentityConfigSchema: z.ZodObject<{
14
+ did: z.ZodString;
15
+ publicKey: z.ZodString;
16
+ agentName: z.ZodOptional<z.ZodString>;
17
+ agentDescription: z.ZodOptional<z.ZodString>;
18
+ }, "strip", z.ZodTypeAny, {
19
+ did: string;
20
+ publicKey: string;
21
+ agentName?: string | undefined;
22
+ agentDescription?: string | undefined;
23
+ }, {
24
+ did: string;
25
+ publicKey: string;
26
+ agentName?: string | undefined;
27
+ agentDescription?: string | undefined;
28
+ }>;
29
+ /**
30
+ * Container instance type schema
31
+ */
32
+ export declare const moltiInstanceTypeSchema: z.ZodEnum<["lite", "basic", "standard-1", "standard-2", "standard-3", "standard-4"]>;
33
+ /**
34
+ * Container runtime status schema
35
+ */
36
+ export declare const moltiContainerStatusSchema: z.ZodEnum<["pending", "deploying", "running", "stopped", "unhealthy", "error"]>;
37
+ /**
38
+ * Molti deploy configuration schema
39
+ */
40
+ export declare const moltiDeployConfigSchema: z.ZodObject<{
41
+ projectName: z.ZodString;
42
+ agentName: z.ZodOptional<z.ZodString>;
43
+ agentDescription: z.ZodOptional<z.ZodString>;
44
+ agentShieldProjectId: z.ZodOptional<z.ZodString>;
45
+ agentShieldApiKey: z.ZodOptional<z.ZodString>;
46
+ instanceType: z.ZodOptional<z.ZodEnum<["lite", "basic", "standard-1", "standard-2", "standard-3", "standard-4"]>>;
47
+ enableReputation: z.ZodOptional<z.ZodBoolean>;
48
+ }, "strip", z.ZodTypeAny, {
49
+ projectName: string;
50
+ agentName?: string | undefined;
51
+ agentDescription?: string | undefined;
52
+ agentShieldProjectId?: string | undefined;
53
+ agentShieldApiKey?: string | undefined;
54
+ instanceType?: "lite" | "basic" | "standard-1" | "standard-2" | "standard-3" | "standard-4" | undefined;
55
+ enableReputation?: boolean | undefined;
56
+ }, {
57
+ projectName: string;
58
+ agentName?: string | undefined;
59
+ agentDescription?: string | undefined;
60
+ agentShieldProjectId?: string | undefined;
61
+ agentShieldApiKey?: string | undefined;
62
+ instanceType?: "lite" | "basic" | "standard-1" | "standard-2" | "standard-3" | "standard-4" | undefined;
63
+ enableReputation?: boolean | undefined;
64
+ }>;
65
+ /**
66
+ * Molti deploy request schema
67
+ * POST /api/internal/deploy/molti/start
68
+ */
69
+ export declare const moltiDeployRequestSchema: z.ZodObject<{
70
+ projectName: z.ZodString;
71
+ agentName: z.ZodOptional<z.ZodString>;
72
+ agentDescription: z.ZodOptional<z.ZodString>;
73
+ organizationId: z.ZodString;
74
+ existingProjectId: z.ZodOptional<z.ZodString>;
75
+ instanceType: z.ZodOptional<z.ZodEnum<["lite", "basic", "standard-1", "standard-2", "standard-3", "standard-4"]>>;
76
+ enableReputation: z.ZodDefault<z.ZodBoolean>;
77
+ }, "strip", z.ZodTypeAny, {
78
+ projectName: string;
79
+ enableReputation: boolean;
80
+ organizationId: string;
81
+ agentName?: string | undefined;
82
+ agentDescription?: string | undefined;
83
+ instanceType?: "lite" | "basic" | "standard-1" | "standard-2" | "standard-3" | "standard-4" | undefined;
84
+ existingProjectId?: string | undefined;
85
+ }, {
86
+ projectName: string;
87
+ organizationId: string;
88
+ agentName?: string | undefined;
89
+ agentDescription?: string | undefined;
90
+ instanceType?: "lite" | "basic" | "standard-1" | "standard-2" | "standard-3" | "standard-4" | undefined;
91
+ enableReputation?: boolean | undefined;
92
+ existingProjectId?: string | undefined;
93
+ }>;
94
+ /**
95
+ * Molti deploy start response schema
96
+ */
97
+ export declare const moltiDeployStartResponseSchema: z.ZodObject<{
98
+ success: z.ZodLiteral<true>;
99
+ deploymentId: z.ZodString;
100
+ }, "strip", z.ZodTypeAny, {
101
+ success: true;
102
+ deploymentId: string;
103
+ }, {
104
+ success: true;
105
+ deploymentId: string;
106
+ }>;
107
+ /**
108
+ * Deploy step ID schema
109
+ */
110
+ export declare const moltiDeployStepIdSchema: z.ZodEnum<["github_verify", "project_create", "api_key_create", "kta_register", "scaffold", "repo_create", "commit_files", "add_secrets", "gateway_route"]>;
111
+ /**
112
+ * Deploy step status schema
113
+ */
114
+ export declare const moltiDeployStepStatusSchema: z.ZodEnum<["pending", "in_progress", "completed", "failed", "skipped"]>;
115
+ /**
116
+ * Individual deploy step schema
117
+ */
118
+ export declare const moltiDeployStepSchema: z.ZodObject<{
119
+ id: z.ZodEnum<["github_verify", "project_create", "api_key_create", "kta_register", "scaffold", "repo_create", "commit_files", "add_secrets", "gateway_route"]>;
120
+ name: z.ZodString;
121
+ status: z.ZodEnum<["pending", "in_progress", "completed", "failed", "skipped"]>;
122
+ message: z.ZodOptional<z.ZodString>;
123
+ startedAt: z.ZodOptional<z.ZodString>;
124
+ completedAt: z.ZodOptional<z.ZodString>;
125
+ }, "strip", z.ZodTypeAny, {
126
+ status: "pending" | "in_progress" | "completed" | "failed" | "skipped";
127
+ id: "github_verify" | "project_create" | "api_key_create" | "kta_register" | "scaffold" | "repo_create" | "commit_files" | "add_secrets" | "gateway_route";
128
+ name: string;
129
+ message?: string | undefined;
130
+ startedAt?: string | undefined;
131
+ completedAt?: string | undefined;
132
+ }, {
133
+ status: "pending" | "in_progress" | "completed" | "failed" | "skipped";
134
+ id: "github_verify" | "project_create" | "api_key_create" | "kta_register" | "scaffold" | "repo_create" | "commit_files" | "add_secrets" | "gateway_route";
135
+ name: string;
136
+ message?: string | undefined;
137
+ startedAt?: string | undefined;
138
+ completedAt?: string | undefined;
139
+ }>;
140
+ /**
141
+ * Overall deployment progress schema
142
+ */
143
+ export declare const moltiDeployProgressSchema: z.ZodObject<{
144
+ deploymentId: z.ZodString;
145
+ steps: z.ZodArray<z.ZodObject<{
146
+ id: z.ZodEnum<["github_verify", "project_create", "api_key_create", "kta_register", "scaffold", "repo_create", "commit_files", "add_secrets", "gateway_route"]>;
147
+ name: z.ZodString;
148
+ status: z.ZodEnum<["pending", "in_progress", "completed", "failed", "skipped"]>;
149
+ message: z.ZodOptional<z.ZodString>;
150
+ startedAt: z.ZodOptional<z.ZodString>;
151
+ completedAt: z.ZodOptional<z.ZodString>;
152
+ }, "strip", z.ZodTypeAny, {
153
+ status: "pending" | "in_progress" | "completed" | "failed" | "skipped";
154
+ id: "github_verify" | "project_create" | "api_key_create" | "kta_register" | "scaffold" | "repo_create" | "commit_files" | "add_secrets" | "gateway_route";
155
+ name: string;
156
+ message?: string | undefined;
157
+ startedAt?: string | undefined;
158
+ completedAt?: string | undefined;
159
+ }, {
160
+ status: "pending" | "in_progress" | "completed" | "failed" | "skipped";
161
+ id: "github_verify" | "project_create" | "api_key_create" | "kta_register" | "scaffold" | "repo_create" | "commit_files" | "add_secrets" | "gateway_route";
162
+ name: string;
163
+ message?: string | undefined;
164
+ startedAt?: string | undefined;
165
+ completedAt?: string | undefined;
166
+ }>, "many">;
167
+ currentStep: z.ZodNumber;
168
+ totalSteps: z.ZodNumber;
169
+ overallStatus: z.ZodEnum<["pending", "in_progress", "completed", "failed"]>;
170
+ }, "strip", z.ZodTypeAny, {
171
+ deploymentId: string;
172
+ steps: {
173
+ status: "pending" | "in_progress" | "completed" | "failed" | "skipped";
174
+ id: "github_verify" | "project_create" | "api_key_create" | "kta_register" | "scaffold" | "repo_create" | "commit_files" | "add_secrets" | "gateway_route";
175
+ name: string;
176
+ message?: string | undefined;
177
+ startedAt?: string | undefined;
178
+ completedAt?: string | undefined;
179
+ }[];
180
+ currentStep: number;
181
+ totalSteps: number;
182
+ overallStatus: "pending" | "in_progress" | "completed" | "failed";
183
+ }, {
184
+ deploymentId: string;
185
+ steps: {
186
+ status: "pending" | "in_progress" | "completed" | "failed" | "skipped";
187
+ id: "github_verify" | "project_create" | "api_key_create" | "kta_register" | "scaffold" | "repo_create" | "commit_files" | "add_secrets" | "gateway_route";
188
+ name: string;
189
+ message?: string | undefined;
190
+ startedAt?: string | undefined;
191
+ completedAt?: string | undefined;
192
+ }[];
193
+ currentStep: number;
194
+ totalSteps: number;
195
+ overallStatus: "pending" | "in_progress" | "completed" | "failed";
196
+ }>;
197
+ /**
198
+ * Successful deploy result schema
199
+ */
200
+ export declare const moltiDeployResultSchema: z.ZodObject<{
201
+ agentDid: z.ZodString;
202
+ repoUrl: z.ZodString;
203
+ repoFullName: z.ZodString;
204
+ projectId: z.ZodString;
205
+ projectFriendlyId: z.ZodString;
206
+ ktaClaimUrl: z.ZodOptional<z.ZodString>;
207
+ deployButtonUrl: z.ZodString;
208
+ gatewayHostname: z.ZodOptional<z.ZodString>;
209
+ }, "strip", z.ZodTypeAny, {
210
+ agentDid: string;
211
+ repoUrl: string;
212
+ repoFullName: string;
213
+ projectId: string;
214
+ projectFriendlyId: string;
215
+ deployButtonUrl: string;
216
+ ktaClaimUrl?: string | undefined;
217
+ gatewayHostname?: string | undefined;
218
+ }, {
219
+ agentDid: string;
220
+ repoUrl: string;
221
+ repoFullName: string;
222
+ projectId: string;
223
+ projectFriendlyId: string;
224
+ deployButtonUrl: string;
225
+ ktaClaimUrl?: string | undefined;
226
+ gatewayHostname?: string | undefined;
227
+ }>;
228
+ /**
229
+ * Molti deploy error codes schema
230
+ */
231
+ export declare const moltiDeployErrorCodeSchema: z.ZodEnum<["GITHUB_NOT_CONNECTED", "REPO_NAME_TAKEN", "REPO_NAME_INVALID", "RATE_LIMIT_EXCEEDED", "PLAN_LIMIT_EXCEEDED", "SCAFFOLDER_ERROR", "IDENTITY_ERROR", "PROJECT_CREATION_ERROR", "KTA_REGISTRATION_ERROR", "SECRETS_ERROR", "GATEWAY_ERROR", "GITHUB_API_ERROR", "INTERNAL_ERROR"]>;
232
+ /**
233
+ * Molti deploy error response schema
234
+ */
235
+ export declare const moltiDeployErrorResponseSchema: z.ZodObject<{
236
+ success: z.ZodLiteral<false>;
237
+ error: z.ZodObject<{
238
+ code: z.ZodEnum<["GITHUB_NOT_CONNECTED", "REPO_NAME_TAKEN", "REPO_NAME_INVALID", "RATE_LIMIT_EXCEEDED", "PLAN_LIMIT_EXCEEDED", "SCAFFOLDER_ERROR", "IDENTITY_ERROR", "PROJECT_CREATION_ERROR", "KTA_REGISTRATION_ERROR", "SECRETS_ERROR", "GATEWAY_ERROR", "GITHUB_API_ERROR", "INTERNAL_ERROR"]>;
239
+ message: z.ZodString;
240
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
241
+ }, "strip", z.ZodTypeAny, {
242
+ code: "GITHUB_NOT_CONNECTED" | "REPO_NAME_TAKEN" | "REPO_NAME_INVALID" | "RATE_LIMIT_EXCEEDED" | "PLAN_LIMIT_EXCEEDED" | "SCAFFOLDER_ERROR" | "IDENTITY_ERROR" | "PROJECT_CREATION_ERROR" | "KTA_REGISTRATION_ERROR" | "SECRETS_ERROR" | "GATEWAY_ERROR" | "GITHUB_API_ERROR" | "INTERNAL_ERROR";
243
+ message: string;
244
+ details?: Record<string, unknown> | undefined;
245
+ }, {
246
+ code: "GITHUB_NOT_CONNECTED" | "REPO_NAME_TAKEN" | "REPO_NAME_INVALID" | "RATE_LIMIT_EXCEEDED" | "PLAN_LIMIT_EXCEEDED" | "SCAFFOLDER_ERROR" | "IDENTITY_ERROR" | "PROJECT_CREATION_ERROR" | "KTA_REGISTRATION_ERROR" | "SECRETS_ERROR" | "GATEWAY_ERROR" | "GITHUB_API_ERROR" | "INTERNAL_ERROR";
247
+ message: string;
248
+ details?: Record<string, unknown> | undefined;
249
+ }>;
250
+ }, "strip", z.ZodTypeAny, {
251
+ error: {
252
+ code: "GITHUB_NOT_CONNECTED" | "REPO_NAME_TAKEN" | "REPO_NAME_INVALID" | "RATE_LIMIT_EXCEEDED" | "PLAN_LIMIT_EXCEEDED" | "SCAFFOLDER_ERROR" | "IDENTITY_ERROR" | "PROJECT_CREATION_ERROR" | "KTA_REGISTRATION_ERROR" | "SECRETS_ERROR" | "GATEWAY_ERROR" | "GITHUB_API_ERROR" | "INTERNAL_ERROR";
253
+ message: string;
254
+ details?: Record<string, unknown> | undefined;
255
+ };
256
+ success: false;
257
+ }, {
258
+ error: {
259
+ code: "GITHUB_NOT_CONNECTED" | "REPO_NAME_TAKEN" | "REPO_NAME_INVALID" | "RATE_LIMIT_EXCEEDED" | "PLAN_LIMIT_EXCEEDED" | "SCAFFOLDER_ERROR" | "IDENTITY_ERROR" | "PROJECT_CREATION_ERROR" | "KTA_REGISTRATION_ERROR" | "SECRETS_ERROR" | "GATEWAY_ERROR" | "GITHUB_API_ERROR" | "INTERNAL_ERROR";
260
+ message: string;
261
+ details?: Record<string, unknown> | undefined;
262
+ };
263
+ success: false;
264
+ }>;
265
+ /**
266
+ * Molti deploy success response schema
267
+ */
268
+ export declare const moltiDeploySuccessResponseSchema: z.ZodObject<{
269
+ success: z.ZodLiteral<true>;
270
+ data: z.ZodObject<{
271
+ agentDid: z.ZodString;
272
+ repoUrl: z.ZodString;
273
+ repoFullName: z.ZodString;
274
+ projectId: z.ZodString;
275
+ projectFriendlyId: z.ZodString;
276
+ ktaClaimUrl: z.ZodOptional<z.ZodString>;
277
+ deployButtonUrl: z.ZodString;
278
+ gatewayHostname: z.ZodOptional<z.ZodString>;
279
+ }, "strip", z.ZodTypeAny, {
280
+ agentDid: string;
281
+ repoUrl: string;
282
+ repoFullName: string;
283
+ projectId: string;
284
+ projectFriendlyId: string;
285
+ deployButtonUrl: string;
286
+ ktaClaimUrl?: string | undefined;
287
+ gatewayHostname?: string | undefined;
288
+ }, {
289
+ agentDid: string;
290
+ repoUrl: string;
291
+ repoFullName: string;
292
+ projectId: string;
293
+ projectFriendlyId: string;
294
+ deployButtonUrl: string;
295
+ ktaClaimUrl?: string | undefined;
296
+ gatewayHostname?: string | undefined;
297
+ }>;
298
+ }, "strip", z.ZodTypeAny, {
299
+ success: true;
300
+ data: {
301
+ agentDid: string;
302
+ repoUrl: string;
303
+ repoFullName: string;
304
+ projectId: string;
305
+ projectFriendlyId: string;
306
+ deployButtonUrl: string;
307
+ ktaClaimUrl?: string | undefined;
308
+ gatewayHostname?: string | undefined;
309
+ };
310
+ }, {
311
+ success: true;
312
+ data: {
313
+ agentDid: string;
314
+ repoUrl: string;
315
+ repoFullName: string;
316
+ projectId: string;
317
+ projectFriendlyId: string;
318
+ deployButtonUrl: string;
319
+ ktaClaimUrl?: string | undefined;
320
+ gatewayHostname?: string | undefined;
321
+ };
322
+ }>;
323
+ /**
324
+ * Molti deploy response union schema
325
+ */
326
+ export declare const moltiDeployResponseSchema: z.ZodDiscriminatedUnion<"success", [z.ZodObject<{
327
+ success: z.ZodLiteral<true>;
328
+ data: z.ZodObject<{
329
+ agentDid: z.ZodString;
330
+ repoUrl: z.ZodString;
331
+ repoFullName: z.ZodString;
332
+ projectId: z.ZodString;
333
+ projectFriendlyId: z.ZodString;
334
+ ktaClaimUrl: z.ZodOptional<z.ZodString>;
335
+ deployButtonUrl: z.ZodString;
336
+ gatewayHostname: z.ZodOptional<z.ZodString>;
337
+ }, "strip", z.ZodTypeAny, {
338
+ agentDid: string;
339
+ repoUrl: string;
340
+ repoFullName: string;
341
+ projectId: string;
342
+ projectFriendlyId: string;
343
+ deployButtonUrl: string;
344
+ ktaClaimUrl?: string | undefined;
345
+ gatewayHostname?: string | undefined;
346
+ }, {
347
+ agentDid: string;
348
+ repoUrl: string;
349
+ repoFullName: string;
350
+ projectId: string;
351
+ projectFriendlyId: string;
352
+ deployButtonUrl: string;
353
+ ktaClaimUrl?: string | undefined;
354
+ gatewayHostname?: string | undefined;
355
+ }>;
356
+ }, "strip", z.ZodTypeAny, {
357
+ success: true;
358
+ data: {
359
+ agentDid: string;
360
+ repoUrl: string;
361
+ repoFullName: string;
362
+ projectId: string;
363
+ projectFriendlyId: string;
364
+ deployButtonUrl: string;
365
+ ktaClaimUrl?: string | undefined;
366
+ gatewayHostname?: string | undefined;
367
+ };
368
+ }, {
369
+ success: true;
370
+ data: {
371
+ agentDid: string;
372
+ repoUrl: string;
373
+ repoFullName: string;
374
+ projectId: string;
375
+ projectFriendlyId: string;
376
+ deployButtonUrl: string;
377
+ ktaClaimUrl?: string | undefined;
378
+ gatewayHostname?: string | undefined;
379
+ };
380
+ }>, z.ZodObject<{
381
+ success: z.ZodLiteral<false>;
382
+ error: z.ZodObject<{
383
+ code: z.ZodEnum<["GITHUB_NOT_CONNECTED", "REPO_NAME_TAKEN", "REPO_NAME_INVALID", "RATE_LIMIT_EXCEEDED", "PLAN_LIMIT_EXCEEDED", "SCAFFOLDER_ERROR", "IDENTITY_ERROR", "PROJECT_CREATION_ERROR", "KTA_REGISTRATION_ERROR", "SECRETS_ERROR", "GATEWAY_ERROR", "GITHUB_API_ERROR", "INTERNAL_ERROR"]>;
384
+ message: z.ZodString;
385
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
386
+ }, "strip", z.ZodTypeAny, {
387
+ code: "GITHUB_NOT_CONNECTED" | "REPO_NAME_TAKEN" | "REPO_NAME_INVALID" | "RATE_LIMIT_EXCEEDED" | "PLAN_LIMIT_EXCEEDED" | "SCAFFOLDER_ERROR" | "IDENTITY_ERROR" | "PROJECT_CREATION_ERROR" | "KTA_REGISTRATION_ERROR" | "SECRETS_ERROR" | "GATEWAY_ERROR" | "GITHUB_API_ERROR" | "INTERNAL_ERROR";
388
+ message: string;
389
+ details?: Record<string, unknown> | undefined;
390
+ }, {
391
+ code: "GITHUB_NOT_CONNECTED" | "REPO_NAME_TAKEN" | "REPO_NAME_INVALID" | "RATE_LIMIT_EXCEEDED" | "PLAN_LIMIT_EXCEEDED" | "SCAFFOLDER_ERROR" | "IDENTITY_ERROR" | "PROJECT_CREATION_ERROR" | "KTA_REGISTRATION_ERROR" | "SECRETS_ERROR" | "GATEWAY_ERROR" | "GITHUB_API_ERROR" | "INTERNAL_ERROR";
392
+ message: string;
393
+ details?: Record<string, unknown> | undefined;
394
+ }>;
395
+ }, "strip", z.ZodTypeAny, {
396
+ error: {
397
+ code: "GITHUB_NOT_CONNECTED" | "REPO_NAME_TAKEN" | "REPO_NAME_INVALID" | "RATE_LIMIT_EXCEEDED" | "PLAN_LIMIT_EXCEEDED" | "SCAFFOLDER_ERROR" | "IDENTITY_ERROR" | "PROJECT_CREATION_ERROR" | "KTA_REGISTRATION_ERROR" | "SECRETS_ERROR" | "GATEWAY_ERROR" | "GITHUB_API_ERROR" | "INTERNAL_ERROR";
398
+ message: string;
399
+ details?: Record<string, unknown> | undefined;
400
+ };
401
+ success: false;
402
+ }, {
403
+ error: {
404
+ code: "GITHUB_NOT_CONNECTED" | "REPO_NAME_TAKEN" | "REPO_NAME_INVALID" | "RATE_LIMIT_EXCEEDED" | "PLAN_LIMIT_EXCEEDED" | "SCAFFOLDER_ERROR" | "IDENTITY_ERROR" | "PROJECT_CREATION_ERROR" | "KTA_REGISTRATION_ERROR" | "SECRETS_ERROR" | "GATEWAY_ERROR" | "GITHUB_API_ERROR" | "INTERNAL_ERROR";
405
+ message: string;
406
+ details?: Record<string, unknown> | undefined;
407
+ };
408
+ success: false;
409
+ }>]>;
410
+ /**
411
+ * Health check response schema
412
+ */
413
+ export declare const moltiHealthStatusSchema: z.ZodObject<{
414
+ agentDid: z.ZodString;
415
+ containerStatus: z.ZodEnum<["pending", "deploying", "running", "stopped", "unhealthy", "error"]>;
416
+ gatewayRunning: z.ZodBoolean;
417
+ gatewayPort: z.ZodNumber;
418
+ uptimeSeconds: z.ZodOptional<z.ZodNumber>;
419
+ lastCheckedAt: z.ZodString;
420
+ workerUrl: z.ZodOptional<z.ZodString>;
421
+ }, "strip", z.ZodTypeAny, {
422
+ agentDid: string;
423
+ containerStatus: "pending" | "deploying" | "running" | "stopped" | "unhealthy" | "error";
424
+ gatewayRunning: boolean;
425
+ gatewayPort: number;
426
+ lastCheckedAt: string;
427
+ uptimeSeconds?: number | undefined;
428
+ workerUrl?: string | undefined;
429
+ }, {
430
+ agentDid: string;
431
+ containerStatus: "pending" | "deploying" | "running" | "stopped" | "unhealthy" | "error";
432
+ gatewayRunning: boolean;
433
+ gatewayPort: number;
434
+ lastCheckedAt: string;
435
+ uptimeSeconds?: number | undefined;
436
+ workerUrl?: string | undefined;
437
+ }>;
438
+ /**
439
+ * SSE progress event schema
440
+ */
441
+ export declare const moltiSSEProgressEventSchema: z.ZodObject<{
442
+ type: z.ZodLiteral<"progress">;
443
+ data: z.ZodObject<{
444
+ deploymentId: z.ZodString;
445
+ steps: z.ZodArray<z.ZodObject<{
446
+ id: z.ZodEnum<["github_verify", "project_create", "api_key_create", "kta_register", "scaffold", "repo_create", "commit_files", "add_secrets", "gateway_route"]>;
447
+ name: z.ZodString;
448
+ status: z.ZodEnum<["pending", "in_progress", "completed", "failed", "skipped"]>;
449
+ message: z.ZodOptional<z.ZodString>;
450
+ startedAt: z.ZodOptional<z.ZodString>;
451
+ completedAt: z.ZodOptional<z.ZodString>;
452
+ }, "strip", z.ZodTypeAny, {
453
+ status: "pending" | "in_progress" | "completed" | "failed" | "skipped";
454
+ id: "github_verify" | "project_create" | "api_key_create" | "kta_register" | "scaffold" | "repo_create" | "commit_files" | "add_secrets" | "gateway_route";
455
+ name: string;
456
+ message?: string | undefined;
457
+ startedAt?: string | undefined;
458
+ completedAt?: string | undefined;
459
+ }, {
460
+ status: "pending" | "in_progress" | "completed" | "failed" | "skipped";
461
+ id: "github_verify" | "project_create" | "api_key_create" | "kta_register" | "scaffold" | "repo_create" | "commit_files" | "add_secrets" | "gateway_route";
462
+ name: string;
463
+ message?: string | undefined;
464
+ startedAt?: string | undefined;
465
+ completedAt?: string | undefined;
466
+ }>, "many">;
467
+ currentStep: z.ZodNumber;
468
+ totalSteps: z.ZodNumber;
469
+ overallStatus: z.ZodEnum<["pending", "in_progress", "completed", "failed"]>;
470
+ }, "strip", z.ZodTypeAny, {
471
+ deploymentId: string;
472
+ steps: {
473
+ status: "pending" | "in_progress" | "completed" | "failed" | "skipped";
474
+ id: "github_verify" | "project_create" | "api_key_create" | "kta_register" | "scaffold" | "repo_create" | "commit_files" | "add_secrets" | "gateway_route";
475
+ name: string;
476
+ message?: string | undefined;
477
+ startedAt?: string | undefined;
478
+ completedAt?: string | undefined;
479
+ }[];
480
+ currentStep: number;
481
+ totalSteps: number;
482
+ overallStatus: "pending" | "in_progress" | "completed" | "failed";
483
+ }, {
484
+ deploymentId: string;
485
+ steps: {
486
+ status: "pending" | "in_progress" | "completed" | "failed" | "skipped";
487
+ id: "github_verify" | "project_create" | "api_key_create" | "kta_register" | "scaffold" | "repo_create" | "commit_files" | "add_secrets" | "gateway_route";
488
+ name: string;
489
+ message?: string | undefined;
490
+ startedAt?: string | undefined;
491
+ completedAt?: string | undefined;
492
+ }[];
493
+ currentStep: number;
494
+ totalSteps: number;
495
+ overallStatus: "pending" | "in_progress" | "completed" | "failed";
496
+ }>;
497
+ }, "strip", z.ZodTypeAny, {
498
+ type: "progress";
499
+ data: {
500
+ deploymentId: string;
501
+ steps: {
502
+ status: "pending" | "in_progress" | "completed" | "failed" | "skipped";
503
+ id: "github_verify" | "project_create" | "api_key_create" | "kta_register" | "scaffold" | "repo_create" | "commit_files" | "add_secrets" | "gateway_route";
504
+ name: string;
505
+ message?: string | undefined;
506
+ startedAt?: string | undefined;
507
+ completedAt?: string | undefined;
508
+ }[];
509
+ currentStep: number;
510
+ totalSteps: number;
511
+ overallStatus: "pending" | "in_progress" | "completed" | "failed";
512
+ };
513
+ }, {
514
+ type: "progress";
515
+ data: {
516
+ deploymentId: string;
517
+ steps: {
518
+ status: "pending" | "in_progress" | "completed" | "failed" | "skipped";
519
+ id: "github_verify" | "project_create" | "api_key_create" | "kta_register" | "scaffold" | "repo_create" | "commit_files" | "add_secrets" | "gateway_route";
520
+ name: string;
521
+ message?: string | undefined;
522
+ startedAt?: string | undefined;
523
+ completedAt?: string | undefined;
524
+ }[];
525
+ currentStep: number;
526
+ totalSteps: number;
527
+ overallStatus: "pending" | "in_progress" | "completed" | "failed";
528
+ };
529
+ }>;
530
+ /**
531
+ * SSE completion event schema
532
+ */
533
+ export declare const moltiSSECompleteEventSchema: z.ZodObject<{
534
+ type: z.ZodLiteral<"complete">;
535
+ data: z.ZodObject<{
536
+ agentDid: z.ZodString;
537
+ repoUrl: z.ZodString;
538
+ repoFullName: z.ZodString;
539
+ projectId: z.ZodString;
540
+ projectFriendlyId: z.ZodString;
541
+ ktaClaimUrl: z.ZodOptional<z.ZodString>;
542
+ deployButtonUrl: z.ZodString;
543
+ gatewayHostname: z.ZodOptional<z.ZodString>;
544
+ }, "strip", z.ZodTypeAny, {
545
+ agentDid: string;
546
+ repoUrl: string;
547
+ repoFullName: string;
548
+ projectId: string;
549
+ projectFriendlyId: string;
550
+ deployButtonUrl: string;
551
+ ktaClaimUrl?: string | undefined;
552
+ gatewayHostname?: string | undefined;
553
+ }, {
554
+ agentDid: string;
555
+ repoUrl: string;
556
+ repoFullName: string;
557
+ projectId: string;
558
+ projectFriendlyId: string;
559
+ deployButtonUrl: string;
560
+ ktaClaimUrl?: string | undefined;
561
+ gatewayHostname?: string | undefined;
562
+ }>;
563
+ }, "strip", z.ZodTypeAny, {
564
+ type: "complete";
565
+ data: {
566
+ agentDid: string;
567
+ repoUrl: string;
568
+ repoFullName: string;
569
+ projectId: string;
570
+ projectFriendlyId: string;
571
+ deployButtonUrl: string;
572
+ ktaClaimUrl?: string | undefined;
573
+ gatewayHostname?: string | undefined;
574
+ };
575
+ }, {
576
+ type: "complete";
577
+ data: {
578
+ agentDid: string;
579
+ repoUrl: string;
580
+ repoFullName: string;
581
+ projectId: string;
582
+ projectFriendlyId: string;
583
+ deployButtonUrl: string;
584
+ ktaClaimUrl?: string | undefined;
585
+ gatewayHostname?: string | undefined;
586
+ };
587
+ }>;
588
+ /**
589
+ * SSE error event schema
590
+ */
591
+ export declare const moltiSSEErrorEventSchema: z.ZodObject<{
592
+ type: z.ZodLiteral<"error">;
593
+ data: z.ZodObject<{
594
+ code: z.ZodEnum<["GITHUB_NOT_CONNECTED", "REPO_NAME_TAKEN", "REPO_NAME_INVALID", "RATE_LIMIT_EXCEEDED", "PLAN_LIMIT_EXCEEDED", "SCAFFOLDER_ERROR", "IDENTITY_ERROR", "PROJECT_CREATION_ERROR", "KTA_REGISTRATION_ERROR", "SECRETS_ERROR", "GATEWAY_ERROR", "GITHUB_API_ERROR", "INTERNAL_ERROR"]>;
595
+ message: z.ZodString;
596
+ step: z.ZodOptional<z.ZodEnum<["github_verify", "project_create", "api_key_create", "kta_register", "scaffold", "repo_create", "commit_files", "add_secrets", "gateway_route"]>>;
597
+ }, "strip", z.ZodTypeAny, {
598
+ code: "GITHUB_NOT_CONNECTED" | "REPO_NAME_TAKEN" | "REPO_NAME_INVALID" | "RATE_LIMIT_EXCEEDED" | "PLAN_LIMIT_EXCEEDED" | "SCAFFOLDER_ERROR" | "IDENTITY_ERROR" | "PROJECT_CREATION_ERROR" | "KTA_REGISTRATION_ERROR" | "SECRETS_ERROR" | "GATEWAY_ERROR" | "GITHUB_API_ERROR" | "INTERNAL_ERROR";
599
+ message: string;
600
+ step?: "github_verify" | "project_create" | "api_key_create" | "kta_register" | "scaffold" | "repo_create" | "commit_files" | "add_secrets" | "gateway_route" | undefined;
601
+ }, {
602
+ code: "GITHUB_NOT_CONNECTED" | "REPO_NAME_TAKEN" | "REPO_NAME_INVALID" | "RATE_LIMIT_EXCEEDED" | "PLAN_LIMIT_EXCEEDED" | "SCAFFOLDER_ERROR" | "IDENTITY_ERROR" | "PROJECT_CREATION_ERROR" | "KTA_REGISTRATION_ERROR" | "SECRETS_ERROR" | "GATEWAY_ERROR" | "GITHUB_API_ERROR" | "INTERNAL_ERROR";
603
+ message: string;
604
+ step?: "github_verify" | "project_create" | "api_key_create" | "kta_register" | "scaffold" | "repo_create" | "commit_files" | "add_secrets" | "gateway_route" | undefined;
605
+ }>;
606
+ }, "strip", z.ZodTypeAny, {
607
+ type: "error";
608
+ data: {
609
+ code: "GITHUB_NOT_CONNECTED" | "REPO_NAME_TAKEN" | "REPO_NAME_INVALID" | "RATE_LIMIT_EXCEEDED" | "PLAN_LIMIT_EXCEEDED" | "SCAFFOLDER_ERROR" | "IDENTITY_ERROR" | "PROJECT_CREATION_ERROR" | "KTA_REGISTRATION_ERROR" | "SECRETS_ERROR" | "GATEWAY_ERROR" | "GITHUB_API_ERROR" | "INTERNAL_ERROR";
610
+ message: string;
611
+ step?: "github_verify" | "project_create" | "api_key_create" | "kta_register" | "scaffold" | "repo_create" | "commit_files" | "add_secrets" | "gateway_route" | undefined;
612
+ };
613
+ }, {
614
+ type: "error";
615
+ data: {
616
+ code: "GITHUB_NOT_CONNECTED" | "REPO_NAME_TAKEN" | "REPO_NAME_INVALID" | "RATE_LIMIT_EXCEEDED" | "PLAN_LIMIT_EXCEEDED" | "SCAFFOLDER_ERROR" | "IDENTITY_ERROR" | "PROJECT_CREATION_ERROR" | "KTA_REGISTRATION_ERROR" | "SECRETS_ERROR" | "GATEWAY_ERROR" | "GITHUB_API_ERROR" | "INTERNAL_ERROR";
617
+ message: string;
618
+ step?: "github_verify" | "project_create" | "api_key_create" | "kta_register" | "scaffold" | "repo_create" | "commit_files" | "add_secrets" | "gateway_route" | undefined;
619
+ };
620
+ }>;
621
+ /**
622
+ * SSE keepalive event schema
623
+ */
624
+ export declare const moltiSSEKeepaliveEventSchema: z.ZodObject<{
625
+ type: z.ZodLiteral<"keepalive">;
626
+ data: z.ZodObject<{
627
+ timestamp: z.ZodString;
628
+ }, "strip", z.ZodTypeAny, {
629
+ timestamp: string;
630
+ }, {
631
+ timestamp: string;
632
+ }>;
633
+ }, "strip", z.ZodTypeAny, {
634
+ type: "keepalive";
635
+ data: {
636
+ timestamp: string;
637
+ };
638
+ }, {
639
+ type: "keepalive";
640
+ data: {
641
+ timestamp: string;
642
+ };
643
+ }>;
644
+ /**
645
+ * Union of all SSE event schemas
646
+ */
647
+ export declare const moltiSSEEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
648
+ type: z.ZodLiteral<"progress">;
649
+ data: z.ZodObject<{
650
+ deploymentId: z.ZodString;
651
+ steps: z.ZodArray<z.ZodObject<{
652
+ id: z.ZodEnum<["github_verify", "project_create", "api_key_create", "kta_register", "scaffold", "repo_create", "commit_files", "add_secrets", "gateway_route"]>;
653
+ name: z.ZodString;
654
+ status: z.ZodEnum<["pending", "in_progress", "completed", "failed", "skipped"]>;
655
+ message: z.ZodOptional<z.ZodString>;
656
+ startedAt: z.ZodOptional<z.ZodString>;
657
+ completedAt: z.ZodOptional<z.ZodString>;
658
+ }, "strip", z.ZodTypeAny, {
659
+ status: "pending" | "in_progress" | "completed" | "failed" | "skipped";
660
+ id: "github_verify" | "project_create" | "api_key_create" | "kta_register" | "scaffold" | "repo_create" | "commit_files" | "add_secrets" | "gateway_route";
661
+ name: string;
662
+ message?: string | undefined;
663
+ startedAt?: string | undefined;
664
+ completedAt?: string | undefined;
665
+ }, {
666
+ status: "pending" | "in_progress" | "completed" | "failed" | "skipped";
667
+ id: "github_verify" | "project_create" | "api_key_create" | "kta_register" | "scaffold" | "repo_create" | "commit_files" | "add_secrets" | "gateway_route";
668
+ name: string;
669
+ message?: string | undefined;
670
+ startedAt?: string | undefined;
671
+ completedAt?: string | undefined;
672
+ }>, "many">;
673
+ currentStep: z.ZodNumber;
674
+ totalSteps: z.ZodNumber;
675
+ overallStatus: z.ZodEnum<["pending", "in_progress", "completed", "failed"]>;
676
+ }, "strip", z.ZodTypeAny, {
677
+ deploymentId: string;
678
+ steps: {
679
+ status: "pending" | "in_progress" | "completed" | "failed" | "skipped";
680
+ id: "github_verify" | "project_create" | "api_key_create" | "kta_register" | "scaffold" | "repo_create" | "commit_files" | "add_secrets" | "gateway_route";
681
+ name: string;
682
+ message?: string | undefined;
683
+ startedAt?: string | undefined;
684
+ completedAt?: string | undefined;
685
+ }[];
686
+ currentStep: number;
687
+ totalSteps: number;
688
+ overallStatus: "pending" | "in_progress" | "completed" | "failed";
689
+ }, {
690
+ deploymentId: string;
691
+ steps: {
692
+ status: "pending" | "in_progress" | "completed" | "failed" | "skipped";
693
+ id: "github_verify" | "project_create" | "api_key_create" | "kta_register" | "scaffold" | "repo_create" | "commit_files" | "add_secrets" | "gateway_route";
694
+ name: string;
695
+ message?: string | undefined;
696
+ startedAt?: string | undefined;
697
+ completedAt?: string | undefined;
698
+ }[];
699
+ currentStep: number;
700
+ totalSteps: number;
701
+ overallStatus: "pending" | "in_progress" | "completed" | "failed";
702
+ }>;
703
+ }, "strip", z.ZodTypeAny, {
704
+ type: "progress";
705
+ data: {
706
+ deploymentId: string;
707
+ steps: {
708
+ status: "pending" | "in_progress" | "completed" | "failed" | "skipped";
709
+ id: "github_verify" | "project_create" | "api_key_create" | "kta_register" | "scaffold" | "repo_create" | "commit_files" | "add_secrets" | "gateway_route";
710
+ name: string;
711
+ message?: string | undefined;
712
+ startedAt?: string | undefined;
713
+ completedAt?: string | undefined;
714
+ }[];
715
+ currentStep: number;
716
+ totalSteps: number;
717
+ overallStatus: "pending" | "in_progress" | "completed" | "failed";
718
+ };
719
+ }, {
720
+ type: "progress";
721
+ data: {
722
+ deploymentId: string;
723
+ steps: {
724
+ status: "pending" | "in_progress" | "completed" | "failed" | "skipped";
725
+ id: "github_verify" | "project_create" | "api_key_create" | "kta_register" | "scaffold" | "repo_create" | "commit_files" | "add_secrets" | "gateway_route";
726
+ name: string;
727
+ message?: string | undefined;
728
+ startedAt?: string | undefined;
729
+ completedAt?: string | undefined;
730
+ }[];
731
+ currentStep: number;
732
+ totalSteps: number;
733
+ overallStatus: "pending" | "in_progress" | "completed" | "failed";
734
+ };
735
+ }>, z.ZodObject<{
736
+ type: z.ZodLiteral<"complete">;
737
+ data: z.ZodObject<{
738
+ agentDid: z.ZodString;
739
+ repoUrl: z.ZodString;
740
+ repoFullName: z.ZodString;
741
+ projectId: z.ZodString;
742
+ projectFriendlyId: z.ZodString;
743
+ ktaClaimUrl: z.ZodOptional<z.ZodString>;
744
+ deployButtonUrl: z.ZodString;
745
+ gatewayHostname: z.ZodOptional<z.ZodString>;
746
+ }, "strip", z.ZodTypeAny, {
747
+ agentDid: string;
748
+ repoUrl: string;
749
+ repoFullName: string;
750
+ projectId: string;
751
+ projectFriendlyId: string;
752
+ deployButtonUrl: string;
753
+ ktaClaimUrl?: string | undefined;
754
+ gatewayHostname?: string | undefined;
755
+ }, {
756
+ agentDid: string;
757
+ repoUrl: string;
758
+ repoFullName: string;
759
+ projectId: string;
760
+ projectFriendlyId: string;
761
+ deployButtonUrl: string;
762
+ ktaClaimUrl?: string | undefined;
763
+ gatewayHostname?: string | undefined;
764
+ }>;
765
+ }, "strip", z.ZodTypeAny, {
766
+ type: "complete";
767
+ data: {
768
+ agentDid: string;
769
+ repoUrl: string;
770
+ repoFullName: string;
771
+ projectId: string;
772
+ projectFriendlyId: string;
773
+ deployButtonUrl: string;
774
+ ktaClaimUrl?: string | undefined;
775
+ gatewayHostname?: string | undefined;
776
+ };
777
+ }, {
778
+ type: "complete";
779
+ data: {
780
+ agentDid: string;
781
+ repoUrl: string;
782
+ repoFullName: string;
783
+ projectId: string;
784
+ projectFriendlyId: string;
785
+ deployButtonUrl: string;
786
+ ktaClaimUrl?: string | undefined;
787
+ gatewayHostname?: string | undefined;
788
+ };
789
+ }>, z.ZodObject<{
790
+ type: z.ZodLiteral<"error">;
791
+ data: z.ZodObject<{
792
+ code: z.ZodEnum<["GITHUB_NOT_CONNECTED", "REPO_NAME_TAKEN", "REPO_NAME_INVALID", "RATE_LIMIT_EXCEEDED", "PLAN_LIMIT_EXCEEDED", "SCAFFOLDER_ERROR", "IDENTITY_ERROR", "PROJECT_CREATION_ERROR", "KTA_REGISTRATION_ERROR", "SECRETS_ERROR", "GATEWAY_ERROR", "GITHUB_API_ERROR", "INTERNAL_ERROR"]>;
793
+ message: z.ZodString;
794
+ step: z.ZodOptional<z.ZodEnum<["github_verify", "project_create", "api_key_create", "kta_register", "scaffold", "repo_create", "commit_files", "add_secrets", "gateway_route"]>>;
795
+ }, "strip", z.ZodTypeAny, {
796
+ code: "GITHUB_NOT_CONNECTED" | "REPO_NAME_TAKEN" | "REPO_NAME_INVALID" | "RATE_LIMIT_EXCEEDED" | "PLAN_LIMIT_EXCEEDED" | "SCAFFOLDER_ERROR" | "IDENTITY_ERROR" | "PROJECT_CREATION_ERROR" | "KTA_REGISTRATION_ERROR" | "SECRETS_ERROR" | "GATEWAY_ERROR" | "GITHUB_API_ERROR" | "INTERNAL_ERROR";
797
+ message: string;
798
+ step?: "github_verify" | "project_create" | "api_key_create" | "kta_register" | "scaffold" | "repo_create" | "commit_files" | "add_secrets" | "gateway_route" | undefined;
799
+ }, {
800
+ code: "GITHUB_NOT_CONNECTED" | "REPO_NAME_TAKEN" | "REPO_NAME_INVALID" | "RATE_LIMIT_EXCEEDED" | "PLAN_LIMIT_EXCEEDED" | "SCAFFOLDER_ERROR" | "IDENTITY_ERROR" | "PROJECT_CREATION_ERROR" | "KTA_REGISTRATION_ERROR" | "SECRETS_ERROR" | "GATEWAY_ERROR" | "GITHUB_API_ERROR" | "INTERNAL_ERROR";
801
+ message: string;
802
+ step?: "github_verify" | "project_create" | "api_key_create" | "kta_register" | "scaffold" | "repo_create" | "commit_files" | "add_secrets" | "gateway_route" | undefined;
803
+ }>;
804
+ }, "strip", z.ZodTypeAny, {
805
+ type: "error";
806
+ data: {
807
+ code: "GITHUB_NOT_CONNECTED" | "REPO_NAME_TAKEN" | "REPO_NAME_INVALID" | "RATE_LIMIT_EXCEEDED" | "PLAN_LIMIT_EXCEEDED" | "SCAFFOLDER_ERROR" | "IDENTITY_ERROR" | "PROJECT_CREATION_ERROR" | "KTA_REGISTRATION_ERROR" | "SECRETS_ERROR" | "GATEWAY_ERROR" | "GITHUB_API_ERROR" | "INTERNAL_ERROR";
808
+ message: string;
809
+ step?: "github_verify" | "project_create" | "api_key_create" | "kta_register" | "scaffold" | "repo_create" | "commit_files" | "add_secrets" | "gateway_route" | undefined;
810
+ };
811
+ }, {
812
+ type: "error";
813
+ data: {
814
+ code: "GITHUB_NOT_CONNECTED" | "REPO_NAME_TAKEN" | "REPO_NAME_INVALID" | "RATE_LIMIT_EXCEEDED" | "PLAN_LIMIT_EXCEEDED" | "SCAFFOLDER_ERROR" | "IDENTITY_ERROR" | "PROJECT_CREATION_ERROR" | "KTA_REGISTRATION_ERROR" | "SECRETS_ERROR" | "GATEWAY_ERROR" | "GITHUB_API_ERROR" | "INTERNAL_ERROR";
815
+ message: string;
816
+ step?: "github_verify" | "project_create" | "api_key_create" | "kta_register" | "scaffold" | "repo_create" | "commit_files" | "add_secrets" | "gateway_route" | undefined;
817
+ };
818
+ }>, z.ZodObject<{
819
+ type: z.ZodLiteral<"keepalive">;
820
+ data: z.ZodObject<{
821
+ timestamp: z.ZodString;
822
+ }, "strip", z.ZodTypeAny, {
823
+ timestamp: string;
824
+ }, {
825
+ timestamp: string;
826
+ }>;
827
+ }, "strip", z.ZodTypeAny, {
828
+ type: "keepalive";
829
+ data: {
830
+ timestamp: string;
831
+ };
832
+ }, {
833
+ type: "keepalive";
834
+ data: {
835
+ timestamp: string;
836
+ };
837
+ }>]>;