@renai-labs/sdk 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/dist/auth.d.ts +1 -0
  2. package/dist/auth.js +2 -1
  3. package/dist/client.js +12 -1
  4. package/dist/generated/@tanstack/react-query.gen.d.ts +1056 -1058
  5. package/dist/generated/@tanstack/react-query.gen.js +1455 -1390
  6. package/dist/generated/client/client.gen.d.ts +1 -1
  7. package/dist/generated/client/client.gen.js +44 -46
  8. package/dist/generated/client/index.d.ts +8 -8
  9. package/dist/generated/client/index.js +5 -5
  10. package/dist/generated/client/types.gen.d.ts +18 -18
  11. package/dist/generated/client/utils.gen.d.ts +3 -3
  12. package/dist/generated/client/utils.gen.js +33 -35
  13. package/dist/generated/client.gen.d.ts +2 -2
  14. package/dist/generated/client.gen.js +1 -1
  15. package/dist/generated/core/auth.gen.d.ts +3 -3
  16. package/dist/generated/core/auth.gen.js +3 -3
  17. package/dist/generated/core/bodySerializer.gen.d.ts +1 -1
  18. package/dist/generated/core/bodySerializer.gen.js +3 -3
  19. package/dist/generated/core/params.gen.d.ts +3 -3
  20. package/dist/generated/core/params.gen.js +11 -9
  21. package/dist/generated/core/pathSerializer.gen.d.ts +4 -4
  22. package/dist/generated/core/pathSerializer.gen.js +37 -37
  23. package/dist/generated/core/queryKeySerializer.gen.js +8 -7
  24. package/dist/generated/core/serverSentEvents.gen.d.ts +3 -3
  25. package/dist/generated/core/serverSentEvents.gen.js +19 -19
  26. package/dist/generated/core/types.gen.d.ts +4 -4
  27. package/dist/generated/core/utils.gen.d.ts +1 -1
  28. package/dist/generated/core/utils.gen.js +17 -17
  29. package/dist/generated/internal/types.gen.d.ts +664 -0
  30. package/dist/generated/internal/types.gen.js +2 -0
  31. package/dist/generated/sdk.gen.d.ts +386 -320
  32. package/dist/generated/sdk.gen.js +1193 -672
  33. package/dist/generated/types.gen.d.ts +4010 -2286
  34. package/dist/generated/zod.gen.d.ts +9431 -2312
  35. package/dist/generated/zod.gen.js +2231 -1088
  36. package/dist/index.d.ts +1 -1
  37. package/dist/index.js +1 -1
  38. package/package.json +11 -3
@@ -1,121 +1,350 @@
1
1
  // This file is auto-generated by @hey-api/openapi-ts
2
- import * as z from 'zod';
3
- export const zGitRepo = z.object({
2
+ import * as z from "zod";
3
+ export const zProjectGitRepo = z.object({
4
+ url: z.string().min(1),
5
+ baseBranch: z.string().min(1).optional(),
6
+ mountPath: z.string().min(1).optional(),
7
+ });
8
+ export const zPermissionConfig = z.union([
9
+ z.object({
10
+ __originalKeys: z.array(z.string()).optional(),
11
+ read: z
12
+ .union([z.enum(["allow", "deny", "ask"]), z.record(z.string(), z.enum(["allow", "deny", "ask"]))])
13
+ .optional(),
14
+ edit: z
15
+ .union([z.enum(["allow", "deny", "ask"]), z.record(z.string(), z.enum(["allow", "deny", "ask"]))])
16
+ .optional(),
17
+ glob: z
18
+ .union([z.enum(["allow", "deny", "ask"]), z.record(z.string(), z.enum(["allow", "deny", "ask"]))])
19
+ .optional(),
20
+ grep: z
21
+ .union([z.enum(["allow", "deny", "ask"]), z.record(z.string(), z.enum(["allow", "deny", "ask"]))])
22
+ .optional(),
23
+ list: z
24
+ .union([z.enum(["allow", "deny", "ask"]), z.record(z.string(), z.enum(["allow", "deny", "ask"]))])
25
+ .optional(),
26
+ bash: z
27
+ .union([z.enum(["allow", "deny", "ask"]), z.record(z.string(), z.enum(["allow", "deny", "ask"]))])
28
+ .optional(),
29
+ task: z
30
+ .union([z.enum(["allow", "deny", "ask"]), z.record(z.string(), z.enum(["allow", "deny", "ask"]))])
31
+ .optional(),
32
+ external_directory: z
33
+ .union([z.enum(["allow", "deny", "ask"]), z.record(z.string(), z.enum(["allow", "deny", "ask"]))])
34
+ .optional(),
35
+ todowrite: z.enum(["allow", "deny", "ask"]).optional(),
36
+ question: z.enum(["allow", "deny", "ask"]).optional(),
37
+ webfetch: z.enum(["allow", "deny", "ask"]).optional(),
38
+ websearch: z.enum(["allow", "deny", "ask"]).optional(),
39
+ codesearch: z.enum(["allow", "deny", "ask"]).optional(),
40
+ lsp: z.union([z.enum(["allow", "deny", "ask"]), z.record(z.string(), z.enum(["allow", "deny", "ask"]))]).optional(),
41
+ doom_loop: z.enum(["allow", "deny", "ask"]).optional(),
42
+ skill: z
43
+ .union([z.enum(["allow", "deny", "ask"]), z.record(z.string(), z.enum(["allow", "deny", "ask"]))])
44
+ .optional(),
45
+ }),
46
+ z.enum(["allow", "deny", "ask"]),
47
+ ]);
48
+ export const zBlueprintReplayRef = z.object({
49
+ replayId: z.string(),
50
+ });
51
+ export const zBlueprintMcpRef = z.object({
52
+ mcpId: z.string(),
53
+ });
54
+ export const zBlueprintSkillRef = z.object({
55
+ skillId: z.string(),
56
+ versionId: z.string().nullable(),
57
+ });
58
+ export const zBlueprintAgentRef = z.object({
59
+ agentId: z.string(),
60
+ versionId: z.string().nullable(),
61
+ });
62
+ export const zBlueprintProjectEntry = z.object({
63
+ name: z.string(),
64
+ description: z.string().nullable(),
65
+ permission: zPermissionConfig,
66
+ parentId: z.string().nullish().default(null),
67
+ agents: z.array(z.object({
68
+ agentId: z.string(),
69
+ type: z.enum(["primary", "subagent", "all"]),
70
+ })),
71
+ cronTriggers: z.array(z.object({
72
+ inputMessage: z.string(),
73
+ schedule: z.string(),
74
+ timezone: z.string().nullable(),
75
+ cronTriggerId: z.string(),
76
+ agentId: z.string(),
77
+ })),
78
+ });
79
+ export const zBlueprintTemplate = z.object({
80
+ schemaVersion: z.literal(1),
81
+ projects: z.array(zBlueprintProjectEntry),
82
+ agents: z.array(zBlueprintAgentRef),
83
+ skills: z.array(zBlueprintSkillRef),
84
+ mcps: z.array(zBlueprintMcpRef),
85
+ replays: z.array(zBlueprintReplayRef),
86
+ });
87
+ export const zWebsiteMetadata = z.object({
88
+ title: z.string().optional(),
89
+ description: z.string().optional(),
90
+ longDescription: z.string().optional(),
91
+ image: z.url().optional(),
92
+ favicon: z.url().optional(),
93
+ supportUrl: z.url().optional(),
94
+ privacyPolicyUrl: z.url().optional(),
95
+ });
96
+ export const zBlueprintPublicView = z.object({
97
+ id: z.string(),
98
+ slug: z.string(),
99
+ name: z.string(),
100
+ description: z.string().nullable(),
101
+ websiteMetadata: zWebsiteMetadata.nullable(),
102
+ publisherId: z.string(),
103
+ template: zBlueprintTemplate,
104
+ });
105
+ export const zReplayPresignDownloadResponse = z.object({
4
106
  url: z.string(),
5
- mountPath: z.string()
107
+ expiresAt: z.iso
108
+ .datetime()
109
+ .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))$/),
110
+ });
111
+ export const zReplayMessage = z.object({
112
+ info: z.record(z.string(), z.unknown()),
113
+ parts: z.array(z.record(z.string(), z.unknown())),
6
114
  });
7
- export const zPermissionRule = z.object({
8
- permission: z.string(),
9
- pattern: z.string(),
10
- action: z.enum([
11
- 'allow',
12
- 'deny',
13
- 'ask'
14
- ])
115
+ export const zReplayPublicSession = z.object({
116
+ id: z.string(),
117
+ title: z.string(),
118
+ createdAt: z.iso
119
+ .datetime()
120
+ .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))$/),
121
+ });
122
+ export const zReplayPublicView = z.object({
123
+ id: z.string(),
124
+ slug: z.string(),
125
+ createdAt: z.iso
126
+ .datetime()
127
+ .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))$/),
128
+ session: zReplayPublicSession,
129
+ messages: z.array(zReplayMessage),
15
130
  });
16
131
  export const zOAuthStartInput = z.object({
17
132
  mcpId: z.string().regex(/^mcp_[0-9A-HJKMNP-TV-Z]{26}$/),
18
133
  scope: z.string().optional(),
19
- callbackUrl: z.url().optional()
134
+ callbackUrl: z.url().optional(),
20
135
  });
21
136
  export const zOAuthStartResult = z.object({
22
137
  authorizationUrl: z.string(),
23
138
  sessionId: z.string(),
24
- state: z.string()
139
+ state: z.string(),
25
140
  });
26
141
  export const zCredentialAuth = z.union([
27
142
  z.object({
28
- type: z.literal('bearer'),
29
- token: z.string()
143
+ type: z.literal("bearer"),
144
+ token: z.string(),
30
145
  }),
31
146
  z.object({
32
- type: z.literal('oauth'),
147
+ type: z.literal("oauth"),
33
148
  accessToken: z.string(),
34
149
  expiresAt: z.string().nullish(),
35
- refresh: z.object({
150
+ refresh: z
151
+ .object({
36
152
  clientId: z.string(),
37
153
  refreshToken: z.string(),
38
154
  clientSecret: z.string().optional(),
39
155
  tokenEndpoint: z.string().optional(),
40
- tokenEndpointAuth: z.enum([
41
- 'none',
42
- 'client_secret_basic',
43
- 'client_secret_post'
44
- ]).optional(),
156
+ tokenEndpointAuth: z.enum(["none", "client_secret_basic", "client_secret_post"]).optional(),
45
157
  scope: z.string().optional(),
46
- resource: z.string().optional()
47
- }).nullish()
158
+ resource: z.string().optional(),
159
+ })
160
+ .nullish(),
161
+ profile: z
162
+ .object({
163
+ service: z.literal("github"),
164
+ id: z.number(),
165
+ login: z.string(),
166
+ name: z.string().nullable(),
167
+ })
168
+ .nullish(),
48
169
  }),
49
170
  z.object({
50
- type: z.literal('env'),
51
- value: z.string()
52
- })
171
+ type: z.literal("env"),
172
+ value: z.string(),
173
+ }),
53
174
  ]);
54
175
  export const zCredentialAuthPublic = z.union([
55
176
  z.object({
56
- type: z.literal('bearer')
177
+ type: z.literal("bearer"),
57
178
  }),
58
179
  z.object({
59
- type: z.literal('oauth'),
180
+ type: z.literal("oauth"),
60
181
  expiresAt: z.string().nullish(),
61
- refresh: z.object({
182
+ refresh: z
183
+ .object({
62
184
  clientId: z.string(),
63
185
  tokenEndpoint: z.string().optional(),
64
- tokenEndpointAuth: z.enum([
65
- 'none',
66
- 'client_secret_basic',
67
- 'client_secret_post'
68
- ]).optional(),
186
+ tokenEndpointAuth: z.enum(["none", "client_secret_basic", "client_secret_post"]).optional(),
69
187
  scope: z.string().optional(),
70
- resource: z.string().optional()
71
- }).nullish()
188
+ resource: z.string().optional(),
189
+ })
190
+ .nullish(),
72
191
  }),
73
192
  z.object({
74
- type: z.literal('env')
75
- })
193
+ type: z.literal("env"),
194
+ }),
76
195
  ]);
77
196
  export const zCredential = z.object({
78
197
  id: z.string(),
79
198
  vaultId: z.string(),
80
199
  name: z.string(),
81
200
  mcpId: z.string().nullable(),
201
+ provider: z.enum(["github"]).nullable(),
82
202
  label: z.string().nullable(),
83
203
  keyPreview: z.string().nullable(),
84
204
  auth: zCredentialAuthPublic,
85
- createdAt: z.iso.datetime().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))$/),
86
- updatedAt: z.iso.datetime().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))$/),
87
- archivedAt: z.iso.datetime().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))$/).nullable()
205
+ createdAt: z.iso
206
+ .datetime()
207
+ .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))$/),
208
+ updatedAt: z.iso
209
+ .datetime()
210
+ .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))$/),
211
+ archivedAt: z.iso
212
+ .datetime()
213
+ .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))$/)
214
+ .nullable(),
88
215
  });
89
216
  export const zVault = z.object({
90
217
  id: z.string(),
91
218
  name: z.string(),
92
219
  description: z.string().nullable(),
220
+ isDefault: z.boolean(),
93
221
  orgId: z.string(),
94
222
  userId: z.string().nullable(),
95
- createdAt: z.iso.datetime().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))$/),
96
- updatedAt: z.iso.datetime().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))$/),
97
- archivedAt: z.iso.datetime().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))$/).nullable()
223
+ createdAt: z.iso
224
+ .datetime()
225
+ .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))$/),
226
+ updatedAt: z.iso
227
+ .datetime()
228
+ .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))$/),
229
+ archivedAt: z.iso
230
+ .datetime()
231
+ .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))$/)
232
+ .nullable(),
233
+ });
234
+ export const zSlackInstallationResponse = z.object({
235
+ id: z.string(),
236
+ orgId: z.string(),
237
+ installedById: z.string(),
238
+ teamId: z.string(),
239
+ teamName: z.string().nullable(),
240
+ botUserId: z.string(),
241
+ scope: z.string(),
242
+ createdAt: z.iso
243
+ .datetime()
244
+ .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))$/),
245
+ updatedAt: z.iso
246
+ .datetime()
247
+ .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))$/),
248
+ archivedAt: z.iso
249
+ .datetime()
250
+ .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))$/)
251
+ .nullable(),
252
+ });
253
+ export const zSlackStatus = z.object({
254
+ hasInstallation: z.boolean(),
255
+ installations: z.array(zSlackInstallationResponse),
256
+ });
257
+ export const zWebhookTrigger = z.object({
258
+ id: z.string(),
259
+ projectId: z.string(),
260
+ projectAgentId: z.string(),
261
+ senderUserId: z.string(),
262
+ provider: z.enum(["slack", "generic"]),
263
+ providerInstallId: z.string().nullable(),
264
+ scopeFilter: z
265
+ .object({
266
+ channelId: z.string().optional(),
267
+ })
268
+ .nullable(),
269
+ secretHash: z.string().nullable(),
270
+ isEnabled: z.boolean(),
271
+ createdAt: z.iso
272
+ .datetime()
273
+ .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))$/),
274
+ updatedAt: 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
+ archivedAt: 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
+ .nullable(),
281
+ });
282
+ export const zWebhookTriggerCreateResult = z.object({
283
+ trigger: zWebhookTrigger,
284
+ plaintextSecret: z.string().nullable(),
285
+ });
286
+ export const zCronTrigger = z.object({
287
+ id: z.string(),
288
+ projectId: z.string(),
289
+ projectAgentId: z.string(),
290
+ senderUserId: z.string(),
291
+ inputMessage: z.string(),
292
+ schedule: z.string(),
293
+ timezone: z.string().nullable(),
294
+ isEnabled: z.boolean(),
295
+ syncedAt: z.iso
296
+ .datetime()
297
+ .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))$/)
298
+ .nullable(),
299
+ createdAt: z.iso
300
+ .datetime()
301
+ .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))$/),
302
+ updatedAt: z.iso
303
+ .datetime()
304
+ .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))$/),
305
+ archivedAt: z.iso
306
+ .datetime()
307
+ .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))$/)
308
+ .nullable(),
309
+ });
310
+ export const zRequiredCredential = z.object({
311
+ name: z
312
+ .string()
313
+ .min(1)
314
+ .max(128)
315
+ .regex(/^[A-Z_][A-Z0-9_]*$/),
316
+ description: z.string().max(512).optional(),
98
317
  });
99
318
  export const zSkillVersion = z.object({
100
319
  id: z.string(),
101
320
  skillId: z.string(),
102
321
  version: z.string().regex(/^\d+\.\d+\.\d+$/),
103
322
  createdById: z.string(),
104
- createdAt: z.iso.datetime().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))$/),
105
- archivedAt: z.iso.datetime().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))$/).nullable(),
323
+ createdAt: z.iso
324
+ .datetime()
325
+ .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))$/),
326
+ archivedAt: z.iso
327
+ .datetime()
328
+ .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))$/)
329
+ .nullable(),
106
330
  source: z.union([
107
331
  z.object({
108
- type: z.literal('s3'),
109
- url: z.url()
332
+ type: z.literal("s3"),
333
+ url: z.url(),
110
334
  }),
111
335
  z.object({
112
- type: z.literal('git'),
336
+ type: z.literal("git"),
113
337
  url: z.url(),
114
338
  ref: z.string().optional(),
115
- path: z.string().optional()
116
- })
339
+ path: z.string().optional(),
340
+ }),
117
341
  ]),
118
- releaseNotes: z.string().nullable()
342
+ requiredCredentials: z.array(zRequiredCredential),
343
+ releaseNotes: z.string().nullable(),
344
+ });
345
+ export const zRepository = z.object({
346
+ url: z.url().optional(),
347
+ source: z.string().optional(),
119
348
  });
120
349
  export const zSkill = z.object({
121
350
  id: z.string(),
@@ -123,66 +352,110 @@ export const zSkill = z.object({
123
352
  name: z.string(),
124
353
  description: z.string().nullable(),
125
354
  icon: z.string().nullable(),
355
+ docUrl: z.string().nullable(),
356
+ repository: zRepository.nullable(),
126
357
  orgId: z.string(),
127
358
  userId: z.string().nullable(),
128
359
  publisherId: z.string().nullable(),
360
+ parentId: z.string().nullable(),
361
+ websiteMetadata: zWebsiteMetadata.nullable(),
362
+ sortOrder: z.int().gte(-9007199254740991).lte(9007199254740991).nullable(),
363
+ popularityScore: z.int().gte(-9007199254740991).lte(9007199254740991).nullable(),
364
+ trendingScore: z.int().gte(-9007199254740991).lte(9007199254740991).nullable(),
365
+ rank: z.int().gte(-9007199254740991).lte(9007199254740991).nullable(),
129
366
  latestVersionId: z.string().nullable(),
130
- createdAt: z.iso.datetime().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))$/),
131
- updatedAt: z.iso.datetime().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))$/),
132
- archivedAt: z.iso.datetime().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))$/).nullable()
367
+ createdAt: z.iso
368
+ .datetime()
369
+ .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))$/),
370
+ updatedAt: z.iso
371
+ .datetime()
372
+ .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))$/),
373
+ archivedAt: z.iso
374
+ .datetime()
375
+ .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))$/)
376
+ .nullable(),
377
+ deprecatedAt: z.iso
378
+ .datetime()
379
+ .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))$/)
380
+ .nullable(),
381
+ deprecationMessage: z.string().nullable(),
382
+ tags: z.array(z.string()).optional().default([]),
383
+ });
384
+ export const zSessionVolumeRef = z.object({
385
+ kind: z.enum(["outputs", "uploads"]),
386
+ filename: z.string().min(1),
387
+ });
388
+ export const zSessionFilesPresignDownloadResponse = z.object({
389
+ url: z.string(),
390
+ expiresAt: z.iso
391
+ .datetime()
392
+ .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))$/),
393
+ });
394
+ export const zSessionFilesPresignUploadResponse = z.object({
395
+ uploadUrl: z.string(),
396
+ sandboxPath: z.string(),
397
+ podVolume: z.object({
398
+ projectId: z.string(),
399
+ sessionId: z.string(),
400
+ kind: z.enum(["outputs", "uploads"]),
401
+ filename: z.string(),
402
+ }),
403
+ expiresAt: z.iso
404
+ .datetime()
405
+ .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))$/),
406
+ });
407
+ export const zAuthRequirementEnv = z.object({
408
+ name: z
409
+ .string()
410
+ .min(1)
411
+ .max(128)
412
+ .regex(/^[A-Z_][A-Z0-9_]*$/),
413
+ description: z.string().max(512).optional(),
414
+ satisfied: z.boolean(),
415
+ neededBy: z.array(z.object({
416
+ skillId: z.string(),
417
+ skillName: z.string(),
418
+ })),
133
419
  });
134
- export const zReplay = z.object({
135
- id: z.string(),
136
- orgId: z.string(),
137
- userId: z.string().nullable(),
138
- sessionId: z.string(),
139
- publisherId: z.string(),
420
+ export const zMcpAuthConfig = z.union([
421
+ z.object({
422
+ type: z.literal("oauth"),
423
+ scopes: z.array(z.string()).optional(),
424
+ tokenEndpoint: z.string().optional(),
425
+ authorizationEndpoint: z.string().optional(),
426
+ tokenEndpointAuth: z.enum(["none", "client_secret_basic", "client_secret_post"]).optional(),
427
+ }),
428
+ z.object({
429
+ type: z.literal("api_key"),
430
+ headerName: z.string().optional(),
431
+ queryParam: z.string().optional(),
432
+ }),
433
+ z.object({
434
+ type: z.literal("basic"),
435
+ }),
436
+ z.object({
437
+ type: z.literal("none"),
438
+ }),
439
+ ]);
440
+ export const zAuthRequirementMcp = z.object({
441
+ mcpId: z.string(),
140
442
  slug: z.string(),
141
- websiteMetadata: z.record(z.string(), z.unknown()).nullable(),
142
- createdAt: z.iso.datetime().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))$/),
143
- updatedAt: z.iso.datetime().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))$/),
144
- archivedAt: z.iso.datetime().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))$/).nullable()
145
- });
146
- export const zApiTrigger = z.object({
147
- id: z.string(),
148
- routineId: z.string(),
149
- tokenHash: z.string().nullable(),
150
- isEnabled: z.boolean(),
151
- createdAt: z.iso.datetime().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))$/),
152
- updatedAt: z.iso.datetime().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))$/),
153
- archivedAt: z.iso.datetime().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))$/).nullable()
154
- });
155
- export const zApiTriggerCreated = z.object({
156
- trigger: zApiTrigger,
157
- token: z.string()
158
- });
159
- export const zWebhookTrigger = z.object({
160
- id: z.string(),
161
- routineId: z.string(),
162
- source: z.string().nullable(),
163
- secret: z.string().nullable(),
164
- eventFilters: z.record(z.string(), z.string()).nullable(),
165
- isEnabled: z.boolean(),
166
- createdAt: z.iso.datetime().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))$/),
167
- updatedAt: z.iso.datetime().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))$/),
168
- archivedAt: z.iso.datetime().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))$/).nullable()
443
+ name: z.string(),
444
+ icon: z.string().nullable(),
445
+ authType: z.enum(["none", "oauth", "api_key", "basic"]),
446
+ authConfig: zMcpAuthConfig.nullable(),
447
+ satisfied: z.boolean(),
448
+ neededByAgentIds: z.array(z.string()),
169
449
  });
170
- export const zCronTrigger = z.object({
171
- id: z.string(),
172
- routineId: z.string(),
173
- schedule: z.string(),
174
- timezone: z.string().nullable(),
175
- isEnabled: z.boolean(),
176
- createdAt: z.iso.datetime().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))$/),
177
- updatedAt: z.iso.datetime().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))$/),
178
- archivedAt: z.iso.datetime().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))$/).nullable()
450
+ export const zAuthRequirements = z.object({
451
+ mcps: z.array(zAuthRequirementMcp),
452
+ envs: z.array(zAuthRequirementEnv),
179
453
  });
180
- export const zOpencodeMessage = z.object({
181
- id: z.string(),
182
- sessionId: z.string(),
183
- data: z.record(z.string(), z.unknown()),
184
- createdAt: z.iso.datetime().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))$/),
185
- updatedAt: z.iso.datetime().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))$/)
454
+ export const zSessionMessagesPage = z.object({
455
+ items: z.array(zReplayMessage),
456
+ pageNumber: z.int().gte(-9007199254740991).lte(9007199254740991),
457
+ pageSize: z.int().gte(-9007199254740991).lte(9007199254740991),
458
+ total: z.int().gte(-9007199254740991).lte(9007199254740991),
186
459
  });
