@renai-labs/sdk 0.1.19 → 0.1.20

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.
@@ -76,49 +76,165 @@ export const zReplayPublicView = z.object({
76
76
  session: zReplayPublicSession,
77
77
  messages: z.array(zReplayMessage),
78
78
  });
79
- export const zBlueprintReplayRef = z.object({
80
- replayId: z.string(),
79
+ export const zPublisherLink = z.object({
80
+ label: z.string().min(1),
81
+ href: z.url(),
81
82
  });
82
- export const zBlueprintMcpRef = z.object({
83
- mcpId: z.string(),
83
+ export const zPublisherPublicView = z.object({
84
+ id: z.string(),
85
+ slug: z.string(),
86
+ handle: z.string(),
87
+ name: z.string(),
88
+ description: z.string().nullable(),
89
+ avatar: z.string().nullable(),
90
+ url: z.string().nullable(),
91
+ isVerified: z.boolean(),
92
+ links: z.array(zPublisherLink),
84
93
  });
85
- export const zBlueprintSkillRef = z.object({
86
- skillId: z.string(),
87
- versionId: z.string().nullable(),
94
+ export const zSpecPublicTriggerEntry = z.object({
95
+ slug: z.string().regex(/^[a-z0-9][a-z0-9-]*$/),
96
+ ref: z
97
+ .object({
98
+ id: z.string().regex(/^[a-z]+_[A-Za-z0-9]+$/),
99
+ })
100
+ .optional(),
101
+ project: z.string().regex(/^[a-z0-9][a-z0-9-]*$/),
102
+ agent: z
103
+ .string()
104
+ .regex(/^[a-z0-9][a-z0-9-]*$/)
105
+ .optional(),
106
+ schedule: z.string(),
107
+ timezone: z.string().optional(),
108
+ until: z.iso
109
+ .datetime()
110
+ .regex(/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$/)
111
+ .optional(),
112
+ inputMessage: z.string(),
113
+ enabled: z.boolean().optional(),
88
114
  });
89
- export const zBlueprintAgentRef = z.object({
90
- agentId: z.string(),
91
- versionId: z.string().nullable(),
115
+ export const zSpecChannelBinding = z.object({
116
+ slug: z.string().regex(/^[a-z0-9][a-z0-9-]*$/),
117
+ kind: z.enum(["slack", "linear", "github", "telegram", "email"]),
118
+ purpose: z.string(),
119
+ agent: z
120
+ .string()
121
+ .regex(/^[a-z0-9][a-z0-9-]*$/)
122
+ .optional(),
92
123
  });
93
- export const zBlueprintProjectEntry = z.object({
94
- name: z.string(),
95
- description: z.string().nullable(),
96
- permission: zPermissionConfig,
97
- parentId: z.string().nullish().default(null),
98
- agents: z.array(z.object({
99
- agentId: z.string(),
100
- type: z.enum(["primary", "subagent", "all"]),
101
- })),
102
- cronTriggers: z.array(z.object({
103
- inputMessage: z.string(),
104
- schedule: z.string(),
105
- timezone: z.string().nullable(),
106
- cronTriggerId: z.string(),
107
- agentId: z.string().nullable(),
108
- until: z.iso
109
- .datetime()
110
- .regex(/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$/)
111
- .nullish()
112
- .default(null),
113
- })),
124
+ export const zSpecProjectAgent = z.object({
125
+ slug: z.string().regex(/^[a-z0-9][a-z0-9-]*$/),
126
+ mode: z.enum(["subagent", "all"]).optional().default("all"),
127
+ });
128
+ export const zProjectReference = z.union([
129
+ z.string(),
130
+ z.object({
131
+ repository: z.string(),
132
+ branch: z.string().optional(),
133
+ description: z.string().optional(),
134
+ hidden: z.boolean().optional(),
135
+ }),
136
+ z.object({
137
+ path: z.string(),
138
+ description: z.string().optional(),
139
+ hidden: z.boolean().optional(),
140
+ }),
141
+ ]);
142
+ export const zProjectReferences = z.record(z.string(), zProjectReference);
143
+ export const zSpecRef = z.object({
144
+ id: z.string().regex(/^[a-z]+_[A-Za-z0-9]+$/),
145
+ versionId: z
146
+ .string()
147
+ .regex(/^[a-z]+_[A-Za-z0-9]+$/)
148
+ .optional(),
149
+ });
150
+ export const zSpecPublicProjectEntry = z.object({
151
+ slug: z.string().regex(/^[a-z0-9][a-z0-9-]*$/),
152
+ ref: zSpecRef.optional(),
153
+ name: z.string().optional(),
154
+ description: z.string().optional(),
155
+ instructions: z.string().optional(),
156
+ references: zProjectReferences.optional(),
157
+ agents: z.array(zSpecProjectAgent).optional(),
158
+ skills: z.array(z.string().regex(/^[a-z0-9][a-z0-9-]*$/)).optional(),
159
+ mcps: z.array(z.string().regex(/^[a-z0-9][a-z0-9-]*$/)).optional(),
160
+ channels: z.array(zSpecChannelBinding).optional(),
161
+ });
162
+ export const zSpecPublicMcpEntry = z.object({
163
+ slug: z.string().regex(/^[a-z0-9][a-z0-9-]*$/),
164
+ ref: zSpecRef.optional(),
165
+ name: z.string().optional(),
166
+ registrySlug: z.string().optional(),
167
+ auth: z.enum(["oauth", "basic", "api_key", "none", "mcp_provider"]).optional(),
168
+ });
169
+ export const zSpecPublicSkillEntry = z.object({
170
+ slug: z.string().regex(/^[a-z0-9][a-z0-9-]*$/),
171
+ ref: zSpecRef.optional(),
172
+ name: z.string().optional(),
173
+ registrySlug: z.string().optional(),
174
+ });
175
+ export const zSpecPublicAgentEntry = z.object({
176
+ slug: z.string().regex(/^[a-z0-9][a-z0-9-]*$/),
177
+ ref: zSpecRef.optional(),
178
+ name: z.string().optional(),
179
+ model: z.string().optional(),
180
+ scope: z.enum(["org", "user", "registry"]).optional(),
181
+ skills: z.array(z.string().regex(/^[a-z0-9][a-z0-9-]*$/)).optional(),
182
+ mcps: z.array(z.string().regex(/^[a-z0-9][a-z0-9-]*$/)).optional(),
183
+ });
184
+ export const zSpecInitialPrompt = z.object({
185
+ prompt: z.string(),
186
+ project: z
187
+ .string()
188
+ .regex(/^[a-z0-9][a-z0-9-]*$/)
189
+ .optional(),
190
+ agent: z
191
+ .string()
192
+ .regex(/^[a-z0-9][a-z0-9-]*$/)
193
+ .optional(),
194
+ });
195
+ export const zSpecPublic = z.object({
196
+ schemaVersion: z.literal(2),
197
+ meta: z.object({
198
+ name: z.string(),
199
+ description: z.string().optional(),
200
+ snapshotDate: z.string().optional(),
201
+ }),
202
+ instructions: z.string().optional(),
203
+ initialPrompt: zSpecInitialPrompt.optional(),
204
+ agents: z.array(zSpecPublicAgentEntry),
205
+ skills: z.array(zSpecPublicSkillEntry),
206
+ mcps: z.array(zSpecPublicMcpEntry),
207
+ projects: z.array(zSpecPublicProjectEntry),
208
+ triggers: z.array(zSpecPublicTriggerEntry),
209
+ environment: z
210
+ .object({
211
+ ref: z
212
+ .object({
213
+ id: z.string().regex(/^[a-z]+_[A-Za-z0-9]+$/),
214
+ })
215
+ .optional(),
216
+ })
217
+ .optional(),
114
218
  });
115
- export const zBlueprintTemplate = z.object({
116
- schemaVersion: z.literal(1),
117
- projects: z.array(zBlueprintProjectEntry),
118
- agents: z.array(zBlueprintAgentRef),
119
- skills: z.array(zBlueprintSkillRef),
120
- mcps: z.array(zBlueprintMcpRef),
121
- replays: z.array(zBlueprintReplayRef),
219
+ export const zBlueprintOutcome = z.object({
220
+ title: z.string().min(1),
221
+ description: z.string().min(1),
222
+ });
223
+ export const zBlueprintHowItWorksStep = z.object({
224
+ title: z.string().min(1),
225
+ description: z.string().min(1),
226
+ });
227
+ export const zBlueprintPageContent = z.object({
228
+ overview: z.string().optional(),
229
+ howItWorks: z.array(zBlueprintHowItWorksStep).optional().default([]),
230
+ useCases: z.array(z.string().min(1)).optional().default([]),
231
+ requirements: z.array(z.string().min(1)).optional().default([]),
232
+ setup: z.array(z.string().min(1)).optional().default([]),
233
+ outcomes: z.array(zBlueprintOutcome).optional().default([]),
234
+ relatedBlueprintSlugs: z
235
+ .array(z.string().regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/))
236
+ .optional()
237
+ .default([]),
122
238
  });
123
239
  export const zBlueprintPublicView = z.object({
124
240
  id: z.string(),
@@ -126,8 +242,10 @@ export const zBlueprintPublicView = z.object({
126
242
  name: z.string(),
127
243
  description: z.string().nullable(),
128
244
  websiteMetadata: zWebsiteMetadata.nullable(),
245
+ pageContent: zBlueprintPageContent.nullable(),
129
246
  publisherId: z.string(),
130
- template: zBlueprintTemplate,
247
+ template: zSpecPublic,
248
+ replays: z.array(z.string()),
131
249
  });
132
250
  export const zRequiredCredential = z.object({
133
251
  name: z
@@ -178,110 +296,121 @@ export const zOAuthStartResult = z.object({
178
296
  sessionId: z.string(),
179
297
  state: z.string(),
180
298
  });
181
- export const zCredentialAuth = z.union([
299
+ export const zCredentialTransferInput = z.object({
300
+ targetVaultId: z.string().regex(/^vlt_[0-9A-HJKMNP-TV-Z]{26}$/),
301
+ mode: z.enum(["copy", "move"]).optional().default("copy"),
302
+ conflict: z.enum(["fail", "replace"]).optional().default("fail"),
303
+ });
304
+ export const zCredentialAuthPublic = z.union([
182
305
  z.object({
183
306
  type: z.literal("bearer"),
184
- token: z.string(),
185
307
  }),
186
308
  z.object({
187
309
  type: z.literal("oauth"),
188
- accessToken: z.string(),
189
310
  expiresAt: z.string().nullish(),
190
311
  refresh: z
191
312
  .object({
192
313
  clientId: z.string(),
193
- refreshToken: z.string(),
194
- clientSecret: z.string().optional(),
195
314
  tokenEndpoint: z.string().optional(),
196
315
  tokenEndpointAuth: z.enum(["none", "client_secret_basic", "client_secret_post"]).optional(),
197
316
  scope: z.string().optional(),
198
317
  resource: z.string().optional(),
199
318
  })
200
319
  .nullish(),
201
- profile: z
202
- .union([
203
- z.object({
204
- service: z.literal("github"),
205
- id: z.number(),
206
- login: z.string(),
207
- name: z.string().nullable(),
208
- }),
209
- z.object({
210
- service: z.literal("google_workspace"),
211
- sub: z.string(),
212
- email: z.string(),
213
- name: z.string().nullable(),
214
- hd: z.string().nullable(),
215
- }),
216
- ])
217
- .nullish(),
218
320
  }),
219
321
  z.object({
220
322
  type: z.literal("env"),
221
- value: z.string(),
222
323
  }),
223
324
  z.object({
224
325
  type: z.literal("basic"),
225
326
  username: z.string(),
226
- password: z.string(),
227
327
  }),
228
328
  z.object({
229
329
  type: z.literal("mcp_provider"),
230
330
  provider: z.enum(["composio"]),
231
331
  userId: z.string(),
232
- url: z.url(),
233
332
  }),
234
333
  ]);
235
- export const zCredentialAuthPublic = z.union([
334
+ export const zCredential = z.object({
335
+ id: z.string(),
336
+ vaultId: z.string(),
337
+ name: z.string(),
338
+ mcpId: z.string().nullable(),
339
+ provider: z.enum(["github", "google_workspace"]).nullable(),
340
+ label: z.string().nullable(),
341
+ keyPreview: z.string().nullable(),
342
+ auth: zCredentialAuthPublic,
343
+ createdAt: z.iso
344
+ .datetime()
345
+ .regex(/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$/),
346
+ updatedAt: z.iso
347
+ .datetime()
348
+ .regex(/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$/),
349
+ archivedAt: z.iso
350
+ .datetime()
351
+ .regex(/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$/)
352
+ .nullable(),
353
+ });
354
+ export const zCredentialTransferResult = z.object({
355
+ target: zCredential,
356
+ sourceCredentialId: z.string(),
357
+ sourceArchived: z.boolean(),
358
+ replacedCredentialId: z.string().nullable(),
359
+ });
360
+ export const zCredentialAuth = z.union([
236
361
  z.object({
237
362
  type: z.literal("bearer"),
363
+ token: z.string(),
238
364
  }),
239
365
  z.object({
240
366
  type: z.literal("oauth"),
367
+ accessToken: z.string(),
241
368
  expiresAt: z.string().nullish(),
242
369
  refresh: z
243
370
  .object({
244
371
  clientId: z.string(),
372
+ refreshToken: z.string(),
373
+ clientSecret: z.string().optional(),
245
374
  tokenEndpoint: z.string().optional(),
246
375
  tokenEndpointAuth: z.enum(["none", "client_secret_basic", "client_secret_post"]).optional(),
247
376
  scope: z.string().optional(),
248
377
  resource: z.string().optional(),
249
378
  })
250
379
  .nullish(),
380
+ profile: z
381
+ .union([
382
+ z.object({
383
+ service: z.literal("github"),
384
+ id: z.number(),
385
+ login: z.string(),
386
+ name: z.string().nullable(),
387
+ }),
388
+ z.object({
389
+ service: z.literal("google_workspace"),
390
+ sub: z.string(),
391
+ email: z.string(),
392
+ name: z.string().nullable(),
393
+ hd: z.string().nullable(),
394
+ }),
395
+ ])
396
+ .nullish(),
251
397
  }),
252
398
  z.object({
253
399
  type: z.literal("env"),
400
+ value: z.string(),
254
401
  }),
255
402
  z.object({
256
403
  type: z.literal("basic"),
257
404
  username: z.string(),
405
+ password: z.string(),
258
406
  }),
259
407
  z.object({
260
408
  type: z.literal("mcp_provider"),
261
409
  provider: z.enum(["composio"]),
262
410
  userId: z.string(),
411
+ url: z.url(),
263
412
  }),
264
413
  ]);
265
- export const zCredential = z.object({
266
- id: z.string(),
267
- vaultId: z.string(),
268
- name: z.string(),
269
- mcpId: z.string().nullable(),
270
- provider: z.enum(["github", "google_workspace"]).nullable(),
271
- label: z.string().nullable(),
272
- keyPreview: z.string().nullable(),
273
- auth: zCredentialAuthPublic,
274
- createdAt: z.iso
275
- .datetime()
276
- .regex(/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$/),
277
- updatedAt: z.iso
278
- .datetime()
279
- .regex(/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$/),
280
- archivedAt: z.iso
281
- .datetime()
282
- .regex(/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$/)
283
- .nullable(),
284
- });
285
414
  export const zVault = z.object({
286
415
  id: z.string(),
287
416
  name: z.string(),
@@ -305,6 +434,7 @@ export const zLinearMapping = z.object({
305
434
  renProjectId: z.string(),
306
435
  renProjectName: z.string().nullable(),
307
436
  linearProjectId: z.string().nullable(),
437
+ linearProjectName: z.string().nullable(),
308
438
  senderUserId: z.string(),
309
439
  projectAgentId: z.string().nullable(),
310
440
  isEnabled: z.boolean(),
@@ -416,6 +546,7 @@ export const zProjectEmailResponse = z.object({
416
546
  export const zSlackChannel = z.object({
417
547
  id: z.string(),
418
548
  name: z.string(),
549
+ isPrivate: z.boolean(),
419
550
  projectId: z.string().nullable(),
420
551
  fallbackSenderUserId: z.string().nullable(),
421
552
  projectName: z.string().nullable(),
@@ -443,6 +574,10 @@ export const zSlackStatus = z.object({
443
574
  hasInstallation: z.boolean(),
444
575
  installations: z.array(zSlackInstallationResponse),
445
576
  });
577
+ export const zSlackOnboardingResolveResult = z.object({
578
+ status: z.enum(["installed", "install_required", "conflict", "no_identity"]),
579
+ url: z.url().optional(),
580
+ });
446
581
  export const zSlackOAuthStartResult = z.object({
447
582
  url: z.url(),
448
583
  });
@@ -457,6 +592,7 @@ export const zWebhookTrigger = z.object({
457
592
  .object({
458
593
  channelId: z.string().optional(),
459
594
  linearProjectId: z.string().optional(),
595
+ linearProjectName: z.string().optional(),
460
596
  })
461
597
  .nullable(),
462
598
  secretHash: z.string().nullable(),
@@ -523,50 +659,27 @@ export const zTopologyShare = z.object({
523
659
  export const zTopology = z.object({
524
660
  meta: z.object({
525
661
  org: z.string(),
526
- orgId: z.string().regex(/^[a-z]+_[A-Za-z0-9]+$/),
527
- ownerUserId: z
528
- .string()
529
- .regex(/^[a-z]+_[A-Za-z0-9]+$/)
530
- .optional(),
531
- specVersion: z.string().optional(),
532
- snapshotDate: z.string().optional(),
533
- notes: z.string().optional(),
534
662
  }),
535
663
  agents: z.array(z.object({
536
664
  id: z.string().regex(/^[a-z]+_[A-Za-z0-9]+$/),
537
665
  slug: z.string().regex(/^[a-z0-9][a-z0-9-]*$/),
538
666
  name: z.string(),
539
667
  model: z.string().optional(),
540
- scope: z.enum(["org", "user", "registry"]).optional(),
541
668
  icon: z.string().optional(),
542
- promptRef: z.string().optional(),
543
669
  skills: z.array(z.string().regex(/^[a-z0-9][a-z0-9-]*$/)).optional(),
544
670
  mcps: z.array(z.string().regex(/^[a-z0-9][a-z0-9-]*$/)).optional(),
545
- notes: z.string().optional(),
546
671
  })),
547
672
  mcps: z
548
673
  .array(z.object({
549
674
  id: z.string().regex(/^[a-z]+_[A-Za-z0-9]+$/),
550
675
  slug: z.string().regex(/^[a-z0-9][a-z0-9-]*$/),
551
676
  name: z.string(),
552
- registrySlug: z.string().optional(),
553
- remoteUrl: z.url().optional(),
554
- auth: z.enum(["oauth", "basic", "api_key", "none", "mcp_provider"]).optional(),
555
677
  credential: z
556
678
  .string()
557
679
  .regex(/^[a-z0-9][a-z0-9-]*$/)
558
680
  .optional(),
559
681
  icon: z.string().optional(),
560
682
  tags: z.array(z.string()).optional(),
561
- notes: z.string().optional(),
562
- }))
563
- .optional(),
564
- skills: z
565
- .array(z.object({
566
- id: z.string().regex(/^[a-z]+_[A-Za-z0-9]+$/),
567
- slug: z.string().regex(/^[a-z0-9][a-z0-9-]*$/),
568
- source: z.enum(["registry", "org", "user"]).optional(),
569
- notes: z.string().optional(),
570
683
  }))
571
684
  .optional(),
572
685
  credentials: z
@@ -574,9 +687,7 @@ export const zTopology = z.object({
574
687
  id: z.string().regex(/^[a-z]+_[A-Za-z0-9]+$/),
575
688
  slug: z.string().regex(/^[a-z0-9][a-z0-9-]*$/),
576
689
  provider: z.string(),
577
- authType: z.enum(["oauth", "basic", "api_key", "env", "mcp_provider"]).optional(),
578
690
  vault: z.string().regex(/^[a-z0-9][a-z0-9-]*$/),
579
- notes: z.string().optional(),
580
691
  }))
581
692
  .optional(),
582
693
  vaults: z
@@ -584,9 +695,7 @@ export const zTopology = z.object({
584
695
  id: z.string().regex(/^[a-z]+_[A-Za-z0-9]+$/),
585
696
  slug: z.string().regex(/^[a-z0-9][a-z0-9-]*$/),
586
697
  name: z.string(),
587
- scope: z.enum(["org", "user", "registry"]),
588
698
  attachedPods: z.array(z.string().regex(/^[a-z0-9][a-z0-9-]*$/)).optional(),
589
- notes: z.string().optional(),
590
699
  }))
591
700
  .optional(),
592
701
  fileStores: z
@@ -594,8 +703,6 @@ export const zTopology = z.object({
594
703
  id: z.string().regex(/^[a-z]+_[A-Za-z0-9]+$/),
595
704
  slug: z.string().regex(/^[a-z0-9][a-z0-9-]*$/),
596
705
  name: z.string(),
597
- scope: z.enum(["org", "user", "registry"]),
598
- notes: z.string().optional(),
599
706
  }))
600
707
  .optional(),
601
708
  memoryStores: z
@@ -603,8 +710,6 @@ export const zTopology = z.object({
603
710
  id: z.string().regex(/^[a-z]+_[A-Za-z0-9]+$/),
604
711
  slug: z.string().regex(/^[a-z0-9][a-z0-9-]*$/),
605
712
  name: z.string(),
606
- scope: z.enum(["org", "user", "registry"]),
607
- notes: z.string().optional(),
608
713
  }))
609
714
  .optional(),
610
715
  pods: z.array(z.object({
@@ -612,87 +717,26 @@ export const zTopology = z.object({
612
717
  slug: z.string().regex(/^[a-z0-9][a-z0-9-]*$/),
613
718
  name: z.string(),
614
719
  scope: z.enum(["org", "user", "registry"]).optional(),
615
- vaults: z.array(z.string().regex(/^[a-z0-9][a-z0-9-]*$/)).optional(),
616
- notes: z.string().optional(),
617
720
  })),
618
721
  projects: z.array(z.object({
619
722
  id: z.string().regex(/^[a-z]+_[A-Za-z0-9]+$/),
620
723
  slug: z.string().regex(/^[a-z0-9][a-z0-9-]*$/),
621
724
  name: z.string(),
622
725
  pod: z.string().regex(/^[a-z0-9][a-z0-9-]*$/),
623
- buildOrder: z.int().gte(1).lte(9007199254740991).optional(),
624
- slackChannel: z.string().optional(),
625
- primaryAgent: z
626
- .string()
627
- .regex(/^[a-z0-9][a-z0-9-]*$/)
628
- .optional(),
629
- subAgents: z.array(z.string().regex(/^[a-z0-9][a-z0-9-]*$/)).optional(),
630
- fileStores: z.array(z.string().regex(/^[a-z0-9][a-z0-9-]*$/)).optional(),
631
- memoryStores: z.array(z.string().regex(/^[a-z0-9][a-z0-9-]*$/)).optional(),
632
- restricted: z.boolean().optional(),
633
- requirements: z
726
+ agents: z
634
727
  .array(z.object({
635
- id: z.string().regex(/^[a-z0-9][a-z0-9-]*$/),
636
- kind: z.enum([
637
- "agent_attached",
638
- "skill_attached",
639
- "mcp_wired",
640
- "credential_present",
641
- "trigger_configured",
642
- "slack_mapped",
643
- "file_store_attached",
644
- "memory_store_attached",
645
- "vault_attached",
646
- "capability",
647
- "other",
648
- ]),
649
- must: z.string(),
650
- agent: z
651
- .string()
652
- .regex(/^[a-z0-9][a-z0-9-]*$/)
653
- .optional(),
654
- mcp: z
655
- .string()
656
- .regex(/^[a-z0-9][a-z0-9-]*$/)
657
- .optional(),
658
- skill: z
659
- .string()
660
- .regex(/^[a-z0-9][a-z0-9-]*$/)
661
- .optional(),
662
- credential: z
663
- .string()
664
- .regex(/^[a-z0-9][a-z0-9-]*$/)
665
- .optional(),
666
- trigger: z
667
- .string()
668
- .regex(/^[a-z0-9][a-z0-9-]*$/)
669
- .optional(),
670
- vault: z
671
- .string()
672
- .regex(/^[a-z0-9][a-z0-9-]*$/)
673
- .optional(),
674
- store: z
675
- .string()
676
- .regex(/^[a-z0-9][a-z0-9-]*$/)
677
- .optional(),
678
- channel: z.string().optional(),
679
- blocking: z.boolean().optional(),
680
- reason: z.string().optional(),
681
- verify: z.string().optional(),
682
- blockedBy: z.string().optional(),
728
+ slug: z.string().regex(/^[a-z0-9][a-z0-9-]*$/),
729
+ mode: z.enum(["subagent", "all"]),
683
730
  }))
684
731
  .optional(),
685
- notes: z.string().optional(),
732
+ fileStores: z.array(z.string().regex(/^[a-z0-9][a-z0-9-]*$/)).optional(),
733
+ memoryStores: z.array(z.string().regex(/^[a-z0-9][a-z0-9-]*$/)).optional(),
686
734
  })),
687
735
  slack: z
688
736
  .object({
689
737
  workspace: z.string().optional(),
690
- teamId: z.string().optional(),
691
- installationId: z.string().optional(),
692
- botUserId: z.string().optional(),
693
738
  channels: z.array(z.object({
694
739
  name: z.string(),
695
- id: z.string().optional(),
696
740
  project: z
697
741
  .string()
698
742
  .regex(/^[a-z0-9][a-z0-9-]*$/)
@@ -702,10 +746,6 @@ export const zTopology = z.object({
702
746
  .optional(),
703
747
  github: z
704
748
  .object({
705
- installationId: z
706
- .string()
707
- .regex(/^[a-z]+_[A-Za-z0-9]+$/)
708
- .optional(),
709
749
  repos: z.array(z.object({
710
750
  name: z.string(),
711
751
  project: z.string().regex(/^[a-z0-9][a-z0-9-]*$/),
@@ -719,14 +759,7 @@ export const zTopology = z.object({
719
759
  slug: z.string().regex(/^[a-z0-9][a-z0-9-]*$/),
720
760
  project: z.string().regex(/^[a-z0-9][a-z0-9-]*$/),
721
761
  schedule: z.string(),
722
- timezone: z.string().optional(),
723
- until: z.iso
724
- .datetime()
725
- .regex(/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$/)
726
- .optional(),
727
762
  inputMessage: z.string(),
728
- enabled: z.boolean().optional(),
729
- notes: z.string().optional(),
730
763
  }))
731
764
  .optional(),
732
765
  emails: z
@@ -766,6 +799,7 @@ export const zSkillVersion = z.object({
766
799
  ]),
767
800
  requiredCredentials: z.array(zRequiredCredential),
768
801
  releaseNotes: z.string().nullable(),
802
+ contentHash: z.string().nullable(),
769
803
  });
770
804
  export const zSkill = z.object({
771
805
  id: z.string(),
@@ -952,6 +986,32 @@ export const zOpencodeSession = z.object({
952
986
  .regex(/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$/)
953
987
  .nullable(),
954
988
  });
989
+ export const zSessionCreateStatus = z.union([
990
+ z.object({
991
+ status: z.literal("pending"),
992
+ phase: z.enum([
993
+ "waiting-sandbox",
994
+ "creating-session",
995
+ "loading",
996
+ "resuming",
997
+ "provisioning",
998
+ "bootstrapping",
999
+ "finalizing",
1000
+ ]),
1001
+ }),
1002
+ z.object({
1003
+ status: z.literal("ready"),
1004
+ sessionId: z.string(),
1005
+ }),
1006
+ z.object({
1007
+ status: z.literal("failed"),
1008
+ reason: z.string(),
1009
+ }),
1010
+ ]);
1011
+ export const zSessionCreateJob = z.object({
1012
+ jobId: z.string().regex(/^sjob_[0-9A-HJKMNP-TV-Z]{26}$/),
1013
+ status: z.literal("pending"),
1014
+ });
955
1015
  export const zReplay = z.object({
956
1016
  id: z.string(),
957
1017
  orgId: z.string(),
@@ -986,6 +1046,7 @@ export const zPublisher = z.object({
986
1046
  avatar: z.string().nullable(),
987
1047
  url: z.string().nullable(),
988
1048
  isVerified: z.boolean(),
1049
+ links: z.array(zPublisherLink),
989
1050
  createdAt: z.iso
990
1051
  .datetime()
991
1052
  .regex(/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$/),
@@ -1000,6 +1061,29 @@ export const zPublisher = z.object({
1000
1061
  export const zPublisherMe = z.object({
1001
1062
  org: zPublisher.nullable(),
1002
1063
  });
1064
+ export const zProjectMcp = z.object({
1065
+ id: z.string(),
1066
+ projectId: z.string(),
1067
+ mcpId: z.string(),
1068
+ createdAt: z.iso
1069
+ .datetime()
1070
+ .regex(/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$/),
1071
+ updatedAt: z.iso
1072
+ .datetime()
1073
+ .regex(/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$/),
1074
+ });
1075
+ export const zProjectSkill = z.object({
1076
+ id: z.string(),
1077
+ projectId: z.string(),
1078
+ skillId: z.string(),
1079
+ skillVersionId: z.string().nullable(),
1080
+ createdAt: z.iso
1081
+ .datetime()
1082
+ .regex(/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$/),
1083
+ updatedAt: z.iso
1084
+ .datetime()
1085
+ .regex(/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$/),
1086
+ });
1003
1087
  export const zProjectMemoryStore = z.object({
1004
1088
  id: z.string(),
1005
1089
  projectId: z.string(),
@@ -1027,7 +1111,7 @@ export const zProjectAgent = z.object({
1027
1111
  projectId: z.string(),
1028
1112
  agentId: z.string(),
1029
1113
  agentVersionId: z.string().nullable(),
1030
- type: z.enum(["primary", "subagent", "all"]),
1114
+ mode: z.enum(["subagent", "all"]),
1031
1115
  createdAt: z.iso
1032
1116
  .datetime()
1033
1117
  .regex(/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$/),
@@ -1050,8 +1134,11 @@ export const zProject = z.object({
1050
1134
  name: z.string(),
1051
1135
  description: z.string().nullable(),
1052
1136
  slug: z.string(),
1137
+ defaultModel: z.string().nullable(),
1138
+ instructions: z.string(),
1053
1139
  permission: zPermissionConfig,
1054
1140
  gitRepos: z.array(zProjectGitRepo),
1141
+ references: zProjectReferences,
1055
1142
  createdAt: z.iso
1056
1143
  .datetime()
1057
1144
  .regex(/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$/),
@@ -1139,6 +1226,8 @@ export const zPod = z.object({
1139
1226
  description: z.string().nullable(),
1140
1227
  isPrivate: z.boolean(),
1141
1228
  isDefault: z.boolean(),
1229
+ defaultModel: z.string().nullable(),
1230
+ instructions: z.string(),
1142
1231
  environmentId: z.string().nullable(),
1143
1232
  orgId: z.string(),
1144
1233
  userId: z.string().nullable(),
@@ -1166,6 +1255,7 @@ export const zPat = z.object({
1166
1255
  organizationId: z.string(),
1167
1256
  name: z.string(),
1168
1257
  tokenPrefix: z.string(),
1258
+ role: z.enum(["readonly", "member", "admin"]),
1169
1259
  scopes: z.array(z.string()),
1170
1260
  lastUsedAt: z.iso
1171
1261
  .datetime()
@@ -1186,6 +1276,16 @@ export const zPat = z.object({
1186
1276
  .datetime()
1187
1277
  .regex(/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$/),
1188
1278
  });
1279
+ export const zOrganizationLogoUpload = z.object({
1280
+ url: z.url(),
1281
+ });
1282
+ export const zOrgSettings = z.object({
1283
+ id: z.string(),
1284
+ name: z.string(),
1285
+ slug: z.string(),
1286
+ defaultModel: z.string().nullable(),
1287
+ instructions: z.string(),
1288
+ });
1189
1289
  export const zOnboardingSetupPersonalOrg = z.object({
1190
1290
  organizationId: z.string(),
1191
1291
  alreadyExisted: z.boolean(),
@@ -1203,6 +1303,7 @@ export const zModelEntry = z.object({
1203
1303
  key: z.string(),
1204
1304
  name: z.string(),
1205
1305
  description: z.string(),
1306
+ modelID: z.string(),
1206
1307
  size: z.enum(["large", "medium", "small"]).optional(),
1207
1308
  pricing: zModelPricing.optional(),
1208
1309
  });
@@ -1243,6 +1344,16 @@ export const zMemoryStore = z.object({
1243
1344
  .regex(/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$/)
1244
1345
  .nullable(),
1245
1346
  });
1347
+ export const zOnboardingComplete = z.object({
1348
+ onboarding: z.object({
1349
+ organization: z.boolean(),
1350
+ member: z.boolean(),
1351
+ }),
1352
+ });
1353
+ export const zMemberPersona = z.enum(["engineering", "product", "sales", "marketing", "support", "general"]);
1354
+ export const zMemberPersonaUpdate = z.object({
1355
+ persona: zMemberPersona,
1356
+ });
1246
1357
  export const zMe = z.object({
1247
1358
  user: z.object({
1248
1359
  id: z.string(),
@@ -1259,7 +1370,11 @@ export const zMe = z.object({
1259
1370
  })
1260
1371
  .nullable(),
1261
1372
  role: z.string().nullable(),
1262
- scopes: z.array(z.string()),
1373
+ persona: zMemberPersona.nullable(),
1374
+ onboarding: z.object({
1375
+ organization: z.boolean(),
1376
+ member: z.boolean(),
1377
+ }),
1263
1378
  method: z.enum(["session", "pat", "sandbox"]),
1264
1379
  });
1265
1380
  export const zOAuthSessionStatus = z.object({
@@ -1528,16 +1643,85 @@ export const zDashboardResponse = z.object({
1528
1643
  })),
1529
1644
  period: z.enum(["7d", "30d", "90d"]),
1530
1645
  });
1646
+ export const zUsageGroup = z.object({
1647
+ key: z.string(),
1648
+ label: z.string(),
1649
+ credits: z.string(),
1650
+ amountCents: z.int().gte(-9007199254740991).lte(9007199254740991),
1651
+ eventCount: z.int().gte(-9007199254740991).lte(9007199254740991),
1652
+ });
1653
+ export const zUsageDailyPoint = z.object({
1654
+ date: z.string(),
1655
+ credits: z.string(),
1656
+ });
1657
+ export const zUsageBreakdownItem = z.object({
1658
+ source: z.string(),
1659
+ operation: z.string(),
1660
+ credits: z.string(),
1661
+ eventCount: z.int().gte(-9007199254740991).lte(9007199254740991),
1662
+ });
1663
+ export const zUsage = z.object({
1664
+ credits: z.string(),
1665
+ amountCents: z.int().gte(-9007199254740991).lte(9007199254740991),
1666
+ eventCount: z.int().gte(-9007199254740991).lte(9007199254740991),
1667
+ from: z.string().nullable(),
1668
+ through: z.string(),
1669
+ breakdown: z.array(zUsageBreakdownItem),
1670
+ daily: z.array(zUsageDailyPoint),
1671
+ groupBy: z.enum(["user", "member", "agent", "model", "session", "project", "pod", "source"]).nullable(),
1672
+ groups: z.array(zUsageGroup),
1673
+ });
1674
+ export const zBlueprintInstallProjectTarget = z.union([
1675
+ z.object({
1676
+ blueprintProjectSlug: z.string().min(1),
1677
+ mode: z.literal("create"),
1678
+ name: z.string().min(1).max(256).optional(),
1679
+ }),
1680
+ z.object({
1681
+ blueprintProjectSlug: z.string().min(1),
1682
+ mode: z.literal("existing"),
1683
+ projectId: z.string().regex(/^prj_[0-9A-HJKMNP-TV-Z]{26}$/),
1684
+ }),
1685
+ ]);
1686
+ export const zBlueprintInstallInput = z.object({
1687
+ source: z.string().min(1),
1688
+ podId: z.string().regex(/^pod_[0-9A-HJKMNP-TV-Z]{26}$/),
1689
+ projectTargets: z.array(zBlueprintInstallProjectTarget).optional(),
1690
+ });
1691
+ export const zBlueprintInstallProjectMapping = z.object({
1692
+ blueprintProjectSlug: z.string(),
1693
+ projectId: z.string().regex(/^prj_[0-9A-HJKMNP-TV-Z]{26}$/),
1694
+ });
1695
+ export const zBlueprintInstallRequirement = z.object({
1696
+ kind: z.enum(["credential", "channel", "capability", "other"]),
1697
+ message: z.string(),
1698
+ project: z.string().optional(),
1699
+ credential: z.string().optional(),
1700
+ });
1531
1701
  export const zBlueprintInstallReport = z.object({
1532
- projects: z.array(z.string()),
1533
1702
  agents: z.array(z.string()),
1534
1703
  skills: z.array(z.string()),
1535
1704
  mcps: z.array(z.string()),
1536
1705
  skipped: z.array(z.object({
1537
- kind: z.enum(["skill", "agent", "mcp"]),
1706
+ kind: z.enum(["skill", "agent", "mcp", "project", "trigger", "environment"]),
1538
1707
  sourceId: z.string(),
1539
1708
  reason: z.string(),
1540
1709
  })),
1710
+ requirements: z.array(zBlueprintInstallRequirement),
1711
+ projectMappings: z.array(zBlueprintInstallProjectMapping),
1712
+ initialPrompt: z
1713
+ .object({
1714
+ prompt: z.string(),
1715
+ projectId: z
1716
+ .string()
1717
+ .regex(/^prj_[0-9A-HJKMNP-TV-Z]{26}$/)
1718
+ .optional(),
1719
+ agentId: z
1720
+ .string()
1721
+ .regex(/^agt_[0-9A-HJKMNP-TV-Z]{26}$/)
1722
+ .optional(),
1723
+ })
1724
+ .optional(),
1541
1725
  });
1542
1726
  export const zBlueprintSelection = z.object({
1543
1727
  projectIds: z.array(z.string()).optional().default([]),
@@ -1547,6 +1731,147 @@ export const zBlueprintSelection = z.object({
1547
1731
  replayIds: z.array(z.string()).optional().default([]),
1548
1732
  cronTriggerIds: z.array(z.string()).optional().default([]),
1549
1733
  });
1734
+ export const zSpecEnvironmentDef = z.object({
1735
+ networking: zNetworkingConfig,
1736
+ packages: zPackagesConfig,
1737
+ });
1738
+ export const zSpecRequirement = z.object({
1739
+ id: z.string(),
1740
+ kind: z.enum(["credential_present", "capability", "other"]),
1741
+ must: z.string(),
1742
+ agent: z
1743
+ .string()
1744
+ .regex(/^[a-z0-9][a-z0-9-]*$/)
1745
+ .optional(),
1746
+ mcp: z
1747
+ .string()
1748
+ .regex(/^[a-z0-9][a-z0-9-]*$/)
1749
+ .optional(),
1750
+ skill: z
1751
+ .string()
1752
+ .regex(/^[a-z0-9][a-z0-9-]*$/)
1753
+ .optional(),
1754
+ verify: z.string().optional(),
1755
+ });
1756
+ export const zSpecEnvironmentEntry = z.object({
1757
+ ref: z
1758
+ .object({
1759
+ id: z.string().regex(/^[a-z]+_[A-Za-z0-9]+$/),
1760
+ })
1761
+ .optional(),
1762
+ def: zSpecEnvironmentDef.optional(),
1763
+ requirements: z.array(zSpecRequirement).optional(),
1764
+ notes: z.string().optional(),
1765
+ });
1766
+ export const zSpecCronTriggerEntry = z.object({
1767
+ slug: z.string().regex(/^[a-z0-9][a-z0-9-]*$/),
1768
+ ref: z
1769
+ .object({
1770
+ id: z.string().regex(/^[a-z]+_[A-Za-z0-9]+$/),
1771
+ })
1772
+ .optional(),
1773
+ project: z.string().regex(/^[a-z0-9][a-z0-9-]*$/),
1774
+ agent: z
1775
+ .string()
1776
+ .regex(/^[a-z0-9][a-z0-9-]*$/)
1777
+ .optional(),
1778
+ schedule: z.string(),
1779
+ timezone: z.string().optional(),
1780
+ until: z.iso
1781
+ .datetime()
1782
+ .regex(/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$/)
1783
+ .optional(),
1784
+ inputMessage: z.string(),
1785
+ enabled: z.boolean().optional(),
1786
+ requirements: z.array(zSpecRequirement).optional(),
1787
+ notes: z.string().optional(),
1788
+ });
1789
+ export const zSpecProjectDef = z.object({
1790
+ name: z.string(),
1791
+ description: z.string().optional(),
1792
+ instructions: z.string().optional(),
1793
+ references: zProjectReferences.optional(),
1794
+ agents: z.array(zSpecProjectAgent).optional(),
1795
+ skills: z.array(z.string().regex(/^[a-z0-9][a-z0-9-]*$/)).optional(),
1796
+ mcps: z.array(z.string().regex(/^[a-z0-9][a-z0-9-]*$/)).optional(),
1797
+ permission: zPermissionConfig.optional(),
1798
+ buildOrder: z.int().gte(1).lte(9007199254740991).optional(),
1799
+ });
1800
+ export const zSpecProjectEntry = z.object({
1801
+ slug: z.string().regex(/^[a-z0-9][a-z0-9-]*$/),
1802
+ ref: zSpecRef.optional(),
1803
+ def: zSpecProjectDef.optional(),
1804
+ channels: z.array(zSpecChannelBinding).optional(),
1805
+ requirements: z.array(zSpecRequirement).optional(),
1806
+ notes: z.string().optional(),
1807
+ });
1808
+ export const zSpecMcpDef = z.object({
1809
+ name: z.string(),
1810
+ registrySlug: z.string().optional(),
1811
+ remoteUrl: z.url().optional(),
1812
+ auth: z.enum(["oauth", "basic", "api_key", "none", "mcp_provider"]).optional(),
1813
+ });
1814
+ export const zSpecMcpEntry = z.object({
1815
+ slug: z.string().regex(/^[a-z0-9][a-z0-9-]*$/),
1816
+ ref: zSpecRef.optional(),
1817
+ def: zSpecMcpDef.optional(),
1818
+ requirements: z.array(zSpecRequirement).optional(),
1819
+ notes: z.string().optional(),
1820
+ });
1821
+ export const zSpecSkillDef = z.object({
1822
+ name: z.string(),
1823
+ registrySlug: z.string().optional(),
1824
+ purpose: z.string(),
1825
+ });
1826
+ export const zSpecSkillEntry = z.object({
1827
+ slug: z.string().regex(/^[a-z0-9][a-z0-9-]*$/),
1828
+ ref: zSpecRef.optional(),
1829
+ def: zSpecSkillDef.optional(),
1830
+ requirements: z.array(zSpecRequirement).optional(),
1831
+ notes: z.string().optional(),
1832
+ });
1833
+ export const zSpecAgentDef = z.object({
1834
+ name: z.string(),
1835
+ model: z.string().optional(),
1836
+ scope: z.enum(["org", "user", "registry"]).optional(),
1837
+ promptIntent: z.string().optional(),
1838
+ skills: z.array(z.string().regex(/^[a-z0-9][a-z0-9-]*$/)).optional(),
1839
+ mcps: z.array(z.string().regex(/^[a-z0-9][a-z0-9-]*$/)).optional(),
1840
+ });
1841
+ export const zSpecAgentEntry = z.object({
1842
+ slug: z.string().regex(/^[a-z0-9][a-z0-9-]*$/),
1843
+ ref: zSpecRef.optional(),
1844
+ def: zSpecAgentDef.optional(),
1845
+ requirements: z.array(zSpecRequirement).optional(),
1846
+ notes: z.string().optional(),
1847
+ });
1848
+ export const zSpecBrief = z.object({
1849
+ goal: z.string(),
1850
+ scope: z.string().optional(),
1851
+ actors: z.array(z.string()).optional(),
1852
+ successCriteria: z.array(z.string()).optional(),
1853
+ constraints: z.array(z.string()).optional(),
1854
+ openQuestions: z.array(z.string()).optional(),
1855
+ });
1856
+ export const zSpecMeta = z.object({
1857
+ name: z.string(),
1858
+ description: z.string().optional(),
1859
+ snapshotDate: z.string().optional(),
1860
+ notes: z.string().optional(),
1861
+ });
1862
+ export const zSpec = z.object({
1863
+ schemaVersion: z.literal(2),
1864
+ meta: zSpecMeta,
1865
+ brief: zSpecBrief.optional(),
1866
+ instructions: z.string().optional(),
1867
+ initialPrompt: zSpecInitialPrompt.optional(),
1868
+ agents: z.array(zSpecAgentEntry),
1869
+ skills: z.array(zSpecSkillEntry),
1870
+ mcps: z.array(zSpecMcpEntry),
1871
+ projects: z.array(zSpecProjectEntry),
1872
+ triggers: z.array(zSpecCronTriggerEntry),
1873
+ environment: zSpecEnvironmentEntry.optional(),
1874
+ });
1550
1875
  export const zBlueprint = z.object({
1551
1876
  id: z.string(),
1552
1877
  slug: z.string(),
@@ -1555,7 +1880,9 @@ export const zBlueprint = z.object({
1555
1880
  orgId: z.string(),
1556
1881
  userId: z.string().nullable(),
1557
1882
  publisherId: z.string().nullable(),
1558
- template: zBlueprintTemplate,
1883
+ template: zSpec,
1884
+ replays: z.array(z.string()),
1885
+ pageContent: zBlueprintPageContent.nullable(),
1559
1886
  websiteMetadata: zWebsiteMetadata.nullable(),
1560
1887
  createdAt: z.iso
1561
1888
  .datetime()
@@ -1656,15 +1983,11 @@ export const zAgent = z.object({
1656
1983
  tags: z.array(z.string()).optional().default([]),
1657
1984
  latestVersion: zAgentLatestVersion.nullish(),
1658
1985
  });
1659
- /**
1660
- * Pass 'user' to scope the operation to the authenticated user's private namespace. Omit for the org-wide namespace.
1661
- */
1662
- export const zScopeQuery = z.enum(["user"]);
1663
1986
  export const zAgentListQuery = z.object({
1664
- scope: z.enum(["user"]).optional(),
1665
- limit: z.number().gte(1).lte(1000).optional(),
1666
- offset: z.number().gte(0).optional(),
1987
+ limit: z.int().gte(1).lte(1000).optional(),
1988
+ offset: z.int().gte(0).lte(9007199254740991).optional(),
1667
1989
  includeDeprecated: z.boolean().optional(),
1990
+ visibility: z.enum(["private", "org"]).optional(),
1668
1991
  });
1669
1992
  /**
1670
1993
  * List of agents
@@ -1674,6 +1997,7 @@ export const zAgentCreateBody = z.object({
1674
1997
  name: z.string().min(1).max(256),
1675
1998
  icon: z.string().nullish().default(null),
1676
1999
  tags: z.array(z.string()).optional(),
2000
+ visibility: z.enum(["private", "org"]).optional().default("org"),
1677
2001
  version: z
1678
2002
  .union([z.string(), z.enum(["major", "minor", "patch"])])
1679
2003
  .optional()
@@ -1697,9 +2021,6 @@ export const zAgentCreateBody = z.object({
1697
2021
  .default([]),
1698
2022
  releaseNotes: z.string().max(4096).optional(),
1699
2023
  });
1700
- export const zAgentCreateQuery = z.object({
1701
- scope: z.enum(["user"]).optional(),
1702
- });
1703
2024
  /**
1704
2025
  * Created agent
1705
2026
  */
@@ -1713,9 +2034,6 @@ export const zAgentSearchBody = z.object({
1713
2034
  .default(["user", "org", "registry"]),
1714
2035
  limit: z.int().gte(1).lte(50).optional().default(20),
1715
2036
  });
1716
- export const zAgentSearchQuery = z.object({
1717
- scope: z.enum(["user"]).optional(),
1718
- });
1719
2037
  /**
1720
2038
  * Matching agents
1721
2039
  */
@@ -1727,9 +2045,6 @@ export const zAgentGetBySlugPath = z.object({
1727
2045
  .max(128)
1728
2046
  .regex(/^[a-z0-9-]+$/),
1729
2047
  });
1730
- export const zAgentGetBySlugQuery = z.object({
1731
- scope: z.enum(["user"]).optional(),
1732
- });
1733
2048
  /**
1734
2049
  * Agent details
1735
2050
  */
@@ -1737,9 +2052,6 @@ export const zAgentGetBySlugResponse = zAgent;
1737
2052
  export const zAgentGetPath = z.object({
1738
2053
  id: z.string().regex(/^agt_[0-9A-HJKMNP-TV-Z]{26}$/),
1739
2054
  });
1740
- export const zAgentGetQuery = z.object({
1741
- scope: z.enum(["user"]).optional(),
1742
- });
1743
2055
  /**
1744
2056
  * Agent details
1745
2057
  */
@@ -1753,9 +2065,6 @@ export const zAgentUpdateBody = z.object({
1753
2065
  export const zAgentUpdatePath = z.object({
1754
2066
  id: z.string().regex(/^agt_[0-9A-HJKMNP-TV-Z]{26}$/),
1755
2067
  });
1756
- export const zAgentUpdateQuery = z.object({
1757
- scope: z.enum(["user"]).optional(),
1758
- });
1759
2068
  /**
1760
2069
  * Updated agent
1761
2070
  */
@@ -1763,9 +2072,6 @@ export const zAgentUpdateResponse = zAgent;
1763
2072
  export const zAgentArchivePath = z.object({
1764
2073
  id: z.string().regex(/^agt_[0-9A-HJKMNP-TV-Z]{26}$/),
1765
2074
  });
1766
- export const zAgentArchiveQuery = z.object({
1767
- scope: z.enum(["user"]).optional(),
1768
- });
1769
2075
  /**
1770
2076
  * Archived agent
1771
2077
  */
@@ -1773,36 +2079,23 @@ export const zAgentArchiveResponse = zAgent;
1773
2079
  export const zAgentPublishPath = z.object({
1774
2080
  id: z.string().regex(/^agt_[0-9A-HJKMNP-TV-Z]{26}$/),
1775
2081
  });
1776
- export const zAgentPublishQuery = z.object({
1777
- scope: z.enum(["user"]).optional(),
1778
- });
1779
2082
  /**
1780
2083
  * Published agent
1781
2084
  */
1782
2085
  export const zAgentPublishResponse = zAgent;
1783
- export const zAgentCopyToOrgBody = z.object({
1784
- name: z.string().min(1).max(256).optional(),
1785
- version: z.string().optional(),
1786
- });
1787
- export const zAgentCopyToOrgPath = z.object({
2086
+ export const zAgentPromotePath = z.object({
1788
2087
  id: z.string().regex(/^agt_[0-9A-HJKMNP-TV-Z]{26}$/),
1789
2088
  });
1790
- export const zAgentCopyToOrgQuery = z.object({
1791
- scope: z.enum(["user"]).optional(),
1792
- });
1793
2089
  /**
1794
- * Copied agent
2090
+ * Promoted agent
1795
2091
  */
1796
- export const zAgentCopyToOrgResponse = zAgent;
2092
+ export const zAgentPromoteResponse = zAgent;
1797
2093
  export const zAgentDeprecateBody = z.object({
1798
2094
  message: z.string().nullish(),
1799
2095
  });
1800
2096
  export const zAgentDeprecatePath = z.object({
1801
2097
  id: z.string().regex(/^agt_[0-9A-HJKMNP-TV-Z]{26}$/),
1802
2098
  });
1803
- export const zAgentDeprecateQuery = z.object({
1804
- scope: z.enum(["user"]).optional(),
1805
- });
1806
2099
  /**
1807
2100
  * Deprecated agent
1808
2101
  */
@@ -1810,9 +2103,6 @@ export const zAgentDeprecateResponse = zAgent;
1810
2103
  export const zAgentUndeprecatePath = z.object({
1811
2104
  id: z.string().regex(/^agt_[0-9A-HJKMNP-TV-Z]{26}$/),
1812
2105
  });
1813
- export const zAgentUndeprecateQuery = z.object({
1814
- scope: z.enum(["user"]).optional(),
1815
- });
1816
2106
  /**
1817
2107
  * Undeprecated agent
1818
2108
  */
@@ -1821,9 +2111,8 @@ export const zAgentVersionListPath = z.object({
1821
2111
  id: z.string().regex(/^agt_[0-9A-HJKMNP-TV-Z]{26}$/),
1822
2112
  });
1823
2113
  export const zAgentVersionListQuery = z.object({
1824
- scope: z.enum(["user"]).optional(),
1825
- limit: z.number().gte(1).lte(1000).optional(),
1826
- offset: z.number().gte(0).optional(),
2114
+ limit: z.int().gte(1).lte(1000).optional(),
2115
+ offset: z.int().gte(0).lte(9007199254740991).optional(),
1827
2116
  includeDeprecated: z.boolean().optional(),
1828
2117
  });
1829
2118
  /**
@@ -1857,9 +2146,6 @@ export const zAgentVersionCreateBody = z.object({
1857
2146
  export const zAgentVersionCreatePath = z.object({
1858
2147
  id: z.string().regex(/^agt_[0-9A-HJKMNP-TV-Z]{26}$/),
1859
2148
  });
1860
- export const zAgentVersionCreateQuery = z.object({
1861
- scope: z.enum(["user"]).optional(),
1862
- });
1863
2149
  /**
1864
2150
  * Created agent version
1865
2151
  */
@@ -1868,9 +2154,6 @@ export const zAgentVersionGetPath = z.object({
1868
2154
  id: z.string().regex(/^agt_[0-9A-HJKMNP-TV-Z]{26}$/),
1869
2155
  version: z.string().min(1).max(32),
1870
2156
  });
1871
- export const zAgentVersionGetQuery = z.object({
1872
- scope: z.enum(["user"]).optional(),
1873
- });
1874
2157
  /**
1875
2158
  * Agent version details
1876
2159
  */
@@ -1879,18 +2162,15 @@ export const zAgentVersionArchivePath = z.object({
1879
2162
  id: z.string().regex(/^agt_[0-9A-HJKMNP-TV-Z]{26}$/),
1880
2163
  version: z.string().min(1).max(32),
1881
2164
  });
1882
- export const zAgentVersionArchiveQuery = z.object({
1883
- scope: z.enum(["user"]).optional(),
1884
- });
1885
2165
  /**
1886
2166
  * Archived agent version
1887
2167
  */
1888
2168
  export const zAgentVersionArchiveResponse = zAgentVersion;
1889
2169
  export const zBlueprintListQuery = z.object({
1890
- scope: z.enum(["user"]).optional(),
1891
- limit: z.number().gte(1).lte(1000).optional(),
1892
- offset: z.number().gte(0).optional(),
2170
+ limit: z.int().gte(1).lte(1000).optional(),
2171
+ offset: z.int().gte(0).lte(9007199254740991).optional(),
1893
2172
  includeDeprecated: z.boolean().optional(),
2173
+ visibility: z.enum(["private", "org"]).optional(),
1894
2174
  });
1895
2175
  /**
1896
2176
  * List of blueprints
@@ -1900,22 +2180,27 @@ export const zBlueprintCreateBody = z.object({
1900
2180
  name: z.string().min(1).max(256),
1901
2181
  description: z.string().optional().default(""),
1902
2182
  websiteMetadata: zWebsiteMetadata.nullish().default(null),
2183
+ pageContent: zBlueprintPageContent.nullish().default(null),
2184
+ instructions: z.string().optional(),
2185
+ initialPrompt: zSpecInitialPrompt.optional(),
1903
2186
  selection: zBlueprintSelection,
1904
- });
1905
- export const zBlueprintCreateQuery = z.object({
1906
- scope: z.enum(["user"]).optional(),
2187
+ visibility: z.enum(["private", "org"]).optional().default("org"),
1907
2188
  });
1908
2189
  /**
1909
2190
  * Created blueprint
1910
2191
  */
1911
2192
  export const zBlueprintCreateResponse = zBlueprint;
1912
- export const zBlueprintInstallBody = z.object({
1913
- source: z.string().min(1),
1914
- podId: z.string().regex(/^pod_[0-9A-HJKMNP-TV-Z]{26}$/),
1915
- });
1916
- export const zBlueprintInstallQuery = z.object({
1917
- scope: z.enum(["user"]).optional(),
2193
+ export const zBlueprintPushBody = z.object({
2194
+ id: z.string().optional(),
2195
+ name: z.string().min(1).max(256).optional(),
2196
+ description: z.string().optional(),
2197
+ spec: zSpec,
1918
2198
  });
2199
+ /**
2200
+ * Upserted blueprint
2201
+ */
2202
+ export const zBlueprintPushResponse = zBlueprint;
2203
+ export const zBlueprintInstallBody = zBlueprintInstallInput;
1919
2204
  /**
1920
2205
  * Install report
1921
2206
  */
@@ -1923,9 +2208,6 @@ export const zBlueprintInstallResponse = zBlueprintInstallReport;
1923
2208
  export const zBlueprintGetPath = z.object({
1924
2209
  id: z.string().regex(/^blp_[0-9A-HJKMNP-TV-Z]{26}$/),
1925
2210
  });
1926
- export const zBlueprintGetQuery = z.object({
1927
- scope: z.enum(["user"]).optional(),
1928
- });
1929
2211
  /**
1930
2212
  * Blueprint details
1931
2213
  */
@@ -1934,14 +2216,14 @@ export const zBlueprintUpdateBody = z.object({
1934
2216
  name: z.string().min(1).max(256).optional(),
1935
2217
  description: z.string().optional(),
1936
2218
  websiteMetadata: zWebsiteMetadata.nullish(),
2219
+ pageContent: zBlueprintPageContent.nullish(),
2220
+ instructions: z.string().optional(),
2221
+ initialPrompt: zSpecInitialPrompt.nullish(),
1937
2222
  selection: zBlueprintSelection.optional(),
1938
2223
  });
1939
2224
  export const zBlueprintUpdatePath = z.object({
1940
2225
  id: z.string().regex(/^blp_[0-9A-HJKMNP-TV-Z]{26}$/),
1941
2226
  });
1942
- export const zBlueprintUpdateQuery = z.object({
1943
- scope: z.enum(["user"]).optional(),
1944
- });
1945
2227
  /**
1946
2228
  * Updated blueprint
1947
2229
  */
@@ -1949,9 +2231,6 @@ export const zBlueprintUpdateResponse = zBlueprint;
1949
2231
  export const zBlueprintPublishPath = z.object({
1950
2232
  id: z.string().regex(/^blp_[0-9A-HJKMNP-TV-Z]{26}$/),
1951
2233
  });
1952
- export const zBlueprintPublishQuery = z.object({
1953
- scope: z.enum(["user"]).optional(),
1954
- });
1955
2234
  /**
1956
2235
  * Published blueprint
1957
2236
  */
@@ -1962,9 +2241,6 @@ export const zBlueprintDeprecateBody = z.object({
1962
2241
  export const zBlueprintDeprecatePath = z.object({
1963
2242
  id: z.string().regex(/^blp_[0-9A-HJKMNP-TV-Z]{26}$/),
1964
2243
  });
1965
- export const zBlueprintDeprecateQuery = z.object({
1966
- scope: z.enum(["user"]).optional(),
1967
- });
1968
2244
  /**
1969
2245
  * Deprecated blueprint
1970
2246
  */
@@ -1972,9 +2248,6 @@ export const zBlueprintDeprecateResponse = zBlueprint;
1972
2248
  export const zBlueprintUndeprecatePath = z.object({
1973
2249
  id: z.string().regex(/^blp_[0-9A-HJKMNP-TV-Z]{26}$/),
1974
2250
  });
1975
- export const zBlueprintUndeprecateQuery = z.object({
1976
- scope: z.enum(["user"]).optional(),
1977
- });
1978
2251
  /**
1979
2252
  * Undeprecated blueprint
1980
2253
  */
@@ -1982,9 +2255,6 @@ export const zBlueprintUndeprecateResponse = zBlueprint;
1982
2255
  export const zBlueprintArchivePath = z.object({
1983
2256
  id: z.string().regex(/^blp_[0-9A-HJKMNP-TV-Z]{26}$/),
1984
2257
  });
1985
- export const zBlueprintArchiveQuery = z.object({
1986
- scope: z.enum(["user"]).optional(),
1987
- });
1988
2258
  /**
1989
2259
  * Archived blueprint
1990
2260
  */
@@ -1993,13 +2263,33 @@ export const zBlueprintArchiveResponse = zBlueprint;
1993
2263
  * Billing summary
1994
2264
  */
1995
2265
  export const zBillingGetResponse = z.object({
1996
- plan: z.string(),
1997
2266
  creditsBalance: z.string(),
1998
2267
  balanceCents: z.number(),
1999
2268
  consumedCredits: z.string(),
2000
2269
  consumedAmountCents: z.number(),
2001
2270
  grantedCredits: z.string(),
2271
+ freeGrantCredits: z.string(),
2272
+ plan: z.enum(["free", "plan_100", "plan_200"]),
2273
+ planStatus: z.string().nullable(),
2274
+ renewsAt: z.string().nullable(),
2275
+ pendingPlan: z.enum(["plan_100", "plan_200"]).nullable(),
2276
+ });
2277
+ export const zBillingUsageQuery = z.object({
2278
+ groupBy: z
2279
+ .enum(["user", "member", "agent", "model", "session", "project", "pod", "source"])
2280
+ .optional()
2281
+ .default("source"),
2282
+ start: z.iso
2283
+ .datetime()
2284
+ .regex(/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$/),
2285
+ end: z.iso
2286
+ .datetime()
2287
+ .regex(/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$/),
2002
2288
  });
2289
+ /**
2290
+ * Organization credit usage
2291
+ */
2292
+ export const zBillingUsageResponse = zUsage;
2003
2293
  export const zBillingInvoicesQuery = z.object({
2004
2294
  page: z.int().gte(1).lte(9007199254740991).optional().default(1),
2005
2295
  perPage: z.int().gte(1).lte(100).optional().default(10),
@@ -2023,17 +2313,7 @@ export const zBillingInvoicesResponse = z.object({
2023
2313
  totalPages: z.number(),
2024
2314
  totalCount: z.number(),
2025
2315
  }),
2026
- });
2027
- export const zBillingDailyUsageQuery = z.object({
2028
- days: z.int().gte(1).lte(90).optional().default(30),
2029
- });
2030
- /**
2031
- * Daily usage
2032
- */
2033
- export const zBillingDailyUsageResponse = z.array(z.object({
2034
- date: z.string(),
2035
- creditsUsed: z.string(),
2036
- }));
2316
+ });
2037
2317
  export const zBillingInvoicePaymentUrlQuery = z.object({
2038
2318
  id: z.string().min(1),
2039
2319
  });
@@ -2043,16 +2323,49 @@ export const zBillingInvoicePaymentUrlQuery = z.object({
2043
2323
  export const zBillingInvoicePaymentUrlResponse = z.object({
2044
2324
  url: z.string(),
2045
2325
  });
2046
- export const zBillingUpdatePlanBody = z.object({
2047
- newPlan: z.enum(["free", "plus", "pro"]),
2326
+ /**
2327
+ * Subscription plans
2328
+ */
2329
+ export const zBillingPlansResponse = z.array(z.object({
2330
+ key: z.enum(["plan_100", "plan_200"]),
2331
+ priceCents: z.number(),
2332
+ creditsPerCycle: z.number(),
2333
+ name: z.string(),
2334
+ description: z.string().nullable(),
2335
+ tagline: z.string().nullable(),
2336
+ features: z.array(z.string()),
2337
+ badge: z.string().nullable(),
2338
+ sortOrder: z.number(),
2339
+ }));
2340
+ export const zBillingSubscribeBody = z.object({
2341
+ plan: z.enum(["plan_100", "plan_200"]),
2342
+ });
2343
+ /**
2344
+ * Checkout URL
2345
+ */
2346
+ export const zBillingSubscribeResponse = z.object({
2347
+ checkoutUrl: z.string(),
2348
+ });
2349
+ /**
2350
+ * Portal URL
2351
+ */
2352
+ export const zBillingPortalResponse = z.object({
2353
+ url: z.string(),
2354
+ });
2355
+ export const zBillingChangePlanBody = z.object({
2356
+ plan: z.enum(["plan_100", "plan_200"]),
2357
+ });
2358
+ /**
2359
+ * Plan change started; checkoutUrl is set when the customer must authenticate the charge
2360
+ */
2361
+ export const zBillingChangePlanResponse = z.object({
2362
+ checkoutUrl: z.string(),
2048
2363
  });
2049
2364
  /**
2050
- * Plan updated
2365
+ * Cancellation scheduled
2051
2366
  */
2052
- export const zBillingUpdatePlanResponse = z.object({
2053
- status: z.string(),
2054
- plan: z.string(),
2055
- effective: z.string(),
2367
+ export const zBillingCancelResponse = z.object({
2368
+ ok: z.boolean(),
2056
2369
  });
2057
2370
  export const zDashboardGetQuery = z.object({
2058
2371
  period: z.enum(["7d", "30d", "90d"]).optional().default("30d"),
@@ -2066,12 +2379,12 @@ export const zDashboardGetQuery = z.object({
2066
2379
  */
2067
2380
  export const zDashboardGetResponse = zDashboardResponse;
2068
2381
  export const zEnvironmentListQuery = z.object({
2069
- scope: z.enum(["user"]).optional(),
2070
2382
  orgId: z.string().optional(),
2071
- limit: z.number().gte(1).lte(1000).optional(),
2072
- offset: z.number().gte(0).optional(),
2383
+ limit: z.int().gte(1).lte(1000).optional(),
2384
+ offset: z.int().gte(0).lte(9007199254740991).optional(),
2073
2385
  includeDeprecated: z.boolean().optional(),
2074
2386
  userId: z.string().nullish(),
2387
+ visibility: z.enum(["private", "org"]).optional(),
2075
2388
  });
2076
2389
  /**
2077
2390
  * List of environments
@@ -2083,9 +2396,7 @@ export const zEnvironmentCreateBody = z.object({
2083
2396
  description: z.string().optional().default(""),
2084
2397
  hostingType: z.enum(["cloud"]).optional().default("cloud"),
2085
2398
  packages: zPackagesConfig.optional(),
2086
- });
2087
- export const zEnvironmentCreateQuery = z.object({
2088
- scope: z.enum(["user"]).optional(),
2399
+ visibility: z.enum(["private", "org"]).optional().default("org"),
2089
2400
  });
2090
2401
  /**
2091
2402
  * Created environment
@@ -2094,9 +2405,6 @@ export const zEnvironmentCreateResponse = zEnvironment;
2094
2405
  export const zEnvironmentDeletePath = z.object({
2095
2406
  id: z.string().regex(/^env_[0-9A-HJKMNP-TV-Z]{26}$/),
2096
2407
  });
2097
- export const zEnvironmentDeleteQuery = z.object({
2098
- scope: z.enum(["user"]).optional(),
2099
- });
2100
2408
  /**
2101
2409
  * Deleted environment
2102
2410
  */
@@ -2104,9 +2412,6 @@ export const zEnvironmentDeleteResponse = zEnvironment;
2104
2412
  export const zEnvironmentGetPath = z.object({
2105
2413
  id: z.string().regex(/^env_[0-9A-HJKMNP-TV-Z]{26}$/),
2106
2414
  });
2107
- export const zEnvironmentGetQuery = z.object({
2108
- scope: z.enum(["user"]).optional(),
2109
- });
2110
2415
  /**
2111
2416
  * Environment details
2112
2417
  */
@@ -2120,9 +2425,6 @@ export const zEnvironmentUpdateBody = z.object({
2120
2425
  export const zEnvironmentUpdatePath = z.object({
2121
2426
  id: z.string().regex(/^env_[0-9A-HJKMNP-TV-Z]{26}$/),
2122
2427
  });
2123
- export const zEnvironmentUpdateQuery = z.object({
2124
- scope: z.enum(["user"]).optional(),
2125
- });
2126
2428
  /**
2127
2429
  * Updated environment
2128
2430
  */
@@ -2130,20 +2432,17 @@ export const zEnvironmentUpdateResponse = zEnvironment;
2130
2432
  export const zEnvironmentArchivePath = z.object({
2131
2433
  id: z.string().regex(/^env_[0-9A-HJKMNP-TV-Z]{26}$/),
2132
2434
  });
2133
- export const zEnvironmentArchiveQuery = z.object({
2134
- scope: z.enum(["user"]).optional(),
2135
- });
2136
2435
  /**
2137
2436
  * Archived environment
2138
2437
  */
2139
2438
  export const zEnvironmentArchiveResponse = zEnvironment;
2140
2439
  export const zFileStoreListQuery = z.object({
2141
- scope: z.enum(["user"]).optional(),
2142
2440
  orgId: z.string().optional(),
2143
- limit: z.number().gte(1).lte(1000).optional(),
2144
- offset: z.number().gte(0).optional(),
2441
+ limit: z.int().gte(1).lte(1000).optional(),
2442
+ offset: z.int().gte(0).lte(9007199254740991).optional(),
2145
2443
  includeDeprecated: z.boolean().optional(),
2146
2444
  userId: z.string().nullish(),
2445
+ visibility: z.enum(["private", "org"]).optional(),
2147
2446
  });
2148
2447
  /**
2149
2448
  * List of file stores
@@ -2153,9 +2452,7 @@ export const zFileStoreCreateBody = z.object({
2153
2452
  name: z.string().min(1).max(256),
2154
2453
  description: z.string().optional().default(""),
2155
2454
  isDefault: z.boolean().optional().default(false),
2156
- });
2157
- export const zFileStoreCreateQuery = z.object({
2158
- scope: z.enum(["user"]).optional(),
2455
+ visibility: z.enum(["private", "org"]).optional().default("org"),
2159
2456
  });
2160
2457
  /**
2161
2458
  * Created file store
@@ -2164,9 +2461,6 @@ export const zFileStoreCreateResponse = zFileStore;
2164
2461
  export const zFileStoreGetPath = z.object({
2165
2462
  id: z.string().regex(/^fst_[0-9A-HJKMNP-TV-Z]{26}$/),
2166
2463
  });
2167
- export const zFileStoreGetQuery = z.object({
2168
- scope: z.enum(["user"]).optional(),
2169
- });
2170
2464
  /**
2171
2465
  * File store details
2172
2466
  */
@@ -2178,9 +2472,6 @@ export const zFileStoreUpdateBody = z.object({
2178
2472
  export const zFileStoreUpdatePath = z.object({
2179
2473
  id: z.string().regex(/^fst_[0-9A-HJKMNP-TV-Z]{26}$/),
2180
2474
  });
2181
- export const zFileStoreUpdateQuery = z.object({
2182
- scope: z.enum(["user"]).optional(),
2183
- });
2184
2475
  /**
2185
2476
  * Updated file store
2186
2477
  */
@@ -2188,9 +2479,6 @@ export const zFileStoreUpdateResponse = zFileStore;
2188
2479
  export const zFileStoreArchivePath = z.object({
2189
2480
  id: z.string().regex(/^fst_[0-9A-HJKMNP-TV-Z]{26}$/),
2190
2481
  });
2191
- export const zFileStoreArchiveQuery = z.object({
2192
- scope: z.enum(["user"]).optional(),
2193
- });
2194
2482
  /**
2195
2483
  * Archived file store
2196
2484
  */
@@ -2199,7 +2487,6 @@ export const zFileStoreFilesDeletePath = z.object({
2199
2487
  id: z.string().regex(/^fst_[0-9A-HJKMNP-TV-Z]{26}$/),
2200
2488
  });
2201
2489
  export const zFileStoreFilesDeleteQuery = z.object({
2202
- scope: z.enum(["user"]).optional(),
2203
2490
  path: z.string().min(1),
2204
2491
  });
2205
2492
  /**
@@ -2212,7 +2499,6 @@ export const zFileStoreFilesListPath = z.object({
2212
2499
  id: z.string().regex(/^fst_[0-9A-HJKMNP-TV-Z]{26}$/),
2213
2500
  });
2214
2501
  export const zFileStoreFilesListQuery = z.object({
2215
- scope: z.enum(["user"]).optional(),
2216
2502
  prefix: z.string().optional(),
2217
2503
  limit: z.int().gt(0).lte(1000).optional(),
2218
2504
  });
@@ -2224,7 +2510,6 @@ export const zFileStoreFilesPresignDownloadPath = z.object({
2224
2510
  id: z.string().regex(/^fst_[0-9A-HJKMNP-TV-Z]{26}$/),
2225
2511
  });
2226
2512
  export const zFileStoreFilesPresignDownloadQuery = z.object({
2227
- scope: z.enum(["user"]).optional(),
2228
2513
  path: z.string().min(1),
2229
2514
  expiresInSeconds: z.int().gt(0).lte(9007199254740991).optional(),
2230
2515
  });
@@ -2240,9 +2525,6 @@ export const zFileStoreFilesStartUploadBody = z.object({
2240
2525
  export const zFileStoreFilesStartUploadPath = z.object({
2241
2526
  id: z.string().regex(/^fst_[0-9A-HJKMNP-TV-Z]{26}$/),
2242
2527
  });
2243
- export const zFileStoreFilesStartUploadQuery = z.object({
2244
- scope: z.enum(["user"]).optional(),
2245
- });
2246
2528
  /**
2247
2529
  * Presigned PUT URL the browser uploads to directly
2248
2530
  */
@@ -2253,22 +2535,39 @@ export const zFileStoreFilesFinalizeUploadBody = z.object({
2253
2535
  export const zFileStoreFilesFinalizeUploadPath = z.object({
2254
2536
  id: z.string().regex(/^fst_[0-9A-HJKMNP-TV-Z]{26}$/),
2255
2537
  });
2256
- export const zFileStoreFilesFinalizeUploadQuery = z.object({
2257
- scope: z.enum(["user"]).optional(),
2258
- });
2259
2538
  /**
2260
2539
  * Finalized file info
2261
2540
  */
2262
2541
  export const zFileStoreFilesFinalizeUploadResponse = zFileStoreFile;
2263
- export const zGithubUninstallQuery = z.object({
2264
- scope: z.enum(["user"]).optional(),
2542
+ export const zInvitationPreviewPath = z.object({
2543
+ id: z.string().min(1).max(128),
2544
+ });
2545
+ /**
2546
+ * Presentation details and current state for an invitation link
2547
+ */
2548
+ export const zInvitationPreviewResponse = z.object({
2549
+ state: z.enum(["pending", "expired", "accepted", "unavailable", "invalid"]),
2550
+ organization: z
2551
+ .object({
2552
+ id: z.string(),
2553
+ name: z.string(),
2554
+ logo: z.string().nullable(),
2555
+ })
2556
+ .nullable(),
2557
+ inviter: z
2558
+ .object({
2559
+ name: z.string().nullable(),
2560
+ email: z
2561
+ .email()
2562
+ .regex(/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/),
2563
+ })
2564
+ .nullable(),
2265
2565
  });
2266
2566
  /**
2267
2567
  * Removed
2268
2568
  */
2269
2569
  export const zGithubUninstallResponse = z.void();
2270
2570
  export const zGithubInstallQuery = z.object({
2271
- scope: z.enum(["user"]).optional(),
2272
2571
  returnTo: z.string().optional(),
2273
2572
  });
2274
2573
  /**
@@ -2276,30 +2575,20 @@ export const zGithubInstallQuery = z.object({
2276
2575
  */
2277
2576
  export const zGithubInstallResponse = zGithubOAuthStartResult;
2278
2577
  export const zGithubConnectQuery = z.object({
2279
- scope: z.enum(["user"]).optional(),
2280
2578
  returnTo: z.string().optional(),
2281
2579
  });
2282
2580
  /**
2283
2581
  * Authorization URL for the user to visit
2284
2582
  */
2285
2583
  export const zGithubConnectResponse = zGithubOAuthStartResult;
2286
- export const zGithubStatusQuery = z.object({
2287
- scope: z.enum(["user"]).optional(),
2288
- });
2289
2584
  /**
2290
2585
  * GitHub configuration status
2291
2586
  */
2292
2587
  export const zGithubStatusResponse = zGithubStatus;
2293
- export const zGithubReposQuery = z.object({
2294
- scope: z.enum(["user"]).optional(),
2295
- });
2296
2588
  /**
2297
2589
  * Repositories
2298
2590
  */
2299
2591
  export const zGithubReposResponse = z.array(zGithubRepo);
2300
- export const zGithubMappingsListQuery = z.object({
2301
- scope: z.enum(["user"]).optional(),
2302
- });
2303
2592
  /**
2304
2593
  * Repo mappings
2305
2594
  */
@@ -2308,7 +2597,6 @@ export const zGithubMappingUnsetPath = z.object({
2308
2597
  repoId: z.string().min(1),
2309
2598
  });
2310
2599
  export const zGithubMappingUnsetQuery = z.object({
2311
- scope: z.enum(["user"]).optional(),
2312
2600
  installationId: z.string().min(1),
2313
2601
  });
2314
2602
  /**
@@ -2326,23 +2614,14 @@ export const zGithubMappingSetBody = z.object({
2326
2614
  export const zGithubMappingSetPath = z.object({
2327
2615
  repoId: z.string().min(1),
2328
2616
  });
2329
- export const zGithubMappingSetQuery = z.object({
2330
- scope: z.enum(["user"]).optional(),
2331
- });
2332
2617
  /**
2333
2618
  * Mapped
2334
2619
  */
2335
2620
  export const zGithubMappingSetResponse = z.void();
2336
- export const zGoogleStatusQuery = z.object({
2337
- scope: z.enum(["user"]).optional(),
2338
- });
2339
2621
  /**
2340
2622
  * Google Workspace configuration status
2341
2623
  */
2342
2624
  export const zGoogleStatusResponse = zGoogleWorkspaceStatus;
2343
- export const zGoogleConfigDeleteQuery = z.object({
2344
- scope: z.enum(["user"]).optional(),
2345
- });
2346
2625
  /**
2347
2626
  * Removed
2348
2627
  */
@@ -2352,9 +2631,6 @@ export const zGoogleConfigSaveBody = z.object({
2352
2631
  clientSecret: z.string().min(1),
2353
2632
  scopes: z.array(z.string().min(1)).min(1).optional(),
2354
2633
  });
2355
- export const zGoogleConfigSaveQuery = z.object({
2356
- scope: z.enum(["user"]).optional(),
2357
- });
2358
2634
  /**
2359
2635
  * Updated Google Workspace configuration status
2360
2636
  */
@@ -2362,9 +2638,6 @@ export const zGoogleConfigSaveResponse = zGoogleWorkspaceStatus;
2362
2638
  export const zGoogleDisconnectPath = z.object({
2363
2639
  vaultId: z.string(),
2364
2640
  });
2365
- export const zGoogleDisconnectQuery = z.object({
2366
- scope: z.enum(["user"]).optional(),
2367
- });
2368
2641
  /**
2369
2642
  * Removed
2370
2643
  */
@@ -2373,7 +2646,6 @@ export const zGoogleConnectPath = z.object({
2373
2646
  vaultId: z.string(),
2374
2647
  });
2375
2648
  export const zGoogleConnectQuery = z.object({
2376
- scope: z.enum(["user"]).optional(),
2377
2649
  returnTo: z.string().optional(),
2378
2650
  });
2379
2651
  /**
@@ -2381,11 +2653,11 @@ export const zGoogleConnectQuery = z.object({
2381
2653
  */
2382
2654
  export const zGoogleConnectResponse = zGoogleWorkspaceOAuthStartResult;
2383
2655
  export const zMcpListQuery = z.object({
2384
- scope: z.enum(["user"]).optional(),
2385
- limit: z.number().gte(1).lte(1000).optional(),
2386
- offset: z.number().gte(0).optional(),
2656
+ limit: z.int().gte(1).lte(1000).optional(),
2657
+ offset: z.int().gte(0).lte(9007199254740991).optional(),
2387
2658
  includeDeprecated: z.boolean().optional(),
2388
2659
  sort: z.enum(["popular", "trending", "recent"]).optional(),
2660
+ visibility: z.enum(["private", "org"]).optional(),
2389
2661
  });
2390
2662
  /**
2391
2663
  * List of MCPs
@@ -2411,9 +2683,7 @@ export const zMcpCreateBody = z.object({
2411
2683
  auth: z.enum(["none", "oauth", "api_key", "basic", "mcp_provider"]).optional().default("none"),
2412
2684
  authConfig: zMcpAuthConfig.nullish().default(null),
2413
2685
  tags: z.array(z.string()).optional(),
2414
- });
2415
- export const zMcpCreateQuery = z.object({
2416
- scope: z.enum(["user"]).optional(),
2686
+ visibility: z.enum(["private", "org"]).optional().default("org"),
2417
2687
  });
2418
2688
  /**
2419
2689
  * Created MCP
@@ -2428,9 +2698,6 @@ export const zMcpSearchBody = z.object({
2428
2698
  .default(["user", "org", "registry"]),
2429
2699
  limit: z.int().gte(1).lte(50).optional().default(20),
2430
2700
  });
2431
- export const zMcpSearchQuery = z.object({
2432
- scope: z.enum(["user"]).optional(),
2433
- });
2434
2701
  /**
2435
2702
  * Matching MCPs
2436
2703
  */
@@ -2442,9 +2709,6 @@ export const zMcpGetBySlugPath = z.object({
2442
2709
  .max(128)
2443
2710
  .regex(/^[a-z0-9-]+$/),
2444
2711
  });
2445
- export const zMcpGetBySlugQuery = z.object({
2446
- scope: z.enum(["user"]).optional(),
2447
- });
2448
2712
  /**
2449
2713
  * MCP details
2450
2714
  */
@@ -2452,9 +2716,6 @@ export const zMcpGetBySlugResponse = zMcp;
2452
2716
  export const zMcpGetPath = z.object({
2453
2717
  id: z.string().regex(/^mcp_[0-9A-HJKMNP-TV-Z]{26}$/),
2454
2718
  });
2455
- export const zMcpGetQuery = z.object({
2456
- scope: z.enum(["user"]).optional(),
2457
- });
2458
2719
  /**
2459
2720
  * MCP details
2460
2721
  */
@@ -2483,9 +2744,6 @@ export const zMcpUpdateBody = z.object({
2483
2744
  export const zMcpUpdatePath = z.object({
2484
2745
  id: z.string().regex(/^mcp_[0-9A-HJKMNP-TV-Z]{26}$/),
2485
2746
  });
2486
- export const zMcpUpdateQuery = z.object({
2487
- scope: z.enum(["user"]).optional(),
2488
- });
2489
2747
  /**
2490
2748
  * Updated MCP
2491
2749
  */
@@ -2493,9 +2751,6 @@ export const zMcpUpdateResponse = zMcp;
2493
2751
  export const zMcpArchivePath = z.object({
2494
2752
  id: z.string().regex(/^mcp_[0-9A-HJKMNP-TV-Z]{26}$/),
2495
2753
  });
2496
- export const zMcpArchiveQuery = z.object({
2497
- scope: z.enum(["user"]).optional(),
2498
- });
2499
2754
  /**
2500
2755
  * Archived MCP
2501
2756
  */
@@ -2503,35 +2758,23 @@ export const zMcpArchiveResponse = zMcp;
2503
2758
  export const zMcpPublishPath = z.object({
2504
2759
  id: z.string().regex(/^mcp_[0-9A-HJKMNP-TV-Z]{26}$/),
2505
2760
  });
2506
- export const zMcpPublishQuery = z.object({
2507
- scope: z.enum(["user"]).optional(),
2508
- });
2509
2761
  /**
2510
2762
  * Published MCP
2511
2763
  */
2512
2764
  export const zMcpPublishResponse = zMcp;
2513
- export const zMcpCopyToOrgBody = z.object({
2514
- name: z.string().min(1).max(256).optional(),
2515
- });
2516
- export const zMcpCopyToOrgPath = z.object({
2765
+ export const zMcpPromotePath = z.object({
2517
2766
  id: z.string().regex(/^mcp_[0-9A-HJKMNP-TV-Z]{26}$/),
2518
2767
  });
2519
- export const zMcpCopyToOrgQuery = z.object({
2520
- scope: z.enum(["user"]).optional(),
2521
- });
2522
2768
  /**
2523
- * Copied MCP
2769
+ * Promoted MCP
2524
2770
  */
2525
- export const zMcpCopyToOrgResponse = zMcp;
2771
+ export const zMcpPromoteResponse = zMcp;
2526
2772
  export const zMcpDeprecateBody = z.object({
2527
2773
  message: z.string().nullish(),
2528
2774
  });
2529
2775
  export const zMcpDeprecatePath = z.object({
2530
2776
  id: z.string().regex(/^mcp_[0-9A-HJKMNP-TV-Z]{26}$/),
2531
2777
  });
2532
- export const zMcpDeprecateQuery = z.object({
2533
- scope: z.enum(["user"]).optional(),
2534
- });
2535
2778
  /**
2536
2779
  * Deprecated MCP
2537
2780
  */
@@ -2539,9 +2782,6 @@ export const zMcpDeprecateResponse = zMcp;
2539
2782
  export const zMcpUndeprecatePath = z.object({
2540
2783
  id: z.string().regex(/^mcp_[0-9A-HJKMNP-TV-Z]{26}$/),
2541
2784
  });
2542
- export const zMcpUndeprecateQuery = z.object({
2543
- scope: z.enum(["user"]).optional(),
2544
- });
2545
2785
  /**
2546
2786
  * Undeprecated MCP
2547
2787
  */
@@ -2550,9 +2790,6 @@ export const zMcpOauthConnectBody = zMcpOAuthConnectBody;
2550
2790
  export const zMcpOauthConnectPath = z.object({
2551
2791
  id: z.string().regex(/^mcp_[0-9A-HJKMNP-TV-Z]{26}$/),
2552
2792
  });
2553
- export const zMcpOauthConnectQuery = z.object({
2554
- scope: z.enum(["user"]).optional(),
2555
- });
2556
2793
  /**
2557
2794
  * OAuth connect result
2558
2795
  */
@@ -2561,9 +2798,6 @@ export const zMcpOauthSessionPath = z.object({
2561
2798
  id: z.string().regex(/^mcp_[0-9A-HJKMNP-TV-Z]{26}$/),
2562
2799
  sessionId: z.string().regex(/^oas_[0-9A-HJKMNP-TV-Z]{26}$/),
2563
2800
  });
2564
- export const zMcpOauthSessionQuery = z.object({
2565
- scope: z.enum(["user"]).optional(),
2566
- });
2567
2801
  /**
2568
2802
  * OAuth session status
2569
2803
  */
@@ -2572,13 +2806,27 @@ export const zMcpOauthSessionResponse = zOAuthSessionStatus;
2572
2806
  * Resolved auth context
2573
2807
  */
2574
2808
  export const zMeGetResponse = zMe;
2809
+ export const zMeUpdatePersonaBody = z.object({
2810
+ persona: zMemberPersona,
2811
+ });
2812
+ /**
2813
+ * Persona updated
2814
+ */
2815
+ export const zMeUpdatePersonaResponse = zMemberPersonaUpdate;
2816
+ export const zMeCompleteOnboardingBody = z.object({
2817
+ timezone: z.string().min(1).max(255).optional(),
2818
+ });
2819
+ /**
2820
+ * Onboarding recorded
2821
+ */
2822
+ export const zMeCompleteOnboardingResponse = zOnboardingComplete;
2575
2823
  export const zMemoryStoreListQuery = z.object({
2576
- scope: z.enum(["user"]).optional(),
2577
2824
  orgId: z.string().optional(),
2578
- limit: z.number().gte(1).lte(1000).optional(),
2579
- offset: z.number().gte(0).optional(),
2825
+ limit: z.int().gte(1).lte(1000).optional(),
2826
+ offset: z.int().gte(0).lte(9007199254740991).optional(),
2580
2827
  includeDeprecated: z.boolean().optional(),
2581
2828
  userId: z.string().nullish(),
2829
+ visibility: z.enum(["private", "org"]).optional(),
2582
2830
  });
2583
2831
  /**
2584
2832
  * List of memory stores
@@ -2588,9 +2836,7 @@ export const zMemoryStoreCreateBody = z.object({
2588
2836
  name: z.string().min(1).max(256),
2589
2837
  description: z.string().optional().default(""),
2590
2838
  isDefault: z.boolean().optional().default(false),
2591
- });
2592
- export const zMemoryStoreCreateQuery = z.object({
2593
- scope: z.enum(["user"]).optional(),
2839
+ visibility: z.enum(["private", "org"]).optional().default("org"),
2594
2840
  });
2595
2841
  /**
2596
2842
  * Created memory store
@@ -2599,9 +2845,6 @@ export const zMemoryStoreCreateResponse = zMemoryStore;
2599
2845
  export const zMemoryStoreGetPath = z.object({
2600
2846
  id: z.string().regex(/^mst_[0-9A-HJKMNP-TV-Z]{26}$/),
2601
2847
  });
2602
- export const zMemoryStoreGetQuery = z.object({
2603
- scope: z.enum(["user"]).optional(),
2604
- });
2605
2848
  /**
2606
2849
  * Memory store details
2607
2850
  */
@@ -2613,9 +2856,6 @@ export const zMemoryStoreUpdateBody = z.object({
2613
2856
  export const zMemoryStoreUpdatePath = z.object({
2614
2857
  id: z.string().regex(/^mst_[0-9A-HJKMNP-TV-Z]{26}$/),
2615
2858
  });
2616
- export const zMemoryStoreUpdateQuery = z.object({
2617
- scope: z.enum(["user"]).optional(),
2618
- });
2619
2859
  /**
2620
2860
  * Updated memory store
2621
2861
  */
@@ -2623,9 +2863,6 @@ export const zMemoryStoreUpdateResponse = zMemoryStore;
2623
2863
  export const zMemoryStoreArchivePath = z.object({
2624
2864
  id: z.string().regex(/^mst_[0-9A-HJKMNP-TV-Z]{26}$/),
2625
2865
  });
2626
- export const zMemoryStoreArchiveQuery = z.object({
2627
- scope: z.enum(["user"]).optional(),
2628
- });
2629
2866
  /**
2630
2867
  * Archived memory store
2631
2868
  */
@@ -2634,7 +2871,6 @@ export const zMemoryStoreFilesDeletePath = z.object({
2634
2871
  id: z.string().regex(/^mst_[0-9A-HJKMNP-TV-Z]{26}$/),
2635
2872
  });
2636
2873
  export const zMemoryStoreFilesDeleteQuery = z.object({
2637
- scope: z.enum(["user"]).optional(),
2638
2874
  path: z.string().min(1),
2639
2875
  });
2640
2876
  /**
@@ -2647,7 +2883,6 @@ export const zMemoryStoreFilesListPath = z.object({
2647
2883
  id: z.string().regex(/^mst_[0-9A-HJKMNP-TV-Z]{26}$/),
2648
2884
  });
2649
2885
  export const zMemoryStoreFilesListQuery = z.object({
2650
- scope: z.enum(["user"]).optional(),
2651
2886
  prefix: z.string().optional(),
2652
2887
  limit: z.int().gt(0).lte(1000).optional(),
2653
2888
  });
@@ -2659,7 +2894,6 @@ export const zMemoryStoreFilesPresignDownloadPath = z.object({
2659
2894
  id: z.string().regex(/^mst_[0-9A-HJKMNP-TV-Z]{26}$/),
2660
2895
  });
2661
2896
  export const zMemoryStoreFilesPresignDownloadQuery = z.object({
2662
- scope: z.enum(["user"]).optional(),
2663
2897
  path: z.string().min(1),
2664
2898
  expiresInSeconds: z.int().gt(0).lte(9007199254740991).optional(),
2665
2899
  });
@@ -2675,9 +2909,6 @@ export const zMemoryStoreFilesStartUploadBody = z.object({
2675
2909
  export const zMemoryStoreFilesStartUploadPath = z.object({
2676
2910
  id: z.string().regex(/^mst_[0-9A-HJKMNP-TV-Z]{26}$/),
2677
2911
  });
2678
- export const zMemoryStoreFilesStartUploadQuery = z.object({
2679
- scope: z.enum(["user"]).optional(),
2680
- });
2681
2912
  /**
2682
2913
  * Presigned PUT URL the browser uploads to directly
2683
2914
  */
@@ -2688,9 +2919,6 @@ export const zMemoryStoreFilesFinalizeUploadBody = z.object({
2688
2919
  export const zMemoryStoreFilesFinalizeUploadPath = z.object({
2689
2920
  id: z.string().regex(/^mst_[0-9A-HJKMNP-TV-Z]{26}$/),
2690
2921
  });
2691
- export const zMemoryStoreFilesFinalizeUploadQuery = z.object({
2692
- scope: z.enum(["user"]).optional(),
2693
- });
2694
2922
  /**
2695
2923
  * Finalized file info
2696
2924
  */
@@ -2704,9 +2932,6 @@ export const zOnboardingStartBody = z.object({
2704
2932
  skillIds: z.array(z.string()).max(64).optional().default([]),
2705
2933
  mcpIds: z.array(z.string()).max(64).optional().default([]),
2706
2934
  });
2707
- export const zOnboardingStartQuery = z.object({
2708
- scope: z.enum(["user"]).optional(),
2709
- });
2710
2935
  /**
2711
2936
  * Session created and prompt sent
2712
2937
  */
@@ -2715,25 +2940,38 @@ export const zOnboardingStartResponse = zOnboardingStart;
2715
2940
  * Personal organization ready
2716
2941
  */
2717
2942
  export const zOnboardingSetupPersonalOrgResponse = zOnboardingSetupPersonalOrg;
2718
- export const zPatListQuery = z.object({
2719
- scope: z.enum(["user"]).optional(),
2943
+ /**
2944
+ * Organization settings
2945
+ */
2946
+ export const zOrgGetResponse = zOrgSettings;
2947
+ export const zOrgUpdateBody = z.object({
2948
+ defaultModel: z.string().nullish(),
2949
+ instructions: z.string().optional(),
2720
2950
  });
2951
+ /**
2952
+ * Updated organization settings
2953
+ */
2954
+ export const zOrgUpdateResponse = zOrgSettings;
2955
+ export const zOrganizationLogoUploadBody = z.object({
2956
+ file: z.string(),
2957
+ });
2958
+ /**
2959
+ * Persistent organization logo URL
2960
+ */
2961
+ export const zOrganizationLogoUploadResponse = zOrganizationLogoUpload;
2721
2962
  /**
2722
2963
  * List of PATs
2723
2964
  */
2724
2965
  export const zPatListResponse = z.array(zPat);
2725
2966
  export const zPatCreateBody = z.object({
2726
2967
  name: z.string().min(1).max(128),
2727
- scopes: z.array(z.string()).min(1),
2968
+ role: z.enum(["readonly", "member", "admin"]),
2728
2969
  expiresAt: z.iso
2729
2970
  .datetime()
2730
2971
  .regex(/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$/)
2731
2972
  .nullish()
2732
2973
  .default(null),
2733
2974
  });
2734
- export const zPatCreateQuery = z.object({
2735
- scope: z.enum(["user"]).optional(),
2736
- });
2737
2975
  /**
2738
2976
  * Created PAT (token shown once)
2739
2977
  */
@@ -2744,20 +2982,17 @@ export const zPatCreateResponse = z.object({
2744
2982
  export const zPatRevokePath = z.object({
2745
2983
  id: z.string().regex(/^pat_[0-9A-HJKMNP-TV-Z]{26}$/),
2746
2984
  });
2747
- export const zPatRevokeQuery = z.object({
2748
- scope: z.enum(["user"]).optional(),
2749
- });
2750
2985
  /**
2751
2986
  * Revoked PAT
2752
2987
  */
2753
2988
  export const zPatRevokeResponse = zPat;
2754
2989
  export const zPodListQuery = z.object({
2755
- scope: z.enum(["user"]).optional(),
2756
2990
  orgId: z.string().optional(),
2757
- limit: z.number().gte(1).lte(1000).optional(),
2758
- offset: z.number().gte(0).optional(),
2991
+ limit: z.int().gte(1).lte(1000).optional(),
2992
+ offset: z.int().gte(0).lte(9007199254740991).optional(),
2759
2993
  includeDeprecated: z.boolean().optional(),
2760
2994
  userId: z.string().nullish(),
2995
+ visibility: z.enum(["private", "org"]).optional(),
2761
2996
  });
2762
2997
  /**
2763
2998
  * List of pods
@@ -2767,11 +3002,11 @@ export const zPodCreateBody = z.object({
2767
3002
  name: z.string().min(1).max(256),
2768
3003
  environmentId: z.string().nullish().default(null),
2769
3004
  description: z.string().optional().default(""),
3005
+ instructions: z.string().optional().default(""),
2770
3006
  isPrivate: z.boolean().optional().default(true),
2771
3007
  isDefault: z.boolean().optional().default(false),
2772
- });
2773
- export const zPodCreateQuery = z.object({
2774
- scope: z.enum(["user"]).optional(),
3008
+ createDefaultProject: z.boolean().optional().default(true),
3009
+ visibility: z.enum(["private", "org"]).optional().default("org"),
2775
3010
  });
2776
3011
  /**
2777
3012
  * Created pod with freshly provisioned sandbox
@@ -2780,9 +3015,6 @@ export const zPodCreateResponse = zPodWithSandbox;
2780
3015
  export const zPodGetPath = z.object({
2781
3016
  id: z.string().regex(/^pod_[0-9A-HJKMNP-TV-Z]{26}$/),
2782
3017
  });
2783
- export const zPodGetQuery = z.object({
2784
- scope: z.enum(["user"]).optional(),
2785
- });
2786
3018
  /**
2787
3019
  * Pod details
2788
3020
  */
@@ -2792,22 +3024,25 @@ export const zPodUpdateBody = z.object({
2792
3024
  description: z.string().optional(),
2793
3025
  isPrivate: z.boolean().optional(),
2794
3026
  environmentId: z.string().nullish(),
3027
+ defaultModel: z.string().nullish(),
3028
+ instructions: z.string().optional(),
2795
3029
  });
2796
3030
  export const zPodUpdatePath = z.object({
2797
3031
  id: z.string().regex(/^pod_[0-9A-HJKMNP-TV-Z]{26}$/),
2798
3032
  });
2799
- export const zPodUpdateQuery = z.object({
2800
- scope: z.enum(["user"]).optional(),
2801
- });
2802
3033
  /**
2803
3034
  * Updated pod
2804
3035
  */
2805
3036
  export const zPodUpdateResponse = zPod;
2806
- export const zPodArchivePath = z.object({
3037
+ export const zPodUsagePath = z.object({
2807
3038
  id: z.string().regex(/^pod_[0-9A-HJKMNP-TV-Z]{26}$/),
2808
3039
  });
2809
- export const zPodArchiveQuery = z.object({
2810
- scope: z.enum(["user"]).optional(),
3040
+ /**
3041
+ * Pod credit usage
3042
+ */
3043
+ export const zPodUsageResponse = zUsage;
3044
+ export const zPodArchivePath = z.object({
3045
+ id: z.string().regex(/^pod_[0-9A-HJKMNP-TV-Z]{26}$/),
2811
3046
  });
2812
3047
  /**
2813
3048
  * Archived pod
@@ -2816,9 +3051,6 @@ export const zPodArchiveResponse = zPod;
2816
3051
  export const zPodMemberListPath = z.object({
2817
3052
  id: z.string().regex(/^pod_[0-9A-HJKMNP-TV-Z]{26}$/),
2818
3053
  });
2819
- export const zPodMemberListQuery = z.object({
2820
- scope: z.enum(["user"]).optional(),
2821
- });
2822
3054
  /**
2823
3055
  * List of members
2824
3056
  */
@@ -2830,9 +3062,6 @@ export const zPodMemberAddBody = z.object({
2830
3062
  export const zPodMemberAddPath = z.object({
2831
3063
  id: z.string().regex(/^pod_[0-9A-HJKMNP-TV-Z]{26}$/),
2832
3064
  });
2833
- export const zPodMemberAddQuery = z.object({
2834
- scope: z.enum(["user"]).optional(),
2835
- });
2836
3065
  /**
2837
3066
  * Added member
2838
3067
  */
@@ -2841,9 +3070,6 @@ export const zPodMemberRemovePath = z.object({
2841
3070
  id: z.string().regex(/^pod_[0-9A-HJKMNP-TV-Z]{26}$/),
2842
3071
  userId: z.string().regex(/^usr_[0-9A-HJKMNP-TV-Z]{26}$/),
2843
3072
  });
2844
- export const zPodMemberRemoveQuery = z.object({
2845
- scope: z.enum(["user"]).optional(),
2846
- });
2847
3073
  /**
2848
3074
  * Removed member
2849
3075
  */
@@ -2851,9 +3077,6 @@ export const zPodMemberRemoveResponse = zPodMember;
2851
3077
  export const zPodVaultListPath = z.object({
2852
3078
  id: z.string().regex(/^pod_[0-9A-HJKMNP-TV-Z]{26}$/),
2853
3079
  });
2854
- export const zPodVaultListQuery = z.object({
2855
- scope: z.enum(["user"]).optional(),
2856
- });
2857
3080
  /**
2858
3081
  * List of vault associations
2859
3082
  */
@@ -2865,9 +3088,6 @@ export const zPodVaultAddBody = z.object({
2865
3088
  export const zPodVaultAddPath = z.object({
2866
3089
  id: z.string().regex(/^pod_[0-9A-HJKMNP-TV-Z]{26}$/),
2867
3090
  });
2868
- export const zPodVaultAddQuery = z.object({
2869
- scope: z.enum(["user"]).optional(),
2870
- });
2871
3091
  /**
2872
3092
  * Added vault
2873
3093
  */
@@ -2876,9 +3096,6 @@ export const zPodVaultRemovePath = z.object({
2876
3096
  id: z.string().regex(/^pod_[0-9A-HJKMNP-TV-Z]{26}$/),
2877
3097
  vaultId: z.string().regex(/^vlt_[0-9A-HJKMNP-TV-Z]{26}$/),
2878
3098
  });
2879
- export const zPodVaultRemoveQuery = z.object({
2880
- scope: z.enum(["user"]).optional(),
2881
- });
2882
3099
  /**
2883
3100
  * Removed vault
2884
3101
  */
@@ -2886,9 +3103,6 @@ export const zPodVaultRemoveResponse = zPodVault;
2886
3103
  export const zPodSandboxProvisionPath = z.object({
2887
3104
  podId: z.string().regex(/^pod_[0-9A-HJKMNP-TV-Z]{26}$/),
2888
3105
  });
2889
- export const zPodSandboxProvisionQuery = z.object({
2890
- scope: z.enum(["user"]).optional(),
2891
- });
2892
3106
  /**
2893
3107
  * Workflow started or joined
2894
3108
  */
@@ -2896,9 +3110,6 @@ export const zPodSandboxProvisionResponse2 = zPodSandboxProvisionResponse;
2896
3110
  export const zPodSandboxTeardownPath = z.object({
2897
3111
  podId: z.string().regex(/^pod_[0-9A-HJKMNP-TV-Z]{26}$/),
2898
3112
  });
2899
- export const zPodSandboxTeardownQuery = z.object({
2900
- scope: z.enum(["user"]).optional(),
2901
- });
2902
3113
  /**
2903
3114
  * Teardown result
2904
3115
  */
@@ -2906,22 +3117,19 @@ export const zPodSandboxTeardownResponse2 = zPodSandboxTeardownResponse;
2906
3117
  export const zPodSandboxStatusPath = z.object({
2907
3118
  podId: z.string().regex(/^pod_[0-9A-HJKMNP-TV-Z]{26}$/),
2908
3119
  });
2909
- export const zPodSandboxStatusQuery = z.object({
2910
- scope: z.enum(["user"]).optional(),
2911
- });
2912
3120
  /**
2913
3121
  * Current sandbox state
2914
3122
  */
2915
3123
  export const zPodSandboxStatusResponse2 = zPodSandboxStatusResponse;
2916
3124
  export const zProjectListQuery = z.object({
2917
- scope: z.enum(["user"]).optional(),
2918
- limit: z.number().gte(1).lte(1000).optional(),
2919
- offset: z.number().gte(0).optional(),
3125
+ limit: z.int().gte(1).lte(1000).optional(),
3126
+ offset: z.int().gte(0).lte(9007199254740991).optional(),
2920
3127
  includeDeprecated: z.boolean().optional(),
2921
3128
  podId: z
2922
3129
  .string()
2923
3130
  .regex(/^pod_[0-9A-HJKMNP-TV-Z]{26}$/)
2924
3131
  .optional(),
3132
+ visibility: z.enum(["private", "org"]).optional(),
2925
3133
  });
2926
3134
  /**
2927
3135
  * List of projects
@@ -2931,11 +3139,11 @@ export const zProjectCreateBody = z.object({
2931
3139
  podId: z.string().regex(/^pod_[0-9A-HJKMNP-TV-Z]{26}$/),
2932
3140
  name: z.string().min(1).max(256),
2933
3141
  description: z.string().optional().default(""),
3142
+ instructions: z.string().optional().default(""),
2934
3143
  permission: zPermissionConfig.optional(),
2935
3144
  gitRepos: z.array(zProjectGitRepo).optional().default([]),
2936
- });
2937
- export const zProjectCreateQuery = z.object({
2938
- scope: z.enum(["user"]).optional(),
3145
+ references: zProjectReferences.optional(),
3146
+ visibility: z.enum(["private", "org"]).optional().default("org"),
2939
3147
  });
2940
3148
  /**
2941
3149
  * Created project
@@ -2944,9 +3152,6 @@ export const zProjectCreateResponse = zProject;
2944
3152
  export const zProjectGetPath = z.object({
2945
3153
  id: z.string().regex(/^prj_[0-9A-HJKMNP-TV-Z]{26}$/),
2946
3154
  });
2947
- export const zProjectGetQuery = z.object({
2948
- scope: z.enum(["user"]).optional(),
2949
- });
2950
3155
  /**
2951
3156
  * Project details
2952
3157
  */
@@ -2956,22 +3161,37 @@ export const zProjectUpdateBody = z.object({
2956
3161
  description: z.string().optional(),
2957
3162
  permission: zPermissionConfig.optional(),
2958
3163
  gitRepos: z.array(zProjectGitRepo).optional(),
3164
+ references: zProjectReferences.optional(),
3165
+ defaultModel: z.string().nullish(),
3166
+ instructions: z.string().optional(),
2959
3167
  });
2960
3168
  export const zProjectUpdatePath = z.object({
2961
3169
  id: z.string().regex(/^prj_[0-9A-HJKMNP-TV-Z]{26}$/),
2962
3170
  });
2963
- export const zProjectUpdateQuery = z.object({
2964
- scope: z.enum(["user"]).optional(),
2965
- });
2966
3171
  /**
2967
3172
  * Updated project
2968
3173
  */
2969
3174
  export const zProjectUpdateResponse = zProject;
2970
- export const zProjectAgentListPath = z.object({
3175
+ export const zProjectUsagePath = z.object({
2971
3176
  id: z.string().regex(/^prj_[0-9A-HJKMNP-TV-Z]{26}$/),
2972
3177
  });
2973
- export const zProjectAgentListQuery = z.object({
2974
- scope: z.enum(["user"]).optional(),
3178
+ export const zProjectUsageQuery = z.object({
3179
+ groupBy: z.enum(["user", "member", "agent", "model", "session", "project", "pod", "source"]).optional(),
3180
+ start: z.iso
3181
+ .datetime()
3182
+ .regex(/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$/)
3183
+ .optional(),
3184
+ end: z.iso
3185
+ .datetime()
3186
+ .regex(/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$/)
3187
+ .optional(),
3188
+ });
3189
+ /**
3190
+ * Project credit usage
3191
+ */
3192
+ export const zProjectUsageResponse = zUsage;
3193
+ export const zProjectAgentListPath = z.object({
3194
+ id: z.string().regex(/^prj_[0-9A-HJKMNP-TV-Z]{26}$/),
2975
3195
  });
2976
3196
  /**
2977
3197
  * List of agent memberships
@@ -2980,14 +3200,11 @@ export const zProjectAgentListResponse = z.array(zProjectAgent);
2980
3200
  export const zProjectAgentAddBody = z.object({
2981
3201
  agentId: z.string().regex(/^agt_[0-9A-HJKMNP-TV-Z]{26}$/),
2982
3202
  agentVersionId: z.string().nullish().default(null),
2983
- type: z.enum(["primary", "subagent", "all"]).optional().default("all"),
3203
+ mode: z.enum(["subagent", "all"]).optional().default("all"),
2984
3204
  });
2985
3205
  export const zProjectAgentAddPath = z.object({
2986
3206
  id: z.string().regex(/^prj_[0-9A-HJKMNP-TV-Z]{26}$/),
2987
3207
  });
2988
- export const zProjectAgentAddQuery = z.object({
2989
- scope: z.enum(["user"]).optional(),
2990
- });
2991
3208
  /**
2992
3209
  * Attached agent
2993
3210
  */
@@ -2996,24 +3213,18 @@ export const zProjectAgentRemovePath = z.object({
2996
3213
  id: z.string().regex(/^prj_[0-9A-HJKMNP-TV-Z]{26}$/),
2997
3214
  agentId: z.string().regex(/^agt_[0-9A-HJKMNP-TV-Z]{26}$/),
2998
3215
  });
2999
- export const zProjectAgentRemoveQuery = z.object({
3000
- scope: z.enum(["user"]).optional(),
3001
- });
3002
3216
  /**
3003
3217
  * Detached agent
3004
3218
  */
3005
3219
  export const zProjectAgentRemoveResponse = zProjectAgent;
3006
3220
  export const zProjectAgentUpdateBody = z.object({
3007
3221
  agentVersionId: z.string().nullish(),
3008
- type: z.enum(["primary", "subagent", "all"]).optional(),
3222
+ mode: z.enum(["subagent", "all"]).optional(),
3009
3223
  });
3010
3224
  export const zProjectAgentUpdatePath = z.object({
3011
3225
  id: z.string().regex(/^prj_[0-9A-HJKMNP-TV-Z]{26}$/),
3012
3226
  agentId: z.string().regex(/^agt_[0-9A-HJKMNP-TV-Z]{26}$/),
3013
3227
  });
3014
- export const zProjectAgentUpdateQuery = z.object({
3015
- scope: z.enum(["user"]).optional(),
3016
- });
3017
3228
  /**
3018
3229
  * Updated agent membership
3019
3230
  */
@@ -3021,9 +3232,6 @@ export const zProjectAgentUpdateResponse = zProjectAgent;
3021
3232
  export const zProjectFileStoreListPath = z.object({
3022
3233
  id: z.string().regex(/^prj_[0-9A-HJKMNP-TV-Z]{26}$/),
3023
3234
  });
3024
- export const zProjectFileStoreListQuery = z.object({
3025
- scope: z.enum(["user"]).optional(),
3026
- });
3027
3235
  /**
3028
3236
  * List of file store attachments
3029
3237
  */
@@ -3034,9 +3242,6 @@ export const zProjectFileStoreAddBody = z.object({
3034
3242
  export const zProjectFileStoreAddPath = z.object({
3035
3243
  id: z.string().regex(/^prj_[0-9A-HJKMNP-TV-Z]{26}$/),
3036
3244
  });
3037
- export const zProjectFileStoreAddQuery = z.object({
3038
- scope: z.enum(["user"]).optional(),
3039
- });
3040
3245
  /**
3041
3246
  * Attached file store
3042
3247
  */
@@ -3045,9 +3250,6 @@ export const zProjectFileStoreRemovePath = z.object({
3045
3250
  id: z.string().regex(/^prj_[0-9A-HJKMNP-TV-Z]{26}$/),
3046
3251
  fileStoreId: z.string().regex(/^fst_[0-9A-HJKMNP-TV-Z]{26}$/),
3047
3252
  });
3048
- export const zProjectFileStoreRemoveQuery = z.object({
3049
- scope: z.enum(["user"]).optional(),
3050
- });
3051
3253
  /**
3052
3254
  * Detached file store
3053
3255
  */
@@ -3055,9 +3257,6 @@ export const zProjectFileStoreRemoveResponse = zProjectFileStore;
3055
3257
  export const zProjectMemoryStoreListPath = z.object({
3056
3258
  id: z.string().regex(/^prj_[0-9A-HJKMNP-TV-Z]{26}$/),
3057
3259
  });
3058
- export const zProjectMemoryStoreListQuery = z.object({
3059
- scope: z.enum(["user"]).optional(),
3060
- });
3061
3260
  /**
3062
3261
  * List of memory store attachments
3063
3262
  */
@@ -3068,9 +3267,6 @@ export const zProjectMemoryStoreAddBody = z.object({
3068
3267
  export const zProjectMemoryStoreAddPath = z.object({
3069
3268
  id: z.string().regex(/^prj_[0-9A-HJKMNP-TV-Z]{26}$/),
3070
3269
  });
3071
- export const zProjectMemoryStoreAddQuery = z.object({
3072
- scope: z.enum(["user"]).optional(),
3073
- });
3074
3270
  /**
3075
3271
  * Attached memory store
3076
3272
  */
@@ -3079,26 +3275,72 @@ export const zProjectMemoryStoreRemovePath = z.object({
3079
3275
  id: z.string().regex(/^prj_[0-9A-HJKMNP-TV-Z]{26}$/),
3080
3276
  memoryStoreId: z.string().regex(/^mst_[0-9A-HJKMNP-TV-Z]{26}$/),
3081
3277
  });
3082
- export const zProjectMemoryStoreRemoveQuery = z.object({
3083
- scope: z.enum(["user"]).optional(),
3084
- });
3085
3278
  /**
3086
3279
  * Detached memory store
3087
3280
  */
3088
3281
  export const zProjectMemoryStoreRemoveResponse = zProjectMemoryStore;
3089
- export const zProjectArchivePath = z.object({
3282
+ export const zProjectSkillListPath = z.object({
3283
+ id: z.string().regex(/^prj_[0-9A-HJKMNP-TV-Z]{26}$/),
3284
+ });
3285
+ /**
3286
+ * List of project skill attachments
3287
+ */
3288
+ export const zProjectSkillListResponse = z.array(zProjectSkill);
3289
+ export const zProjectSkillAddBody = z.object({
3290
+ skillId: z.string().regex(/^skl_[0-9A-HJKMNP-TV-Z]{26}$/),
3291
+ skillVersionId: z
3292
+ .string()
3293
+ .regex(/^skv_[0-9A-HJKMNP-TV-Z]{26}$/)
3294
+ .nullish()
3295
+ .default(null),
3296
+ });
3297
+ export const zProjectSkillAddPath = z.object({
3298
+ id: z.string().regex(/^prj_[0-9A-HJKMNP-TV-Z]{26}$/),
3299
+ });
3300
+ /**
3301
+ * Attached skill
3302
+ */
3303
+ export const zProjectSkillAddResponse = zProjectSkill;
3304
+ export const zProjectSkillRemovePath = z.object({
3305
+ id: z.string().regex(/^prj_[0-9A-HJKMNP-TV-Z]{26}$/),
3306
+ skillId: z.string().regex(/^skl_[0-9A-HJKMNP-TV-Z]{26}$/),
3307
+ });
3308
+ /**
3309
+ * Detached skill
3310
+ */
3311
+ export const zProjectSkillRemoveResponse = zProjectSkill;
3312
+ export const zProjectMcpListPath = z.object({
3313
+ id: z.string().regex(/^prj_[0-9A-HJKMNP-TV-Z]{26}$/),
3314
+ });
3315
+ /**
3316
+ * List of project MCP attachments
3317
+ */
3318
+ export const zProjectMcpListResponse = z.array(zProjectMcp);
3319
+ export const zProjectMcpAddBody = z.object({
3320
+ mcpId: z.string().regex(/^mcp_[0-9A-HJKMNP-TV-Z]{26}$/),
3321
+ });
3322
+ export const zProjectMcpAddPath = z.object({
3323
+ id: z.string().regex(/^prj_[0-9A-HJKMNP-TV-Z]{26}$/),
3324
+ });
3325
+ /**
3326
+ * Attached MCP
3327
+ */
3328
+ export const zProjectMcpAddResponse = zProjectMcp;
3329
+ export const zProjectMcpRemovePath = z.object({
3090
3330
  id: z.string().regex(/^prj_[0-9A-HJKMNP-TV-Z]{26}$/),
3331
+ mcpId: z.string().regex(/^mcp_[0-9A-HJKMNP-TV-Z]{26}$/),
3091
3332
  });
3092
- export const zProjectArchiveQuery = z.object({
3093
- scope: z.enum(["user"]).optional(),
3333
+ /**
3334
+ * Detached MCP
3335
+ */
3336
+ export const zProjectMcpRemoveResponse = zProjectMcp;
3337
+ export const zProjectArchivePath = z.object({
3338
+ id: z.string().regex(/^prj_[0-9A-HJKMNP-TV-Z]{26}$/),
3094
3339
  });
3095
3340
  /**
3096
3341
  * Archived project
3097
3342
  */
3098
3343
  export const zProjectArchiveResponse = zProject;
3099
- export const zPublisherMeQuery = z.object({
3100
- scope: z.enum(["user"]).optional(),
3101
- });
3102
3344
  /**
3103
3345
  * Caller's org publisher
3104
3346
  */
@@ -3111,9 +3353,6 @@ export const zPublisherClaimOrgBody = z.object({
3111
3353
  .regex(/^[a-z0-9-]+$/)
3112
3354
  .optional(),
3113
3355
  });
3114
- export const zPublisherClaimOrgQuery = z.object({
3115
- scope: z.enum(["user"]).optional(),
3116
- });
3117
3356
  /**
3118
3357
  * Org publisher
3119
3358
  */
@@ -3121,9 +3360,6 @@ export const zPublisherClaimOrgResponse = zPublisher;
3121
3360
  export const zPublisherGetPath = z.object({
3122
3361
  id: z.string().regex(/^pub_[0-9A-HJKMNP-TV-Z]{26}$/),
3123
3362
  });
3124
- export const zPublisherGetQuery = z.object({
3125
- scope: z.enum(["user"]).optional(),
3126
- });
3127
3363
  /**
3128
3364
  * Publisher
3129
3365
  */
@@ -3133,6 +3369,7 @@ export const zPublisherUpdateBody = z.object({
3133
3369
  description: z.string().nullish(),
3134
3370
  avatar: z.string().nullish(),
3135
3371
  url: z.string().nullish(),
3372
+ links: z.array(zPublisherLink).optional(),
3136
3373
  slug: z
3137
3374
  .string()
3138
3375
  .min(1)
@@ -3143,19 +3380,16 @@ export const zPublisherUpdateBody = z.object({
3143
3380
  export const zPublisherUpdatePath = z.object({
3144
3381
  id: z.string().regex(/^pub_[0-9A-HJKMNP-TV-Z]{26}$/),
3145
3382
  });
3146
- export const zPublisherUpdateQuery = z.object({
3147
- scope: z.enum(["user"]).optional(),
3148
- });
3149
3383
  /**
3150
3384
  * Updated publisher
3151
3385
  */
3152
3386
  export const zPublisherUpdateResponse = zPublisher;
3153
3387
  export const zReplayListQuery = z.object({
3154
- scope: z.enum(["user"]).optional(),
3155
- limit: z.number().gte(1).lte(1000).optional(),
3156
- offset: z.number().gte(0).optional(),
3388
+ limit: z.int().gte(1).lte(1000).optional(),
3389
+ offset: z.int().gte(0).lte(9007199254740991).optional(),
3157
3390
  includeDeprecated: z.boolean().optional(),
3158
3391
  publisherId: z.string().optional(),
3392
+ visibility: z.enum(["private", "org"]).optional(),
3159
3393
  });
3160
3394
  /**
3161
3395
  * List
@@ -3166,9 +3400,7 @@ export const zReplayCreateBody = z.object({
3166
3400
  publisherId: z.string().nullish().default(null),
3167
3401
  websiteMetadata: zWebsiteMetadata.nullish().default(null),
3168
3402
  shareToken: z.string().nullish().default(null),
3169
- });
3170
- export const zReplayCreateQuery = z.object({
3171
- scope: z.enum(["user"]).optional(),
3403
+ visibility: z.enum(["private", "org"]).optional().default("org"),
3172
3404
  });
3173
3405
  /**
3174
3406
  * Created
@@ -3177,9 +3409,6 @@ export const zReplayCreateResponse = zReplay;
3177
3409
  export const zReplayGetPath = z.object({
3178
3410
  id: z.string().regex(/^rpl_[0-9A-HJKMNP-TV-Z]{26}$/),
3179
3411
  });
3180
- export const zReplayGetQuery = z.object({
3181
- scope: z.enum(["user"]).optional(),
3182
- });
3183
3412
  /**
3184
3413
  * Details
3185
3414
  */
@@ -3190,9 +3419,6 @@ export const zReplayUpdateBody = z.object({
3190
3419
  export const zReplayUpdatePath = z.object({
3191
3420
  id: z.string().regex(/^rpl_[0-9A-HJKMNP-TV-Z]{26}$/),
3192
3421
  });
3193
- export const zReplayUpdateQuery = z.object({
3194
- scope: z.enum(["user"]).optional(),
3195
- });
3196
3422
  /**
3197
3423
  * Updated
3198
3424
  */
@@ -3200,9 +3426,6 @@ export const zReplayUpdateResponse = zReplay;
3200
3426
  export const zReplayArchivePath = z.object({
3201
3427
  id: z.string().regex(/^rpl_[0-9A-HJKMNP-TV-Z]{26}$/),
3202
3428
  });
3203
- export const zReplayArchiveQuery = z.object({
3204
- scope: z.enum(["user"]).optional(),
3205
- });
3206
3429
  /**
3207
3430
  * Archived
3208
3431
  */
@@ -3210,9 +3433,6 @@ export const zReplayArchiveResponse = zReplay;
3210
3433
  export const zReplayPublishPath = z.object({
3211
3434
  id: z.string().regex(/^rpl_[0-9A-HJKMNP-TV-Z]{26}$/),
3212
3435
  });
3213
- export const zReplayPublishQuery = z.object({
3214
- scope: z.enum(["user"]).optional(),
3215
- });
3216
3436
  /**
3217
3437
  * Published replay
3218
3438
  */
@@ -3223,9 +3443,6 @@ export const zReplayDeprecateBody = z.object({
3223
3443
  export const zReplayDeprecatePath = z.object({
3224
3444
  id: z.string().regex(/^rpl_[0-9A-HJKMNP-TV-Z]{26}$/),
3225
3445
  });
3226
- export const zReplayDeprecateQuery = z.object({
3227
- scope: z.enum(["user"]).optional(),
3228
- });
3229
3446
  /**
3230
3447
  * Deprecated replay
3231
3448
  */
@@ -3233,9 +3450,6 @@ export const zReplayDeprecateResponse = zReplay;
3233
3450
  export const zReplayUndeprecatePath = z.object({
3234
3451
  id: z.string().regex(/^rpl_[0-9A-HJKMNP-TV-Z]{26}$/),
3235
3452
  });
3236
- export const zReplayUndeprecateQuery = z.object({
3237
- scope: z.enum(["user"]).optional(),
3238
- });
3239
3453
  /**
3240
3454
  * Undeprecated replay
3241
3455
  */
@@ -3244,20 +3458,16 @@ export const zReplayShareBody = z.object({
3244
3458
  sessionId: z.string(),
3245
3459
  websiteMetadata: zWebsiteMetadata.nullish(),
3246
3460
  });
3247
- export const zReplayShareQuery = z.object({
3248
- scope: z.enum(["user"]).optional(),
3249
- });
3250
3461
  /**
3251
3462
  * Shared replay
3252
3463
  */
3253
3464
  export const zReplayShareResponse = zReplay;
3254
3465
  export const zSessionListQuery = z.object({
3255
- scope: z.enum(["user"]).optional(),
3256
3466
  podId: z.string().optional(),
3257
3467
  projectId: z.string().optional(),
3258
3468
  createdById: z.string().optional(),
3259
- limit: z.number().gte(1).lte(1000).optional(),
3260
- offset: z.number().gte(0).optional(),
3469
+ limit: z.int().gte(1).lte(1000).optional(),
3470
+ offset: z.int().gte(0).lte(9007199254740991).optional(),
3261
3471
  includeDeprecated: z.boolean().optional(),
3262
3472
  });
3263
3473
  /**
@@ -3269,19 +3479,20 @@ export const zSessionCreateBody = z.object({
3269
3479
  projectId: z.string().min(1),
3270
3480
  title: z.string().min(1).max(512),
3271
3481
  });
3272
- export const zSessionCreateQuery = z.object({
3273
- scope: z.enum(["user"]).optional(),
3482
+ /**
3483
+ * Session creation job accepted
3484
+ */
3485
+ export const zSessionCreateResponse = zSessionCreateJob;
3486
+ export const zSessionCreateStatusPath = z.object({
3487
+ jobId: z.string().regex(/^sjob_[0-9A-HJKMNP-TV-Z]{26}$/),
3274
3488
  });
3275
3489
  /**
3276
- * Created session
3490
+ * Session creation job status
3277
3491
  */
3278
- export const zSessionCreateResponse = zOpencodeSession;
3492
+ export const zSessionCreateStatusResponse = zSessionCreateStatus;
3279
3493
  export const zSessionGetPath = z.object({
3280
3494
  id: z.string().min(1),
3281
3495
  });
3282
- export const zSessionGetQuery = z.object({
3283
- scope: z.enum(["user"]).optional(),
3284
- });
3285
3496
  /**
3286
3497
  * Session details
3287
3498
  */
@@ -3305,9 +3516,6 @@ export const zSessionUpdateBody = z.object({
3305
3516
  export const zSessionUpdatePath = z.object({
3306
3517
  id: z.string().min(1),
3307
3518
  });
3308
- export const zSessionUpdateQuery = z.object({
3309
- scope: z.enum(["user"]).optional(),
3310
- });
3311
3519
  /**
3312
3520
  * Updated session
3313
3521
  */
@@ -3315,9 +3523,6 @@ export const zSessionUpdateResponse = zOpencodeSession;
3315
3523
  export const zSessionUrlPath = z.object({
3316
3524
  id: z.string().min(1),
3317
3525
  });
3318
- export const zSessionUrlQuery = z.object({
3319
- scope: z.enum(["user"]).optional(),
3320
- });
3321
3526
  /**
3322
3527
  * OpenCode URL
3323
3528
  */
@@ -3326,7 +3531,6 @@ export const zSessionMessagesListPath = z.object({
3326
3531
  id: z.string().min(1),
3327
3532
  });
3328
3533
  export const zSessionMessagesListQuery = z.object({
3329
- scope: z.enum(["user"]).optional(),
3330
3534
  pageNumber: z.int().gte(1).lte(9007199254740991).optional(),
3331
3535
  pageSize: z.int().gte(1).lte(100).optional(),
3332
3536
  });
@@ -3338,7 +3542,6 @@ export const zSessionTracesListPath = z.object({
3338
3542
  id: z.string().min(1),
3339
3543
  });
3340
3544
  export const zSessionTracesListQuery = z.object({
3341
- scope: z.enum(["user"]).optional(),
3342
3545
  limit: z.int().gt(0).lte(100).optional(),
3343
3546
  page: z.int().gt(0).lte(9007199254740991).optional(),
3344
3547
  fields: z.string().min(1).optional(),
@@ -3347,11 +3550,15 @@ export const zSessionTracesListQuery = z.object({
3347
3550
  * Session traces
3348
3551
  */
3349
3552
  export const zSessionTracesListResponse = zSessionTracesResponse;
3350
- export const zSessionAuthRequirementsPath = z.object({
3553
+ export const zSessionUsagePath = z.object({
3351
3554
  id: z.string().min(1),
3352
3555
  });
3353
- export const zSessionAuthRequirementsQuery = z.object({
3354
- scope: z.enum(["user"]).optional(),
3556
+ /**
3557
+ * Session credit usage
3558
+ */
3559
+ export const zSessionUsageResponse = zUsage;
3560
+ export const zSessionAuthRequirementsPath = z.object({
3561
+ id: z.string().min(1),
3355
3562
  });
3356
3563
  /**
3357
3564
  * Auth requirements with satisfaction flags
@@ -3360,9 +3567,6 @@ export const zSessionAuthRequirementsResponse = zAuthRequirements;
3360
3567
  export const zSessionArchivePath = z.object({
3361
3568
  id: z.string().min(1),
3362
3569
  });
3363
- export const zSessionArchiveQuery = z.object({
3364
- scope: z.enum(["user"]).optional(),
3365
- });
3366
3570
  /**
3367
3571
  * Archived session
3368
3572
  */
@@ -3375,9 +3579,6 @@ export const zSessionFilesPresignUploadBody = z.object({
3375
3579
  export const zSessionFilesPresignUploadPath = z.object({
3376
3580
  id: z.string().min(1),
3377
3581
  });
3378
- export const zSessionFilesPresignUploadQuery = z.object({
3379
- scope: z.enum(["user"]).optional(),
3380
- });
3381
3582
  /**
3382
3583
  * Presigned upload URL
3383
3584
  */
@@ -3386,19 +3587,16 @@ export const zSessionFilesPresignDownloadBody = zSessionVolumeRef;
3386
3587
  export const zSessionFilesPresignDownloadPath = z.object({
3387
3588
  id: z.string().min(1),
3388
3589
  });
3389
- export const zSessionFilesPresignDownloadQuery = z.object({
3390
- scope: z.enum(["user"]).optional(),
3391
- });
3392
3590
  /**
3393
3591
  * Presigned download URL
3394
3592
  */
3395
3593
  export const zSessionFilesPresignDownloadResponse2 = zSessionFilesPresignDownloadResponse;
3396
3594
  export const zSkillListQuery = z.object({
3397
- scope: z.enum(["user"]).optional(),
3398
- limit: z.number().gte(1).lte(1000).optional(),
3399
- offset: z.number().gte(0).optional(),
3595
+ limit: z.int().gte(1).lte(1000).optional(),
3596
+ offset: z.int().gte(0).lte(9007199254740991).optional(),
3400
3597
  includeDeprecated: z.boolean().optional(),
3401
3598
  sort: z.enum(["popular", "trending", "recent"]).optional(),
3599
+ visibility: z.enum(["private", "org"]).optional(),
3402
3600
  });
3403
3601
  /**
3404
3602
  * List of skills
@@ -3413,11 +3611,9 @@ export const zSkillCreateBody = z.object({
3413
3611
  requiredCredentials: z.string().optional(),
3414
3612
  releaseNotes: z.string().optional(),
3415
3613
  source: z.string().optional(),
3614
+ visibility: z.enum(["private", "org"]).optional().default("org"),
3416
3615
  files: z.array(z.string()),
3417
3616
  });
3418
- export const zSkillCreateQuery = z.object({
3419
- scope: z.enum(["user"]).optional(),
3420
- });
3421
3617
  /**
3422
3618
  * Created skill
3423
3619
  */
@@ -3431,9 +3627,6 @@ export const zSkillSearchBody = z.object({
3431
3627
  .default(["user", "org", "registry"]),
3432
3628
  limit: z.int().gte(1).lte(50).optional().default(20),
3433
3629
  });
3434
- export const zSkillSearchQuery = z.object({
3435
- scope: z.enum(["user"]).optional(),
3436
- });
3437
3630
  /**
3438
3631
  * Matching skills
3439
3632
  */
@@ -3445,9 +3638,6 @@ export const zSkillGetBySlugPath = z.object({
3445
3638
  .max(128)
3446
3639
  .regex(/^[a-z0-9-]+$/),
3447
3640
  });
3448
- export const zSkillGetBySlugQuery = z.object({
3449
- scope: z.enum(["user"]).optional(),
3450
- });
3451
3641
  /**
3452
3642
  * Skill details
3453
3643
  */
@@ -3455,9 +3645,6 @@ export const zSkillGetBySlugResponse = zSkill;
3455
3645
  export const zSkillGetPath = z.object({
3456
3646
  id: z.string().regex(/^skl_[0-9A-HJKMNP-TV-Z]{26}$/),
3457
3647
  });
3458
- export const zSkillGetQuery = z.object({
3459
- scope: z.enum(["user"]).optional(),
3460
- });
3461
3648
  /**
3462
3649
  * Skill details
3463
3650
  */
@@ -3474,9 +3661,6 @@ export const zSkillUpdateBody = z.object({
3474
3661
  export const zSkillUpdatePath = z.object({
3475
3662
  id: z.string().regex(/^skl_[0-9A-HJKMNP-TV-Z]{26}$/),
3476
3663
  });
3477
- export const zSkillUpdateQuery = z.object({
3478
- scope: z.enum(["user"]).optional(),
3479
- });
3480
3664
  /**
3481
3665
  * Updated skill
3482
3666
  */
@@ -3484,9 +3668,6 @@ export const zSkillUpdateResponse = zSkill;
3484
3668
  export const zSkillArchivePath = z.object({
3485
3669
  id: z.string().regex(/^skl_[0-9A-HJKMNP-TV-Z]{26}$/),
3486
3670
  });
3487
- export const zSkillArchiveQuery = z.object({
3488
- scope: z.enum(["user"]).optional(),
3489
- });
3490
3671
  /**
3491
3672
  * Archived skill
3492
3673
  */
@@ -3494,9 +3675,6 @@ export const zSkillArchiveResponse = zSkill;
3494
3675
  export const zSkillPublishPath = z.object({
3495
3676
  id: z.string().regex(/^skl_[0-9A-HJKMNP-TV-Z]{26}$/),
3496
3677
  });
3497
- export const zSkillPublishQuery = z.object({
3498
- scope: z.enum(["user"]).optional(),
3499
- });
3500
3678
  /**
3501
3679
  * Published skill
3502
3680
  */
@@ -3507,9 +3685,6 @@ export const zSkillDeprecateBody = z.object({
3507
3685
  export const zSkillDeprecatePath = z.object({
3508
3686
  id: z.string().regex(/^skl_[0-9A-HJKMNP-TV-Z]{26}$/),
3509
3687
  });
3510
- export const zSkillDeprecateQuery = z.object({
3511
- scope: z.enum(["user"]).optional(),
3512
- });
3513
3688
  /**
3514
3689
  * Deprecated skill
3515
3690
  */
@@ -3517,9 +3692,6 @@ export const zSkillDeprecateResponse = zSkill;
3517
3692
  export const zSkillUndeprecatePath = z.object({
3518
3693
  id: z.string().regex(/^skl_[0-9A-HJKMNP-TV-Z]{26}$/),
3519
3694
  });
3520
- export const zSkillUndeprecateQuery = z.object({
3521
- scope: z.enum(["user"]).optional(),
3522
- });
3523
3695
  /**
3524
3696
  * Undeprecated skill
3525
3697
  */
@@ -3527,38 +3699,28 @@ export const zSkillUndeprecateResponse = zSkill;
3527
3699
  export const zSkillCopyBody = z.object({
3528
3700
  name: z.string(),
3529
3701
  version: z.string().optional(),
3702
+ visibility: z.enum(["private", "org"]).optional().default("org"),
3530
3703
  });
3531
3704
  export const zSkillCopyPath = z.object({
3532
3705
  id: z.string().regex(/^skl_[0-9A-HJKMNP-TV-Z]{26}$/),
3533
3706
  });
3534
- export const zSkillCopyQuery = z.object({
3535
- scope: z.enum(["user"]).optional(),
3536
- });
3537
3707
  /**
3538
3708
  * Copied skill
3539
3709
  */
3540
3710
  export const zSkillCopyResponse = zSkill;
3541
- export const zSkillCopyToOrgBody = z.object({
3542
- name: z.string().min(1).max(256).optional(),
3543
- version: z.string().optional(),
3544
- });
3545
- export const zSkillCopyToOrgPath = z.object({
3711
+ export const zSkillPromotePath = z.object({
3546
3712
  id: z.string().regex(/^skl_[0-9A-HJKMNP-TV-Z]{26}$/),
3547
3713
  });
3548
- export const zSkillCopyToOrgQuery = z.object({
3549
- scope: z.enum(["user"]).optional(),
3550
- });
3551
3714
  /**
3552
- * Copied skill
3715
+ * Promoted skill
3553
3716
  */
3554
- export const zSkillCopyToOrgResponse = zSkill;
3717
+ export const zSkillPromoteResponse = zSkill;
3555
3718
  export const zSkillVersionListPath = z.object({
3556
3719
  id: z.string().regex(/^skl_[0-9A-HJKMNP-TV-Z]{26}$/),
3557
3720
  });
3558
3721
  export const zSkillVersionListQuery = z.object({
3559
- scope: z.enum(["user"]).optional(),
3560
- limit: z.number().gte(1).lte(1000).optional(),
3561
- offset: z.number().gte(0).optional(),
3722
+ limit: z.int().gte(1).lte(1000).optional(),
3723
+ offset: z.int().gte(0).lte(9007199254740991).optional(),
3562
3724
  includeDeprecated: z.boolean().optional(),
3563
3725
  });
3564
3726
  /**
@@ -3575,9 +3737,6 @@ export const zSkillVersionCreateBody = z.object({
3575
3737
  export const zSkillVersionCreatePath = z.object({
3576
3738
  id: z.string().regex(/^skl_[0-9A-HJKMNP-TV-Z]{26}$/),
3577
3739
  });
3578
- export const zSkillVersionCreateQuery = z.object({
3579
- scope: z.enum(["user"]).optional(),
3580
- });
3581
3740
  /**
3582
3741
  * Created skill version
3583
3742
  */
@@ -3586,9 +3745,6 @@ export const zSkillVersionGetPath = z.object({
3586
3745
  id: z.string().regex(/^skl_[0-9A-HJKMNP-TV-Z]{26}$/),
3587
3746
  version: z.string().min(1).max(32),
3588
3747
  });
3589
- export const zSkillVersionGetQuery = z.object({
3590
- scope: z.enum(["user"]).optional(),
3591
- });
3592
3748
  /**
3593
3749
  * Skill version details
3594
3750
  */
@@ -3598,7 +3754,6 @@ export const zSkillVersionDataPath = z.object({
3598
3754
  version: z.string().min(1).max(32),
3599
3755
  });
3600
3756
  export const zSkillVersionDataQuery = z.object({
3601
- scope: z.enum(["user"]).optional(),
3602
3757
  format: z.enum(["json", "presigned"]).optional(),
3603
3758
  });
3604
3759
  /**
@@ -3607,7 +3762,7 @@ export const zSkillVersionDataQuery = z.object({
3607
3762
  export const zSkillVersionDataResponse = z.union([
3608
3763
  z.object({
3609
3764
  files: z.array(z.object({
3610
- path: z.string(),
3765
+ path: z.string().min(1),
3611
3766
  content: z.string(),
3612
3767
  })),
3613
3768
  }),
@@ -3625,9 +3780,6 @@ export const zSkillVersionArchivePath = z.object({
3625
3780
  id: z.string().regex(/^skl_[0-9A-HJKMNP-TV-Z]{26}$/),
3626
3781
  version: z.string().min(1).max(32),
3627
3782
  });
3628
- export const zSkillVersionArchiveQuery = z.object({
3629
- scope: z.enum(["user"]).optional(),
3630
- });
3631
3783
  /**
3632
3784
  * Archived skill version
3633
3785
  */
@@ -3637,18 +3789,14 @@ export const zSkillVersionArchiveResponse = zSkillVersion;
3637
3789
  */
3638
3790
  export const zTopologyGetResponse = zTopology;
3639
3791
  export const zTopologyShareListQuery = z.object({
3640
- scope: z.enum(["user"]).optional(),
3641
- limit: z.number().gte(1).lte(1000).optional(),
3642
- offset: z.number().gte(0).optional(),
3792
+ limit: z.int().gte(1).lte(1000).optional(),
3793
+ offset: z.int().gte(0).lte(9007199254740991).optional(),
3643
3794
  includeDeprecated: z.boolean().optional(),
3644
3795
  });
3645
3796
  /**
3646
3797
  * List of topology shares
3647
3798
  */
3648
3799
  export const zTopologyShareListResponse = z.array(zTopologyShare);
3649
- export const zTopologyShareCreateQuery = z.object({
3650
- scope: z.enum(["user"]).optional(),
3651
- });
3652
3800
  /**
3653
3801
  * Created topology share
3654
3802
  */
@@ -3656,17 +3804,13 @@ export const zTopologyShareCreateResponse = zTopologyShare;
3656
3804
  export const zTopologyShareArchivePath = z.object({
3657
3805
  id: z.string().regex(/^tps_[0-9A-HJKMNP-TV-Z]{26}$/),
3658
3806
  });
3659
- export const zTopologyShareArchiveQuery = z.object({
3660
- scope: z.enum(["user"]).optional(),
3661
- });
3662
3807
  /**
3663
3808
  * Archived topology share
3664
3809
  */
3665
3810
  export const zTopologyShareArchiveResponse = zTopologyShare;
3666
3811
  export const zTriggerListQuery = z.object({
3667
- scope: z.enum(["user"]).optional(),
3668
- limit: z.number().gte(1).lte(1000).optional(),
3669
- offset: z.number().gte(0).optional(),
3812
+ limit: z.int().gte(1).lte(1000).optional(),
3813
+ offset: z.int().gte(0).lte(9007199254740991).optional(),
3670
3814
  includeDeprecated: z.boolean().optional(),
3671
3815
  projectId: z.string().regex(/^prj_[0-9A-HJKMNP-TV-Z]{26}$/),
3672
3816
  });
@@ -3688,9 +3832,6 @@ export const zTriggerCreateBody = z.object({
3688
3832
  .default(null),
3689
3833
  isEnabled: z.boolean().optional().default(true),
3690
3834
  });
3691
- export const zTriggerCreateQuery = z.object({
3692
- scope: z.enum(["user"]).optional(),
3693
- });
3694
3835
  /**
3695
3836
  * Created cron trigger
3696
3837
  */
@@ -3699,7 +3840,6 @@ export const zTriggerGetPath = z.object({
3699
3840
  triggerId: z.string().regex(/^ctrg_[0-9A-HJKMNP-TV-Z]{26}$/),
3700
3841
  });
3701
3842
  export const zTriggerGetQuery = z.object({
3702
- scope: z.enum(["user"]).optional(),
3703
3843
  projectId: z.string().regex(/^prj_[0-9A-HJKMNP-TV-Z]{26}$/),
3704
3844
  });
3705
3845
  /**
@@ -3722,9 +3862,6 @@ export const zTriggerUpdateBody = z.object({
3722
3862
  export const zTriggerUpdatePath = z.object({
3723
3863
  triggerId: z.string().regex(/^ctrg_[0-9A-HJKMNP-TV-Z]{26}$/),
3724
3864
  });
3725
- export const zTriggerUpdateQuery = z.object({
3726
- scope: z.enum(["user"]).optional(),
3727
- });
3728
3865
  /**
3729
3866
  * Updated cron trigger
3730
3867
  */
@@ -3735,17 +3872,13 @@ export const zTriggerArchiveBody = z.object({
3735
3872
  export const zTriggerArchivePath = z.object({
3736
3873
  triggerId: z.string().regex(/^ctrg_[0-9A-HJKMNP-TV-Z]{26}$/),
3737
3874
  });
3738
- export const zTriggerArchiveQuery = z.object({
3739
- scope: z.enum(["user"]).optional(),
3740
- });
3741
3875
  /**
3742
3876
  * Archived cron trigger
3743
3877
  */
3744
3878
  export const zTriggerArchiveResponse = zCronTrigger;
3745
3879
  export const zWebhookTriggerListQuery = z.object({
3746
- scope: z.enum(["user"]).optional(),
3747
- limit: z.number().gte(1).lte(1000).optional(),
3748
- offset: z.number().gte(0).optional(),
3880
+ limit: z.int().gte(1).lte(1000).optional(),
3881
+ offset: z.int().gte(0).lte(9007199254740991).optional(),
3749
3882
  includeDeprecated: z.boolean().optional(),
3750
3883
  projectId: z.string().regex(/^prj_[0-9A-HJKMNP-TV-Z]{26}$/),
3751
3884
  });
@@ -3763,13 +3896,11 @@ export const zWebhookTriggerCreateBody = z.object({
3763
3896
  .object({
3764
3897
  channelId: z.string().optional(),
3765
3898
  linearProjectId: z.string().optional(),
3899
+ linearProjectName: z.string().optional(),
3766
3900
  })
3767
3901
  .nullable(),
3768
3902
  isEnabled: z.boolean().optional().default(true),
3769
3903
  });
3770
- export const zWebhookTriggerCreateQuery = z.object({
3771
- scope: z.enum(["user"]).optional(),
3772
- });
3773
3904
  /**
3774
3905
  * Created webhook trigger (with plaintext secret for generic triggers)
3775
3906
  */
@@ -3778,7 +3909,6 @@ export const zWebhookTriggerGetPath = z.object({
3778
3909
  triggerId: z.string().regex(/^wtrg_[0-9A-HJKMNP-TV-Z]{26}$/),
3779
3910
  });
3780
3911
  export const zWebhookTriggerGetQuery = z.object({
3781
- scope: z.enum(["user"]).optional(),
3782
3912
  projectId: z.string().regex(/^prj_[0-9A-HJKMNP-TV-Z]{26}$/),
3783
3913
  });
3784
3914
  /**
@@ -3792,6 +3922,7 @@ export const zWebhookTriggerUpdateBody = z.object({
3792
3922
  .object({
3793
3923
  channelId: z.string().optional(),
3794
3924
  linearProjectId: z.string().optional(),
3925
+ linearProjectName: z.string().optional(),
3795
3926
  })
3796
3927
  .nullish(),
3797
3928
  isEnabled: z.boolean().optional(),
@@ -3800,9 +3931,6 @@ export const zWebhookTriggerUpdateBody = z.object({
3800
3931
  export const zWebhookTriggerUpdatePath = z.object({
3801
3932
  triggerId: z.string().regex(/^wtrg_[0-9A-HJKMNP-TV-Z]{26}$/),
3802
3933
  });
3803
- export const zWebhookTriggerUpdateQuery = z.object({
3804
- scope: z.enum(["user"]).optional(),
3805
- });
3806
3934
  /**
3807
3935
  * Updated webhook trigger
3808
3936
  */
@@ -3813,38 +3941,32 @@ export const zWebhookTriggerArchiveBody = z.object({
3813
3941
  export const zWebhookTriggerArchivePath = z.object({
3814
3942
  triggerId: z.string().regex(/^wtrg_[0-9A-HJKMNP-TV-Z]{26}$/),
3815
3943
  });
3816
- export const zWebhookTriggerArchiveQuery = z.object({
3817
- scope: z.enum(["user"]).optional(),
3818
- });
3819
3944
  /**
3820
3945
  * Archived webhook trigger
3821
3946
  */
3822
3947
  export const zWebhookTriggerArchiveResponse = zWebhookTrigger;
3823
- export const zSlackUninstallQuery = z.object({
3824
- scope: z.enum(["user"]).optional(),
3825
- });
3826
3948
  /**
3827
3949
  * Removed
3828
3950
  */
3829
3951
  export const zSlackUninstallResponse = z.void();
3830
3952
  export const zSlackInstallQuery = z.object({
3831
- scope: z.enum(["user"]).optional(),
3832
3953
  returnTo: z.string().optional(),
3833
3954
  });
3834
3955
  /**
3835
3956
  * Authorization URL for the user to visit
3836
3957
  */
3837
3958
  export const zSlackInstallResponse = zSlackOAuthStartResult;
3838
- export const zSlackStatusQuery = z.object({
3839
- scope: z.enum(["user"]).optional(),
3959
+ export const zSlackOnboardingResolveQuery = z.object({
3960
+ returnTo: z.string().optional(),
3840
3961
  });
3962
+ /**
3963
+ * Whether the workspace is already installed or needs the bot install flow
3964
+ */
3965
+ export const zSlackOnboardingResolveResponse = zSlackOnboardingResolveResult;
3841
3966
  /**
3842
3967
  * Slack installation status
3843
3968
  */
3844
3969
  export const zSlackStatusResponse = zSlackStatus;
3845
- export const zSlackChannelListQuery = z.object({
3846
- scope: z.enum(["user"]).optional(),
3847
- });
3848
3970
  /**
3849
3971
  * Channels visible to the Ren bot
3850
3972
  */
@@ -3852,9 +3974,6 @@ export const zSlackChannelListResponse = z.array(zSlackChannel);
3852
3974
  export const zSlackChannelUnsetPath = z.object({
3853
3975
  channelId: z.string().min(1),
3854
3976
  });
3855
- export const zSlackChannelUnsetQuery = z.object({
3856
- scope: z.enum(["user"]).optional(),
3857
- });
3858
3977
  /**
3859
3978
  * Updated installation
3860
3979
  */
@@ -3867,15 +3986,12 @@ export const zSlackChannelSetPath = z.object({
3867
3986
  channelId: z.string().min(1),
3868
3987
  });
3869
3988
  export const zSlackChannelSetQuery = z.object({
3870
- scope: z.enum(["user"]).optional(),
3989
+ notify: z.enum(["true", "false"]).optional(),
3871
3990
  });
3872
3991
  /**
3873
3992
  * Updated installation
3874
3993
  */
3875
3994
  export const zSlackChannelSetResponse = zSlackInstallationResponse;
3876
- export const zEmailListQuery = z.object({
3877
- scope: z.enum(["user"]).optional(),
3878
- });
3879
3995
  /**
3880
3996
  * Email mailboxes
3881
3997
  */
@@ -3883,9 +3999,6 @@ export const zEmailListResponse = z.array(zProjectEmailResponse);
3883
3999
  export const zEmailUnsetPath = z.object({
3884
4000
  projectId: z.string().min(1),
3885
4001
  });
3886
- export const zEmailUnsetQuery = z.object({
3887
- scope: z.enum(["user"]).optional(),
3888
- });
3889
4002
  /**
3890
4003
  * Removed
3891
4004
  */
@@ -3896,30 +4009,18 @@ export const zEmailSetBody = z.object({
3896
4009
  export const zEmailSetPath = z.object({
3897
4010
  projectId: z.string().min(1),
3898
4011
  });
3899
- export const zEmailSetQuery = z.object({
3900
- scope: z.enum(["user"]).optional(),
3901
- });
3902
4012
  /**
3903
4013
  * The project's email mailbox
3904
4014
  */
3905
4015
  export const zEmailSetResponse = zProjectEmailResponse;
3906
- export const zTelegramLinkCodeQuery = z.object({
3907
- scope: z.enum(["user"]).optional(),
3908
- });
3909
4016
  /**
3910
4017
  * Link code
3911
4018
  */
3912
4019
  export const zTelegramLinkCodeResponse = zTelegramLinkCode;
3913
- export const zTelegramMeQuery = z.object({
3914
- scope: z.enum(["user"]).optional(),
3915
- });
3916
4020
  /**
3917
4021
  * Link status
3918
4022
  */
3919
4023
  export const zTelegramMeResponse = zTelegramLinkStatus;
3920
- export const zTelegramUnlinkQuery = z.object({
3921
- scope: z.enum(["user"]).optional(),
3922
- });
3923
4024
  /**
3924
4025
  * Unlinked
3925
4026
  */
@@ -3928,16 +4029,10 @@ export const zTelegramClaimCodeBody = z.object({
3928
4029
  projectId: z.string().min(1),
3929
4030
  fallbackSenderUserId: z.string().min(1).nullish().default(null),
3930
4031
  });
3931
- export const zTelegramClaimCodeQuery = z.object({
3932
- scope: z.enum(["user"]).optional(),
3933
- });
3934
4032
  /**
3935
4033
  * Claim code
3936
4034
  */
3937
4035
  export const zTelegramClaimCodeResponse = zTelegramClaimCode;
3938
- export const zTelegramChatListQuery = z.object({
3939
- scope: z.enum(["user"]).optional(),
3940
- });
3941
4036
  /**
3942
4037
  * Mapped chats
3943
4038
  */
@@ -3946,7 +4041,6 @@ export const zTelegramChatUnsetPath = z.object({
3946
4041
  chatId: z.string().min(1),
3947
4042
  });
3948
4043
  export const zTelegramChatUnsetQuery = z.object({
3949
- scope: z.enum(["user"]).optional(),
3950
4044
  topicId: z.string().optional().default(""),
3951
4045
  });
3952
4046
  /**
@@ -3963,45 +4057,31 @@ export const zTelegramChatSetPath = z.object({
3963
4057
  chatId: z.string().min(1),
3964
4058
  });
3965
4059
  export const zTelegramChatSetQuery = z.object({
3966
- scope: z.enum(["user"]).optional(),
3967
4060
  topicId: z.string().optional().default(""),
3968
4061
  });
3969
4062
  /**
3970
4063
  * Updated mapping
3971
4064
  */
3972
4065
  export const zTelegramChatSetResponse = zTelegramChatMapping;
3973
- export const zLinearUninstallQuery = z.object({
3974
- scope: z.enum(["user"]).optional(),
3975
- });
3976
4066
  /**
3977
4067
  * Removed
3978
4068
  */
3979
4069
  export const zLinearUninstallResponse = z.void();
3980
4070
  export const zLinearInstallQuery = z.object({
3981
- scope: z.enum(["user"]).optional(),
3982
4071
  returnTo: z.string().optional(),
3983
4072
  });
3984
4073
  /**
3985
4074
  * Authorization URL for the user to visit
3986
4075
  */
3987
4076
  export const zLinearInstallResponse = zLinearOAuthStartResult;
3988
- export const zLinearStatusQuery = z.object({
3989
- scope: z.enum(["user"]).optional(),
3990
- });
3991
4077
  /**
3992
4078
  * Linear installation status
3993
4079
  */
3994
4080
  export const zLinearStatusResponse = zLinearStatus;
3995
- export const zLinearProjectsQuery = z.object({
3996
- scope: z.enum(["user"]).optional(),
3997
- });
3998
4081
  /**
3999
4082
  * Linear projects (with a __global__ entry for issues without a project)
4000
4083
  */
4001
4084
  export const zLinearProjectsResponse = z.array(zLinearProject);
4002
- export const zLinearMappingsListQuery = z.object({
4003
- scope: z.enum(["user"]).optional(),
4004
- });
4005
4085
  /**
4006
4086
  * Linear project mappings
4007
4087
  */
@@ -4012,9 +4092,6 @@ export const zLinearMappingsCreateBody = z.object({
4012
4092
  senderUserId: z.string().min(1),
4013
4093
  projectAgentId: z.string().nullish(),
4014
4094
  });
4015
- export const zLinearMappingsCreateQuery = z.object({
4016
- scope: z.enum(["user"]).optional(),
4017
- });
4018
4095
  /**
4019
4096
  * Created mapping
4020
4097
  */
@@ -4022,18 +4099,15 @@ export const zLinearMappingsCreateResponse = zLinearMapping;
4022
4099
  export const zLinearMappingsRemovePath = z.object({
4023
4100
  triggerId: z.string().min(1),
4024
4101
  });
4025
- export const zLinearMappingsRemoveQuery = z.object({
4026
- scope: z.enum(["user"]).optional(),
4027
- });
4028
4102
  /**
4029
4103
  * Removed
4030
4104
  */
4031
4105
  export const zLinearMappingsRemoveResponse = z.void();
4032
4106
  export const zVaultListQuery = z.object({
4033
- scope: z.enum(["user"]).optional(),
4034
- limit: z.number().gte(1).lte(1000).optional(),
4035
- offset: z.number().gte(0).optional(),
4107
+ limit: z.int().gte(1).lte(1000).optional(),
4108
+ offset: z.int().gte(0).lte(9007199254740991).optional(),
4036
4109
  includeDeprecated: z.boolean().optional(),
4110
+ visibility: z.enum(["private", "org"]).optional(),
4037
4111
  });
4038
4112
  /**
4039
4113
  * List of vaults
@@ -4043,9 +4117,7 @@ export const zVaultCreateBody = z.object({
4043
4117
  name: z.string().min(1).max(256),
4044
4118
  description: z.string().optional().default(""),
4045
4119
  isDefault: z.boolean().optional().default(false),
4046
- });
4047
- export const zVaultCreateQuery = z.object({
4048
- scope: z.enum(["user"]).optional(),
4120
+ visibility: z.enum(["private", "org"]).optional().default("org"),
4049
4121
  });
4050
4122
  /**
4051
4123
  * Created vault
@@ -4054,9 +4126,6 @@ export const zVaultCreateResponse = zVault;
4054
4126
  export const zVaultDeletePath = z.object({
4055
4127
  id: z.string().regex(/^vlt_[0-9A-HJKMNP-TV-Z]{26}$/),
4056
4128
  });
4057
- export const zVaultDeleteQuery = z.object({
4058
- scope: z.enum(["user"]).optional(),
4059
- });
4060
4129
  /**
4061
4130
  * Deleted vault
4062
4131
  */
@@ -4064,9 +4133,6 @@ export const zVaultDeleteResponse = zVault;
4064
4133
  export const zVaultGetPath = z.object({
4065
4134
  id: z.string().regex(/^vlt_[0-9A-HJKMNP-TV-Z]{26}$/),
4066
4135
  });
4067
- export const zVaultGetQuery = z.object({
4068
- scope: z.enum(["user"]).optional(),
4069
- });
4070
4136
  /**
4071
4137
  * Vault details
4072
4138
  */
@@ -4078,9 +4144,6 @@ export const zVaultUpdateBody = z.object({
4078
4144
  export const zVaultUpdatePath = z.object({
4079
4145
  id: z.string().regex(/^vlt_[0-9A-HJKMNP-TV-Z]{26}$/),
4080
4146
  });
4081
- export const zVaultUpdateQuery = z.object({
4082
- scope: z.enum(["user"]).optional(),
4083
- });
4084
4147
  /**
4085
4148
  * Updated vault
4086
4149
  */
@@ -4088,9 +4151,6 @@ export const zVaultUpdateResponse = zVault;
4088
4151
  export const zVaultArchivePath = z.object({
4089
4152
  id: z.string().regex(/^vlt_[0-9A-HJKMNP-TV-Z]{26}$/),
4090
4153
  });
4091
- export const zVaultArchiveQuery = z.object({
4092
- scope: z.enum(["user"]).optional(),
4093
- });
4094
4154
  /**
4095
4155
  * Archived vault
4096
4156
  */
@@ -4099,9 +4159,8 @@ export const zCredentialListPath = z.object({
4099
4159
  vaultId: z.string().regex(/^vlt_[0-9A-HJKMNP-TV-Z]{26}$/),
4100
4160
  });
4101
4161
  export const zCredentialListQuery = z.object({
4102
- scope: z.enum(["user"]).optional(),
4103
- limit: z.number().gte(1).lte(1000).optional(),
4104
- offset: z.number().gte(0).optional(),
4162
+ limit: z.int().gte(1).lte(1000).optional(),
4163
+ offset: z.int().gte(0).lte(9007199254740991).optional(),
4105
4164
  includeDeprecated: z.boolean().optional(),
4106
4165
  });
4107
4166
  /**
@@ -4123,9 +4182,6 @@ export const zCredentialCreateBody = z.object({
4123
4182
  export const zCredentialCreatePath = z.object({
4124
4183
  vaultId: z.string().regex(/^vlt_[0-9A-HJKMNP-TV-Z]{26}$/),
4125
4184
  });
4126
- export const zCredentialCreateQuery = z.object({
4127
- scope: z.enum(["user"]).optional(),
4128
- });
4129
4185
  /**
4130
4186
  * Created credential
4131
4187
  */
@@ -4134,9 +4190,6 @@ export const zCredentialDeletePath = z.object({
4134
4190
  vaultId: z.string().regex(/^vlt_[0-9A-HJKMNP-TV-Z]{26}$/),
4135
4191
  id: z.string().regex(/^crd_[0-9A-HJKMNP-TV-Z]{26}$/),
4136
4192
  });
4137
- export const zCredentialDeleteQuery = z.object({
4138
- scope: z.enum(["user"]).optional(),
4139
- });
4140
4193
  /**
4141
4194
  * Deleted credential
4142
4195
  */
@@ -4145,9 +4198,6 @@ export const zCredentialGetPath = z.object({
4145
4198
  vaultId: z.string().regex(/^vlt_[0-9A-HJKMNP-TV-Z]{26}$/),
4146
4199
  id: z.string().regex(/^crd_[0-9A-HJKMNP-TV-Z]{26}$/),
4147
4200
  });
4148
- export const zCredentialGetQuery = z.object({
4149
- scope: z.enum(["user"]).optional(),
4150
- });
4151
4201
  /**
4152
4202
  * Credential details
4153
4203
  */
@@ -4160,9 +4210,6 @@ export const zCredentialUpdatePath = z.object({
4160
4210
  vaultId: z.string().regex(/^vlt_[0-9A-HJKMNP-TV-Z]{26}$/),
4161
4211
  id: z.string().regex(/^crd_[0-9A-HJKMNP-TV-Z]{26}$/),
4162
4212
  });
4163
- export const zCredentialUpdateQuery = z.object({
4164
- scope: z.enum(["user"]).optional(),
4165
- });
4166
4213
  /**
4167
4214
  * Updated credential
4168
4215
  */
@@ -4171,20 +4218,23 @@ export const zCredentialArchivePath = z.object({
4171
4218
  vaultId: z.string().regex(/^vlt_[0-9A-HJKMNP-TV-Z]{26}$/),
4172
4219
  id: z.string().regex(/^crd_[0-9A-HJKMNP-TV-Z]{26}$/),
4173
4220
  });
4174
- export const zCredentialArchiveQuery = z.object({
4175
- scope: z.enum(["user"]).optional(),
4176
- });
4177
4221
  /**
4178
4222
  * Archived credential
4179
4223
  */
4180
4224
  export const zCredentialArchiveResponse = zCredential;
4225
+ export const zCredentialTransferBody = zCredentialTransferInput;
4226
+ export const zCredentialTransferPath = z.object({
4227
+ vaultId: z.string().regex(/^vlt_[0-9A-HJKMNP-TV-Z]{26}$/),
4228
+ id: z.string().regex(/^crd_[0-9A-HJKMNP-TV-Z]{26}$/),
4229
+ });
4230
+ /**
4231
+ * Credential transferred
4232
+ */
4233
+ export const zCredentialTransferResponse = zCredentialTransferResult;
4181
4234
  export const zCredentialOauthStartBody = zOAuthStartInput;
4182
4235
  export const zCredentialOauthStartPath = z.object({
4183
4236
  vaultId: z.string().regex(/^vlt_[0-9A-HJKMNP-TV-Z]{26}$/),
4184
4237
  });
4185
- export const zCredentialOauthStartQuery = z.object({
4186
- scope: z.enum(["user"]).optional(),
4187
- });
4188
4238
  /**
4189
4239
  * Authorization URL for the user to visit
4190
4240
  */
@@ -4193,16 +4243,13 @@ export const zCredentialOauthSessionPath = z.object({
4193
4243
  vaultId: z.string().regex(/^vlt_[0-9A-HJKMNP-TV-Z]{26}$/),
4194
4244
  sessionId: z.string().regex(/^oas_[0-9A-HJKMNP-TV-Z]{26}$/),
4195
4245
  });
4196
- export const zCredentialOauthSessionQuery = z.object({
4197
- scope: z.enum(["user"]).optional(),
4198
- });
4199
4246
  /**
4200
4247
  * Session status snapshot
4201
4248
  */
4202
4249
  export const zCredentialOauthSessionResponse = zOAuthSessionStatus;
4203
4250
  export const zRegistryAgentListQuery = z.object({
4204
- limit: z.number().gte(1).lte(1000).optional(),
4205
- offset: z.number().gte(0).optional(),
4251
+ limit: z.int().gte(1).lte(1000).optional(),
4252
+ offset: z.int().gte(0).lte(9007199254740991).optional(),
4206
4253
  includeDeprecated: z.boolean().optional(),
4207
4254
  });
4208
4255
  /**
@@ -4217,8 +4264,8 @@ export const zRegistryAgentGetPath = z.object({
4217
4264
  */
4218
4265
  export const zRegistryAgentGetResponse = zAgent;
4219
4266
  export const zRegistrySkillListQuery = z.object({
4220
- limit: z.number().gte(1).lte(1000).optional(),
4221
- offset: z.number().gte(0).optional(),
4267
+ limit: z.int().gte(1).lte(1000).optional(),
4268
+ offset: z.int().gte(0).lte(9007199254740991).optional(),
4222
4269
  includeDeprecated: z.boolean().optional(),
4223
4270
  sort: z.enum(["popular", "trending", "recent"]).optional(),
4224
4271
  });
@@ -4234,8 +4281,8 @@ export const zRegistrySkillGetPath = z.object({
4234
4281
  */
4235
4282
  export const zRegistrySkillGetResponse = zSkill;
4236
4283
  export const zRegistryMcpListQuery = z.object({
4237
- limit: z.number().gte(1).lte(1000).optional(),
4238
- offset: z.number().gte(0).optional(),
4284
+ limit: z.int().gte(1).lte(1000).optional(),
4285
+ offset: z.int().gte(0).lte(9007199254740991).optional(),
4239
4286
  includeDeprecated: z.boolean().optional(),
4240
4287
  sort: z.enum(["popular", "trending", "recent"]).optional(),
4241
4288
  });
@@ -4261,6 +4308,17 @@ export const zRegistryBlueprintGetPath = z.object({
4261
4308
  * Public blueprint view
4262
4309
  */
4263
4310
  export const zRegistryBlueprintGetResponse = zBlueprintPublicView;
4311
+ export const zRegistryPublisherGetPath = z.object({
4312
+ slug: z
4313
+ .string()
4314
+ .min(1)
4315
+ .max(128)
4316
+ .regex(/^[a-z0-9-]+$/),
4317
+ });
4318
+ /**
4319
+ * Public publisher view
4320
+ */
4321
+ export const zRegistryPublisherGetResponse = zPublisherPublicView;
4264
4322
  export const zRegistryReplayGetPath = z.object({
4265
4323
  slug: z
4266
4324
  .string()