187
460
  export const zOpencodeSession = z.object({
188
461
  id: z.string(),
@@ -190,6 +463,7 @@ export const zOpencodeSession = z.object({
190
463
  projectId: z.string(),
191
464
  podId: z.string(),
192
465
  slug: z.string(),
466
+ workspaceId: z.string().nullable(),
193
467
  directory: z.string(),
194
468
  title: z.string(),
195
469
  version: z.string(),
@@ -198,82 +472,127 @@ export const zOpencodeSession = z.object({
198
472
  summaryAdditions: z.int().gte(-2147483648).lte(2147483647).nullable(),
199
473
  summaryDeletions: z.int().gte(-2147483648).lte(2147483647).nullable(),
200
474
  summaryFiles: z.int().gte(-2147483648).lte(2147483647).nullable(),
201
- summaryDiffs: z.array(z.object({
475
+ summaryDiffs: z
476
+ .array(z.object({
202
477
  path: z.string(),
203
478
  additions: z.number(),
204
- deletions: z.number()
205
- })).nullable(),
206
- revert: z.object({
479
+ deletions: z.number(),
480
+ }))
481
+ .nullable(),
482
+ revert: z
483
+ .object({
207
484
  messageId: z.string(),
208
485
  partId: z.string().optional(),
209
486
  snapshot: z.string().optional(),
210
- diff: z.string().optional()
211
- }).nullable(),
487
+ diff: z.string().optional(),
488
+ })
489
+ .nullable(),
212
490
  permission: z.record(z.string(), z.unknown()).nullable(),
213
- createdAt: z.iso.datetime().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))$/),
214
- updatedAt: z.iso.datetime().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))$/),
215
- archivedAt: z.iso.datetime().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))$/).nullable(),
216
- compactingAt: z.iso.datetime().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))$/).nullable()
217
- });
218
- export const zRoutineRun = z.object({
219
- id: z.string(),
220
- routineId: z.string(),
221
- sessionId: z.string().nullable(),
222
- status: z.enum([
223
- 'pending',
224
- 'running',
225
- 'completed',
226
- 'failed',
227
- 'cancelled'
228
- ]),
229
- error: z.string().nullable(),
230
- startedAt: z.iso.datetime().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))$/).nullable(),
231
- completedAt: z.iso.datetime().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))$/).nullable(),
232
- createdAt: z.iso.datetime().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))$/),
233
- updatedAt: z.iso.datetime().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))$/)
491
+ status: z.enum(["idle", "busy", "waiting", "error"]),
492
+ error: z
493
+ .object({
494
+ code: z.string(),
495
+ message: z.string(),
496
+ details: z.record(z.string(), z.unknown()).optional(),
497
+ })
498
+ .nullable(),
499
+ currentAgentId: z.string().nullable(),
500
+ createdAt: z.iso
501
+ .datetime()
502
+ .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))$/),
503
+ updatedAt: z.iso
504
+ .datetime()
505
+ .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))$/),
506
+ archivedAt: z.iso
507
+ .datetime()
508
+ .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))$/)
509
+ .nullable(),
510
+ compactingAt: z.iso
511
+ .datetime()
512
+ .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))$/)
513
+ .nullable(),
234
514
  });
235
- export const zRoutine = z.object({
515
+ export const zReplay = z.object({
236
516
  id: z.string(),
237
517
  orgId: z.string(),
238
518
  userId: z.string().nullable(),
239
- podId: z.string(),
240
- projectId: z.string(),
241
- projectAgentId: z.string(),
519
+ sessionId: z.string(),
520
+ publisherId: z.string().nullable(),
521
+ slug: z.string(),
522
+ websiteMetadata: zWebsiteMetadata.nullable(),
523
+ createdAt: z.iso
524
+ .datetime()
525
+ .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))$/),
526
+ updatedAt: z.iso
527
+ .datetime()
528
+ .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))$/),
529
+ archivedAt: z.iso
530
+ .datetime()
531
+ .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))$/)
532
+ .nullable(),
533
+ deprecatedAt: z.iso
534
+ .datetime()
535
+ .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))$/)
536
+ .nullable(),
537
+ deprecationMessage: z.string().nullable(),
538
+ });
539
+ export const zPublisher = z.object({
540
+ id: z.string(),
541
+ organizationId: z.string().nullable(),
542
+ slug: z.string(),
242
543
  name: z.string(),
243
544
  description: z.string().nullable(),
244
- prompt: z.string(),
245
- status: z.enum(['active', 'paused']),
246
- createdAt: z.iso.datetime().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))$/),
247
- updatedAt: z.iso.datetime().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))$/),
248
- archivedAt: z.iso.datetime().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))$/).nullable()
545
+ avatar: z.string().nullable(),
546
+ url: z.string().nullable(),
547
+ isVerified: z.boolean(),
548
+ createdAt: z.iso
549
+ .datetime()
550
+ .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))$/),
551
+ updatedAt: z.iso
552
+ .datetime()
553
+ .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))$/),
554
+ archivedAt: z.iso
555
+ .datetime()
556
+ .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))$/)
557
+ .nullable(),
558
+ });
559
+ export const zPublisherMe = z.object({
560
+ org: zPublisher.nullable(),
249
561
  });
250
562
  export const zProjectMemoryStore = z.object({
251
563
  id: z.string(),
252
564
  projectId: z.string(),
253
565
  memoryStoreId: z.string(),
254
- createdAt: z.iso.datetime().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))$/),
255
- updatedAt: z.iso.datetime().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))$/)
256
- });
257
- export const zFileStoreResource = z.object({
258
- source: z.string(),
259
- mountPath: z.string()
566
+ createdAt: z.iso
567
+ .datetime()
568
+ .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))$/),
569
+ updatedAt: z.iso
570
+ .datetime()
571
+ .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))$/),
260
572
  });
261
573
  export const zProjectFileStore = z.object({
262
574
  id: z.string(),
263
575
  projectId: z.string(),
264
576
  fileStoreId: z.string(),
265
- resources: z.array(zFileStoreResource),
266
- createdAt: z.iso.datetime().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))$/),
267
- updatedAt: z.iso.datetime().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))$/)
577
+ createdAt: z.iso
578
+ .datetime()
579
+ .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))$/),
580
+ updatedAt: z.iso
581
+ .datetime()
582
+ .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))$/),
268
583
  });
269
584
  export const zProjectAgent = z.object({
270
585
  id: z.string(),
271
586
  projectId: z.string(),
272
587
  agentId: z.string(),
273
588
  agentVersionId: z.string().nullable(),
274
- type: z.enum(['primary', 'subagent']),
275
- createdAt: z.iso.datetime().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))$/),
276
- updatedAt: z.iso.datetime().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))$/)
589
+ type: z.enum(["primary", "subagent", "all"]),
590
+ createdAt: z.iso
591
+ .datetime()
592
+ .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))$/),
593
+ updatedAt: z.iso
594
+ .datetime()
595
+ .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
596
  });
278
597
  export const zProject = z.object({
279
598
  id: z.string(),
@@ -283,12 +602,18 @@ export const zProject = z.object({
283
602
  name: z.string(),
284
603
  description: z.string().nullable(),
285
604
  slug: z.string(),
286
- path: z.string().nullable(),
287
- permission: z.array(zPermissionRule),
288
- gitRepos: z.array(zGitRepo),
289
- createdAt: z.iso.datetime().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))$/),
290
- updatedAt: z.iso.datetime().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))$/),
291
- archivedAt: z.iso.datetime().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))$/).nullable()
605
+ permission: zPermissionConfig,
606
+ gitRepo: zProjectGitRepo.nullable(),
607
+ createdAt: z.iso
608
+ .datetime()
609
+ .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))$/),
610
+ updatedAt: z.iso
611
+ .datetime()
612
+ .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))$/),
613
+ archivedAt: z.iso
614
+ .datetime()
615
+ .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))$/)
616
+ .nullable(),
292
617
  });
293
618
  export const zSandbox = z.object({
294
619
  id: z.string(),
@@ -298,44 +623,91 @@ export const zSandbox = z.object({
298
623
  providerSandboxId: z.string().nullable(),
299
624
  internalHost: z.string().nullable(),
300
625
  publicHost: z.string().nullable(),
301
- status: z.enum([
302
- 'provisioning',
303
- 'ready',
304
- 'failed',
305
- 'terminated'
306
- ]),
307
- lastActivityAt: z.iso.datetime().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))$/).nullable(),
308
- createdAt: z.iso.datetime().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))$/),
309
- updatedAt: z.iso.datetime().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))$/),
310
- archivedAt: z.iso.datetime().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))$/).nullable()
626
+ createdAt: z.iso
627
+ .datetime()
628
+ .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))$/),
629
+ updatedAt: z.iso
630
+ .datetime()
631
+ .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))$/),
632
+ archivedAt: z.iso
633
+ .datetime()
634
+ .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))$/)
635
+ .nullable(),
636
+ });
637
+ export const zPodSandboxStatusResponse = z.union([
638
+ z.object({
639
+ status: z.literal("provisioning"),
640
+ workflowId: z.string(),
641
+ phase: z.enum(["loading", "resuming", "provisioning", "bootstrapping", "finalizing"]),
642
+ }),
643
+ z.object({
644
+ status: z.literal("ready"),
645
+ sandbox: zSandbox,
646
+ serverPassword: z.string(),
647
+ }),
648
+ z.object({
649
+ status: z.literal("absent"),
650
+ }),
651
+ z.object({
652
+ status: z.literal("failed"),
653
+ reason: z.string(),
654
+ }),
655
+ ]);
656
+ export const zPodSandboxProvisionResponse = z.object({
657
+ workflowId: z.string(),
658
+ status: z.literal("provisioning"),
311
659
  });
312
660
  export const zPodVault = z.object({
313
661
  id: z.string(),
314
662
  podId: z.string(),
315
663
  vaultId: z.string(),
316
664
  priority: z.int().gte(-2147483648).lte(2147483647),
317
- createdAt: z.iso.datetime().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))$/),
318
- updatedAt: z.iso.datetime().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))$/)
665
+ createdAt: z.iso
666
+ .datetime()
667
+ .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))$/),
668
+ updatedAt: z.iso
669
+ .datetime()
670
+ .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))$/),
319
671
  });
320
672
  export const zPodMember = z.object({
321
673
  id: z.string(),
322
674
  podId: z.string(),
323
675
  userId: z.string(),
324
- role: z.enum(['owner', 'member']),
325
- createdAt: z.iso.datetime().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))$/),
326
- updatedAt: z.iso.datetime().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))$/)
676
+ role: z.enum(["owner", "member"]),
677
+ createdAt: z.iso
678
+ .datetime()
679
+ .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))$/),
680
+ updatedAt: z.iso
681
+ .datetime()
682
+ .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))$/),
327
683
  });
328
684
  export const zPod = z.object({
329
685
  id: z.string(),
330
686
  name: z.string(),
687
+ slug: z.string(),
331
688
  description: z.string().nullable(),
332
689
  isPrivate: z.boolean(),
690
+ isDefault: z.boolean(),
333
691
  environmentId: z.string().nullable(),
334
692
  orgId: z.string(),
335
693
  userId: z.string().nullable(),
336
- createdAt: z.iso.datetime().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))$/),
337
- updatedAt: z.iso.datetime().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))$/),
338
- archivedAt: z.iso.datetime().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))$/).nullable()
694
+ manifestUpdatedAt: z.iso
695
+ .datetime()
696
+ .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))$/),
697
+ createdAt: z.iso
698
+ .datetime()
699
+ .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))$/),
700
+ updatedAt: z.iso
701
+ .datetime()
702
+ .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))$/),
703
+ archivedAt: z.iso
704
+ .datetime()
705
+ .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))$/)
706
+ .nullable(),
707
+ });
708
+ export const zPodWithSandbox = z.object({
709
+ pod: zPod,
710
+ sandbox: zSandbox,
339
711
  });
340
712
  export const zPat = z.object({
341
713
  id: z.string(),
@@ -344,79 +716,125 @@ export const zPat = z.object({
344
716
  name: z.string(),
345
717
  tokenPrefix: z.string(),
346
718
  scopes: z.array(z.string()),
347
- lastUsedAt: z.iso.datetime().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))$/).nullable(),
348
- expiresAt: z.iso.datetime().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))$/).nullable(),
349
- revokedAt: z.iso.datetime().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))$/).nullable(),
350
- createdAt: z.iso.datetime().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))$/),
351
- updatedAt: z.iso.datetime().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))$/)
719
+ lastUsedAt: z.iso
720
+ .datetime()
721
+ .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))$/)
722
+ .nullable(),
723
+ expiresAt: 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
+ .nullable(),
727
+ revokedAt: z.iso
728
+ .datetime()
729
+ .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))$/)
730
+ .nullable(),
731
+ createdAt: z.iso
732
+ .datetime()
733
+ .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))$/),
734
+ updatedAt: z.iso
735
+ .datetime()
736
+ .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))$/),
737
+ });
738
+ export const zOnboardingSetupPersonalOrg = z.object({
739
+ organizationId: z.string(),
740
+ alreadyExisted: z.boolean(),
741
+ });
742
+ export const zOnboardingStart = z.object({
743
+ podId: z.string(),
744
+ projectId: z.string(),
745
+ sessionId: z.string(),
746
+ });
747
+ export const zModelPricing = z.object({
748
+ input_usd_per_million_tokens: z.number(),
749
+ output_usd_per_million_tokens: z.number(),
750
+ });
751
+ export const zModelEntry = z.object({
752
+ key: z.string(),
753
+ name: z.string(),
754
+ description: z.string(),
755
+ size: z.enum(["large", "medium", "small"]).optional(),
756
+ pricing: zModelPricing.optional(),
757
+ });
758
+ export const zModelProvider = z.object({
759
+ key: z.string(),
760
+ name: z.string(),
761
+ models: z.array(zModelEntry),
762
+ });
763
+ export const zModelsResponse = z.object({
764
+ default_model: z.string(),
765
+ providers: z.array(zModelProvider),
352
766
  });
353
767
  export const zMemoryStoreFile = z.object({
354
768
  path: z.string(),
355
769
  size: z.int().gte(0).lte(9007199254740991),
356
- lastModified: z.iso.datetime().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))$/).optional()
770
+ lastModified: z.iso
771
+ .datetime()
772
+ .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))$/)
773
+ .optional(),
774
+ contentSha256: z.string().optional(),
357
775
  });
358
776
  export const zMemoryStore = z.object({
359
777
  id: z.string(),
360
778
  name: z.string(),
361
779
  description: z.string().nullable(),
780
+ mountSlug: z.string(),
781
+ isDefault: z.boolean(),
362
782
  orgId: z.string(),
363
783
  userId: z.string().nullable(),
364
- prompt: z.string().nullable(),
365
- createdAt: z.iso.datetime().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))$/),
366
- updatedAt: z.iso.datetime().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))$/),
367
- archivedAt: z.iso.datetime().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))$/).nullable()
784
+ createdAt: z.iso
785
+ .datetime()
786
+ .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))$/),
787
+ updatedAt: z.iso
788
+ .datetime()
789
+ .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))$/),
790
+ archivedAt: z.iso
791
+ .datetime()
792
+ .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))$/)
793
+ .nullable(),
794
+ });
795
+ export const zMe = z.object({
796
+ user: z.object({
797
+ id: z.string(),
798
+ name: z.string(),
799
+ email: z
800
+ .email()
801
+ .regex(/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/),
802
+ }),
803
+ organization: z
804
+ .object({
805
+ id: z.string(),
806
+ name: z.string(),
807
+ slug: z.string(),
808
+ })
809
+ .nullable(),
810
+ role: z.string().nullable(),
811
+ scopes: z.array(z.string()),
812
+ method: z.enum(["session", "pat", "sandbox"]),
368
813
  });
369
814
  export const zOAuthSessionStatus = z.object({
370
815
  id: z.string(),
371
- status: z.enum([
372
- 'pending',
373
- 'active',
374
- 'failed',
375
- 'expired'
376
- ]),
377
- mcpId: z.string(),
816
+ status: z.enum(["pending", "active", "failed", "expired"]),
817
+ mcpId: z.string().nullable(),
378
818
  credentialId: z.string().nullable(),
379
819
  failureReason: z.string().nullable(),
380
- expiresAt: z.iso.datetime().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))$/)
820
+ expiresAt: z.iso
821
+ .datetime()
822
+ .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))$/),
381
823
  });
382
824
  export const zMcpOAuthConnectBody = z.object({
383
825
  scope: z.string().optional(),
384
- callbackUrl: z.url().optional()
826
+ callbackUrl: z.url().optional(),
385
827
  });
386
828
  export const zMcpOAuthConnectResult = z.union([
387
829
  z.object({
388
830
  alreadyConnected: z.literal(true),
389
- credentialId: z.string()
831
+ credentialId: z.string(),
390
832
  }),
391
833
  z.object({
392
834
  alreadyConnected: z.literal(false),
393
835
  authorizationUrl: z.string(),
394
- sessionId: z.string()
395
- })
396
- ]);
397
- export const zMcpAuthConfig = z.union([
398
- z.object({
399
- type: z.literal('oauth'),
400
- scopes: z.array(z.string()).optional(),
401
- tokenEndpoint: z.string().optional(),
402
- authorizationEndpoint: z.string().optional(),
403
- tokenEndpointAuth: z.enum([
404
- 'none',
405
- 'client_secret_basic',
406
- 'client_secret_post'
407
- ]).optional()
408
- }),
409
- z.object({
410
- type: z.literal('api_key'),
411
- headerName: z.string().optional(),
412
- queryParam: z.string().optional()
413
- }),
414
- z.object({
415
- type: z.literal('basic')
836
+ sessionId: z.string(),
416
837
  }),
417
- z.object({
418
- type: z.literal('none')
419
- })
420
838
  ]);
421
839
  export const zMcp = z.object({
422
840
  id: z.string(),
@@ -424,41 +842,112 @@ export const zMcp = z.object({
424
842
  name: z.string(),
425
843
  description: z.string().nullable(),
426
844
  icon: z.string().nullable(),
427
- mcpServerUrl: z.string(),
428
- type: z.enum(['url']),
429
- auth: z.enum([
430
- 'none',
431
- 'oauth',
432
- 'api_key',
433
- 'basic'
434
- ]),
845
+ mcpServerUrl: z.string().nullable(),
846
+ docUrl: z.string().nullable(),
847
+ type: z.enum(["remote", "local"]),
848
+ transport: z.enum(["streamable-http", "sse", "stdio"]),
849
+ command: z.string().nullable(),
850
+ args: z.array(z.string()),
851
+ version: z.string().nullable(),
852
+ repository: zRepository.nullable(),
853
+ tools: z.array(z.string()),
854
+ prompts: z.array(z.string()),
855
+ auth: z.enum(["none", "oauth", "api_key", "basic"]),
435
856
  authConfig: zMcpAuthConfig.nullable(),
436
857
  orgId: z.string(),
437
858
  userId: z.string().nullable(),
438
859
  publisherId: z.string().nullable(),
439
- websiteMetadata: z.record(z.string(), z.unknown()).nullable(),
440
- createdAt: z.iso.datetime().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))$/),
441
- updatedAt: z.iso.datetime().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))$/),
442
- archivedAt: z.iso.datetime().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))$/).nullable()
860
+ websiteMetadata: zWebsiteMetadata.nullable(),
861
+ sortOrder: z.int().gte(-9007199254740991).lte(9007199254740991).nullable(),
862
+ popularityScore: z.int().gte(-9007199254740991).lte(9007199254740991).nullable(),
863
+ trendingScore: z.int().gte(-9007199254740991).lte(9007199254740991).nullable(),
864
+ rank: z.int().gte(-9007199254740991).lte(9007199254740991).nullable(),
865
+ createdAt: z.iso
866
+ .datetime()
867
+ .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))$/),
868
+ updatedAt: z.iso
869
+ .datetime()
870
+ .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))$/),
871
+ archivedAt: z.iso
872
+ .datetime()
873
+ .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))$/)
874
+ .nullable(),
875
+ deprecatedAt: z.iso
876
+ .datetime()
877
+ .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))$/)
878
+ .nullable(),
879
+ deprecationMessage: z.string().nullable(),
880
+ tags: z.array(z.string()).optional().default([]),
881
+ });
882
+ export const zGithubInstallationResponse = z.object({
883
+ id: z.string(),
884
+ orgId: z.string(),
885
+ installedById: z.string().nullable(),
886
+ installationId: z.string(),
887
+ accountLogin: z.string(),
888
+ accountType: z.enum(["User", "Organization"]),
889
+ repositorySelection: z.enum(["all", "selected"]),
890
+ selectedRepos: z
891
+ .array(z.object({
892
+ fullName: z.string(),
893
+ }))
894
+ .nullable(),
895
+ appPermissions: z.record(z.string(), z.string()).nullable(),
896
+ createdAt: z.iso
897
+ .datetime()
898
+ .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))$/),
899
+ updatedAt: z.iso
900
+ .datetime()
901
+ .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))$/),
902
+ archivedAt: z.iso
903
+ .datetime()
904
+ .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))$/)
905
+ .nullable(),
906
+ });
907
+ export const zGithubStatus = z.object({
908
+ hasInstallation: z.boolean(),
909
+ hasUserCredential: z.boolean(),
910
+ installations: z.array(zGithubInstallationResponse),
911
+ });
912
+ export const zStoreStartUploadResponse = z.object({
913
+ url: z.string(),
914
+ expiresAt: z.iso
915
+ .datetime()
916
+ .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))$/),
443
917
  });
444
918
  export const zStorePresignResponse = z.object({
445
919
  url: z.string(),
446
- expiresAt: z.iso.datetime().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))$/)
920
+ expiresAt: z.iso
921
+ .datetime()
922
+ .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))$/),
447
923
  });
448
924
  export const zFileStoreFile = z.object({
449
925
  path: z.string(),
450
926
  size: z.int().gte(0).lte(9007199254740991),
451
- lastModified: z.iso.datetime().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))$/).optional()
927
+ lastModified: z.iso
928
+ .datetime()
929
+ .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))$/)
930
+ .optional(),
931
+ contentSha256: z.string().optional(),
452
932
  });
453
933
  export const zFileStore = z.object({
454
934
  id: z.string(),
455
935
  name: z.string(),
456
936
  description: z.string().nullable(),
937
+ mountSlug: z.string(),
938
+ isDefault: z.boolean(),
457
939
  orgId: z.string(),
458
940
  userId: z.string().nullable(),
459
- createdAt: z.iso.datetime().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))$/),
460
- updatedAt: z.iso.datetime().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))$/),
461
- archivedAt: z.iso.datetime().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))$/).nullable()
941
+ createdAt: z.iso
942
+ .datetime()
943
+ .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))$/),
944
+ updatedAt: z.iso
945
+ .datetime()
946
+ .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))$/),
947
+ archivedAt: z.iso
948
+ .datetime()
949
+ .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))$/)
950
+ .nullable(),
462
951
  });
463
952
  export const zPackagesConfig = z.object({
464
953
  apt: z.array(z.string()).optional(),
@@ -466,18 +955,18 @@ export const zPackagesConfig = z.object({
466
955
  pip: z.array(z.string()).optional(),
467
956
  cargo: z.array(z.string()).optional(),
468
957
  gem: z.array(z.string()).optional(),
469
- go: z.array(z.string()).optional()
958
+ go: z.array(z.string()).optional(),
470
959
  });
471
960
  export const zNetworkingConfig = z.union([
472
961
  z.object({
473
- type: z.literal('unrestricted')
962
+ type: z.literal("unrestricted"),
474
963
  }),
475
964
  z.object({
476
- type: z.literal('limited'),
965
+ type: z.literal("limited"),
477
966
  allowMcpServers: z.boolean(),
478
967
  allowPackageManagers: z.boolean(),
479
- allowedHosts: z.array(z.string())
480
- })
968
+ allowedHosts: z.array(z.string()),
969
+ }),
481
970
  ]);
482
971
  export const zEnvironment = z.object({
483
972
  id: z.string(),
@@ -485,29 +974,42 @@ export const zEnvironment = z.object({
485
974
  description: z.string().nullable(),
486
975
  orgId: z.string(),
487
976
  userId: z.string().nullable(),
488
- hostingType: z.enum(['cloud']),
977
+ hostingType: z.enum(["cloud"]),
489
978
  networking: zNetworkingConfig,
490
979
  packages: zPackagesConfig,
491
- createdAt: z.iso.datetime().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))$/),
492
- updatedAt: z.iso.datetime().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))$/),
493
- archivedAt: z.iso.datetime().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))$/).nullable()
980
+ createdAt: z.iso
981
+ .datetime()
982
+ .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))$/),
983
+ updatedAt: z.iso
984
+ .datetime()
985
+ .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))$/),
986
+ archivedAt: z.iso
987
+ .datetime()
988
+ .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))$/)
989
+ .nullable(),
494
990
  });
495
991
  export const zDashboardByUserItem = z.object({
496
992
  user_id: z.string(),
497
993
  username: z.string(),
498
- task_count: z.number()
994
+ task_count: z.number(),
499
995
  });
500
996
  export const zDashboardByAgentItem = z.object({
501
997
  agent_id: z.string(),
502
998
  agent_name: z.string(),
503
999
  task_count: z.number(),
504
- success_rate: z.number()
1000
+ success_rate: z.number(),
1001
+ });
1002
+ export const zDashboardTasksOverTimeUserSegment = z.object({
1003
+ user_id: z.string(),
1004
+ username: z.string(),
1005
+ count: z.number(),
505
1006
  });
506
1007
  export const zDashboardTasksOverTimeItem = z.object({
507
1008
  date: z.string(),
508
1009
  completed: z.number(),
509
1010
  error: z.number(),
510
- total: z.number()
1011
+ total: z.number(),
1012
+ by_user: z.array(zDashboardTasksOverTimeUserSegment),
511
1013
  });
512
1014
  export const zDashboardSummary = z.object({
513
1015
  total_tasks: z.number(),
@@ -516,7 +1018,7 @@ export const zDashboardSummary = z.object({
516
1018
  active_tasks: z.number(),
517
1019
  waiting_tasks: z.number(),
518
1020
  success_rate: z.number(),
519
- autonomy_score: z.number()
1021
+ autonomy_score: z.number(),
520
1022
  });
521
1023
  export const zDashboardResponse = z.object({
522
1024
  summary: zDashboardSummary,
@@ -525,167 +1027,204 @@ export const zDashboardResponse = z.object({
525
1027
  by_user: z.array(zDashboardByUserItem),
526
1028
  agents: z.array(z.object({
527
1029
  id: z.string(),
528
- name: z.string()
1030
+ name: z.string(),
529
1031
  })),
530
1032
  pods: z.array(z.object({
531
1033
  id: z.string(),
532
- name: z.string()
1034
+ name: z.string(),
533
1035
  })),
534
1036
  users: z.array(z.object({
535
1037
  id: z.string(),
536
- name: z.string()
1038
+ name: z.string(),
537
1039
  })),
538
- period: z.enum([
539
- '7d',
540
- '30d',
541
- '90d'
542
- ])
1040
+ period: z.enum(["7d", "30d", "90d"]),
1041
+ });
1042
+ export const zBlueprintInstallReport = z.object({
1043
+ projects: z.array(z.string()),
1044
+ agents: z.array(z.string()),
1045
+ skills: z.array(z.string()),
1046
+ mcps: z.array(z.string()),
1047
+ skipped: z.array(z.object({
1048
+ kind: z.enum(["skill", "agent", "mcp"]),
1049
+ sourceId: z.string(),
1050
+ reason: z.string(),
1051
+ })),
1052
+ });
1053
+ export const zBlueprintSelection = z.object({
1054
+ projectIds: z.array(z.string()).optional().default([]),
1055
+ agentIds: z.array(z.string()).optional().default([]),
1056
+ skillIds: z.array(z.string()).optional().default([]),
1057
+ mcpIds: z.array(z.string()).optional().default([]),
1058
+ replayIds: z.array(z.string()).optional().default([]),
1059
+ cronTriggerIds: z.array(z.string()).optional().default([]),
1060
+ });
1061
+ export const zBlueprint = z.object({
1062
+ id: z.string(),
1063
+ slug: z.string(),
1064
+ name: z.string(),
1065
+ description: z.string().nullable(),
1066
+ orgId: z.string(),
1067
+ userId: z.string().nullable(),
1068
+ publisherId: z.string().nullable(),
1069
+ template: zBlueprintTemplate,
1070
+ websiteMetadata: zWebsiteMetadata.nullable(),
1071
+ createdAt: 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
+ updatedAt: z.iso
1075
+ .datetime()
1076
+ .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))$/),
1077
+ archivedAt: z.iso
1078
+ .datetime()
1079
+ .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))$/)
1080
+ .nullable(),
1081
+ deprecatedAt: z.iso
1082
+ .datetime()
1083
+ .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))$/)
1084
+ .nullable(),
1085
+ deprecationMessage: z.string().nullable(),
543
1086
  });
544
1087
  export const zAgentVersion = z.object({
545
1088
  id: z.string(),
546
1089
  agentId: z.string(),
547
1090
  version: z.string().regex(/^\d+\.\d+\.\d+$/),
548
1091
  createdById: z.string(),
549
- createdAt: z.iso.datetime().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))$/),
550
- archivedAt: z.iso.datetime().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))$/).nullable(),
1092
+ createdAt: z.iso
1093
+ .datetime()
1094
+ .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))$/),
1095
+ archivedAt: z.iso
1096
+ .datetime()
1097
+ .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))$/)
1098
+ .nullable(),
551
1099
  description: z.string().nullable(),
552
1100
  prompt: z.string().nullable(),
553
- releaseNotes: z.string().nullable()
1101
+ model: z.string().nullable(),
1102
+ releaseNotes: z.string().nullable(),
1103
+ permission: zPermissionConfig,
554
1104
  });
555
- export const zAgent = z.object({
1105
+ export const zSearchResult = z.object({
556
1106
  id: z.string(),
557
1107
  slug: z.string(),
558
1108
  name: z.string(),
1109
+ description: z.string().nullable(),
559
1110
  icon: z.string().nullable(),
560
- orgId: z.string(),
561
- userId: z.string().nullable(),
562
- publisherId: z.string().nullable(),
563
- websiteMetadata: z.record(z.string(), z.unknown()).nullable(),
564
- latestVersionId: z.string().nullable(),
565
- createdAt: z.iso.datetime().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))$/),
566
- updatedAt: z.iso.datetime().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))$/),
567
- archivedAt: z.iso.datetime().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))$/).nullable()
1111
+ source: z.enum(["user", "org", "registry"]),
1112
+ updatedAt: z.iso
1113
+ .datetime()
1114
+ .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))$/),
568
1115
  });
569
- export const zComposioConnection = z.object({
1116
+ export const zAgentLatestVersion = z.object({
570
1117
  id: z.string(),
571
- orgId: z.string(),
572
- userId: z.string().nullable(),
573
- composioMcpId: z.string(),
574
- composioUserId: z.string(),
575
- connectedAccountId: z.string().nullable(),
576
- oauthStatus: z.enum([
577
- 'pending',
578
- 'active',
579
- 'failed',
580
- 'expired'
581
- ]),
582
- oauthState: z.string().nullable(),
583
- failureReason: z.string().nullable(),
584
- createdAt: z.iso.datetime().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))$/),
585
- updatedAt: z.iso.datetime().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))$/),
586
- archivedAt: z.iso.datetime().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))$/).nullable()
1118
+ agentId: z.string(),
1119
+ version: z.string().regex(/^\d+\.\d+\.\d+$/),
1120
+ skills: z.array(z.object({
1121
+ skillId: z.string(),
1122
+ skillVersionId: z.string().nullish().default(null),
1123
+ skill: z.object({
1124
+ id: z.string(),
1125
+ slug: z.string(),
1126
+ name: z.string(),
1127
+ icon: z.string().nullable(),
1128
+ }),
1129
+ })),
1130
+ mcps: z.array(z.object({
1131
+ mcpId: z.string(),
1132
+ mcp: z.object({
1133
+ id: z.string(),
1134
+ slug: z.string(),
1135
+ name: z.string(),
1136
+ icon: z.string().nullable(),
1137
+ }),
1138
+ })),
587
1139
  });
588
- export const zComposioMcp = z.object({
1140
+ export const zAgent = z.object({
589
1141
  id: z.string(),
590
1142
  slug: z.string(),
591
1143
  name: z.string(),
592
- description: z.string().nullable(),
593
- logo: z.string().nullable(),
594
- composioAuthConfigId: z.string(),
595
- syncedAt: z.iso.datetime().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))$/).nullable(),
596
- createdAt: z.iso.datetime().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))$/),
597
- updatedAt: z.iso.datetime().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))$/),
598
- archivedAt: z.iso.datetime().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))$/).nullable()
599
- });
600
- export const zComposioMcpListQuery = z.object({
601
- limit: z.number().gte(1).lte(100).optional(),
602
- offset: z.number().gte(0).optional()
603
- });
604
- /**
605
- * List of Composio MCPs
606
- */
607
- export const zComposioMcpListResponse = z.array(zComposioMcp);
608
- export const zComposioMcpGetPath = z.object({
609
- id: z.string().regex(/^cmcp_[0-9A-HJKMNP-TV-Z]{26}$/)
610
- });
611
- /**
612
- * Composio MCP details
613
- */
614
- export const zComposioMcpGetResponse = zComposioMcp;
615
- export const zComposioConnectionListQuery = z.object({
616
- limit: z.number().gte(1).lte(100).optional(),
617
- offset: z.number().gte(0).optional()
618
- });
619
- /**
620
- * Connections
621
- */
622
- export const zComposioConnectionListResponse = z.array(zComposioConnection);
623
- export const zComposioConnectionInitiateBody = z.object({
624
- composioMcpId: z.string().regex(/^cmcp_[0-9A-HJKMNP-TV-Z]{26}$/),
625
- callbackUrl: z.url().optional()
626
- });
627
- /**
628
- * Redirect target or already-connected short-circuit
629
- */
630
- export const zComposioConnectionInitiateResponse = z.union([
631
- z.object({
632
- kind: z.literal('redirect'),
633
- redirectUrl: z.string(),
634
- connectionId: z.string(),
635
- state: z.string()
636
- }),
637
- z.object({
638
- kind: z.literal('already_connected'),
639
- connectionId: z.string()
640
- })
641
- ]);
642
- export const zComposioConnectionGetPath = z.object({
643
- id: z.string().regex(/^cmc_[0-9A-HJKMNP-TV-Z]{26}$/)
644
- });
645
- /**
646
- * Connection
647
- */
648
- export const zComposioConnectionGetResponse = zComposioConnection;
649
- export const zComposioConnectionRefreshPath = z.object({
650
- id: z.string().regex(/^cmc_[0-9A-HJKMNP-TV-Z]{26}$/)
651
- });
652
- /**
653
- * Connection
654
- */
655
- export const zComposioConnectionRefreshResponse = zComposioConnection;
656
- export const zComposioConnectionArchivePath = z.object({
657
- id: z.string().regex(/^cmc_[0-9A-HJKMNP-TV-Z]{26}$/)
658
- });
659
- /**
660
- * Archived connection
661
- */
662
- export const zComposioConnectionArchiveResponse = zComposioConnection;
1144
+ icon: z.string().nullable(),
1145
+ orgId: z.string(),
1146
+ userId: z.string().nullable(),
1147
+ publisherId: z.string().nullable(),
1148
+ parentId: z.string().nullable(),
1149
+ websiteMetadata: zWebsiteMetadata.nullable(),
1150
+ latestVersionId: z.string().nullable(),
1151
+ createdAt: z.iso
1152
+ .datetime()
1153
+ .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))$/),
1154
+ updatedAt: z.iso
1155
+ .datetime()
1156
+ .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))$/),
1157
+ archivedAt: z.iso
1158
+ .datetime()
1159
+ .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))$/)
1160
+ .nullable(),
1161
+ deprecatedAt: z.iso
1162
+ .datetime()
1163
+ .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))$/)
1164
+ .nullable(),
1165
+ deprecationMessage: z.string().nullable(),
1166
+ latestVersion: zAgentLatestVersion.nullish(),
1167
+ });
1168
+ /**
1169
+ * Pass 'user' to scope the operation to the authenticated user's private namespace. Omit for the org-wide namespace.
1170
+ */
1171
+ export const zScopeQuery = z.enum(["user"]);
663
1172
  export const zAgentListQuery = z.object({
664
- limit: z.number().gte(1).lte(100).optional(),
665
- offset: z.number().gte(0).optional()
1173
+ scope: z.enum(["user"]).optional(),
1174
+ limit: z.number().gte(1).lte(1000).optional(),
1175
+ offset: z.number().gte(0).optional(),
666
1176
  });
667
1177
  /**
668
1178
  * List of agents
669
1179
  */
670
1180
  export const zAgentListResponse = z.array(zAgent);
671
1181
  export const zAgentCreateBody = z.object({
672
- slug: z.string().min(1).max(128).regex(/^[a-z0-9-]+$/),
673
1182
  name: z.string().min(1).max(256),
674
- icon: z.string().nullish().default(null)
1183
+ icon: z.string().nullish().default(null),
1184
+ tags: z.array(z.string()).optional(),
1185
+ });
1186
+ export const zAgentCreateQuery = z.object({
1187
+ scope: z.enum(["user"]).optional(),
675
1188
  });
676
1189
  /**
677
1190
  * Created agent
678
1191
  */
679
1192
  export const zAgentCreateResponse = zAgent;
1193
+ export const zAgentSearchBody = z.object({
1194
+ query: z.string().optional(),
1195
+ sources: z
1196
+ .array(z.enum(["user", "org", "registry"]))
1197
+ .min(1)
1198
+ .optional()
1199
+ .default(["user", "org", "registry"]),
1200
+ limit: z.int().gte(1).lte(50).optional().default(20),
1201
+ });
1202
+ export const zAgentSearchQuery = z.object({
1203
+ scope: z.enum(["user"]).optional(),
1204
+ });
1205
+ /**
1206
+ * Matching agents
1207
+ */
1208
+ export const zAgentSearchResponse = z.array(zSearchResult);
680
1209
  export const zAgentGetBySlugPath = z.object({
681
- slug: z.string().min(1).max(128).regex(/^[a-z0-9-]+$/)
1210
+ slug: z
1211
+ .string()
1212
+ .min(1)
1213
+ .max(128)
1214
+ .regex(/^[a-z0-9-]+$/),
1215
+ });
1216
+ export const zAgentGetBySlugQuery = z.object({
1217
+ scope: z.enum(["user"]).optional(),
682
1218
  });
683
1219
  /**
684
1220
  * Agent details
685
1221
  */
686
1222
  export const zAgentGetBySlugResponse = zAgent;
687
1223
  export const zAgentGetPath = z.object({
688
- id: z.string().regex(/^agt_[0-9A-HJKMNP-TV-Z]{26}$/)
1224
+ id: z.string().regex(/^agt_[0-9A-HJKMNP-TV-Z]{26}$/),
1225
+ });
1226
+ export const zAgentGetQuery = z.object({
1227
+ scope: z.enum(["user"]).optional(),
689
1228
  });
690
1229
  /**
691
1230
  * Agent details
@@ -693,57 +1232,104 @@ export const zAgentGetPath = z.object({
693
1232
  export const zAgentGetResponse = zAgent;
694
1233
  export const zAgentUpdateBody = z.object({
695
1234
  name: z.string().optional(),
696
- icon: z.string().nullish()
1235
+ icon: z.string().nullish(),
1236
+ websiteMetadata: zWebsiteMetadata.nullish(),
1237
+ tags: z.array(z.string()).optional(),
697
1238
  });
698
1239
  export const zAgentUpdatePath = z.object({
699
- id: z.string().regex(/^agt_[0-9A-HJKMNP-TV-Z]{26}$/)
1240
+ id: z.string().regex(/^agt_[0-9A-HJKMNP-TV-Z]{26}$/),
1241
+ });
1242
+ export const zAgentUpdateQuery = z.object({
1243
+ scope: z.enum(["user"]).optional(),
700
1244
  });
701
1245
  /**
702
1246
  * Updated agent
703
1247
  */
704
1248
  export const zAgentUpdateResponse = zAgent;
705
1249
  export const zAgentArchivePath = z.object({
706
- id: z.string().regex(/^agt_[0-9A-HJKMNP-TV-Z]{26}$/)
1250
+ id: z.string().regex(/^agt_[0-9A-HJKMNP-TV-Z]{26}$/),
1251
+ });
1252
+ export const zAgentArchiveQuery = z.object({
1253
+ scope: z.enum(["user"]).optional(),
707
1254
  });
708
1255
  /**
709
1256
  * Archived agent
710
1257
  */
711
1258
  export const zAgentArchiveResponse = zAgent;
1259
+ export const zAgentPublishPath = z.object({
1260
+ id: z.string().regex(/^agt_[0-9A-HJKMNP-TV-Z]{26}$/),
1261
+ });
1262
+ export const zAgentPublishQuery = z.object({
1263
+ scope: z.enum(["user"]).optional(),
1264
+ });
1265
+ /**
1266
+ * Published agent
1267
+ */
1268
+ export const zAgentPublishResponse = zAgent;
1269
+ export const zAgentDeprecateBody = z.object({
1270
+ message: z.string().nullish(),
1271
+ });
1272
+ export const zAgentDeprecatePath = z.object({
1273
+ id: z.string().regex(/^agt_[0-9A-HJKMNP-TV-Z]{26}$/),
1274
+ });
1275
+ export const zAgentDeprecateQuery = z.object({
1276
+ scope: z.enum(["user"]).optional(),
1277
+ });
1278
+ /**
1279
+ * Deprecated agent
1280
+ */
1281
+ export const zAgentDeprecateResponse = zAgent;
1282
+ export const zAgentUndeprecatePath = z.object({
1283
+ id: z.string().regex(/^agt_[0-9A-HJKMNP-TV-Z]{26}$/),
1284
+ });
1285
+ export const zAgentUndeprecateQuery = z.object({
1286
+ scope: z.enum(["user"]).optional(),
1287
+ });
1288
+ /**
1289
+ * Undeprecated agent
1290
+ */
1291
+ export const zAgentUndeprecateResponse = zAgent;
712
1292
  export const zAgentVersionListPath = z.object({
713
- id: z.string().regex(/^agt_[0-9A-HJKMNP-TV-Z]{26}$/)
1293
+ id: z.string().regex(/^agt_[0-9A-HJKMNP-TV-Z]{26}$/),
714
1294
  });
715
1295
  export const zAgentVersionListQuery = z.object({
716
- limit: z.number().gte(1).lte(100).optional(),
717
- offset: z.number().gte(0).optional()
1296
+ scope: z.enum(["user"]).optional(),
1297
+ limit: z.number().gte(1).lte(1000).optional(),
1298
+ offset: z.number().gte(0).optional(),
718
1299
  });
719
1300
  /**
720
1301
  * List of agent versions
721
1302
  */
722
1303
  export const zAgentVersionListResponse = z.array(zAgentVersion);
723
1304
  export const zAgentVersionCreateBody = z.object({
724
- version: z.union([
725
- z.string(),
726
- z.enum([
727
- 'major',
728
- 'minor',
729
- 'patch'
730
- ])
731
- ]).optional().default('patch'),
732
- description: z.string().optional().default(''),
733
- prompt: z.string().optional().default(''),
734
- skills: z.array(z.object({
1305
+ version: z
1306
+ .union([z.string(), z.enum(["major", "minor", "patch"])])
1307
+ .optional()
1308
+ .default("patch"),
1309
+ description: z.string().optional().default(""),
1310
+ prompt: z.string().optional().default(""),
1311
+ model: z.string().nullish().default(null),
1312
+ permission: zPermissionConfig.optional(),
1313
+ skills: z
1314
+ .array(z.object({
735
1315
  skillId: z.string(),
736
1316
  skillVersionId: z.string().nullish().default(null),
737
- permission: z.array(zPermissionRule).optional().default([])
738
- })).optional().default([]),
739
- mcps: z.array(z.object({
1317
+ }))
1318
+ .optional()
1319
+ .default([]),
1320
+ mcps: z
1321
+ .array(z.object({
740
1322
  mcpId: z.string(),
741
- permission: z.array(zPermissionRule).optional().default([])
742
- })).optional().default([]),
743
- releaseNotes: z.string().max(4096).optional()
1323
+ }))
1324
+ .optional()
1325
+ .default([]),
1326
+ releaseNotes: z.string().max(4096).optional(),
744
1327
  });
745
1328
  export const zAgentVersionCreatePath = z.object({
746
- id: z.string().regex(/^agt_[0-9A-HJKMNP-TV-Z]{26}$/)
1329
+ id: z.string().regex(/^agt_[0-9A-HJKMNP-TV-Z]{26}$/),
1330
+ });
1331
+ export const zAgentVersionCreateQuery = z.object({
1332
+ scope: z.enum(["user"]).optional(),
747
1333
  });
748
1334
  /**
749
1335
  * Created agent version
@@ -751,7 +1337,10 @@ export const zAgentVersionCreatePath = z.object({
751
1337
  export const zAgentVersionCreateResponse = zAgentVersion;
752
1338
  export const zAgentVersionGetPath = z.object({
753
1339
  id: z.string().regex(/^agt_[0-9A-HJKMNP-TV-Z]{26}$/),
754
- version: z.string().min(1).max(32)
1340
+ version: z.string().min(1).max(32),
1341
+ });
1342
+ export const zAgentVersionGetQuery = z.object({
1343
+ scope: z.enum(["user"]).optional(),
755
1344
  });
756
1345
  /**
757
1346
  * Agent version details
@@ -759,31 +1348,199 @@ export const zAgentVersionGetPath = z.object({
759
1348
  export const zAgentVersionGetResponse = zAgentVersion;
760
1349
  export const zAgentVersionArchivePath = z.object({
761
1350
  id: z.string().regex(/^agt_[0-9A-HJKMNP-TV-Z]{26}$/),
762
- version: z.string().min(1).max(32)
1351
+ version: z.string().min(1).max(32),
1352
+ });
1353
+ export const zAgentVersionArchiveQuery = z.object({
1354
+ scope: z.enum(["user"]).optional(),
763
1355
  });
764
1356
  /**
765
1357
  * Archived agent version
766
1358
  */
767
1359
  export const zAgentVersionArchiveResponse = zAgentVersion;
1360
+ export const zBlueprintListQuery = z.object({
1361
+ scope: z.enum(["user"]).optional(),
1362
+ limit: z.number().gte(1).lte(1000).optional(),
1363
+ offset: z.number().gte(0).optional(),
1364
+ });
1365
+ /**
1366
+ * List of blueprints
1367
+ */
1368
+ export const zBlueprintListResponse = z.array(zBlueprint);
1369
+ export const zBlueprintCreateBody = z.object({
1370
+ name: z.string().min(1).max(256),
1371
+ description: z.string().optional().default(""),
1372
+ websiteMetadata: zWebsiteMetadata.nullish().default(null),
1373
+ selection: zBlueprintSelection,
1374
+ });
1375
+ export const zBlueprintCreateQuery = z.object({
1376
+ scope: z.enum(["user"]).optional(),
1377
+ });
1378
+ /**
1379
+ * Created blueprint
1380
+ */
1381
+ export const zBlueprintCreateResponse = zBlueprint;
1382
+ export const zBlueprintInstallBody = z.object({
1383
+ source: z.string().min(1),
1384
+ podId: z.string().regex(/^pod_[0-9A-HJKMNP-TV-Z]{26}$/),
1385
+ });
1386
+ export const zBlueprintInstallQuery = z.object({
1387
+ scope: z.enum(["user"]).optional(),
1388
+ });
1389
+ /**
1390
+ * Install report
1391
+ */
1392
+ export const zBlueprintInstallResponse = zBlueprintInstallReport;
1393
+ export const zBlueprintGetPath = z.object({
1394
+ id: z.string().regex(/^blp_[0-9A-HJKMNP-TV-Z]{26}$/),
1395
+ });
1396
+ export const zBlueprintGetQuery = z.object({
1397
+ scope: z.enum(["user"]).optional(),
1398
+ });
1399
+ /**
1400
+ * Blueprint details
1401
+ */
1402
+ export const zBlueprintGetResponse = zBlueprint;
1403
+ export const zBlueprintUpdateBody = z.object({
1404
+ name: z.string().min(1).max(256).optional(),
1405
+ description: z.string().optional(),
1406
+ websiteMetadata: zWebsiteMetadata.nullish(),
1407
+ selection: zBlueprintSelection.optional(),
1408
+ });
1409
+ export const zBlueprintUpdatePath = z.object({
1410
+ id: z.string().regex(/^blp_[0-9A-HJKMNP-TV-Z]{26}$/),
1411
+ });
1412
+ export const zBlueprintUpdateQuery = z.object({
1413
+ scope: z.enum(["user"]).optional(),
1414
+ });
1415
+ /**
1416
+ * Updated blueprint
1417
+ */
1418
+ export const zBlueprintUpdateResponse = zBlueprint;
1419
+ export const zBlueprintPublishPath = z.object({
1420
+ id: z.string().regex(/^blp_[0-9A-HJKMNP-TV-Z]{26}$/),
1421
+ });
1422
+ export const zBlueprintPublishQuery = z.object({
1423
+ scope: z.enum(["user"]).optional(),
1424
+ });
1425
+ /**
1426
+ * Published blueprint
1427
+ */
1428
+ export const zBlueprintPublishResponse = zBlueprint;
1429
+ export const zBlueprintDeprecateBody = z.object({
1430
+ message: z.string().nullish(),
1431
+ });
1432
+ export const zBlueprintDeprecatePath = z.object({
1433
+ id: z.string().regex(/^blp_[0-9A-HJKMNP-TV-Z]{26}$/),
1434
+ });
1435
+ export const zBlueprintDeprecateQuery = z.object({
1436
+ scope: z.enum(["user"]).optional(),
1437
+ });
1438
+ /**
1439
+ * Deprecated blueprint
1440
+ */
1441
+ export const zBlueprintDeprecateResponse = zBlueprint;
1442
+ export const zBlueprintUndeprecatePath = z.object({
1443
+ id: z.string().regex(/^blp_[0-9A-HJKMNP-TV-Z]{26}$/),
1444
+ });
1445
+ export const zBlueprintUndeprecateQuery = z.object({
1446
+ scope: z.enum(["user"]).optional(),
1447
+ });
1448
+ /**
1449
+ * Undeprecated blueprint
1450
+ */
1451
+ export const zBlueprintUndeprecateResponse = zBlueprint;
1452
+ export const zBlueprintArchivePath = z.object({
1453
+ id: z.string().regex(/^blp_[0-9A-HJKMNP-TV-Z]{26}$/),
1454
+ });
1455
+ export const zBlueprintArchiveQuery = z.object({
1456
+ scope: z.enum(["user"]).optional(),
1457
+ });
1458
+ /**
1459
+ * Archived blueprint
1460
+ */
1461
+ export const zBlueprintArchiveResponse = zBlueprint;
1462
+ /**
1463
+ * Billing summary
1464
+ */
1465
+ export const zBillingGetResponse = z.object({
1466
+ plan: z.string(),
1467
+ creditsBalance: z.string(),
1468
+ balanceCents: z.number(),
1469
+ consumedCredits: z.string(),
1470
+ consumedAmountCents: z.number(),
1471
+ grantedCredits: z.string(),
1472
+ });
1473
+ export const zBillingInvoicesQuery = z.object({
1474
+ page: z.int().gte(1).lte(9007199254740991).optional().default(1),
1475
+ perPage: z.int().gte(1).lte(100).optional().default(10),
1476
+ });
1477
+ /**
1478
+ * Paginated invoice list
1479
+ */
1480
+ export const zBillingInvoicesResponse = z.object({
1481
+ invoices: z.array(z.object({
1482
+ id: z.string(),
1483
+ number: z.string(),
1484
+ status: z.string(),
1485
+ paymentStatus: z.string(),
1486
+ totalAmountCents: z.number(),
1487
+ currency: z.string(),
1488
+ issuingDate: z.string(),
1489
+ invoiceType: z.string(),
1490
+ })),
1491
+ meta: z.object({
1492
+ currentPage: z.number(),
1493
+ totalPages: z.number(),
1494
+ totalCount: z.number(),
1495
+ }),
1496
+ });
1497
+ export const zBillingDailyUsageQuery = z.object({
1498
+ days: z.int().gte(1).lte(90).optional().default(30),
1499
+ });
1500
+ /**
1501
+ * Daily usage
1502
+ */
1503
+ export const zBillingDailyUsageResponse = z.array(z.object({
1504
+ date: z.string(),
1505
+ creditsUsed: z.string(),
1506
+ }));
1507
+ export const zBillingInvoicePaymentUrlQuery = z.object({
1508
+ id: z.string().min(1),
1509
+ });
1510
+ /**
1511
+ * Payment URL
1512
+ */
1513
+ export const zBillingInvoicePaymentUrlResponse = z.object({
1514
+ url: z.string(),
1515
+ });
1516
+ export const zBillingUpdatePlanBody = z.object({
1517
+ newPlan: z.enum(["free", "plus", "pro"]),
1518
+ });
1519
+ /**
1520
+ * Plan updated
1521
+ */
1522
+ export const zBillingUpdatePlanResponse = z.object({
1523
+ status: z.string(),
1524
+ plan: z.string(),
1525
+ effective: z.string(),
1526
+ });
768
1527
  export const zDashboardGetQuery = z.object({
769
- period: z.enum([
770
- '7d',
771
- '30d',
772
- '90d'
773
- ]).optional().default('30d'),
1528
+ period: z.enum(["7d", "30d", "90d"]).optional().default("30d"),
774
1529
  podId: z.string().optional(),
775
1530
  agentId: z.string().optional(),
776
- userId: z.string().optional()
1531
+ userId: z.string().optional(),
1532
+ include: z.array(z.enum(["summary", "over_time", "over_time_by_user", "by_agent", "by_user", "filters"])).optional(),
777
1533
  });
778
1534
  /**
779
1535
  * Dashboard analytics
780
1536
  */
781
1537
  export const zDashboardGetResponse = zDashboardResponse;
782
1538
  export const zEnvironmentListQuery = z.object({
1539
+ scope: z.enum(["user"]).optional(),
783
1540
  orgId: z.string().optional(),
784
- limit: z.number().gte(1).lte(100).optional(),
1541
+ limit: z.number().gte(1).lte(1000).optional(),
785
1542
  offset: z.number().gte(0).optional(),
786
- userId: z.string().nullish()
1543
+ userId: z.string().nullish(),
787
1544
  });
788
1545
  /**
789
1546
  * List of environments
@@ -792,23 +1549,32 @@ export const zEnvironmentListResponse = z.array(zEnvironment);
792
1549
  export const zEnvironmentCreateBody = z.object({
793
1550
  name: z.string().min(1).max(256),
794
1551
  networking: zNetworkingConfig,
795
- description: z.string().optional().default(''),
796
- hostingType: z.enum(['cloud']).optional().default('cloud'),
797
- packages: zPackagesConfig.optional()
1552
+ description: z.string().optional().default(""),
1553
+ hostingType: z.enum(["cloud"]).optional().default("cloud"),
1554
+ packages: zPackagesConfig.optional(),
1555
+ });
1556
+ export const zEnvironmentCreateQuery = z.object({
1557
+ scope: z.enum(["user"]).optional(),
798
1558
  });
799
1559
  /**
800
1560
  * Created environment
801
1561
  */
802
1562
  export const zEnvironmentCreateResponse = zEnvironment;
803
1563
  export const zEnvironmentDeletePath = z.object({
804
- id: z.string().regex(/^env_[0-9A-HJKMNP-TV-Z]{26}$/)
1564
+ id: z.string().regex(/^env_[0-9A-HJKMNP-TV-Z]{26}$/),
1565
+ });
1566
+ export const zEnvironmentDeleteQuery = z.object({
1567
+ scope: z.enum(["user"]).optional(),
805
1568
  });
806
1569
  /**
807
1570
  * Deleted environment
808
1571
  */
809
1572
  export const zEnvironmentDeleteResponse = zEnvironment;
810
1573
  export const zEnvironmentGetPath = z.object({
811
- id: z.string().regex(/^env_[0-9A-HJKMNP-TV-Z]{26}$/)
1574
+ id: z.string().regex(/^env_[0-9A-HJKMNP-TV-Z]{26}$/),
1575
+ });
1576
+ export const zEnvironmentGetQuery = z.object({
1577
+ scope: z.enum(["user"]).optional(),
812
1578
  });
813
1579
  /**
814
1580
  * Environment details
@@ -818,27 +1584,34 @@ export const zEnvironmentUpdateBody = z.object({
818
1584
  name: z.string().min(1).max(256).optional(),
819
1585
  description: z.string().optional(),
820
1586
  networking: zNetworkingConfig.optional(),
821
- packages: zPackagesConfig.optional()
1587
+ packages: zPackagesConfig.optional(),
822
1588
  });
823
1589
  export const zEnvironmentUpdatePath = z.object({
824
- id: z.string().regex(/^env_[0-9A-HJKMNP-TV-Z]{26}$/)
1590
+ id: z.string().regex(/^env_[0-9A-HJKMNP-TV-Z]{26}$/),
1591
+ });
1592
+ export const zEnvironmentUpdateQuery = z.object({
1593
+ scope: z.enum(["user"]).optional(),
825
1594
  });
826
1595
  /**
827
1596
  * Updated environment
828
1597
  */
829
1598
  export const zEnvironmentUpdateResponse = zEnvironment;
830
1599
  export const zEnvironmentArchivePath = z.object({
831
- id: z.string().regex(/^env_[0-9A-HJKMNP-TV-Z]{26}$/)
1600
+ id: z.string().regex(/^env_[0-9A-HJKMNP-TV-Z]{26}$/),
1601
+ });
1602
+ export const zEnvironmentArchiveQuery = z.object({
1603
+ scope: z.enum(["user"]).optional(),
832
1604
  });
833
1605
  /**
834
1606
  * Archived environment
835
1607
  */
836
1608
  export const zEnvironmentArchiveResponse = zEnvironment;
837
1609
  export const zFileStoreListQuery = z.object({
1610
+ scope: z.enum(["user"]).optional(),
838
1611
  orgId: z.string().optional(),
839
- limit: z.number().gte(1).lte(100).optional(),
1612
+ limit: z.number().gte(1).lte(1000).optional(),
840
1613
  offset: z.number().gte(0).optional(),
841
- userId: z.string().nullish()
1614
+ userId: z.string().nullish(),
842
1615
  });
843
1616
  /**
844
1617
  * List of file stores
@@ -846,14 +1619,21 @@ export const zFileStoreListQuery = z.object({
846
1619
  export const zFileStoreListResponse = z.array(zFileStore);
847
1620
  export const zFileStoreCreateBody = z.object({
848
1621
  name: z.string().min(1).max(256),
849
- description: z.string().optional().default('')
1622
+ description: z.string().optional().default(""),
1623
+ isDefault: z.boolean().optional().default(false),
1624
+ });
1625
+ export const zFileStoreCreateQuery = z.object({
1626
+ scope: z.enum(["user"]).optional(),
850
1627
  });
851
1628
  /**
852
1629
  * Created file store
853
1630
  */
854
1631
  export const zFileStoreCreateResponse = zFileStore;
855
1632
  export const zFileStoreGetPath = z.object({
856
- id: z.string().regex(/^fst_[0-9A-HJKMNP-TV-Z]{26}$/)
1633
+ id: z.string().regex(/^fst_[0-9A-HJKMNP-TV-Z]{26}$/),
1634
+ });
1635
+ export const zFileStoreGetQuery = z.object({
1636
+ scope: z.enum(["user"]).optional(),
857
1637
  });
858
1638
  /**
859
1639
  * File store details
@@ -861,139 +1641,292 @@ export const zFileStoreGetPath = z.object({
861
1641
  export const zFileStoreGetResponse = zFileStore;
862
1642
  export const zFileStoreUpdateBody = z.object({
863
1643
  name: z.string().min(1).max(256).optional(),
864
- description: z.string().optional()
1644
+ description: z.string().nullish(),
865
1645
  });
866
1646
  export const zFileStoreUpdatePath = z.object({
867
- id: z.string().regex(/^fst_[0-9A-HJKMNP-TV-Z]{26}$/)
1647
+ id: z.string().regex(/^fst_[0-9A-HJKMNP-TV-Z]{26}$/),
1648
+ });
1649
+ export const zFileStoreUpdateQuery = z.object({
1650
+ scope: z.enum(["user"]).optional(),
868
1651
  });
869
1652
  /**
870
1653
  * Updated file store
871
1654
  */
872
1655
  export const zFileStoreUpdateResponse = zFileStore;
873
1656
  export const zFileStoreArchivePath = z.object({
874
- id: z.string().regex(/^fst_[0-9A-HJKMNP-TV-Z]{26}$/)
1657
+ id: z.string().regex(/^fst_[0-9A-HJKMNP-TV-Z]{26}$/),
1658
+ });
1659
+ export const zFileStoreArchiveQuery = z.object({
1660
+ scope: z.enum(["user"]).optional(),
875
1661
  });
876
1662
  /**
877
1663
  * Archived file store
878
1664
  */
879
1665
  export const zFileStoreArchiveResponse = zFileStore;
880
1666
  export const zFileStoreFilesDeletePath = z.object({
881
- id: z.string().regex(/^fst_[0-9A-HJKMNP-TV-Z]{26}$/)
1667
+ id: z.string().regex(/^fst_[0-9A-HJKMNP-TV-Z]{26}$/),
882
1668
  });
883
1669
  export const zFileStoreFilesDeleteQuery = z.object({
884
- path: z.string().min(1)
1670
+ scope: z.enum(["user"]).optional(),
1671
+ path: z.string().min(1),
885
1672
  });
886
1673
  /**
887
1674
  * Deleted
888
1675
  */
889
1676
  export const zFileStoreFilesDeleteResponse = z.object({
890
- ok: z.literal(true)
1677
+ ok: z.literal(true),
891
1678
  });
892
1679
  export const zFileStoreFilesListPath = z.object({
893
- id: z.string().regex(/^fst_[0-9A-HJKMNP-TV-Z]{26}$/)
1680
+ id: z.string().regex(/^fst_[0-9A-HJKMNP-TV-Z]{26}$/),
894
1681
  });
895
1682
  export const zFileStoreFilesListQuery = z.object({
1683
+ scope: z.enum(["user"]).optional(),
896
1684
  prefix: z.string().optional(),
897
- limit: z.int().gt(0).lte(1000).optional()
1685
+ limit: z.int().gt(0).lte(1000).optional(),
898
1686
  });
899
1687
  /**
900
1688
  * Files under the given prefix
901
1689
  */
902
1690
  export const zFileStoreFilesListResponse = z.array(zFileStoreFile);
903
- export const zFileStoreFilesUploadPath = z.object({
904
- id: z.string().regex(/^fst_[0-9A-HJKMNP-TV-Z]{26}$/)
905
- });
906
- /**
907
- * Uploaded file info
908
- */
909
- export const zFileStoreFilesUploadResponse = z.array(zFileStoreFile);
910
1691
  export const zFileStoreFilesPresignDownloadPath = z.object({
911
- id: z.string().regex(/^fst_[0-9A-HJKMNP-TV-Z]{26}$/)
1692
+ id: z.string().regex(/^fst_[0-9A-HJKMNP-TV-Z]{26}$/),
912
1693
  });
913
1694
  export const zFileStoreFilesPresignDownloadQuery = z.object({
1695
+ scope: z.enum(["user"]).optional(),
914
1696
  path: z.string().min(1),
915
- expiresInSeconds: z.int().gt(0).lte(9007199254740991).optional()
1697
+ expiresInSeconds: z.int().gt(0).lte(9007199254740991).optional(),
916
1698
  });
917
1699
  /**
918
1700
  * Presigned download URL
919
1701
  */
920
1702
  export const zFileStoreFilesPresignDownloadResponse = zStorePresignResponse;
921
- export const zFileStoreFilesRenameBody = z.object({
922
- from: z.string().min(1),
923
- to: z.string().min(1),
924
- overwrite: z.boolean().optional(),
925
- contentType: z.string().optional()
1703
+ export const zFileStoreFilesStartUploadBody = z.object({
1704
+ path: z.string().min(1),
1705
+ size: z.int().gte(0).lte(52428800),
1706
+ contentType: z.string().optional(),
1707
+ });
1708
+ export const zFileStoreFilesStartUploadPath = z.object({
1709
+ id: z.string().regex(/^fst_[0-9A-HJKMNP-TV-Z]{26}$/),
926
1710
  });
927
- export const zFileStoreFilesRenamePath = z.object({
928
- id: z.string().regex(/^fst_[0-9A-HJKMNP-TV-Z]{26}$/)
1711
+ export const zFileStoreFilesStartUploadQuery = z.object({
1712
+ scope: z.enum(["user"]).optional(),
929
1713
  });
930
1714
  /**
931
- * Renamed file info
1715
+ * Presigned PUT URL the browser uploads to directly
932
1716
  */
933
- export const zFileStoreFilesRenameResponse = zFileStoreFile;
934
- export const zFileStoreFilesPresignUploadBody = z.object({
1717
+ export const zFileStoreFilesStartUploadResponse = zStoreStartUploadResponse;
1718
+ export const zFileStoreFilesFinalizeUploadBody = z.object({
935
1719
  path: z.string().min(1),
936
- contentType: z.string().optional(),
937
- expiresInSeconds: z.int().gt(0).lte(9007199254740991).optional()
938
1720
  });
939
- export const zFileStoreFilesPresignUploadPath = z.object({
940
- id: z.string().regex(/^fst_[0-9A-HJKMNP-TV-Z]{26}$/)
1721
+ export const zFileStoreFilesFinalizeUploadPath = z.object({
1722
+ id: z.string().regex(/^fst_[0-9A-HJKMNP-TV-Z]{26}$/),
1723
+ });
1724
+ export const zFileStoreFilesFinalizeUploadQuery = z.object({
1725
+ scope: z.enum(["user"]).optional(),
941
1726
  });
942
1727
  /**
943
- * Presigned upload URL
1728
+ * Finalized file info
1729
+ */
1730
+ export const zFileStoreFilesFinalizeUploadResponse = zFileStoreFile;
1731
+ export const zGithubStatusQuery = z.object({
1732
+ scope: z.enum(["user"]).optional(),
1733
+ });
1734
+ /**
1735
+ * GitHub configuration status
944
1736
  */
945
- export const zFileStoreFilesPresignUploadResponse = zStorePresignResponse;
1737
+ export const zGithubStatusResponse = zGithubStatus;
1738
+ export const zGithubInstallationListQuery = z.object({
1739
+ scope: z.enum(["user"]).optional(),
1740
+ });
1741
+ /**
1742
+ * Installations
1743
+ */
1744
+ export const zGithubInstallationListResponse = z.array(zGithubInstallationResponse);
1745
+ export const zGithubInstallationReposListPath = z.object({
1746
+ id: z.string().regex(/^ghi_[0-9A-HJKMNP-TV-Z]{26}$/),
1747
+ });
1748
+ export const zGithubInstallationReposListQuery = z.object({
1749
+ scope: z.enum(["user"]).optional(),
1750
+ });
1751
+ /**
1752
+ * Repositories
1753
+ */
1754
+ export const zGithubInstallationReposListResponse = z.array(z.object({
1755
+ fullName: z.string(),
1756
+ }));
1757
+ export const zGithubInstallationRefreshPath = z.object({
1758
+ id: z.string().regex(/^ghi_[0-9A-HJKMNP-TV-Z]{26}$/),
1759
+ });
1760
+ export const zGithubInstallationRefreshQuery = z.object({
1761
+ scope: z.enum(["user"]).optional(),
1762
+ });
1763
+ /**
1764
+ * Updated installation snapshot
1765
+ */
1766
+ export const zGithubInstallationRefreshResponse = zGithubInstallationResponse;
1767
+ export const zGithubInstallationRemovePath = z.object({
1768
+ id: z.string().regex(/^ghi_[0-9A-HJKMNP-TV-Z]{26}$/),
1769
+ });
1770
+ export const zGithubInstallationRemoveQuery = z.object({
1771
+ scope: z.enum(["user"]).optional(),
1772
+ });
1773
+ /**
1774
+ * Removed
1775
+ */
1776
+ export const zGithubInstallationRemoveResponse = z.void();
946
1777
  export const zMcpListQuery = z.object({
947
- limit: z.number().gte(1).lte(100).optional(),
948
- offset: z.number().gte(0).optional()
1778
+ scope: z.enum(["user"]).optional(),
1779
+ limit: z.number().gte(1).lte(1000).optional(),
1780
+ offset: z.number().gte(0).optional(),
1781
+ sort: z.enum(["popular", "trending", "recent"]).optional(),
949
1782
  });
950
1783
  /**
951
1784
  * List of MCPs
952
1785
  */
953
1786
  export const zMcpListResponse = z.array(zMcp);
954
1787
  export const zMcpCreateBody = z.object({
955
- slug: z.string().min(1).max(128).regex(/^[a-z0-9-]+$/),
956
1788
  name: z.string().min(1).max(256),
957
- mcpServerUrl: z.url(),
958
- description: z.string().optional().default(''),
1789
+ description: z.string().optional().default(""),
959
1790
  icon: z.string().nullish().default(null),
960
- type: z.enum(['url']).optional().default('url'),
961
- auth: z.enum([
962
- 'none',
963
- 'oauth',
964
- 'api_key',
965
- 'basic'
966
- ]).optional().default('none'),
967
- authConfig: zMcpAuthConfig.nullish().default(null)
1791
+ mcpServerUrl: z.url(),
1792
+ docUrl: z.url().nullish().default(null),
1793
+ type: z.enum(["remote", "local"]).optional().default("remote"),
1794
+ transport: z.enum(["streamable-http", "sse", "stdio"]).optional().default("streamable-http"),
1795
+ command: z.string().nullish().default(null),
1796
+ args: z.array(z.string()).optional().default([]),
1797
+ version: z.string().nullish().default(null),
1798
+ repository: zRepository.nullish().default(null),
1799
+ tools: z.array(z.string()).optional().default([]),
1800
+ prompts: z.array(z.string()).optional().default([]),
1801
+ auth: z.enum(["none", "oauth", "api_key", "basic"]).optional().default("none"),
1802
+ authConfig: zMcpAuthConfig.nullish().default(null),
1803
+ tags: z.array(z.string()).optional(),
1804
+ });
1805
+ export const zMcpCreateQuery = z.object({
1806
+ scope: z.enum(["user"]).optional(),
968
1807
  });
969
1808
  /**
970
1809
  * Created MCP
971
1810
  */
972
1811
  export const zMcpCreateResponse = zMcp;
1812
+ export const zMcpSearchBody = z.object({
1813
+ query: z.string().optional(),
1814
+ sources: z
1815
+ .array(z.enum(["user", "org", "registry"]))
1816
+ .min(1)
1817
+ .optional()
1818
+ .default(["user", "org", "registry"]),
1819
+ limit: z.int().gte(1).lte(50).optional().default(20),
1820
+ });
1821
+ export const zMcpSearchQuery = z.object({
1822
+ scope: z.enum(["user"]).optional(),
1823
+ });
1824
+ /**
1825
+ * Matching MCPs
1826
+ */
1827
+ export const zMcpSearchResponse = z.array(zSearchResult);
973
1828
  export const zMcpGetBySlugPath = z.object({
974
- slug: z.string().min(1).max(128).regex(/^[a-z0-9-]+$/)
1829
+ slug: z
1830
+ .string()
1831
+ .min(1)
1832
+ .max(128)
1833
+ .regex(/^[a-z0-9-]+$/),
1834
+ });
1835
+ export const zMcpGetBySlugQuery = z.object({
1836
+ scope: z.enum(["user"]).optional(),
975
1837
  });
976
1838
  /**
977
1839
  * MCP details
978
1840
  */
979
1841
  export const zMcpGetBySlugResponse = zMcp;
980
1842
  export const zMcpGetPath = z.object({
981
- id: z.string().regex(/^mcp_[0-9A-HJKMNP-TV-Z]{26}$/)
1843
+ id: z.string().regex(/^mcp_[0-9A-HJKMNP-TV-Z]{26}$/),
1844
+ });
1845
+ export const zMcpGetQuery = z.object({
1846
+ scope: z.enum(["user"]).optional(),
982
1847
  });
983
1848
  /**
984
1849
  * MCP details
985
1850
  */
986
1851
  export const zMcpGetResponse = zMcp;
1852
+ export const zMcpUpdateBody = z.object({
1853
+ name: z.string().min(1).max(256).optional(),
1854
+ description: z.string().nullish(),
1855
+ icon: z.string().nullish(),
1856
+ mcpServerUrl: z.url().optional(),
1857
+ docUrl: z.url().nullish(),
1858
+ type: z.enum(["remote", "local"]).optional(),
1859
+ transport: z.enum(["streamable-http", "sse", "stdio"]).optional(),
1860
+ command: z.string().nullish(),
1861
+ args: z.array(z.string()).optional(),
1862
+ version: z.string().nullish(),
1863
+ repository: zRepository.nullish(),
1864
+ tools: z.array(z.string()).optional(),
1865
+ prompts: z.array(z.string()).optional(),
1866
+ auth: z.enum(["none", "oauth", "api_key", "basic"]).optional(),
1867
+ authConfig: zMcpAuthConfig.nullish(),
1868
+ websiteMetadata: zWebsiteMetadata.nullish(),
1869
+ tags: z.array(z.string()).optional(),
1870
+ });
1871
+ export const zMcpUpdatePath = z.object({
1872
+ id: z.string().regex(/^mcp_[0-9A-HJKMNP-TV-Z]{26}$/),
1873
+ });
1874
+ export const zMcpUpdateQuery = z.object({
1875
+ scope: z.enum(["user"]).optional(),
1876
+ });
1877
+ /**
1878
+ * Updated MCP
1879
+ */
1880
+ export const zMcpUpdateResponse = zMcp;
987
1881
  export const zMcpArchivePath = z.object({
988
- id: z.string().regex(/^mcp_[0-9A-HJKMNP-TV-Z]{26}$/)
1882
+ id: z.string().regex(/^mcp_[0-9A-HJKMNP-TV-Z]{26}$/),
1883
+ });
1884
+ export const zMcpArchiveQuery = z.object({
1885
+ scope: z.enum(["user"]).optional(),
989
1886
  });
990
1887
  /**
991
1888
  * Archived MCP
992
1889
  */
993
1890
  export const zMcpArchiveResponse = zMcp;
1891
+ export const zMcpPublishPath = z.object({
1892
+ id: z.string().regex(/^mcp_[0-9A-HJKMNP-TV-Z]{26}$/),
1893
+ });
1894
+ export const zMcpPublishQuery = z.object({
1895
+ scope: z.enum(["user"]).optional(),
1896
+ });
1897
+ /**
1898
+ * Published MCP
1899
+ */
1900
+ export const zMcpPublishResponse = zMcp;
1901
+ export const zMcpDeprecateBody = z.object({
1902
+ message: z.string().nullish(),
1903
+ });
1904
+ export const zMcpDeprecatePath = z.object({
1905
+ id: z.string().regex(/^mcp_[0-9A-HJKMNP-TV-Z]{26}$/),
1906
+ });
1907
+ export const zMcpDeprecateQuery = z.object({
1908
+ scope: z.enum(["user"]).optional(),
1909
+ });
1910
+ /**
1911
+ * Deprecated MCP
1912
+ */
1913
+ export const zMcpDeprecateResponse = zMcp;
1914
+ export const zMcpUndeprecatePath = z.object({
1915
+ id: z.string().regex(/^mcp_[0-9A-HJKMNP-TV-Z]{26}$/),
1916
+ });
1917
+ export const zMcpUndeprecateQuery = z.object({
1918
+ scope: z.enum(["user"]).optional(),
1919
+ });
1920
+ /**
1921
+ * Undeprecated MCP
1922
+ */
1923
+ export const zMcpUndeprecateResponse = zMcp;
994
1924
  export const zMcpOauthConnectBody = zMcpOAuthConnectBody;
995
1925
  export const zMcpOauthConnectPath = z.object({
996
- id: z.string().regex(/^mcp_[0-9A-HJKMNP-TV-Z]{26}$/)
1926
+ id: z.string().regex(/^mcp_[0-9A-HJKMNP-TV-Z]{26}$/),
1927
+ });
1928
+ export const zMcpOauthConnectQuery = z.object({
1929
+ scope: z.enum(["user"]).optional(),
997
1930
  });
998
1931
  /**
999
1932
  * OAuth connect result
@@ -1001,17 +1934,25 @@ export const zMcpOauthConnectPath = z.object({
1001
1934
  export const zMcpOauthConnectResponse = zMcpOAuthConnectResult;
1002
1935
  export const zMcpOauthSessionPath = z.object({
1003
1936
  id: z.string().regex(/^mcp_[0-9A-HJKMNP-TV-Z]{26}$/),
1004
- sessionId: z.string().regex(/^oas_[0-9A-HJKMNP-TV-Z]{26}$/)
1937
+ sessionId: z.string().regex(/^oas_[0-9A-HJKMNP-TV-Z]{26}$/),
1938
+ });
1939
+ export const zMcpOauthSessionQuery = z.object({
1940
+ scope: z.enum(["user"]).optional(),
1005
1941
  });
1006
1942
  /**
1007
1943
  * OAuth session status
1008
1944
  */
1009
1945
  export const zMcpOauthSessionResponse = zOAuthSessionStatus;
1946
+ /**
1947
+ * Resolved auth context
1948
+ */
1949
+ export const zMeGetResponse = zMe;
1010
1950
  export const zMemoryStoreListQuery = z.object({
1951
+ scope: z.enum(["user"]).optional(),
1011
1952
  orgId: z.string().optional(),
1012
- limit: z.number().gte(1).lte(100).optional(),
1953
+ limit: z.number().gte(1).lte(1000).optional(),
1013
1954
  offset: z.number().gte(0).optional(),
1014
- userId: z.string().nullish()
1955
+ userId: z.string().nullish(),
1015
1956
  });
1016
1957
  /**
1017
1958
  * List of memory stores
@@ -1019,15 +1960,21 @@ export const zMemoryStoreListQuery = z.object({
1019
1960
  export const zMemoryStoreListResponse = z.array(zMemoryStore);
1020
1961
  export const zMemoryStoreCreateBody = z.object({
1021
1962
  name: z.string().min(1).max(256),
1022
- description: z.string().optional().default(''),
1023
- prompt: z.string().max(4096).nullish().default(null)
1963
+ description: z.string().optional().default(""),
1964
+ isDefault: z.boolean().optional().default(false),
1965
+ });
1966
+ export const zMemoryStoreCreateQuery = z.object({
1967
+ scope: z.enum(["user"]).optional(),
1024
1968
  });
1025
1969
  /**
1026
1970
  * Created memory store
1027
1971
  */
1028
1972
  export const zMemoryStoreCreateResponse = zMemoryStore;
1029
1973
  export const zMemoryStoreGetPath = z.object({
1030
- id: z.string().regex(/^mst_[0-9A-HJKMNP-TV-Z]{26}$/)
1974
+ id: z.string().regex(/^mst_[0-9A-HJKMNP-TV-Z]{26}$/),
1975
+ });
1976
+ export const zMemoryStoreGetQuery = z.object({
1977
+ scope: z.enum(["user"]).optional(),
1031
1978
  });
1032
1979
  /**
1033
1980
  * Memory store details
@@ -1035,72 +1982,116 @@ export const zMemoryStoreGetPath = z.object({
1035
1982
  export const zMemoryStoreGetResponse = zMemoryStore;
1036
1983
  export const zMemoryStoreUpdateBody = z.object({
1037
1984
  name: z.string().min(1).max(256).optional(),
1038
- description: z.string().optional(),
1039
- prompt: z.string().max(4096).nullish()
1985
+ description: z.string().nullish(),
1040
1986
  });
1041
1987
  export const zMemoryStoreUpdatePath = z.object({
1042
- id: z.string().regex(/^mst_[0-9A-HJKMNP-TV-Z]{26}$/)
1988
+ id: z.string().regex(/^mst_[0-9A-HJKMNP-TV-Z]{26}$/),
1989
+ });
1990
+ export const zMemoryStoreUpdateQuery = z.object({
1991
+ scope: z.enum(["user"]).optional(),
1043
1992
  });
1044
1993
  /**
1045
1994
  * Updated memory store
1046
1995
  */
1047
1996
  export const zMemoryStoreUpdateResponse = zMemoryStore;
1048
1997
  export const zMemoryStoreArchivePath = z.object({
1049
- id: z.string().regex(/^mst_[0-9A-HJKMNP-TV-Z]{26}$/)
1998
+ id: z.string().regex(/^mst_[0-9A-HJKMNP-TV-Z]{26}$/),
1999
+ });
2000
+ export const zMemoryStoreArchiveQuery = z.object({
2001
+ scope: z.enum(["user"]).optional(),
1050
2002
  });
1051
2003
  /**
1052
2004
  * Archived memory store
1053
2005
  */
1054
2006
  export const zMemoryStoreArchiveResponse = zMemoryStore;
1055
2007
  export const zMemoryStoreFilesDeletePath = z.object({
1056
- id: z.string().regex(/^mst_[0-9A-HJKMNP-TV-Z]{26}$/)
2008
+ id: z.string().regex(/^mst_[0-9A-HJKMNP-TV-Z]{26}$/),
1057
2009
  });
1058
2010
  export const zMemoryStoreFilesDeleteQuery = z.object({
1059
- path: z.string().min(1)
2011
+ scope: z.enum(["user"]).optional(),
2012
+ path: z.string().min(1),
1060
2013
  });
1061
2014
  /**
1062
2015
  * Deleted
1063
2016
  */
1064
2017
  export const zMemoryStoreFilesDeleteResponse = z.object({
1065
- ok: z.literal(true)
2018
+ ok: z.literal(true),
1066
2019
  });
1067
2020
  export const zMemoryStoreFilesListPath = z.object({
1068
- id: z.string().regex(/^mst_[0-9A-HJKMNP-TV-Z]{26}$/)
2021
+ id: z.string().regex(/^mst_[0-9A-HJKMNP-TV-Z]{26}$/),
1069
2022
  });
1070
2023
  export const zMemoryStoreFilesListQuery = z.object({
2024
+ scope: z.enum(["user"]).optional(),
1071
2025
  prefix: z.string().optional(),
1072
- limit: z.int().gt(0).lte(1000).optional()
2026
+ limit: z.int().gt(0).lte(1000).optional(),
1073
2027
  });
1074
2028
  /**
1075
2029
  * Files under the given prefix
1076
2030
  */
1077
2031
  export const zMemoryStoreFilesListResponse = z.array(zMemoryStoreFile);
1078
- export const zMemoryStoreFilesUploadPath = z.object({
1079
- id: z.string().regex(/^mst_[0-9A-HJKMNP-TV-Z]{26}$/)
2032
+ export const zMemoryStoreFilesPresignDownloadPath = z.object({
2033
+ id: z.string().regex(/^mst_[0-9A-HJKMNP-TV-Z]{26}$/),
2034
+ });
2035
+ export const zMemoryStoreFilesPresignDownloadQuery = z.object({
2036
+ scope: z.enum(["user"]).optional(),
2037
+ path: z.string().min(1),
2038
+ expiresInSeconds: z.int().gt(0).lte(9007199254740991).optional(),
1080
2039
  });
1081
2040
  /**
1082
- * Uploaded file info
2041
+ * Presigned download URL
2042
+ */
2043
+ export const zMemoryStoreFilesPresignDownloadResponse = zStorePresignResponse;
2044
+ export const zMemoryStoreFilesStartUploadBody = z.object({
2045
+ path: z.string().min(1),
2046
+ size: z.int().gte(0).lte(52428800),
2047
+ contentType: z.string().optional(),
2048
+ });
2049
+ export const zMemoryStoreFilesStartUploadPath = z.object({
2050
+ id: z.string().regex(/^mst_[0-9A-HJKMNP-TV-Z]{26}$/),
2051
+ });
2052
+ export const zMemoryStoreFilesStartUploadQuery = z.object({
2053
+ scope: z.enum(["user"]).optional(),
2054
+ });
2055
+ /**
2056
+ * Presigned PUT URL the browser uploads to directly
1083
2057
  */
1084
- export const zMemoryStoreFilesUploadResponse = z.array(zMemoryStoreFile);
1085
- export const zMemoryStoreFilesDownloadPath = z.object({
1086
- id: z.string().regex(/^mst_[0-9A-HJKMNP-TV-Z]{26}$/)
2058
+ export const zMemoryStoreFilesStartUploadResponse = zStoreStartUploadResponse;
2059
+ export const zMemoryStoreFilesFinalizeUploadBody = z.object({
2060
+ path: z.string().min(1),
2061
+ });
2062
+ export const zMemoryStoreFilesFinalizeUploadPath = z.object({
2063
+ id: z.string().regex(/^mst_[0-9A-HJKMNP-TV-Z]{26}$/),
1087
2064
  });
1088
- export const zMemoryStoreFilesDownloadQuery = z.object({
1089
- path: z.string().min(1)
2065
+ export const zMemoryStoreFilesFinalizeUploadQuery = z.object({
2066
+ scope: z.enum(["user"]).optional(),
1090
2067
  });
1091
- export const zMemoryStoreFilesRenameBody = z.object({
1092
- from: z.string().min(1),
1093
- to: z.string().min(1),
1094
- overwrite: z.boolean().optional(),
1095
- contentType: z.string().optional()
2068
+ /**
2069
+ * Finalized file info
2070
+ */
2071
+ export const zMemoryStoreFilesFinalizeUploadResponse = zMemoryStoreFile;
2072
+ /**
2073
+ * Grouped model list
2074
+ */
2075
+ export const zModelListResponse = zModelsResponse;
2076
+ export const zOnboardingStartBody = z.object({
2077
+ prompt: z.string().min(1).max(8000),
2078
+ skillIds: z.array(z.string()).max(64).optional().default([]),
2079
+ mcpIds: z.array(z.string()).max(64).optional().default([]),
1096
2080
  });
1097
- export const zMemoryStoreFilesRenamePath = z.object({
1098
- id: z.string().regex(/^mst_[0-9A-HJKMNP-TV-Z]{26}$/)
2081
+ export const zOnboardingStartQuery = z.object({
2082
+ scope: z.enum(["user"]).optional(),
1099
2083
  });
1100
2084
  /**
1101
- * Renamed file info
2085
+ * Session created and prompt sent
2086
+ */
2087
+ export const zOnboardingStartResponse = zOnboardingStart;
2088
+ /**
2089
+ * Personal organization ready
1102
2090
  */
1103
- export const zMemoryStoreFilesRenameResponse = zMemoryStoreFile;
2091
+ export const zOnboardingSetupPersonalOrgResponse = zOnboardingSetupPersonalOrg;
2092
+ export const zPatListQuery = z.object({
2093
+ scope: z.enum(["user"]).optional(),
2094
+ });
1104
2095
  /**
1105
2096
  * List of PATs
1106
2097
  */
@@ -1108,27 +2099,38 @@ export const zPatListResponse = z.array(zPat);
1108
2099
  export const zPatCreateBody = z.object({
1109
2100
  name: z.string().min(1).max(128),
1110
2101
  scopes: z.array(z.string()).min(1),
1111
- expiresAt: z.iso.datetime().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))$/).nullish().default(null)
2102
+ expiresAt: z.iso
2103
+ .datetime()
2104
+ .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))$/)
2105
+ .nullish()
2106
+ .default(null),
2107
+ });
2108
+ export const zPatCreateQuery = z.object({
2109
+ scope: z.enum(["user"]).optional(),
1112
2110
  });
1113
2111
  /**
1114
2112
  * Created PAT (token shown once)
1115
2113
  */
1116
2114
  export const zPatCreateResponse = z.object({
1117
2115
  pat: zPat,
1118
- token: z.string()
2116
+ token: z.string(),
1119
2117
  });
1120
2118
  export const zPatRevokePath = z.object({
1121
- id: z.string().regex(/^pat_[0-9A-HJKMNP-TV-Z]{26}$/)
2119
+ id: z.string().regex(/^pat_[0-9A-HJKMNP-TV-Z]{26}$/),
2120
+ });
2121
+ export const zPatRevokeQuery = z.object({
2122
+ scope: z.enum(["user"]).optional(),
1122
2123
  });
1123
2124
  /**
1124
2125
  * Revoked PAT
1125
2126
  */
1126
2127
  export const zPatRevokeResponse = zPat;
1127
2128
  export const zPodListQuery = z.object({
2129
+ scope: z.enum(["user"]).optional(),
1128
2130
  orgId: z.string().optional(),
1129
- limit: z.number().gte(1).lte(100).optional(),
2131
+ limit: z.number().gte(1).lte(1000).optional(),
1130
2132
  offset: z.number().gte(0).optional(),
1131
- userId: z.string().nullish()
2133
+ userId: z.string().nullish(),
1132
2134
  });
1133
2135
  /**
1134
2136
  * List of pods
@@ -1137,15 +2139,22 @@ export const zPodListResponse = z.array(zPod);
1137
2139
  export const zPodCreateBody = z.object({
1138
2140
  name: z.string().min(1).max(256),
1139
2141
  environmentId: z.string().nullish().default(null),
1140
- description: z.string().optional().default(''),
1141
- isPrivate: z.boolean().optional().default(true)
2142
+ description: z.string().optional().default(""),
2143
+ isPrivate: z.boolean().optional().default(true),
2144
+ isDefault: z.boolean().optional().default(false),
2145
+ });
2146
+ export const zPodCreateQuery = z.object({
2147
+ scope: z.enum(["user"]).optional(),
1142
2148
  });
1143
2149
  /**
1144
- * Created pod
2150
+ * Created pod with freshly provisioned sandbox
1145
2151
  */
1146
- export const zPodCreateResponse = zPod;
2152
+ export const zPodCreateResponse = zPodWithSandbox;
1147
2153
  export const zPodGetPath = z.object({
1148
- id: z.string().regex(/^pod_[0-9A-HJKMNP-TV-Z]{26}$/)
2154
+ id: z.string().regex(/^pod_[0-9A-HJKMNP-TV-Z]{26}$/),
2155
+ });
2156
+ export const zPodGetQuery = z.object({
2157
+ scope: z.enum(["user"]).optional(),
1149
2158
  });
1150
2159
  /**
1151
2160
  * Pod details
@@ -1155,24 +2164,33 @@ export const zPodUpdateBody = z.object({
1155
2164
  name: z.string().min(1).max(256).optional(),
1156
2165
  description: z.string().optional(),
1157
2166
  isPrivate: z.boolean().optional(),
1158
- environmentId: z.string().nullish()
2167
+ environmentId: z.string().nullish(),
1159
2168
  });
1160
2169
  export const zPodUpdatePath = z.object({
1161
- id: z.string().regex(/^pod_[0-9A-HJKMNP-TV-Z]{26}$/)
2170
+ id: z.string().regex(/^pod_[0-9A-HJKMNP-TV-Z]{26}$/),
2171
+ });
2172
+ export const zPodUpdateQuery = z.object({
2173
+ scope: z.enum(["user"]).optional(),
1162
2174
  });
1163
2175
  /**
1164
2176
  * Updated pod
1165
2177
  */
1166
2178
  export const zPodUpdateResponse = zPod;
1167
2179
  export const zPodArchivePath = z.object({
1168
- id: z.string().regex(/^pod_[0-9A-HJKMNP-TV-Z]{26}$/)
2180
+ id: z.string().regex(/^pod_[0-9A-HJKMNP-TV-Z]{26}$/),
2181
+ });
2182
+ export const zPodArchiveQuery = z.object({
2183
+ scope: z.enum(["user"]).optional(),
1169
2184
  });
1170
2185
  /**
1171
2186
  * Archived pod
1172
2187
  */
1173
2188
  export const zPodArchiveResponse = zPod;
1174
2189
  export const zPodMemberListPath = z.object({
1175
- id: z.string().regex(/^pod_[0-9A-HJKMNP-TV-Z]{26}$/)
2190
+ id: z.string().regex(/^pod_[0-9A-HJKMNP-TV-Z]{26}$/),
2191
+ });
2192
+ export const zPodMemberListQuery = z.object({
2193
+ scope: z.enum(["user"]).optional(),
1176
2194
  });
1177
2195
  /**
1178
2196
  * List of members
@@ -1180,10 +2198,13 @@ export const zPodMemberListPath = z.object({
1180
2198
  export const zPodMemberListResponse = z.array(zPodMember);
1181
2199
  export const zPodMemberAddBody = z.object({
1182
2200
  userId: z.string().regex(/^usr_[0-9A-HJKMNP-TV-Z]{26}$/),
1183
- role: z.enum(['owner', 'member']).optional().default('member')
2201
+ role: z.enum(["owner", "member"]).optional().default("member"),
1184
2202
  });
1185
2203
  export const zPodMemberAddPath = z.object({
1186
- id: z.string().regex(/^pod_[0-9A-HJKMNP-TV-Z]{26}$/)
2204
+ id: z.string().regex(/^pod_[0-9A-HJKMNP-TV-Z]{26}$/),
2205
+ });
2206
+ export const zPodMemberAddQuery = z.object({
2207
+ scope: z.enum(["user"]).optional(),
1187
2208
  });
1188
2209
  /**
1189
2210
  * Added member
@@ -1191,14 +2212,20 @@ export const zPodMemberAddPath = z.object({
1191
2212
  export const zPodMemberAddResponse = zPodMember;
1192
2213
  export const zPodMemberRemovePath = z.object({
1193
2214
  id: z.string().regex(/^pod_[0-9A-HJKMNP-TV-Z]{26}$/),
1194
- userId: z.string().regex(/^usr_[0-9A-HJKMNP-TV-Z]{26}$/)
2215
+ userId: z.string().regex(/^usr_[0-9A-HJKMNP-TV-Z]{26}$/),
2216
+ });
2217
+ export const zPodMemberRemoveQuery = z.object({
2218
+ scope: z.enum(["user"]).optional(),
1195
2219
  });
1196
2220
  /**
1197
2221
  * Removed member
1198
2222
  */
1199
2223
  export const zPodMemberRemoveResponse = zPodMember;
1200
2224
  export const zPodVaultListPath = z.object({
1201
- id: z.string().regex(/^pod_[0-9A-HJKMNP-TV-Z]{26}$/)
2225
+ id: z.string().regex(/^pod_[0-9A-HJKMNP-TV-Z]{26}$/),
2226
+ });
2227
+ export const zPodVaultListQuery = z.object({
2228
+ scope: z.enum(["user"]).optional(),
1202
2229
  });
1203
2230
  /**
1204
2231
  * List of vault associations
@@ -1206,10 +2233,13 @@ export const zPodVaultListPath = z.object({
1206
2233
  export const zPodVaultListResponse = z.array(zPodVault);
1207
2234
  export const zPodVaultAddBody = z.object({
1208
2235
  vaultId: z.string().regex(/^vlt_[0-9A-HJKMNP-TV-Z]{26}$/),
1209
- priority: z.int().gte(-9007199254740991).lte(9007199254740991).optional().default(0)
2236
+ priority: z.int().gte(-9007199254740991).lte(9007199254740991).optional().default(0),
1210
2237
  });
1211
2238
  export const zPodVaultAddPath = z.object({
1212
- id: z.string().regex(/^pod_[0-9A-HJKMNP-TV-Z]{26}$/)
2239
+ id: z.string().regex(/^pod_[0-9A-HJKMNP-TV-Z]{26}$/),
2240
+ });
2241
+ export const zPodVaultAddQuery = z.object({
2242
+ scope: z.enum(["user"]).optional(),
1213
2243
  });
1214
2244
  /**
1215
2245
  * Added vault
@@ -1217,719 +2247,535 @@ export const zPodVaultAddPath = z.object({
1217
2247
  export const zPodVaultAddResponse = zPodVault;
1218
2248
  export const zPodVaultRemovePath = z.object({
1219
2249
  id: z.string().regex(/^pod_[0-9A-HJKMNP-TV-Z]{26}$/),
1220
- vaultId: z.string().regex(/^vlt_[0-9A-HJKMNP-TV-Z]{26}$/)
2250
+ vaultId: z.string().regex(/^vlt_[0-9A-HJKMNP-TV-Z]{26}$/),
2251
+ });
2252
+ export const zPodVaultRemoveQuery = z.object({
2253
+ scope: z.enum(["user"]).optional(),
1221
2254
  });
1222
2255
  /**
1223
2256
  * Removed vault
1224
2257
  */
1225
2258
  export const zPodVaultRemoveResponse = zPodVault;
1226
- export const zPodSandboxCurrentPath = z.object({
1227
- podId: z.string().regex(/^pod_[0-9A-HJKMNP-TV-Z]{26}$/)
2259
+ export const zPodSandboxProvisionPath = z.object({
2260
+ podId: z.string().regex(/^pod_[0-9A-HJKMNP-TV-Z]{26}$/),
2261
+ });
2262
+ export const zPodSandboxProvisionQuery = z.object({
2263
+ scope: z.enum(["user"]).optional(),
1228
2264
  });
1229
2265
  /**
1230
- * Current sandbox
2266
+ * Workflow started or joined
1231
2267
  */
1232
- export const zPodSandboxCurrentResponse = zSandbox;
1233
- export const zPodSandboxProvisionPath = z.object({
1234
- podId: z.string().regex(/^pod_[0-9A-HJKMNP-TV-Z]{26}$/)
2268
+ export const zPodSandboxProvisionResponse2 = zPodSandboxProvisionResponse;
2269
+ export const zPodSandboxStatusPath = z.object({
2270
+ podId: z.string().regex(/^pod_[0-9A-HJKMNP-TV-Z]{26}$/),
2271
+ });
2272
+ export const zPodSandboxStatusQuery = z.object({
2273
+ scope: z.enum(["user"]).optional(),
1235
2274
  });
1236
2275
  /**
1237
- * Existing active sandbox (no-op)
2276
+ * Current sandbox state
1238
2277
  */
1239
- export const zPodSandboxProvisionResponse = zSandbox;
1240
- export const zPodProjectListPath = z.object({
1241
- podId: z.string()
1242
- });
1243
- export const zPodProjectListQuery = z.object({
1244
- limit: z.number().gte(1).lte(100).optional(),
1245
- offset: z.number().gte(0).optional()
2278
+ export const zPodSandboxStatusResponse2 = zPodSandboxStatusResponse;
2279
+ export const zProjectListQuery = z.object({
2280
+ scope: z.enum(["user"]).optional(),
2281
+ limit: z.number().gte(1).lte(1000).optional(),
2282
+ offset: z.number().gte(0).optional(),
2283
+ podId: z
2284
+ .string()
2285
+ .regex(/^pod_[0-9A-HJKMNP-TV-Z]{26}$/)
2286
+ .optional(),
1246
2287
  });
1247
2288
  /**
1248
2289
  * List of projects
1249
2290
  */
1250
- export const zPodProjectListResponse = z.array(zProject);
1251
- export const zPodProjectCreateBody = z.object({
2291
+ export const zProjectListResponse = z.array(zProject);
2292
+ export const zProjectCreateBody = z.object({
2293
+ podId: z.string().regex(/^pod_[0-9A-HJKMNP-TV-Z]{26}$/),
1252
2294
  name: z.string().min(1).max(256),
1253
- slug: z.string().min(1).max(128).regex(/^[a-z0-9-]+$/),
1254
- description: z.string().optional().default(''),
1255
- path: z.string().nullish().default(null),
1256
- permission: z.array(zPermissionRule).optional().default([]),
1257
- gitRepos: z.array(zGitRepo).optional().default([])
2295
+ description: z.string().optional().default(""),
2296
+ permission: zPermissionConfig.optional(),
2297
+ gitRepo: zProjectGitRepo.nullish().default(null),
1258
2298
  });
1259
- export const zPodProjectCreatePath = z.object({
1260
- podId: z.string()
2299
+ export const zProjectCreateQuery = z.object({
2300
+ scope: z.enum(["user"]).optional(),
1261
2301
  });
1262
2302
  /**
1263
2303
  * Created project
1264
2304
  */
1265
- export const zPodProjectCreateResponse = zProject;
1266
- export const zPodProjectGetPath = z.object({
2305
+ export const zProjectCreateResponse = zProject;
2306
+ export const zProjectGetPath = z.object({
1267
2307
  id: z.string().regex(/^prj_[0-9A-HJKMNP-TV-Z]{26}$/),
1268
- podId: z.string()
2308
+ });
2309
+ export const zProjectGetQuery = z.object({
2310
+ scope: z.enum(["user"]).optional(),
1269
2311
  });
1270
2312
  /**
1271
2313
  * Project details
1272
2314
  */
1273
- export const zPodProjectGetResponse = zProject;
1274
- export const zPodProjectUpdateBody = z.object({
2315
+ export const zProjectGetResponse = zProject;
2316
+ export const zProjectUpdateBody = z.object({
1275
2317
  name: z.string().min(1).max(256).optional(),
1276
2318
  description: z.string().optional(),
1277
- path: z.string().nullish(),
1278
- permission: z.array(zPermissionRule).optional(),
1279
- gitRepos: z.array(zGitRepo).optional()
2319
+ permission: zPermissionConfig.optional(),
2320
+ gitRepo: zProjectGitRepo.nullish(),
1280
2321
  });
1281
- export const zPodProjectUpdatePath = z.object({
2322
+ export const zProjectUpdatePath = z.object({
1282
2323
  id: z.string().regex(/^prj_[0-9A-HJKMNP-TV-Z]{26}$/),
1283
- podId: z.string()
2324
+ });
2325
+ export const zProjectUpdateQuery = z.object({
2326
+ scope: z.enum(["user"]).optional(),
1284
2327
  });
1285
2328
  /**
1286
2329
  * Updated project
1287
2330
  */
1288
- export const zPodProjectUpdateResponse = zProject;
1289
- export const zPodProjectArchivePath = z.object({
2331
+ export const zProjectUpdateResponse = zProject;
2332
+ export const zProjectAgentListPath = z.object({
1290
2333
  id: z.string().regex(/^prj_[0-9A-HJKMNP-TV-Z]{26}$/),
1291
- podId: z.string()
1292
2334
  });
1293
- /**
1294
- * Archived project
1295
- */
1296
- export const zPodProjectArchiveResponse = zProject;
1297
- export const zPodProjectAgentListPath = z.object({
1298
- id: z.string().regex(/^prj_[0-9A-HJKMNP-TV-Z]{26}$/),
1299
- podId: z.string()
2335
+ export const zProjectAgentListQuery = z.object({
2336
+ scope: z.enum(["user"]).optional(),
1300
2337
  });
1301
2338
  /**
1302
2339
  * List of agent memberships
1303
2340
  */
1304
- export const zPodProjectAgentListResponse = z.array(zProjectAgent);
1305
- export const zPodProjectAgentAddBody = z.object({
2341
+ export const zProjectAgentListResponse = z.array(zProjectAgent);
2342
+ export const zProjectAgentAddBody = z.object({
1306
2343
  agentId: z.string().regex(/^agt_[0-9A-HJKMNP-TV-Z]{26}$/),
1307
2344
  agentVersionId: z.string().nullish().default(null),
1308
- type: z.enum(['primary', 'subagent']).optional().default('subagent')
2345
+ type: z.enum(["primary", "subagent", "all"]).optional().default("all"),
1309
2346
  });
1310
- export const zPodProjectAgentAddPath = z.object({
2347
+ export const zProjectAgentAddPath = z.object({
1311
2348
  id: z.string().regex(/^prj_[0-9A-HJKMNP-TV-Z]{26}$/),
1312
- podId: z.string()
2349
+ });
2350
+ export const zProjectAgentAddQuery = z.object({
2351
+ scope: z.enum(["user"]).optional(),
1313
2352
  });
1314
2353
  /**
1315
- * Added agent
2354
+ * Attached agent
1316
2355
  */
1317
- export const zPodProjectAgentAddResponse = zProjectAgent;
1318
- export const zPodProjectAgentRemovePath = z.object({
2356
+ export const zProjectAgentAddResponse = zProjectAgent;
2357
+ export const zProjectAgentRemovePath = z.object({
1319
2358
  id: z.string().regex(/^prj_[0-9A-HJKMNP-TV-Z]{26}$/),
1320
2359
  agentId: z.string().regex(/^agt_[0-9A-HJKMNP-TV-Z]{26}$/),
1321
- podId: z.string()
2360
+ });
2361
+ export const zProjectAgentRemoveQuery = z.object({
2362
+ scope: z.enum(["user"]).optional(),
1322
2363
  });
1323
2364
  /**
1324
- * Removed agent
2365
+ * Detached agent
1325
2366
  */
1326
- export const zPodProjectAgentRemoveResponse = zProjectAgent;
1327
- export const zPodProjectFileStoreListPath = z.object({
2367
+ export const zProjectAgentRemoveResponse = zProjectAgent;
2368
+ export const zProjectFileStoreListPath = z.object({
1328
2369
  id: z.string().regex(/^prj_[0-9A-HJKMNP-TV-Z]{26}$/),
1329
- podId: z.string()
2370
+ });
2371
+ export const zProjectFileStoreListQuery = z.object({
2372
+ scope: z.enum(["user"]).optional(),
1330
2373
  });
1331
2374
  /**
1332
2375
  * List of file store attachments
1333
2376
  */
1334
- export const zPodProjectFileStoreListResponse = z.array(zProjectFileStore);
1335
- export const zPodProjectFileStoreAddBody = z.object({
1336
- resources: z.array(zFileStoreResource).optional().default([]),
1337
- fileStoreId: z.string().regex(/^fst_[0-9A-HJKMNP-TV-Z]{26}$/)
2377
+ export const zProjectFileStoreListResponse = z.array(zProjectFileStore);
2378
+ export const zProjectFileStoreAddBody = z.object({
2379
+ fileStoreId: z.string().regex(/^fst_[0-9A-HJKMNP-TV-Z]{26}$/),
1338
2380
  });
1339
- export const zPodProjectFileStoreAddPath = z.object({
2381
+ export const zProjectFileStoreAddPath = z.object({
1340
2382
  id: z.string().regex(/^prj_[0-9A-HJKMNP-TV-Z]{26}$/),
1341
- podId: z.string()
2383
+ });
2384
+ export const zProjectFileStoreAddQuery = z.object({
2385
+ scope: z.enum(["user"]).optional(),
1342
2386
  });
1343
2387
  /**
1344
2388
  * Attached file store
1345
2389
  */
1346
- export const zPodProjectFileStoreAddResponse = zProjectFileStore;
1347
- export const zPodProjectFileStoreRemovePath = z.object({
2390
+ export const zProjectFileStoreAddResponse = zProjectFileStore;
2391
+ export const zProjectFileStoreRemovePath = z.object({
1348
2392
  id: z.string().regex(/^prj_[0-9A-HJKMNP-TV-Z]{26}$/),
1349
2393
  fileStoreId: z.string().regex(/^fst_[0-9A-HJKMNP-TV-Z]{26}$/),
1350
- podId: z.string()
2394
+ });
2395
+ export const zProjectFileStoreRemoveQuery = z.object({
2396
+ scope: z.enum(["user"]).optional(),
1351
2397
  });
1352
2398
  /**
1353
2399
  * Detached file store
1354
2400
  */
1355
- export const zPodProjectFileStoreRemoveResponse = zProjectFileStore;
1356
- export const zPodProjectMemoryStoreListPath = z.object({
2401
+ export const zProjectFileStoreRemoveResponse = zProjectFileStore;
2402
+ export const zProjectMemoryStoreListPath = z.object({
1357
2403
  id: z.string().regex(/^prj_[0-9A-HJKMNP-TV-Z]{26}$/),
1358
- podId: z.string()
2404
+ });
2405
+ export const zProjectMemoryStoreListQuery = z.object({
2406
+ scope: z.enum(["user"]).optional(),
1359
2407
  });
1360
2408
  /**
1361
2409
  * List of memory store attachments
1362
2410
  */
1363
- export const zPodProjectMemoryStoreListResponse = z.array(zProjectMemoryStore);
1364
- export const zPodProjectMemoryStoreAddBody = z.object({
1365
- memoryStoreId: z.string().regex(/^mst_[0-9A-HJKMNP-TV-Z]{26}$/)
2411
+ export const zProjectMemoryStoreListResponse = z.array(zProjectMemoryStore);
2412
+ export const zProjectMemoryStoreAddBody = z.object({
2413
+ memoryStoreId: z.string().regex(/^mst_[0-9A-HJKMNP-TV-Z]{26}$/),
1366
2414
  });
1367
- export const zPodProjectMemoryStoreAddPath = z.object({
2415
+ export const zProjectMemoryStoreAddPath = z.object({
1368
2416
  id: z.string().regex(/^prj_[0-9A-HJKMNP-TV-Z]{26}$/),
1369
- podId: z.string()
2417
+ });
2418
+ export const zProjectMemoryStoreAddQuery = z.object({
2419
+ scope: z.enum(["user"]).optional(),
1370
2420
  });
1371
2421
  /**
1372
2422
  * Attached memory store
1373
2423
  */
1374
- export const zPodProjectMemoryStoreAddResponse = zProjectMemoryStore;
1375
- export const zPodProjectMemoryStoreRemovePath = z.object({
2424
+ export const zProjectMemoryStoreAddResponse = zProjectMemoryStore;
2425
+ export const zProjectMemoryStoreRemovePath = z.object({
1376
2426
  id: z.string().regex(/^prj_[0-9A-HJKMNP-TV-Z]{26}$/),
1377
2427
  memoryStoreId: z.string().regex(/^mst_[0-9A-HJKMNP-TV-Z]{26}$/),
1378
- podId: z.string()
2428
+ });
2429
+ export const zProjectMemoryStoreRemoveQuery = z.object({
2430
+ scope: z.enum(["user"]).optional(),
1379
2431
  });
1380
2432
  /**
1381
2433
  * Detached memory store
1382
2434
  */
1383
- export const zPodProjectMemoryStoreRemoveResponse = zProjectMemoryStore;
1384
- export const zPodProjectRoutineListPath = z.object({
2435
+ export const zProjectMemoryStoreRemoveResponse = zProjectMemoryStore;
2436
+ export const zProjectArchivePath = z.object({
1385
2437
  id: z.string().regex(/^prj_[0-9A-HJKMNP-TV-Z]{26}$/),
1386
- podId: z.string()
1387
2438
  });
1388
- export const zPodProjectRoutineListQuery = z.object({
1389
- limit: z.number().gte(1).lte(100).optional(),
1390
- offset: z.number().gte(0).optional()
2439
+ export const zProjectArchiveQuery = z.object({
2440
+ scope: z.enum(["user"]).optional(),
1391
2441
  });
1392
2442
  /**
1393
- * List of routines in this project
2443
+ * Archived project
1394
2444
  */
1395
- export const zPodProjectRoutineListResponse = z.array(zRoutine);
1396
- export const zPodProjectRoutinesRunsListAllPath = z.object({
1397
- id: z.string().regex(/^prj_[0-9A-HJKMNP-TV-Z]{26}$/),
1398
- podId: z.string()
1399
- });
1400
- export const zPodProjectRoutinesRunsListAllQuery = z.object({
1401
- status: z.enum([
1402
- 'pending',
1403
- 'running',
1404
- 'completed',
1405
- 'failed',
1406
- 'cancelled'
1407
- ]).optional(),
1408
- sessionId: z.string().nullish(),
1409
- limit: z.number().gte(1).lte(100).optional(),
1410
- offset: z.number().gte(0).optional(),
1411
- createdAfter: z.iso.datetime().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))$/).optional(),
1412
- createdBefore: z.iso.datetime().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))$/).optional()
2445
+ export const zProjectArchiveResponse = zProject;
2446
+ export const zPublisherMeQuery = z.object({
2447
+ scope: z.enum(["user"]).optional(),
1413
2448
  });
1414
2449
  /**
1415
- * List of routine runs in this project
2450
+ * Caller's org publisher
1416
2451
  */
1417
- export const zPodProjectRoutinesRunsListAllResponse = z.array(zRoutineRun);
1418
- export const zPodSessionListPath = z.object({
1419
- podId: z.string()
2452
+ export const zPublisherMeResponse = zPublisherMe;
2453
+ export const zPublisherClaimOrgBody = z.object({
2454
+ slug: z
2455
+ .string()
2456
+ .min(1)
2457
+ .max(128)
2458
+ .regex(/^[a-z0-9-]+$/)
2459
+ .optional(),
1420
2460
  });
1421
- export const zPodSessionListQuery = z.object({
1422
- projectId: z.string().optional(),
1423
- createdById: z.string().optional(),
1424
- limit: z.number().gte(1).lte(100).optional(),
1425
- offset: z.number().gte(0).optional(),
1426
- orgId: z.string().optional()
2461
+ export const zPublisherClaimOrgQuery = z.object({
2462
+ scope: z.enum(["user"]).optional(),
1427
2463
  });
1428
2464
  /**
1429
- * List of sessions
2465
+ * Org publisher
1430
2466
  */
1431
- export const zPodSessionListResponse = z.array(zOpencodeSession);
1432
- export const zPodSessionCreateBody = z.object({
1433
- id: z.string(),
1434
- projectId: z.string(),
1435
- slug: z.string(),
1436
- directory: z.string(),
1437
- title: z.string().min(1).max(512),
1438
- version: z.string(),
1439
- shareUrl: z.string().nullish().default(null),
1440
- parentId: z.string().nullish().default(null)
2467
+ export const zPublisherClaimOrgResponse = zPublisher;
2468
+ export const zPublisherGetPath = z.object({
2469
+ id: z.string().regex(/^pub_[0-9A-HJKMNP-TV-Z]{26}$/),
1441
2470
  });
1442
- export const zPodSessionCreatePath = z.object({
1443
- podId: z.string()
2471
+ export const zPublisherGetQuery = z.object({
2472
+ scope: z.enum(["user"]).optional(),
1444
2473
  });
1445
2474
  /**
1446
- * Created session
2475
+ * Publisher
1447
2476
  */
1448
- export const zPodSessionCreateResponse = zOpencodeSession;
1449
- export const zPodSessionGetPath = z.object({
1450
- id: z.string().min(1),
1451
- podId: z.string()
2477
+ export const zPublisherGetResponse = zPublisher;
2478
+ export const zPublisherUpdateBody = z.object({
2479
+ name: z.string().optional(),
2480
+ description: z.string().nullish(),
2481
+ avatar: z.string().nullish(),
2482
+ url: z.string().nullish(),
2483
+ slug: z
2484
+ .string()
2485
+ .min(1)
2486
+ .max(128)
2487
+ .regex(/^[a-z0-9-]+$/)
2488
+ .optional(),
2489
+ });
2490
+ export const zPublisherUpdatePath = z.object({
2491
+ id: z.string().regex(/^pub_[0-9A-HJKMNP-TV-Z]{26}$/),
2492
+ });
2493
+ export const zPublisherUpdateQuery = z.object({
2494
+ scope: z.enum(["user"]).optional(),
1452
2495
  });
1453
2496
  /**
1454
- * Session details
2497
+ * Updated publisher
1455
2498
  */
1456
- export const zPodSessionGetResponse = zOpencodeSession;
1457
- export const zPodSessionUpdateBody = z.object({
1458
- title: z.string().optional(),
1459
- shareUrl: z.string().nullish(),
1460
- summaryAdditions: z.number().nullish(),
1461
- summaryDeletions: z.number().nullish(),
1462
- summaryFiles: z.number().nullish()
1463
- });
1464
- export const zPodSessionUpdatePath = z.object({
1465
- id: z.string().min(1),
1466
- podId: z.string()
1467
- });
1468
- /**
1469
- * Updated session
1470
- */
1471
- export const zPodSessionUpdateResponse = zOpencodeSession;
1472
- export const zPodSessionArchivePath = z.object({
1473
- id: z.string().min(1),
1474
- podId: z.string()
1475
- });
1476
- /**
1477
- * Archived session
1478
- */
1479
- export const zPodSessionArchiveResponse = zOpencodeSession;
1480
- export const zPodSessionMessageListPath = z.object({
1481
- id: z.string().min(1),
1482
- podId: z.string()
1483
- });
1484
- export const zPodSessionMessageListQuery = z.object({
1485
- limit: z.number().gte(1).lte(100).optional(),
1486
- offset: z.number().gte(0).optional()
1487
- });
1488
- /**
1489
- * List of messages
1490
- */
1491
- export const zPodSessionMessageListResponse = z.array(zOpencodeMessage);
1492
- export const zPodRoutineListPath = z.object({
1493
- podId: z.string()
1494
- });
1495
- export const zPodRoutineListQuery = z.object({
1496
- projectId: z.string().optional(),
1497
- limit: z.number().gte(1).lte(100).optional(),
1498
- offset: z.number().gte(0).optional()
1499
- });
1500
- /**
1501
- * List of routines
1502
- */
1503
- export const zPodRoutineListResponse = z.array(zRoutine);
1504
- export const zPodRoutineCreateBody = z.object({
1505
- projectId: z.string(),
1506
- projectAgentId: z.string(),
1507
- name: z.string().min(1).max(256),
1508
- prompt: z.string().min(1),
1509
- description: z.string().nullish().default(''),
1510
- status: z.enum(['active', 'paused']).optional().default('active')
1511
- });
1512
- export const zPodRoutineCreatePath = z.object({
1513
- podId: z.string()
1514
- });
1515
- /**
1516
- * Created routine
1517
- */
1518
- export const zPodRoutineCreateResponse = zRoutine;
1519
- export const zPodRoutineGetPath = z.object({
1520
- id: z.string().regex(/^rtn_[0-9A-HJKMNP-TV-Z]{26}$/),
1521
- podId: z.string()
2499
+ export const zPublisherUpdateResponse = zPublisher;
2500
+ export const zReplayListQuery = z.object({
2501
+ scope: z.enum(["user"]).optional(),
2502
+ limit: z.number().gte(1).lte(1000).optional(),
2503
+ offset: z.number().gte(0).optional(),
2504
+ publisherId: z.string().optional(),
1522
2505
  });
1523
2506
  /**
1524
- * Routine details
2507
+ * List
1525
2508
  */
1526
- export const zPodRoutineGetResponse = zRoutine;
1527
- export const zPodRoutineUpdateBody = z.object({
1528
- name: z.string().min(1).max(256).optional(),
1529
- description: z.string().nullish(),
1530
- prompt: z.string().min(1).optional(),
1531
- projectAgentId: z.string().optional(),
1532
- status: z.enum(['active', 'paused']).optional()
2509
+ export const zReplayListResponse = z.array(zReplay);
2510
+ export const zReplayCreateBody = z.object({
2511
+ sessionId: z.string(),
2512
+ publisherId: z.string().nullish().default(null),
2513
+ websiteMetadata: zWebsiteMetadata.nullish().default(null),
1533
2514
  });
1534
- export const zPodRoutineUpdatePath = z.object({
1535
- id: z.string().regex(/^rtn_[0-9A-HJKMNP-TV-Z]{26}$/),
1536
- podId: z.string()
2515
+ export const zReplayCreateQuery = z.object({
2516
+ scope: z.enum(["user"]).optional(),
1537
2517
  });
1538
2518
  /**
1539
- * Updated routine
2519
+ * Created
1540
2520
  */
1541
- export const zPodRoutineUpdateResponse = zRoutine;
1542
- export const zPodRoutineArchivePath = z.object({
1543
- id: z.string().regex(/^rtn_[0-9A-HJKMNP-TV-Z]{26}$/),
1544
- podId: z.string()
2521
+ export const zReplayCreateResponse = zReplay;
2522
+ export const zReplayGetPath = z.object({
2523
+ id: z.string().regex(/^rpl_[0-9A-HJKMNP-TV-Z]{26}$/),
1545
2524
  });
1546
- /**
1547
- * Archived routine
1548
- */
1549
- export const zPodRoutineArchiveResponse = zRoutine;
1550
- export const zPodRoutinePausePath = z.object({
1551
- id: z.string().regex(/^rtn_[0-9A-HJKMNP-TV-Z]{26}$/),
1552
- podId: z.string()
2525
+ export const zReplayGetQuery = z.object({
2526
+ scope: z.enum(["user"]).optional(),
1553
2527
  });
1554
2528
  /**
1555
- * Paused routine
2529
+ * Details
1556
2530
  */
1557
- export const zPodRoutinePauseResponse = zRoutine;
1558
- export const zPodRoutineResumePath = z.object({
1559
- id: z.string().regex(/^rtn_[0-9A-HJKMNP-TV-Z]{26}$/),
1560
- podId: z.string()
2531
+ export const zReplayGetResponse = zReplay;
2532
+ export const zReplayUpdateBody = z.object({
2533
+ websiteMetadata: zWebsiteMetadata.nullish(),
1561
2534
  });
1562
- /**
1563
- * Resumed routine
1564
- */
1565
- export const zPodRoutineResumeResponse = zRoutine;
1566
- export const zPodRoutineCronTriggerListPath = z.object({
1567
- id: z.string().regex(/^rtn_[0-9A-HJKMNP-TV-Z]{26}$/),
1568
- podId: z.string()
2535
+ export const zReplayUpdatePath = z.object({
2536
+ id: z.string().regex(/^rpl_[0-9A-HJKMNP-TV-Z]{26}$/),
1569
2537
  });
1570
- export const zPodRoutineCronTriggerListQuery = z.object({
1571
- limit: z.number().gte(1).lte(100).optional(),
1572
- offset: z.number().gte(0).optional()
2538
+ export const zReplayUpdateQuery = z.object({
2539
+ scope: z.enum(["user"]).optional(),
1573
2540
  });
1574
2541
  /**
1575
- * List of cron triggers
2542
+ * Updated
1576
2543
  */
1577
- export const zPodRoutineCronTriggerListResponse = z.array(zCronTrigger);
1578
- export const zPodRoutineCronTriggerCreateBody = z.object({
1579
- schedule: z.string().min(1),
1580
- timezone: z.string().nullish().default(null),
1581
- isEnabled: z.boolean().optional().default(true)
1582
- });
1583
- export const zPodRoutineCronTriggerCreatePath = z.object({
1584
- id: z.string().regex(/^rtn_[0-9A-HJKMNP-TV-Z]{26}$/),
1585
- podId: z.string()
2544
+ export const zReplayUpdateResponse = zReplay;
2545
+ export const zReplayArchivePath = z.object({
2546
+ id: z.string().regex(/^rpl_[0-9A-HJKMNP-TV-Z]{26}$/),
1586
2547
  });
1587
- /**
1588
- * Created cron trigger
1589
- */
1590
- export const zPodRoutineCronTriggerCreateResponse = zCronTrigger;
1591
- export const zPodRoutineCronTriggerGetPath = z.object({
1592
- id: z.string().regex(/^rtn_[0-9A-HJKMNP-TV-Z]{26}$/),
1593
- triggerId: z.string().regex(/^ctrg_[0-9A-HJKMNP-TV-Z]{26}$/),
1594
- podId: z.string()
2548
+ export const zReplayArchiveQuery = z.object({
2549
+ scope: z.enum(["user"]).optional(),
1595
2550
  });
1596
2551
  /**
1597
- * Cron trigger details
2552
+ * Archived
1598
2553
  */
1599
- export const zPodRoutineCronTriggerGetResponse = zCronTrigger;
1600
- export const zPodRoutineCronTriggerUpdateBody = z.object({
1601
- schedule: z.string().min(1).optional(),
1602
- timezone: z.string().nullish(),
1603
- isEnabled: z.boolean().optional()
2554
+ export const zReplayArchiveResponse = zReplay;
2555
+ export const zReplayPublishPath = z.object({
2556
+ id: z.string().regex(/^rpl_[0-9A-HJKMNP-TV-Z]{26}$/),
1604
2557
  });
1605
- export const zPodRoutineCronTriggerUpdatePath = z.object({
1606
- id: z.string().regex(/^rtn_[0-9A-HJKMNP-TV-Z]{26}$/),
1607
- triggerId: z.string().regex(/^ctrg_[0-9A-HJKMNP-TV-Z]{26}$/),
1608
- podId: z.string()
2558
+ export const zReplayPublishQuery = z.object({
2559
+ scope: z.enum(["user"]).optional(),
1609
2560
  });
1610
2561
  /**
1611
- * Updated cron trigger
2562
+ * Published replay
1612
2563
  */
1613
- export const zPodRoutineCronTriggerUpdateResponse = zCronTrigger;
1614
- export const zPodRoutineCronTriggerArchivePath = z.object({
1615
- id: z.string().regex(/^rtn_[0-9A-HJKMNP-TV-Z]{26}$/),
1616
- triggerId: z.string().regex(/^ctrg_[0-9A-HJKMNP-TV-Z]{26}$/),
1617
- podId: z.string()
2564
+ export const zReplayPublishResponse = zReplay;
2565
+ export const zReplayDeprecateBody = z.object({
2566
+ message: z.string().nullish(),
1618
2567
  });
1619
- /**
1620
- * Archived cron trigger
1621
- */
1622
- export const zPodRoutineCronTriggerArchiveResponse = zCronTrigger;
1623
- export const zPodRoutineWebhookTriggerListPath = z.object({
1624
- id: z.string().regex(/^rtn_[0-9A-HJKMNP-TV-Z]{26}$/),
1625
- podId: z.string()
2568
+ export const zReplayDeprecatePath = z.object({
2569
+ id: z.string().regex(/^rpl_[0-9A-HJKMNP-TV-Z]{26}$/),
1626
2570
  });
1627
- export const zPodRoutineWebhookTriggerListQuery = z.object({
1628
- limit: z.number().gte(1).lte(100).optional(),
1629
- offset: z.number().gte(0).optional()
2571
+ export const zReplayDeprecateQuery = z.object({
2572
+ scope: z.enum(["user"]).optional(),
1630
2573
  });
1631
2574
  /**
1632
- * List of webhook triggers
2575
+ * Deprecated replay
1633
2576
  */
1634
- export const zPodRoutineWebhookTriggerListResponse = z.array(zWebhookTrigger);
1635
- export const zPodRoutineWebhookTriggerCreateBody = z.object({
1636
- source: z.string().nullish().default(null),
1637
- secret: z.string().nullish().default(null),
1638
- eventFilters: z.record(z.string(), z.string()).nullish().default(null),
1639
- isEnabled: z.boolean().optional().default(true)
2577
+ export const zReplayDeprecateResponse = zReplay;
2578
+ export const zReplayUndeprecatePath = z.object({
2579
+ id: z.string().regex(/^rpl_[0-9A-HJKMNP-TV-Z]{26}$/),
1640
2580
  });
1641
- export const zPodRoutineWebhookTriggerCreatePath = z.object({
1642
- id: z.string().regex(/^rtn_[0-9A-HJKMNP-TV-Z]{26}$/),
1643
- podId: z.string()
2581
+ export const zReplayUndeprecateQuery = z.object({
2582
+ scope: z.enum(["user"]).optional(),
1644
2583
  });
1645
2584
  /**
1646
- * Created webhook trigger
2585
+ * Undeprecated replay
1647
2586
  */
1648
- export const zPodRoutineWebhookTriggerCreateResponse = zWebhookTrigger;
1649
- export const zPodRoutineWebhookTriggerGetPath = z.object({
1650
- id: z.string().regex(/^rtn_[0-9A-HJKMNP-TV-Z]{26}$/),
1651
- triggerId: z.string().regex(/^wtrg_[0-9A-HJKMNP-TV-Z]{26}$/),
1652
- podId: z.string()
2587
+ export const zReplayUndeprecateResponse = zReplay;
2588
+ export const zReplayShareBody = z.object({
2589
+ sessionId: z.string(),
2590
+ websiteMetadata: zWebsiteMetadata.nullish(),
1653
2591
  });
1654
- /**
1655
- * Webhook trigger details
1656
- */
1657
- export const zPodRoutineWebhookTriggerGetResponse = zWebhookTrigger;
1658
- export const zPodRoutineWebhookTriggerUpdateBody = z.object({
1659
- source: z.string().nullish(),
1660
- secret: z.string().nullish(),
1661
- eventFilters: z.record(z.string(), z.string()).nullish(),
1662
- isEnabled: z.boolean().optional()
1663
- });
1664
- export const zPodRoutineWebhookTriggerUpdatePath = z.object({
1665
- id: z.string().regex(/^rtn_[0-9A-HJKMNP-TV-Z]{26}$/),
1666
- triggerId: z.string().regex(/^wtrg_[0-9A-HJKMNP-TV-Z]{26}$/),
1667
- podId: z.string()
2592
+ export const zReplayShareQuery = z.object({
2593
+ scope: z.enum(["user"]).optional(),
1668
2594
  });
1669
2595
  /**
1670
- * Updated webhook trigger
2596
+ * Shared replay
1671
2597
  */
1672
- export const zPodRoutineWebhookTriggerUpdateResponse = zWebhookTrigger;
1673
- export const zPodRoutineWebhookTriggerArchivePath = z.object({
1674
- id: z.string().regex(/^rtn_[0-9A-HJKMNP-TV-Z]{26}$/),
1675
- triggerId: z.string().regex(/^wtrg_[0-9A-HJKMNP-TV-Z]{26}$/),
1676
- podId: z.string()
1677
- });
1678
- /**
1679
- * Archived webhook trigger
1680
- */
1681
- export const zPodRoutineWebhookTriggerArchiveResponse = zWebhookTrigger;
1682
- export const zPodRoutineApiTriggerListPath = z.object({
1683
- id: z.string().regex(/^rtn_[0-9A-HJKMNP-TV-Z]{26}$/),
1684
- podId: z.string()
1685
- });
1686
- export const zPodRoutineApiTriggerListQuery = z.object({
1687
- limit: z.number().gte(1).lte(100).optional(),
1688
- offset: z.number().gte(0).optional()
2598
+ export const zReplayShareResponse = zReplay;
2599
+ export const zSessionListQuery = z.object({
2600
+ scope: z.enum(["user"]).optional(),
2601
+ podId: z.string().optional(),
2602
+ projectId: z.string().optional(),
2603
+ createdById: z.string().optional(),
2604
+ limit: z.number().gte(1).lte(1000).optional(),
2605
+ offset: z.number().gte(0).optional(),
1689
2606
  });
1690
2607
  /**
1691
- * List of API triggers
2608
+ * List of sessions
1692
2609
  */
1693
- export const zPodRoutineApiTriggerListResponse = z.array(zApiTrigger);
1694
- export const zPodRoutineApiTriggerCreateBody = z.object({
1695
- isEnabled: z.boolean().optional().default(true)
2610
+ export const zSessionListResponse = z.array(zOpencodeSession);
2611
+ export const zSessionCreateBody = z.object({
2612
+ podId: z.string().min(1),
2613
+ projectId: z.string().min(1),
2614
+ title: z.string().min(1).max(512),
1696
2615
  });
1697
- export const zPodRoutineApiTriggerCreatePath = z.object({
1698
- id: z.string().regex(/^rtn_[0-9A-HJKMNP-TV-Z]{26}$/),
1699
- podId: z.string()
2616
+ export const zSessionCreateQuery = z.object({
2617
+ scope: z.enum(["user"]).optional(),
1700
2618
  });
1701
2619
  /**
1702
- * Created API trigger with one-time plaintext token
2620
+ * Created session
1703
2621
  */
1704
- export const zPodRoutineApiTriggerCreateResponse = zApiTriggerCreated;
1705
- export const zPodRoutineApiTriggerRotatePath = z.object({
1706
- id: z.string().regex(/^rtn_[0-9A-HJKMNP-TV-Z]{26}$/),
1707
- triggerId: z.string().regex(/^atrg_[0-9A-HJKMNP-TV-Z]{26}$/),
1708
- podId: z.string()
2622
+ export const zSessionCreateResponse = zOpencodeSession;
2623
+ export const zSessionGetPath = z.object({
2624
+ id: z.string().min(1),
1709
2625
  });
1710
- /**
1711
- * Rotated API trigger with new plaintext token
1712
- */
1713
- export const zPodRoutineApiTriggerRotateResponse = zApiTriggerCreated;
1714
- export const zPodRoutineApiTriggerGetPath = z.object({
1715
- id: z.string().regex(/^rtn_[0-9A-HJKMNP-TV-Z]{26}$/),
1716
- triggerId: z.string().regex(/^atrg_[0-9A-HJKMNP-TV-Z]{26}$/),
1717
- podId: z.string()
2626
+ export const zSessionGetQuery = z.object({
2627
+ scope: z.enum(["user"]).optional(),
1718
2628
  });
1719
2629
  /**
1720
- * API trigger details
2630
+ * Session details
1721
2631
  */
1722
- export const zPodRoutineApiTriggerGetResponse = zApiTrigger;
1723
- export const zPodRoutineApiTriggerUpdateBody = z.object({
1724
- isEnabled: z.boolean().optional()
2632
+ export const zSessionGetResponse = zOpencodeSession;
2633
+ export const zSessionUpdateBody = z.object({
2634
+ title: z.string().optional(),
2635
+ shareUrl: z.string().nullish(),
2636
+ summaryAdditions: z.number().nullish(),
2637
+ summaryDeletions: z.number().nullish(),
2638
+ summaryFiles: z.number().nullish(),
2639
+ status: z.enum(["idle", "busy", "waiting", "error"]).optional(),
2640
+ error: z
2641
+ .object({
2642
+ code: z.string(),
2643
+ message: z.string(),
2644
+ details: z.record(z.string(), z.unknown()).optional(),
2645
+ })
2646
+ .nullish(),
2647
+ currentProjectAgentId: z.string().optional(),
1725
2648
  });
1726
- export const zPodRoutineApiTriggerUpdatePath = z.object({
1727
- id: z.string().regex(/^rtn_[0-9A-HJKMNP-TV-Z]{26}$/),
1728
- triggerId: z.string().regex(/^atrg_[0-9A-HJKMNP-TV-Z]{26}$/),
1729
- podId: z.string()
2649
+ export const zSessionUpdatePath = z.object({
2650
+ id: z.string().min(1),
1730
2651
  });
1731
- /**
1732
- * Updated API trigger
1733
- */
1734
- export const zPodRoutineApiTriggerUpdateResponse = zApiTrigger;
1735
- export const zPodRoutineApiTriggerArchivePath = z.object({
1736
- id: z.string().regex(/^rtn_[0-9A-HJKMNP-TV-Z]{26}$/),
1737
- triggerId: z.string().regex(/^atrg_[0-9A-HJKMNP-TV-Z]{26}$/),
1738
- podId: z.string()
2652
+ export const zSessionUpdateQuery = z.object({
2653
+ scope: z.enum(["user"]).optional(),
1739
2654
  });
1740
2655
  /**
1741
- * Archived API trigger
2656
+ * Updated session
1742
2657
  */
1743
- export const zPodRoutineApiTriggerArchiveResponse = zApiTrigger;
1744
- export const zPodRoutineRunsListPath = z.object({
1745
- id: z.string().regex(/^rtn_[0-9A-HJKMNP-TV-Z]{26}$/),
1746
- podId: z.string()
2658
+ export const zSessionUpdateResponse = zOpencodeSession;
2659
+ export const zSessionMessagesListPath = z.object({
2660
+ id: z.string().min(1),
1747
2661
  });
1748
- export const zPodRoutineRunsListQuery = z.object({
1749
- status: z.enum([
1750
- 'pending',
1751
- 'running',
1752
- 'completed',
1753
- 'failed',
1754
- 'cancelled'
1755
- ]).optional(),
1756
- sessionId: z.string().nullish(),
1757
- limit: z.number().gte(1).lte(100).optional(),
1758
- offset: z.number().gte(0).optional(),
1759
- createdAfter: z.iso.datetime().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))$/).optional(),
1760
- createdBefore: z.iso.datetime().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))$/).optional()
2662
+ export const zSessionMessagesListQuery = z.object({
2663
+ scope: z.enum(["user"]).optional(),
2664
+ pageNumber: z.int().gte(1).lte(9007199254740991).optional(),
2665
+ pageSize: z.int().gte(1).lte(100).optional(),
1761
2666
  });
1762
2667
  /**
1763
- * List of routine runs
2668
+ * Paginated session messages
1764
2669
  */
1765
- export const zPodRoutineRunsListResponse = z.array(zRoutineRun);
1766
- export const zPodRoutineRunsCreateBody = z.record(z.string(), z.unknown());
1767
- export const zPodRoutineRunsCreatePath = z.object({
1768
- id: z.string().regex(/^rtn_[0-9A-HJKMNP-TV-Z]{26}$/),
1769
- podId: z.string()
2670
+ export const zSessionMessagesListResponse = zSessionMessagesPage;
2671
+ export const zSessionAuthRequirementsPath = z.object({
2672
+ id: z.string().min(1),
1770
2673
  });
1771
- /**
1772
- * Created routine run
1773
- */
1774
- export const zPodRoutineRunsCreateResponse = zRoutineRun;
1775
- export const zPodRoutineRunsGetPath = z.object({
1776
- id: z.string().regex(/^rtn_[0-9A-HJKMNP-TV-Z]{26}$/),
1777
- runId: z.string().regex(/^rtr_[0-9A-HJKMNP-TV-Z]{26}$/),
1778
- podId: z.string()
2674
+ export const zSessionAuthRequirementsQuery = z.object({
2675
+ scope: z.enum(["user"]).optional(),
1779
2676
  });
1780
2677
  /**
1781
- * Routine run details
2678
+ * Auth requirements with satisfaction flags
1782
2679
  */
1783
- export const zPodRoutineRunsGetResponse = zRoutineRun;
1784
- export const zPodRoutineRunsStartPath = z.object({
1785
- id: z.string().regex(/^rtn_[0-9A-HJKMNP-TV-Z]{26}$/),
1786
- runId: z.string().regex(/^rtr_[0-9A-HJKMNP-TV-Z]{26}$/),
1787
- podId: z.string()
2680
+ export const zSessionAuthRequirementsResponse = zAuthRequirements;
2681
+ export const zSessionArchivePath = z.object({
2682
+ id: z.string().min(1),
1788
2683
  });
1789
- /**
1790
- * Run started
1791
- */
1792
- export const zPodRoutineRunsStartResponse = zRoutineRun;
1793
- export const zPodRoutineRunsCompletePath = z.object({
1794
- id: z.string().regex(/^rtn_[0-9A-HJKMNP-TV-Z]{26}$/),
1795
- runId: z.string().regex(/^rtr_[0-9A-HJKMNP-TV-Z]{26}$/),
1796
- podId: z.string()
2684
+ export const zSessionArchiveQuery = z.object({
2685
+ scope: z.enum(["user"]).optional(),
1797
2686
  });
1798
2687
  /**
1799
- * Run completed
2688
+ * Archived session
1800
2689
  */
1801
- export const zPodRoutineRunsCompleteResponse = zRoutineRun;
1802
- export const zPodRoutineRunsFailBody = z.object({
1803
- error: z.string().min(1)
2690
+ export const zSessionArchiveResponse = zOpencodeSession;
2691
+ export const zSessionFilesPresignUploadBody = z.object({
2692
+ filename: z.string().min(1),
2693
+ contentType: z.string().min(1),
2694
+ size: z.int().gte(0).lte(9007199254740991),
1804
2695
  });
1805
- export const zPodRoutineRunsFailPath = z.object({
1806
- id: z.string().regex(/^rtn_[0-9A-HJKMNP-TV-Z]{26}$/),
1807
- runId: z.string().regex(/^rtr_[0-9A-HJKMNP-TV-Z]{26}$/),
1808
- podId: z.string()
2696
+ export const zSessionFilesPresignUploadPath = z.object({
2697
+ id: z.string().min(1),
1809
2698
  });
1810
- /**
1811
- * Run failed
1812
- */
1813
- export const zPodRoutineRunsFailResponse = zRoutineRun;
1814
- export const zPodRoutineRunsCancelPath = z.object({
1815
- id: z.string().regex(/^rtn_[0-9A-HJKMNP-TV-Z]{26}$/),
1816
- runId: z.string().regex(/^rtr_[0-9A-HJKMNP-TV-Z]{26}$/),
1817
- podId: z.string()
2699
+ export const zSessionFilesPresignUploadQuery = z.object({
2700
+ scope: z.enum(["user"]).optional(),
1818
2701
  });
1819
2702
  /**
1820
- * Run cancelled
2703
+ * Presigned upload URL
1821
2704
  */
1822
- export const zPodRoutineRunsCancelResponse = zRoutineRun;
1823
- export const zPodRoutinesRunsListAllPath = z.object({
1824
- podId: z.string()
2705
+ export const zSessionFilesPresignUploadResponse2 = zSessionFilesPresignUploadResponse;
2706
+ export const zSessionFilesPresignDownloadBody = zSessionVolumeRef;
2707
+ export const zSessionFilesPresignDownloadPath = z.object({
2708
+ id: z.string().min(1),
1825
2709
  });
1826
- export const zPodRoutinesRunsListAllQuery = z.object({
1827
- status: z.enum([
1828
- 'pending',
1829
- 'running',
1830
- 'completed',
1831
- 'failed',
1832
- 'cancelled'
1833
- ]).optional(),
1834
- sessionId: z.string().nullish(),
1835
- limit: z.number().gte(1).lte(100).optional(),
1836
- offset: z.number().gte(0).optional(),
1837
- createdAfter: z.iso.datetime().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))$/).optional(),
1838
- createdBefore: z.iso.datetime().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))$/).optional()
2710
+ export const zSessionFilesPresignDownloadQuery = z.object({
2711
+ scope: z.enum(["user"]).optional(),
1839
2712
  });
1840
2713
  /**
1841
- * List of routine runs in this pod
2714
+ * Presigned download URL
1842
2715
  */
1843
- export const zPodRoutinesRunsListAllResponse = z.array(zRoutineRun);
1844
- export const zReplayListQuery = z.object({
1845
- limit: z.number().gte(1).lte(100).optional(),
2716
+ export const zSessionFilesPresignDownloadResponse2 = zSessionFilesPresignDownloadResponse;
2717
+ export const zSkillListQuery = z.object({
2718
+ scope: z.enum(["user"]).optional(),
2719
+ limit: z.number().gte(1).lte(1000).optional(),
1846
2720
  offset: z.number().gte(0).optional(),
1847
- publisherId: z.string().optional()
1848
- });
1849
- /**
1850
- * List
1851
- */
1852
- export const zReplayListResponse = z.array(zReplay);
1853
- export const zReplayCreateBody = z.object({
1854
- sessionId: z.string(),
1855
- publisherId: z.string(),
1856
- slug: z.string().min(1).max(128).regex(/^[a-z0-9-]+$/),
1857
- websiteMetadata: z.record(z.string(), z.unknown()).nullish().default(null)
2721
+ sort: z.enum(["popular", "trending", "recent"]).optional(),
1858
2722
  });
1859
2723
  /**
1860
- * Created
1861
- */
1862
- export const zReplayCreateResponse = zReplay;
1863
- export const zReplayGetPath = z.object({
1864
- id: z.string().regex(/^rpl_[0-9A-HJKMNP-TV-Z]{26}$/)
1865
- });
1866
- /**
1867
- * Details
2724
+ * List of skills
1868
2725
  */
1869
- export const zReplayGetResponse = zReplay;
1870
- export const zReplayArchivePath = z.object({
1871
- id: z.string().regex(/^rpl_[0-9A-HJKMNP-TV-Z]{26}$/)
2726
+ export const zSkillListResponse = z.array(zSkill);
2727
+ export const zSkillCreateBody = z.object({
2728
+ name: z.string(),
2729
+ description: z.string().optional(),
2730
+ icon: z.string().optional(),
2731
+ tags: z.string().optional(),
2732
+ requiredCredentials: z.string().optional(),
2733
+ releaseNotes: z.string().optional(),
2734
+ source: z.string().optional(),
2735
+ files: z.array(z.string()),
1872
2736
  });
1873
- /**
1874
- * Archived
1875
- */
1876
- export const zReplayArchiveResponse = zReplay;
1877
- export const zRoutinesRunsListAllQuery = z.object({
1878
- status: z.enum([
1879
- 'pending',
1880
- 'running',
1881
- 'completed',
1882
- 'failed',
1883
- 'cancelled'
1884
- ]).optional(),
1885
- sessionId: z.string().nullish(),
1886
- limit: z.number().gte(1).lte(100).optional(),
1887
- offset: z.number().gte(0).optional(),
1888
- createdAfter: z.iso.datetime().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))$/).optional(),
1889
- createdBefore: z.iso.datetime().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))$/).optional()
2737
+ export const zSkillCreateQuery = z.object({
2738
+ scope: z.enum(["user"]).optional(),
1890
2739
  });
1891
2740
  /**
1892
- * List of routine runs for this user's routines
1893
- */
1894
- export const zRoutinesRunsListAllResponse = z.array(zRoutineRun);
1895
- export const zSessionListQuery = z.object({
1896
- projectId: z.string().optional(),
1897
- createdById: z.string().optional(),
1898
- limit: z.number().gte(1).lte(100).optional(),
1899
- offset: z.number().gte(0).optional()
1900
- });
1901
- /**
1902
- * List of sessions
2741
+ * Created skill
1903
2742
  */
1904
- export const zSessionListResponse = z.array(zOpencodeSession);
1905
- export const zSessionGetPath = z.object({
1906
- id: z.string().min(1)
2743
+ export const zSkillCreateResponse = zSkill;
2744
+ export const zSkillSearchBody = z.object({
2745
+ query: z.string().optional(),
2746
+ sources: z
2747
+ .array(z.enum(["user", "org", "registry"]))
2748
+ .min(1)
2749
+ .optional()
2750
+ .default(["user", "org", "registry"]),
2751
+ limit: z.int().gte(1).lte(50).optional().default(20),
1907
2752
  });
1908
- /**
1909
- * Session details
1910
- */
1911
- export const zSessionGetResponse = zOpencodeSession;
1912
- export const zSkillListQuery = z.object({
1913
- limit: z.number().gte(1).lte(100).optional(),
1914
- offset: z.number().gte(0).optional()
2753
+ export const zSkillSearchQuery = z.object({
2754
+ scope: z.enum(["user"]).optional(),
1915
2755
  });
1916
2756
  /**
1917
- * List of skills
1918
- */
1919
- export const zSkillListResponse = z.array(zSkill);
1920
- /**
1921
- * Created skill
2757
+ * Matching skills
1922
2758
  */
1923
- export const zSkillCreateResponse = zSkill;
2759
+ export const zSkillSearchResponse = z.array(zSearchResult);
1924
2760
  export const zSkillGetBySlugPath = z.object({
1925
- slug: z.string().min(1).max(128).regex(/^[a-z0-9-]+$/)
2761
+ slug: z
2762
+ .string()
2763
+ .min(1)
2764
+ .max(128)
2765
+ .regex(/^[a-z0-9-]+$/),
2766
+ });
2767
+ export const zSkillGetBySlugQuery = z.object({
2768
+ scope: z.enum(["user"]).optional(),
1926
2769
  });
1927
2770
  /**
1928
2771
  * Skill details
1929
2772
  */
1930
2773
  export const zSkillGetBySlugResponse = zSkill;
1931
2774
  export const zSkillGetPath = z.object({
1932
- id: z.string().regex(/^skl_[0-9A-HJKMNP-TV-Z]{26}$/)
2775
+ id: z.string().regex(/^skl_[0-9A-HJKMNP-TV-Z]{26}$/),
2776
+ });
2777
+ export const zSkillGetQuery = z.object({
2778
+ scope: z.enum(["user"]).optional(),
1933
2779
  });
1934
2780
  /**
1935
2781
  * Skill details
@@ -1938,46 +2784,103 @@ export const zSkillGetResponse = zSkill;
1938
2784
  export const zSkillUpdateBody = z.object({
1939
2785
  name: z.string().optional(),
1940
2786
  description: z.string().nullish(),
1941
- icon: z.string().nullish()
2787
+ icon: z.string().nullish(),
2788
+ docUrl: z.string().nullish(),
2789
+ repository: zRepository.nullish(),
2790
+ websiteMetadata: zWebsiteMetadata.nullish(),
2791
+ tags: z.array(z.string()).optional(),
1942
2792
  });
1943
2793
  export const zSkillUpdatePath = z.object({
1944
- id: z.string().regex(/^skl_[0-9A-HJKMNP-TV-Z]{26}$/)
2794
+ id: z.string().regex(/^skl_[0-9A-HJKMNP-TV-Z]{26}$/),
2795
+ });
2796
+ export const zSkillUpdateQuery = z.object({
2797
+ scope: z.enum(["user"]).optional(),
1945
2798
  });
1946
2799
  /**
1947
2800
  * Updated skill
1948
2801
  */
1949
2802
  export const zSkillUpdateResponse = zSkill;
1950
2803
  export const zSkillArchivePath = z.object({
1951
- id: z.string().regex(/^skl_[0-9A-HJKMNP-TV-Z]{26}$/)
2804
+ id: z.string().regex(/^skl_[0-9A-HJKMNP-TV-Z]{26}$/),
2805
+ });
2806
+ export const zSkillArchiveQuery = z.object({
2807
+ scope: z.enum(["user"]).optional(),
1952
2808
  });
1953
2809
  /**
1954
2810
  * Archived skill
1955
2811
  */
1956
2812
  export const zSkillArchiveResponse = zSkill;
2813
+ export const zSkillPublishPath = z.object({
2814
+ id: z.string().regex(/^skl_[0-9A-HJKMNP-TV-Z]{26}$/),
2815
+ });
2816
+ export const zSkillPublishQuery = z.object({
2817
+ scope: z.enum(["user"]).optional(),
2818
+ });
2819
+ /**
2820
+ * Published skill
2821
+ */
2822
+ export const zSkillPublishResponse = zSkill;
2823
+ export const zSkillDeprecateBody = z.object({
2824
+ message: z.string().nullish(),
2825
+ });
2826
+ export const zSkillDeprecatePath = z.object({
2827
+ id: z.string().regex(/^skl_[0-9A-HJKMNP-TV-Z]{26}$/),
2828
+ });
2829
+ export const zSkillDeprecateQuery = z.object({
2830
+ scope: z.enum(["user"]).optional(),
2831
+ });
2832
+ /**
2833
+ * Deprecated skill
2834
+ */
2835
+ export const zSkillDeprecateResponse = zSkill;
2836
+ export const zSkillUndeprecatePath = z.object({
2837
+ id: z.string().regex(/^skl_[0-9A-HJKMNP-TV-Z]{26}$/),
2838
+ });
2839
+ export const zSkillUndeprecateQuery = z.object({
2840
+ scope: z.enum(["user"]).optional(),
2841
+ });
2842
+ /**
2843
+ * Undeprecated skill
2844
+ */
2845
+ export const zSkillUndeprecateResponse = zSkill;
1957
2846
  export const zSkillCopyBody = z.object({
1958
2847
  name: z.string(),
1959
- version: z.string().optional()
2848
+ version: z.string().optional(),
1960
2849
  });
1961
2850
  export const zSkillCopyPath = z.object({
1962
- id: z.string().regex(/^skl_[0-9A-HJKMNP-TV-Z]{26}$/)
2851
+ id: z.string().regex(/^skl_[0-9A-HJKMNP-TV-Z]{26}$/),
2852
+ });
2853
+ export const zSkillCopyQuery = z.object({
2854
+ scope: z.enum(["user"]).optional(),
1963
2855
  });
1964
2856
  /**
1965
2857
  * Copied skill
1966
2858
  */
1967
2859
  export const zSkillCopyResponse = zSkill;
1968
2860
  export const zSkillVersionListPath = z.object({
1969
- id: z.string().regex(/^skl_[0-9A-HJKMNP-TV-Z]{26}$/)
2861
+ id: z.string().regex(/^skl_[0-9A-HJKMNP-TV-Z]{26}$/),
1970
2862
  });
1971
2863
  export const zSkillVersionListQuery = z.object({
1972
- limit: z.number().gte(1).lte(100).optional(),
1973
- offset: z.number().gte(0).optional()
2864
+ scope: z.enum(["user"]).optional(),
2865
+ limit: z.number().gte(1).lte(1000).optional(),
2866
+ offset: z.number().gte(0).optional(),
1974
2867
  });
1975
2868
  /**
1976
2869
  * List of skill versions
1977
2870
  */
1978
2871
  export const zSkillVersionListResponse = z.array(zSkillVersion);
2872
+ export const zSkillVersionCreateBody = z.object({
2873
+ version: z.string().optional(),
2874
+ releaseNotes: z.string().optional(),
2875
+ requiredCredentials: z.string().optional(),
2876
+ source: z.string().optional(),
2877
+ files: z.array(z.string()),
2878
+ });
1979
2879
  export const zSkillVersionCreatePath = z.object({
1980
- id: z.string().regex(/^skl_[0-9A-HJKMNP-TV-Z]{26}$/)
2880
+ id: z.string().regex(/^skl_[0-9A-HJKMNP-TV-Z]{26}$/),
2881
+ });
2882
+ export const zSkillVersionCreateQuery = z.object({
2883
+ scope: z.enum(["user"]).optional(),
1981
2884
  });
1982
2885
  /**
1983
2886
  * Created skill version
@@ -1985,7 +2888,10 @@ export const zSkillVersionCreatePath = z.object({
1985
2888
  export const zSkillVersionCreateResponse = zSkillVersion;
1986
2889
  export const zSkillVersionGetPath = z.object({
1987
2890
  id: z.string().regex(/^skl_[0-9A-HJKMNP-TV-Z]{26}$/),
1988
- version: z.string().min(1).max(32)
2891
+ version: z.string().min(1).max(32),
2892
+ });
2893
+ export const zSkillVersionGetQuery = z.object({
2894
+ scope: z.enum(["user"]).optional(),
1989
2895
  });
1990
2896
  /**
1991
2897
  * Skill version details
@@ -1993,10 +2899,11 @@ export const zSkillVersionGetPath = z.object({
1993
2899
  export const zSkillVersionGetResponse = zSkillVersion;
1994
2900
  export const zSkillVersionDataPath = z.object({
1995
2901
  id: z.string().regex(/^skl_[0-9A-HJKMNP-TV-Z]{26}$/),
1996
- version: z.string().min(1).max(32)
2902
+ version: z.string().min(1).max(32),
1997
2903
  });
1998
2904
  export const zSkillVersionDataQuery = z.object({
1999
- format: z.enum(['json', 'presigned']).optional()
2905
+ scope: z.enum(["user"]).optional(),
2906
+ format: z.enum(["json", "presigned"]).optional(),
2000
2907
  });
2001
2908
  /**
2002
2909
  * Extracted files, presigned URL, or git source descriptor
@@ -2005,30 +2912,195 @@ export const zSkillVersionDataResponse = z.union([
2005
2912
  z.object({
2006
2913
  files: z.array(z.object({
2007
2914
  path: z.string(),
2008
- content: z.string()
2009
- }))
2915
+ content: z.string(),
2916
+ })),
2010
2917
  }),
2011
2918
  z.object({
2012
- url: z.url()
2919
+ url: z.url(),
2013
2920
  }),
2014
2921
  z.object({
2015
- type: z.literal('git'),
2922
+ type: z.literal("git"),
2016
2923
  url: z.url(),
2017
2924
  ref: z.string().optional(),
2018
- path: z.string().optional()
2019
- })
2925
+ path: z.string().optional(),
2926
+ }),
2020
2927
  ]);
2021
2928
  export const zSkillVersionArchivePath = z.object({
2022
2929
  id: z.string().regex(/^skl_[0-9A-HJKMNP-TV-Z]{26}$/),
2023
- version: z.string().min(1).max(32)
2930
+ version: z.string().min(1).max(32),
2931
+ });
2932
+ export const zSkillVersionArchiveQuery = z.object({
2933
+ scope: z.enum(["user"]).optional(),
2024
2934
  });
2025
2935
  /**
2026
2936
  * Archived skill version
2027
2937
  */
2028
2938
  export const zSkillVersionArchiveResponse = zSkillVersion;
2939
+ export const zTriggerListQuery = z.object({
2940
+ scope: z.enum(["user"]).optional(),
2941
+ limit: z.number().gte(1).lte(1000).optional(),
2942
+ offset: z.number().gte(0).optional(),
2943
+ projectId: z.string().regex(/^prj_[0-9A-HJKMNP-TV-Z]{26}$/),
2944
+ });
2945
+ /**
2946
+ * List of cron triggers
2947
+ */
2948
+ export const zTriggerListResponse = z.array(zCronTrigger);
2949
+ export const zTriggerCreateBody = z.object({
2950
+ projectId: z.string().regex(/^prj_[0-9A-HJKMNP-TV-Z]{26}$/),
2951
+ projectAgentId: z.string(),
2952
+ senderUserId: z.string().optional(),
2953
+ inputMessage: z.string(),
2954
+ schedule: z.string(),
2955
+ timezone: z.string().nullish().default(null),
2956
+ isEnabled: z.boolean().optional().default(true),
2957
+ });
2958
+ export const zTriggerCreateQuery = z.object({
2959
+ scope: z.enum(["user"]).optional(),
2960
+ });
2961
+ /**
2962
+ * Created cron trigger
2963
+ */
2964
+ export const zTriggerCreateResponse = zCronTrigger;
2965
+ export const zTriggerGetPath = z.object({
2966
+ triggerId: z.string().regex(/^ctrg_[0-9A-HJKMNP-TV-Z]{26}$/),
2967
+ });
2968
+ export const zTriggerGetQuery = z.object({
2969
+ scope: z.enum(["user"]).optional(),
2970
+ projectId: z.string().regex(/^prj_[0-9A-HJKMNP-TV-Z]{26}$/),
2971
+ });
2972
+ /**
2973
+ * Cron trigger details
2974
+ */
2975
+ export const zTriggerGetResponse = zCronTrigger;
2976
+ export const zTriggerUpdateBody = z.object({
2977
+ projectAgentId: z.string().optional(),
2978
+ senderUserId: z.string().optional(),
2979
+ inputMessage: z.string().optional(),
2980
+ schedule: z.string().optional(),
2981
+ timezone: z.string().nullish(),
2982
+ isEnabled: z.boolean().optional(),
2983
+ projectId: z.string().regex(/^prj_[0-9A-HJKMNP-TV-Z]{26}$/),
2984
+ });
2985
+ export const zTriggerUpdatePath = z.object({
2986
+ triggerId: z.string().regex(/^ctrg_[0-9A-HJKMNP-TV-Z]{26}$/),
2987
+ });
2988
+ export const zTriggerUpdateQuery = z.object({
2989
+ scope: z.enum(["user"]).optional(),
2990
+ });
2991
+ /**
2992
+ * Updated cron trigger
2993
+ */
2994
+ export const zTriggerUpdateResponse = zCronTrigger;
2995
+ export const zTriggerArchiveBody = z.object({
2996
+ projectId: z.string().regex(/^prj_[0-9A-HJKMNP-TV-Z]{26}$/),
2997
+ });
2998
+ export const zTriggerArchivePath = z.object({
2999
+ triggerId: z.string().regex(/^ctrg_[0-9A-HJKMNP-TV-Z]{26}$/),
3000
+ });
3001
+ export const zTriggerArchiveQuery = z.object({
3002
+ scope: z.enum(["user"]).optional(),
3003
+ });
3004
+ /**
3005
+ * Archived cron trigger
3006
+ */
3007
+ export const zTriggerArchiveResponse = zCronTrigger;
3008
+ export const zWebhookTriggerListQuery = z.object({
3009
+ scope: z.enum(["user"]).optional(),
3010
+ limit: z.number().gte(1).lte(1000).optional(),
3011
+ offset: z.number().gte(0).optional(),
3012
+ projectId: z.string().regex(/^prj_[0-9A-HJKMNP-TV-Z]{26}$/),
3013
+ });
3014
+ /**
3015
+ * List of webhook triggers
3016
+ */
3017
+ export const zWebhookTriggerListResponse = z.array(zWebhookTrigger);
3018
+ export const zWebhookTriggerCreateBody = z.object({
3019
+ projectId: z.string().regex(/^prj_[0-9A-HJKMNP-TV-Z]{26}$/),
3020
+ projectAgentId: z.string(),
3021
+ senderUserId: z.string(),
3022
+ provider: z.enum(["slack", "generic"]),
3023
+ providerInstallId: z.string().nullable(),
3024
+ scopeFilter: z
3025
+ .object({
3026
+ channelId: z.string().optional(),
3027
+ })
3028
+ .nullable(),
3029
+ isEnabled: z.boolean().optional().default(true),
3030
+ });
3031
+ export const zWebhookTriggerCreateQuery = z.object({
3032
+ scope: z.enum(["user"]).optional(),
3033
+ });
3034
+ /**
3035
+ * Created webhook trigger (with plaintext secret for generic triggers)
3036
+ */
3037
+ export const zWebhookTriggerCreateResponse = zWebhookTriggerCreateResult;
3038
+ export const zWebhookTriggerGetPath = z.object({
3039
+ triggerId: z.string().regex(/^wtrg_[0-9A-HJKMNP-TV-Z]{26}$/),
3040
+ });
3041
+ export const zWebhookTriggerGetQuery = z.object({
3042
+ scope: z.enum(["user"]).optional(),
3043
+ projectId: z.string().regex(/^prj_[0-9A-HJKMNP-TV-Z]{26}$/),
3044
+ });
3045
+ /**
3046
+ * Webhook trigger details
3047
+ */
3048
+ export const zWebhookTriggerGetResponse = zWebhookTrigger;
3049
+ export const zWebhookTriggerUpdateBody = z.object({
3050
+ projectAgentId: z.string().optional(),
3051
+ senderUserId: z.string().optional(),
3052
+ scopeFilter: z
3053
+ .object({
3054
+ channelId: z.string().optional(),
3055
+ })
3056
+ .nullish(),
3057
+ isEnabled: z.boolean().optional(),
3058
+ projectId: z.string().regex(/^prj_[0-9A-HJKMNP-TV-Z]{26}$/),
3059
+ });
3060
+ export const zWebhookTriggerUpdatePath = z.object({
3061
+ triggerId: z.string().regex(/^wtrg_[0-9A-HJKMNP-TV-Z]{26}$/),
3062
+ });
3063
+ export const zWebhookTriggerUpdateQuery = z.object({
3064
+ scope: z.enum(["user"]).optional(),
3065
+ });
3066
+ /**
3067
+ * Updated webhook trigger
3068
+ */
3069
+ export const zWebhookTriggerUpdateResponse = zWebhookTrigger;
3070
+ export const zWebhookTriggerArchiveBody = z.object({
3071
+ projectId: z.string().regex(/^prj_[0-9A-HJKMNP-TV-Z]{26}$/),
3072
+ });
3073
+ export const zWebhookTriggerArchivePath = z.object({
3074
+ triggerId: z.string().regex(/^wtrg_[0-9A-HJKMNP-TV-Z]{26}$/),
3075
+ });
3076
+ export const zWebhookTriggerArchiveQuery = z.object({
3077
+ scope: z.enum(["user"]).optional(),
3078
+ });
3079
+ /**
3080
+ * Archived webhook trigger
3081
+ */
3082
+ export const zWebhookTriggerArchiveResponse = zWebhookTrigger;
3083
+ export const zSlackStatusQuery = z.object({
3084
+ scope: z.enum(["user"]).optional(),
3085
+ });
3086
+ /**
3087
+ * Slack installation status
3088
+ */
3089
+ export const zSlackStatusResponse = zSlackStatus;
3090
+ export const zSlackInstallationRemovePath = z.object({
3091
+ id: z.string().regex(/^sli_[0-9A-HJKMNP-TV-Z]{26}$/),
3092
+ });
3093
+ export const zSlackInstallationRemoveQuery = z.object({
3094
+ scope: z.enum(["user"]).optional(),
3095
+ });
3096
+ /**
3097
+ * Removed
3098
+ */
3099
+ export const zSlackInstallationRemoveResponse = z.void();
2029
3100
  export const zVaultListQuery = z.object({
2030
- limit: z.number().gte(1).lte(100).optional(),
2031
- offset: z.number().gte(0).optional()
3101
+ scope: z.enum(["user"]).optional(),
3102
+ limit: z.number().gte(1).lte(1000).optional(),
3103
+ offset: z.number().gte(0).optional(),
2032
3104
  });
2033
3105
  /**
2034
3106
  * List of vaults
@@ -2036,21 +3108,31 @@ export const zVaultListQuery = z.object({
2036
3108
  export const zVaultListResponse = z.array(zVault);
2037
3109
  export const zVaultCreateBody = z.object({
2038
3110
  name: z.string().min(1).max(256),
2039
- description: z.string().optional().default('')
3111
+ description: z.string().optional().default(""),
3112
+ isDefault: z.boolean().optional().default(false),
3113
+ });
3114
+ export const zVaultCreateQuery = z.object({
3115
+ scope: z.enum(["user"]).optional(),
2040
3116
  });
2041
3117
  /**
2042
3118
  * Created vault
2043
3119
  */
2044
3120
  export const zVaultCreateResponse = zVault;
2045
3121
  export const zVaultDeletePath = z.object({
2046
- id: z.string().regex(/^vlt_[0-9A-HJKMNP-TV-Z]{26}$/)
3122
+ id: z.string().regex(/^vlt_[0-9A-HJKMNP-TV-Z]{26}$/),
3123
+ });
3124
+ export const zVaultDeleteQuery = z.object({
3125
+ scope: z.enum(["user"]).optional(),
2047
3126
  });
2048
3127
  /**
2049
3128
  * Deleted vault
2050
3129
  */
2051
3130
  export const zVaultDeleteResponse = zVault;
2052
3131
  export const zVaultGetPath = z.object({
2053
- id: z.string().regex(/^vlt_[0-9A-HJKMNP-TV-Z]{26}$/)
3132
+ id: z.string().regex(/^vlt_[0-9A-HJKMNP-TV-Z]{26}$/),
3133
+ });
3134
+ export const zVaultGetQuery = z.object({
3135
+ scope: z.enum(["user"]).optional(),
2054
3136
  });
2055
3137
  /**
2056
3138
  * Vault details
@@ -2058,28 +3140,35 @@ export const zVaultGetPath = z.object({
2058
3140
  export const zVaultGetResponse = zVault;
2059
3141
  export const zVaultUpdateBody = z.object({
2060
3142
  name: z.string().min(1).max(256).optional(),
2061
- description: z.string().optional()
3143
+ description: z.string().optional(),
2062
3144
  });
2063
3145
  export const zVaultUpdatePath = z.object({
2064
- id: z.string().regex(/^vlt_[0-9A-HJKMNP-TV-Z]{26}$/)
3146
+ id: z.string().regex(/^vlt_[0-9A-HJKMNP-TV-Z]{26}$/),
3147
+ });
3148
+ export const zVaultUpdateQuery = z.object({
3149
+ scope: z.enum(["user"]).optional(),
2065
3150
  });
2066
3151
  /**
2067
3152
  * Updated vault
2068
3153
  */
2069
3154
  export const zVaultUpdateResponse = zVault;
2070
3155
  export const zVaultArchivePath = z.object({
2071
- id: z.string().regex(/^vlt_[0-9A-HJKMNP-TV-Z]{26}$/)
3156
+ id: z.string().regex(/^vlt_[0-9A-HJKMNP-TV-Z]{26}$/),
3157
+ });
3158
+ export const zVaultArchiveQuery = z.object({
3159
+ scope: z.enum(["user"]).optional(),
2072
3160
  });
2073
3161
  /**
2074
3162
  * Archived vault
2075
3163
  */
2076
3164
  export const zVaultArchiveResponse = zVault;
2077
3165
  export const zCredentialListPath = z.object({
2078
- vaultId: z.string().regex(/^vlt_[0-9A-HJKMNP-TV-Z]{26}$/)
3166
+ vaultId: z.string().regex(/^vlt_[0-9A-HJKMNP-TV-Z]{26}$/),
2079
3167
  });
2080
3168
  export const zCredentialListQuery = z.object({
2081
- limit: z.number().gte(1).lte(100).optional(),
2082
- offset: z.number().gte(0).optional()
3169
+ scope: z.enum(["user"]).optional(),
3170
+ limit: z.number().gte(1).lte(1000).optional(),
3171
+ offset: z.number().gte(0).optional(),
2083
3172
  });
2084
3173
  /**
2085
3174
  * List of credentials
@@ -2088,11 +3177,20 @@ export const zCredentialListResponse = z.array(zCredential);
2088
3177
  export const zCredentialCreateBody = z.object({
2089
3178
  name: z.string().min(1).max(256),
2090
3179
  mcpId: z.string().nullish().default(null),
2091
- label: z.string().min(1).max(64).regex(/^[A-Z0-9_]+$/).nullish().default(null),
2092
- auth: zCredentialAuth
3180
+ label: z
3181
+ .string()
3182
+ .min(1)
3183
+ .max(64)
3184
+ .regex(/^[A-Z0-9_]+$/)
3185
+ .nullish()
3186
+ .default(null),
3187
+ auth: zCredentialAuth,
2093
3188
  });
2094
3189
  export const zCredentialCreatePath = z.object({
2095
- vaultId: z.string().regex(/^vlt_[0-9A-HJKMNP-TV-Z]{26}$/)
3190
+ vaultId: z.string().regex(/^vlt_[0-9A-HJKMNP-TV-Z]{26}$/),
3191
+ });
3192
+ export const zCredentialCreateQuery = z.object({
3193
+ scope: z.enum(["user"]).optional(),
2096
3194
  });
2097
3195
  /**
2098
3196
  * Created credential
@@ -2100,7 +3198,10 @@ export const zCredentialCreatePath = z.object({
2100
3198
  export const zCredentialCreateResponse = zCredential;
2101
3199
  export const zCredentialDeletePath = z.object({
2102
3200
  vaultId: z.string().regex(/^vlt_[0-9A-HJKMNP-TV-Z]{26}$/),
2103
- id: z.string().regex(/^crd_[0-9A-HJKMNP-TV-Z]{26}$/)
3201
+ id: z.string().regex(/^crd_[0-9A-HJKMNP-TV-Z]{26}$/),
3202
+ });
3203
+ export const zCredentialDeleteQuery = z.object({
3204
+ scope: z.enum(["user"]).optional(),
2104
3205
  });
2105
3206
  /**
2106
3207
  * Deleted credential
@@ -2108,7 +3209,10 @@ export const zCredentialDeletePath = z.object({
2108
3209
  export const zCredentialDeleteResponse = zCredential;
2109
3210
  export const zCredentialGetPath = z.object({
2110
3211
  vaultId: z.string().regex(/^vlt_[0-9A-HJKMNP-TV-Z]{26}$/),
2111
- id: z.string().regex(/^crd_[0-9A-HJKMNP-TV-Z]{26}$/)
3212
+ id: z.string().regex(/^crd_[0-9A-HJKMNP-TV-Z]{26}$/),
3213
+ });
3214
+ export const zCredentialGetQuery = z.object({
3215
+ scope: z.enum(["user"]).optional(),
2112
3216
  });
2113
3217
  /**
2114
3218
  * Credential details
@@ -2116,11 +3220,14 @@ export const zCredentialGetPath = z.object({
2116
3220
  export const zCredentialGetResponse = zCredential;
2117
3221
  export const zCredentialUpdateBody = z.object({
2118
3222
  name: z.string().min(1).max(256).optional(),
2119
- auth: zCredentialAuth.optional()
3223
+ auth: zCredentialAuth.optional(),
2120
3224
  });
2121
3225
  export const zCredentialUpdatePath = z.object({
2122
3226
  vaultId: z.string().regex(/^vlt_[0-9A-HJKMNP-TV-Z]{26}$/),
2123
- id: z.string().regex(/^crd_[0-9A-HJKMNP-TV-Z]{26}$/)
3227
+ id: z.string().regex(/^crd_[0-9A-HJKMNP-TV-Z]{26}$/),
3228
+ });
3229
+ export const zCredentialUpdateQuery = z.object({
3230
+ scope: z.enum(["user"]).optional(),
2124
3231
  });
2125
3232
  /**
2126
3233
  * Updated credential
@@ -2128,7 +3235,10 @@ export const zCredentialUpdatePath = z.object({
2128
3235
  export const zCredentialUpdateResponse = zCredential;
2129
3236
  export const zCredentialArchivePath = z.object({
2130
3237
  vaultId: z.string().regex(/^vlt_[0-9A-HJKMNP-TV-Z]{26}$/),
2131
- id: z.string().regex(/^crd_[0-9A-HJKMNP-TV-Z]{26}$/)
3238
+ id: z.string().regex(/^crd_[0-9A-HJKMNP-TV-Z]{26}$/),
3239
+ });
3240
+ export const zCredentialArchiveQuery = z.object({
3241
+ scope: z.enum(["user"]).optional(),
2132
3242
  });
2133
3243
  /**
2134
3244
  * Archived credential
@@ -2136,7 +3246,10 @@ export const zCredentialArchivePath = z.object({
2136
3246
  export const zCredentialArchiveResponse = zCredential;
2137
3247
  export const zCredentialOauthStartBody = zOAuthStartInput;
2138
3248
  export const zCredentialOauthStartPath = z.object({
2139
- vaultId: z.string().regex(/^vlt_[0-9A-HJKMNP-TV-Z]{26}$/)
3249
+ vaultId: z.string().regex(/^vlt_[0-9A-HJKMNP-TV-Z]{26}$/),
3250
+ });
3251
+ export const zCredentialOauthStartQuery = z.object({
3252
+ scope: z.enum(["user"]).optional(),
2140
3253
  });
2141
3254
  /**
2142
3255
  * Authorization URL for the user to visit
@@ -2144,69 +3257,99 @@ export const zCredentialOauthStartPath = z.object({
2144
3257
  export const zCredentialOauthStartResponse = zOAuthStartResult;
2145
3258
  export const zCredentialOauthSessionPath = z.object({
2146
3259
  vaultId: z.string().regex(/^vlt_[0-9A-HJKMNP-TV-Z]{26}$/),
2147
- sessionId: z.string().regex(/^oas_[0-9A-HJKMNP-TV-Z]{26}$/)
3260
+ sessionId: z.string().regex(/^oas_[0-9A-HJKMNP-TV-Z]{26}$/),
3261
+ });
3262
+ export const zCredentialOauthSessionQuery = z.object({
3263
+ scope: z.enum(["user"]).optional(),
2148
3264
  });
2149
3265
  /**
2150
3266
  * Session status snapshot
2151
3267
  */
2152
3268
  export const zCredentialOauthSessionResponse = zOAuthSessionStatus;
2153
3269
  export const zRegistryAgentListQuery = z.object({
2154
- limit: z.number().gte(1).lte(100).optional(),
2155
- offset: z.number().gte(0).optional()
3270
+ limit: z.number().gte(1).lte(1000).optional(),
3271
+ offset: z.number().gte(0).optional(),
3272
+ includeDeprecated: z.boolean().optional(),
2156
3273
  });
2157
3274
  /**
2158
3275
  * List of published agents
2159
3276
  */
2160
3277
  export const zRegistryAgentListResponse = z.array(zAgent);
2161
3278
  export const zRegistryAgentGetPath = z.object({
2162
- id: z.string().regex(/^agt_[0-9A-HJKMNP-TV-Z]{26}$/)
3279
+ id: z.string().regex(/^agt_[0-9A-HJKMNP-TV-Z]{26}$/),
2163
3280
  });
2164
3281
  /**
2165
3282
  * Agent details
2166
3283
  */
2167
3284
  export const zRegistryAgentGetResponse = zAgent;
2168
3285
  export const zRegistrySkillListQuery = z.object({
2169
- limit: z.number().gte(1).lte(100).optional(),
2170
- offset: z.number().gte(0).optional()
3286
+ limit: z.number().gte(1).lte(1000).optional(),
3287
+ offset: z.number().gte(0).optional(),
3288
+ sort: z.enum(["popular", "trending", "recent"]).optional(),
3289
+ includeDeprecated: z.boolean().optional(),
2171
3290
  });
2172
3291
  /**
2173
3292
  * List of published skills
2174
3293
  */
2175
3294
  export const zRegistrySkillListResponse = z.array(zSkill);
2176
3295
  export const zRegistrySkillGetPath = z.object({
2177
- id: z.string().regex(/^skl_[0-9A-HJKMNP-TV-Z]{26}$/)
3296
+ id: z.string().regex(/^skl_[0-9A-HJKMNP-TV-Z]{26}$/),
2178
3297
  });
2179
3298
  /**
2180
3299
  * Skill details
2181
3300
  */
2182
3301
  export const zRegistrySkillGetResponse = zSkill;
2183
3302
  export const zRegistryMcpListQuery = z.object({
2184
- limit: z.number().gte(1).lte(100).optional(),
2185
- offset: z.number().gte(0).optional()
3303
+ limit: z.number().gte(1).lte(1000).optional(),
3304
+ offset: z.number().gte(0).optional(),
3305
+ sort: z.enum(["popular", "trending", "recent"]).optional(),
3306
+ includeDeprecated: z.boolean().optional(),
2186
3307
  });
2187
3308
  /**
2188
3309
  * List of published MCPs
2189
3310
  */
2190
3311
  export const zRegistryMcpListResponse = z.array(zMcp);
2191
3312
  export const zRegistryMcpGetPath = z.object({
2192
- id: z.string().regex(/^mcp_[0-9A-HJKMNP-TV-Z]{26}$/)
3313
+ id: z.string().regex(/^mcp_[0-9A-HJKMNP-TV-Z]{26}$/),
2193
3314
  });
2194
3315
  /**
2195
3316
  * MCP details
2196
3317
  */
2197
3318
  export const zRegistryMcpGetResponse = zMcp;
2198
- export const zRegistryComposioMcpListQuery = z.object({
2199
- limit: z.number().gte(1).lte(100).optional(),
2200
- offset: z.number().gte(0).optional()
3319
+ export const zRegistryReplayGetPath = z.object({
3320
+ slug: z
3321
+ .string()
3322
+ .min(1)
3323
+ .max(128)
3324
+ .regex(/^[a-z0-9-]+$/),
2201
3325
  });
2202
3326
  /**
2203
- * List of Composio MCPs
3327
+ * Public replay view
3328
+ */
3329
+ export const zRegistryReplayGetResponse = zReplayPublicView;
3330
+ export const zRegistryReplayFilesPresignDownloadBody = z.object({
3331
+ kind: z.enum(["outputs", "uploads"]),
3332
+ filename: z.string().min(1),
3333
+ });
3334
+ export const zRegistryReplayFilesPresignDownloadPath = z.object({
3335
+ slug: z
3336
+ .string()
3337
+ .min(1)
3338
+ .max(128)
3339
+ .regex(/^[a-z0-9-]+$/),
3340
+ });
3341
+ /**
3342
+ * Presigned download URL
2204
3343
  */
2205
- export const zRegistryComposioMcpListResponse = z.array(zComposioMcp);
2206
- export const zRegistryComposioMcpGetPath = z.object({
2207
- id: z.string().regex(/^cmcp_[0-9A-HJKMNP-TV-Z]{26}$/)
3344
+ export const zRegistryReplayFilesPresignDownloadResponse = zReplayPresignDownloadResponse;
3345
+ export const zRegistryBlueprintGetPath = z.object({
3346
+ slug: z
3347
+ .string()
3348
+ .min(1)
3349
+ .max(128)
3350
+ .regex(/^[a-z0-9-]+$/),
2208
3351
  });
2209
3352
  /**
2210
- * Composio MCP details
3353
+ * Public blueprint view
2211
3354
  */
2212
- export const zRegistryComposioMcpGetResponse = zComposioMcp;
3355
+ export const zRegistryBlueprintGetResponse = zBlueprintPublicView;