@renai-labs/sdk 0.1.24 → 0.1.26

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.
@@ -79,15 +79,29 @@ export const zReplayPublicView = z.object({
79
79
  session: zReplayPublicSession,
80
80
  messages: z.array(zReplayMessage),
81
81
  });
82
- export const zPresetTemplate = z.enum(["xs", "small", "medium", "large", "xl"]);
83
- export const zSpecPublicTriggerEntry = z.object({
82
+ /**
83
+ * Prompt the client auto-inserts into a new chat post-add.
84
+ */
85
+ export const zSpecInitialPrompt = z.object({
86
+ prompt: z.string(),
87
+ project: z
88
+ .string()
89
+ .regex(/^[a-z0-9][a-z0-9-]*$/)
90
+ .optional(),
91
+ });
92
+ /**
93
+ * Model this trigger's fires run on; absent inherits the agent/project default.
94
+ */
95
+ export const zModelSelection = z.object({
96
+ model: z.string().min(1),
97
+ variant: z.string().min(1).nullish().default(null),
98
+ });
99
+ export const zSpecCronTriggerEntry = z.object({
84
100
  slug: z.string().regex(/^[a-z0-9][a-z0-9-]*$/),
85
- ref: z
86
- .object({
87
- id: z.string().regex(/^[a-z]+_[A-Za-z0-9]+$/),
88
- })
101
+ project: z
102
+ .string()
103
+ .regex(/^[a-z0-9][a-z0-9-]*$/)
89
104
  .optional(),
90
- project: z.string().regex(/^[a-z0-9][a-z0-9-]*$/),
91
105
  schedule: z.string(),
92
106
  timezone: z.string().optional(),
93
107
  until: z.iso
@@ -95,9 +109,20 @@ export const zSpecPublicTriggerEntry = z.object({
95
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))$/)
96
110
  .optional(),
97
111
  inputMessage: z.string(),
98
- model: z.string().optional(),
112
+ model: zModelSelection.optional(),
99
113
  enabled: z.boolean().optional(),
100
114
  });
115
+ export const zSpecRef = z.object({
116
+ id: z.string().regex(/^[a-z]+_[A-Za-z0-9]+$/),
117
+ });
118
+ export const zSpecMcpEntry = z.object({
119
+ slug: z.string().regex(/^[a-z0-9][a-z0-9-]*$/),
120
+ ref: zSpecRef,
121
+ });
122
+ export const zSpecSkillEntry = z.object({
123
+ slug: z.string().regex(/^[a-z0-9][a-z0-9-]*$/),
124
+ ref: zSpecRef,
125
+ });
101
126
  export const zSpecChannelBinding = z.object({
102
127
  slug: z.string().regex(/^[a-z0-9][a-z0-9-]*$/),
103
128
  kind: z.enum(["slack", "linear", "github", "telegram", "email"]),
@@ -118,70 +143,95 @@ export const zProjectReference = z.union([
118
143
  }),
119
144
  ]);
120
145
  export const zProjectReferences = z.record(z.string(), zProjectReference);
121
- export const zSpecRef = z.object({
122
- id: z.string().regex(/^[a-z]+_[A-Za-z0-9]+$/),
123
- versionId: z
124
- .string()
125
- .regex(/^[a-z]+_[A-Za-z0-9]+$/)
126
- .optional(),
127
- });
128
- export const zSpecPublicProjectEntry = z.object({
129
- slug: z.string().regex(/^[a-z0-9][a-z0-9-]*$/),
130
- ref: zSpecRef.optional(),
131
- name: z.string().optional(),
146
+ export const zSpecProjectDef = z.object({
147
+ name: z.string(),
132
148
  description: z.string().optional(),
133
149
  icon: z.string().optional(),
134
150
  instructions: z.string().optional(),
135
151
  references: zProjectReferences.optional(),
136
152
  skills: z.array(z.string().regex(/^[a-z0-9][a-z0-9-]*$/)).optional(),
137
153
  mcps: z.array(z.string().regex(/^[a-z0-9][a-z0-9-]*$/)).optional(),
138
- channels: z.array(zSpecChannelBinding).optional(),
139
- });
140
- export const zSpecPublicMcpEntry = z.object({
141
- slug: z.string().regex(/^[a-z0-9][a-z0-9-]*$/),
142
- ref: zSpecRef.optional(),
143
- name: z.string().optional(),
144
- registrySlug: z.string().optional(),
145
- auth: z.enum(["oauth", "basic", "api_key", "none", "mcp_provider"]).optional(),
154
+ permission: zPermissionConfig.optional(),
155
+ defaultModel: zModelSelection.optional(),
156
+ buildOrder: z.int().gte(1).lte(9007199254740991).optional(),
146
157
  });
147
- export const zSpecPublicSkillEntry = z.object({
158
+ export const zSpecProjectEntry = z.object({
148
159
  slug: z.string().regex(/^[a-z0-9][a-z0-9-]*$/),
149
- ref: zSpecRef.optional(),
150
- name: z.string().optional(),
151
- registrySlug: z.string().optional(),
152
- });
153
- export const zSpecInitialPrompt = z.object({
154
- prompt: z.string(),
155
- project: z
160
+ pod: z
156
161
  .string()
157
162
  .regex(/^[a-z0-9][a-z0-9-]*$/)
158
163
  .optional(),
164
+ def: zSpecProjectDef,
165
+ channels: z.array(zSpecChannelBinding).optional(),
159
166
  });
160
- export const zSpecPod = z.object({
161
- name: z.string().optional(),
167
+ export const zTemplateMemoryMb = z.union([
168
+ z.literal(1024),
169
+ z.literal(2048),
170
+ z.literal(3072),
171
+ z.literal(4096),
172
+ z.literal(5120),
173
+ z.literal(6144),
174
+ z.literal(7168),
175
+ z.literal(8192),
176
+ ]);
177
+ export const zTemplateCpuCount = z.union([z.literal(1), z.literal(2), z.literal(4), z.literal(6), z.literal(8)]);
178
+ export const zPackagesConfig = z.object({
179
+ apt: z.array(z.string()).optional(),
180
+ npm: z.array(z.string()).optional(),
181
+ pip: z.array(z.string()).optional(),
182
+ go: z.array(z.string()).optional(),
183
+ });
184
+ export const zNetworkingConfig = z.union([
185
+ z.object({
186
+ type: z.literal("unrestricted"),
187
+ }),
188
+ z.object({
189
+ type: z.literal("limited"),
190
+ allowMcpServers: z.boolean(),
191
+ allowPackageManagers: z.boolean(),
192
+ allowedHosts: z.array(z.string()),
193
+ }),
194
+ ]);
195
+ export const zSpecEnvironmentDef = z.object({
196
+ networking: zNetworkingConfig,
197
+ packages: zPackagesConfig,
198
+ cpuCount: zTemplateCpuCount.optional(),
199
+ memoryMB: zTemplateMemoryMb.optional(),
200
+ buildCommands: z.array(z.string().min(1).max(4096)).max(50).optional(),
201
+ });
202
+ export const zPresetTemplate = z.enum(["xs", "small", "medium", "large", "xl"]);
203
+ export const zSpecEnvironmentEntry = z.object({
204
+ preset: zPresetTemplate.optional(),
205
+ def: zSpecEnvironmentDef.optional(),
206
+ });
207
+ export const zSpecPodEntry = z.object({
208
+ slug: z.string().regex(/^[a-z0-9][a-z0-9-]*$/),
209
+ name: z.string(),
162
210
  icon: z.string().optional(),
163
211
  description: z.string().optional(),
164
- defaultModel: z.string().optional(),
212
+ instructions: z.string().optional(),
213
+ defaultModel: zModelSelection.optional(),
214
+ environment: zSpecEnvironmentEntry.optional(),
165
215
  });
166
- export const zSpecPublic = z.object({
167
- schemaVersion: z.literal(3),
168
- meta: z.object({
169
- name: z.string(),
170
- description: z.string().optional(),
171
- snapshotDate: z.string().optional(),
172
- }),
173
- pod: zSpecPod.optional(),
216
+ export const zSpecOrg = z.object({
174
217
  instructions: z.string().optional(),
218
+ defaultModel: zModelSelection.optional(),
219
+ });
220
+ export const zSpecMeta = z.object({
221
+ name: z.string(),
222
+ description: z.string().optional(),
223
+ });
224
+ export const zSpec = z.object({
225
+ schemaVersion: z.literal(4),
226
+ meta: zSpecMeta,
227
+ org: zSpecOrg.optional(),
228
+ pods: z.array(zSpecPodEntry),
229
+ projects: z.array(zSpecProjectEntry),
230
+ skills: z.array(zSpecSkillEntry),
231
+ mcps: z.array(zSpecMcpEntry),
232
+ triggers: z.array(zSpecCronTriggerEntry),
233
+ channels: z.array(zSpecChannelBinding).optional(),
175
234
  initialPrompt: zSpecInitialPrompt.optional(),
176
- skills: z.array(zSpecPublicSkillEntry),
177
- mcps: z.array(zSpecPublicMcpEntry),
178
- projects: z.array(zSpecPublicProjectEntry),
179
- triggers: z.array(zSpecPublicTriggerEntry),
180
- environment: z
181
- .object({
182
- preset: zPresetTemplate.optional(),
183
- })
184
- .optional(),
185
235
  });
186
236
  export const zPublisherLink = z.object({
187
237
  label: z.string().min(1),
@@ -198,17 +248,13 @@ export const zPublisherPublicView = z.object({
198
248
  isVerified: z.boolean(),
199
249
  links: z.array(zPublisherLink),
200
250
  });
201
- export const zBlueprintComposition = z.object({
202
- uses: z.array(z.object({
203
- slug: z.string(),
204
- into: z.string().optional(),
205
- })),
251
+ export const zBlueprintCategories = z.object({
252
+ usecases: z.array(z.string()).optional(),
253
+ roles: z.array(z.string()).optional(),
254
+ functions: z.array(z.string()).optional(),
255
+ verticals: z.array(z.string()).optional(),
206
256
  });
207
- /**
208
- * What a composite is organised around. Null on apps, and on composites nobody has shelved yet.
209
- */
210
- export const zBlueprintType = z.enum(["use-case", "company", "function"]);
211
- export const zBlueprintKind = z.enum(["app", "composite"]);
257
+ export const zBlueprintKind = z.enum(["org", "pod", "project", "app"]);
212
258
  export const zBlueprintPublicView = z.object({
213
259
  id: z.string(),
214
260
  slug: z.string(),
@@ -216,11 +262,10 @@ export const zBlueprintPublicView = z.object({
216
262
  description: z.string().nullable(),
217
263
  websiteMetadata: zWebsiteMetadata.nullable(),
218
264
  kind: zBlueprintKind,
219
- type: zBlueprintType.nullable(),
220
- composition: zBlueprintComposition.nullable(),
265
+ categories: zBlueprintCategories,
221
266
  publisherId: z.string(),
222
267
  publisher: zPublisherPublicView.nullish().default(null),
223
- template: zSpecPublic,
268
+ template: zSpec,
224
269
  replays: z.array(z.string()),
225
270
  examplePrompts: z.array(z.string().min(1).max(200)).max(6),
226
271
  brandColor: z
@@ -233,12 +278,19 @@ export const zBlueprintPublicListItem = z.object({
233
278
  slug: z.string(),
234
279
  name: z.string(),
235
280
  description: z.string().nullable(),
281
+ icon: z.string().nullable(),
236
282
  websiteMetadata: zWebsiteMetadata.nullable(),
283
+ kind: zBlueprintKind,
284
+ categories: zBlueprintCategories,
237
285
  publisherId: z.string().nullable(),
238
286
  publisher: zPublisherPublicView.nullish().default(null),
239
287
  updatedAt: z.iso
240
288
  .datetime()
241
289
  .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
+ resourceIds: z.object({
291
+ skillIds: z.array(z.string()),
292
+ mcpIds: z.array(z.string()),
293
+ }),
242
294
  });
243
295
  export const zSetupSource = z.object({
244
296
  name: z.string().min(1).max(64),
@@ -341,7 +393,7 @@ export const zAgentLatestVersion = z.object({
341
393
  version: z.string().regex(/^\d+\.\d+\.\d+$/),
342
394
  description: z.string().nullable(),
343
395
  prompt: z.string().nullable(),
344
- model: z.string().nullable(),
396
+ model: zModelSelection.nullable(),
345
397
  skills: z.array(z.object({
346
398
  skillId: z.string(),
347
399
  skillVersionId: z.string().nullish().default(null),
@@ -822,7 +874,7 @@ export const zCronTriggerDetail = z.object({
822
874
  projectAgentId: z.string().nullable(),
823
875
  senderUserId: z.string(),
824
876
  inputMessage: z.string(),
825
- model: z.string().nullable(),
877
+ model: zModelSelection.nullable(),
826
878
  schedule: z.string(),
827
879
  timezone: z.string().nullable(),
828
880
  until: z.iso
@@ -863,7 +915,7 @@ export const zCronTrigger = z.object({
863
915
  projectAgentId: z.string().nullable(),
864
916
  senderUserId: z.string(),
865
917
  inputMessage: z.string(),
866
- model: z.string().nullable(),
918
+ model: zModelSelection.nullable(),
867
919
  schedule: z.string(),
868
920
  timezone: z.string().nullable(),
869
921
  until: z.iso
@@ -910,7 +962,7 @@ export const zTopology = z.object({
910
962
  id: z.string().regex(/^[a-z]+_[A-Za-z0-9]+$/),
911
963
  slug: z.string().regex(/^[a-z0-9][a-z0-9-]*$/),
912
964
  name: z.string(),
913
- model: z.string().optional(),
965
+ model: zModelSelection.optional(),
914
966
  icon: z.string().optional(),
915
967
  skills: z.array(z.string().regex(/^[a-z0-9][a-z0-9-]*$/)).optional(),
916
968
  mcps: z.array(z.string().regex(/^[a-z0-9][a-z0-9-]*$/)).optional(),
@@ -1006,7 +1058,7 @@ export const zTopology = z.object({
1006
1058
  project: z.string().regex(/^[a-z0-9][a-z0-9-]*$/),
1007
1059
  schedule: z.string(),
1008
1060
  inputMessage: z.string(),
1009
- model: z.string().optional(),
1061
+ model: zModelSelection.optional(),
1010
1062
  }))
1011
1063
  .optional(),
1012
1064
  emails: z
@@ -1020,6 +1072,91 @@ export const zTopology = z.object({
1020
1072
  }))
1021
1073
  .optional(),
1022
1074
  });
1075
+ /**
1076
+ * One immutable entry in the product-wide activity log.
1077
+ */
1078
+ export const zEvent = z.object({
1079
+ id: z.string(),
1080
+ orgId: z.string(),
1081
+ entityType: z.string(),
1082
+ entityId: z.string(),
1083
+ type: z.string(),
1084
+ data: z.record(z.string(), z.unknown()),
1085
+ actorUserId: z.string().nullable(),
1086
+ actorProjectAgentId: z.string().nullable(),
1087
+ createdAt: z.iso
1088
+ .datetime()
1089
+ .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))$/),
1090
+ });
1091
+ /**
1092
+ * A task with its activity trail embedded.
1093
+ */
1094
+ export const zTaskDetail = z.object({
1095
+ id: z.string(),
1096
+ orgId: z.string(),
1097
+ userId: z.string().nullable(),
1098
+ podId: z.string().nullable(),
1099
+ projectId: z.string().nullable(),
1100
+ title: z.string(),
1101
+ description: z.string().nullable(),
1102
+ status: z.enum(["open", "in_progress", "done", "dismissed"]),
1103
+ priority: z.enum(["low", "medium", "high"]).nullable(),
1104
+ labels: z.array(z.string()),
1105
+ links: z.array(z.string()),
1106
+ dueAt: z.iso
1107
+ .datetime()
1108
+ .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))$/)
1109
+ .nullable(),
1110
+ assignedToUserId: z.string().nullable(),
1111
+ assignedToProjectAgentId: z.string().nullable(),
1112
+ createdByUserId: z.string().nullable(),
1113
+ createdByProjectAgentId: z.string().nullable(),
1114
+ createdAt: z.iso
1115
+ .datetime()
1116
+ .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))$/),
1117
+ updatedAt: z.iso
1118
+ .datetime()
1119
+ .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))$/),
1120
+ archivedAt: z.iso
1121
+ .datetime()
1122
+ .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))$/)
1123
+ .nullable(),
1124
+ events: z.array(zEvent).optional(),
1125
+ });
1126
+ /**
1127
+ * An action item in Ren, created and maintained by people or by agents.
1128
+ */
1129
+ export const zTask = z.object({
1130
+ id: z.string(),
1131
+ orgId: z.string(),
1132
+ userId: z.string().nullable(),
1133
+ podId: z.string().nullable(),
1134
+ projectId: z.string().nullable(),
1135
+ title: z.string(),
1136
+ description: z.string().nullable(),
1137
+ status: z.enum(["open", "in_progress", "done", "dismissed"]),
1138
+ priority: z.enum(["low", "medium", "high"]).nullable(),
1139
+ labels: z.array(z.string()),
1140
+ links: z.array(z.string()),
1141
+ dueAt: z.iso
1142
+ .datetime()
1143
+ .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))$/)
1144
+ .nullable(),
1145
+ assignedToUserId: z.string().nullable(),
1146
+ assignedToProjectAgentId: z.string().nullable(),
1147
+ createdByUserId: z.string().nullable(),
1148
+ createdByProjectAgentId: z.string().nullable(),
1149
+ createdAt: z.iso
1150
+ .datetime()
1151
+ .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))$/),
1152
+ updatedAt: z.iso
1153
+ .datetime()
1154
+ .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))$/),
1155
+ archivedAt: z.iso
1156
+ .datetime()
1157
+ .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))$/)
1158
+ .nullable(),
1159
+ });
1023
1160
  export const zSkillVersionFiles = z.object({
1024
1161
  type: z.literal("files"),
1025
1162
  files: z.array(z.object({
@@ -1414,7 +1551,7 @@ export const zProject = z.object({
1414
1551
  icon: z.string().nullable(),
1415
1552
  description: z.string().nullable(),
1416
1553
  slug: z.string(),
1417
- defaultModel: z.string().nullable(),
1554
+ defaultModel: zModelSelection.nullable(),
1418
1555
  instructions: z.string(),
1419
1556
  permission: zPermissionConfig,
1420
1557
  gitRepos: z.array(zProjectGitRepo),
@@ -1710,7 +1847,7 @@ export const zPod = z.object({
1710
1847
  description: z.string().nullable(),
1711
1848
  isPrivate: z.boolean(),
1712
1849
  isDefault: z.boolean(),
1713
- defaultModel: z.string().nullable(),
1850
+ defaultModel: zModelSelection.nullable(),
1714
1851
  instructions: z.string(),
1715
1852
  environmentId: z.string().nullable(),
1716
1853
  presetTemplate: zPresetTemplate,
@@ -1768,7 +1905,7 @@ export const zOrgSettings = z.object({
1768
1905
  id: z.string(),
1769
1906
  name: z.string(),
1770
1907
  slug: z.string(),
1771
- defaultModel: z.string().nullable(),
1908
+ defaultModel: zModelSelection.nullable(),
1772
1909
  instructions: z.string(),
1773
1910
  });
1774
1911
  export const zOnboardingSetupPersonalOrg = z.object({
@@ -1778,7 +1915,8 @@ export const zOnboardingSetupPersonalOrg = z.object({
1778
1915
  export const zOnboardingStart = z.object({
1779
1916
  podId: z.string(),
1780
1917
  projectId: z.string(),
1781
- sessionId: z.string(),
1918
+ jobId: z.string(),
1919
+ initialPrompt: z.string(),
1782
1920
  });
1783
1921
  export const zModelPricing = z.object({
1784
1922
  input_usd_per_million_tokens: z.number(),
@@ -1791,6 +1929,10 @@ export const zModelEntry = z.object({
1791
1929
  modelID: z.string(),
1792
1930
  size: z.enum(["large", "medium", "small"]).optional(),
1793
1931
  pricing: zModelPricing.optional(),
1932
+ variants: z.array(z.object({
1933
+ id: z.string(),
1934
+ name: z.string(),
1935
+ })),
1794
1936
  });
1795
1937
  export const zModelProvider = z.object({
1796
1938
  key: z.string(),
@@ -1798,7 +1940,7 @@ export const zModelProvider = z.object({
1798
1940
  models: z.array(zModelEntry),
1799
1941
  });
1800
1942
  export const zModelsResponse = z.object({
1801
- default_model: z.string(),
1943
+ default_model: zModelSelection,
1802
1944
  providers: z.array(zModelProvider),
1803
1945
  });
1804
1946
  export const zMemoryStoreFile = z.object({
@@ -1985,6 +2127,144 @@ export const zOAuthApp = z.object({
1985
2127
  .nullable(),
1986
2128
  hasClientSecret: z.boolean(),
1987
2129
  });
2130
+ export const zInferenceKeyCreateInput = z.object({
2131
+ name: z.string().min(1).max(64),
2132
+ });
2133
+ export const zInferenceKeyCreated = z.object({
2134
+ id: z.string(),
2135
+ name: z.string(),
2136
+ prefix: z.string(),
2137
+ status: z.enum(["active", "revoke_pending", "revoked"]),
2138
+ owner: z
2139
+ .object({
2140
+ id: z.string(),
2141
+ name: z.string(),
2142
+ })
2143
+ .nullable(),
2144
+ orphaned: z.boolean(),
2145
+ lastUsedAt: z.string().nullable(),
2146
+ createdAt: z.string(),
2147
+ secret: z.string(),
2148
+ });
2149
+ export const zInferenceKey = z.object({
2150
+ id: z.string(),
2151
+ name: z.string(),
2152
+ prefix: z.string(),
2153
+ status: z.enum(["active", "revoke_pending", "revoked"]),
2154
+ owner: z
2155
+ .object({
2156
+ id: z.string(),
2157
+ name: z.string(),
2158
+ })
2159
+ .nullable(),
2160
+ orphaned: z.boolean(),
2161
+ lastUsedAt: z.string().nullable(),
2162
+ createdAt: z.string(),
2163
+ });
2164
+ export const zInferenceSubscriptionRenameInput = z.object({
2165
+ label: z.string().min(1).max(64),
2166
+ });
2167
+ export const zInferenceConnectCodexInput = z.object({
2168
+ artifact: z.literal("access_token"),
2169
+ token: z.string().min(1).max(8192),
2170
+ label: z.string().min(1).max(64).optional(),
2171
+ });
2172
+ export const zInferenceCodexModel = z.object({
2173
+ slug: z.string(),
2174
+ defaultEffort: z.string(),
2175
+ efforts: z.array(z.string()),
2176
+ contextWindow: z.int().gt(0).lte(9007199254740991),
2177
+ maxContextWindow: z.int().gt(0).lte(9007199254740991),
2178
+ });
2179
+ export const zInferenceCodexCatalog = z.object({
2180
+ models: z.array(zInferenceCodexModel),
2181
+ });
2182
+ export const zInferenceProviderUsage = z.object({
2183
+ windows: z.array(z.object({
2184
+ key: z.string(),
2185
+ kind: z.enum(["quota", "entitlement"]).optional().default("entitlement"),
2186
+ windowMinutes: z.int().gt(0).lte(9007199254740991).nullish().default(null),
2187
+ utilization: z.number().gte(0).nullable(),
2188
+ status: z.string().nullable(),
2189
+ resetsAt: z.string().nullable(),
2190
+ models: z.array(z.string()).optional().default([]),
2191
+ family: z.enum(["opus", "sonnet", "fable", "haiku"]).nullish().default(null),
2192
+ source: z.enum(["oauth_endpoint", "response_header"]).optional().default("response_header"),
2193
+ observedAt: z.string().nullish().default(null),
2194
+ })),
2195
+ status: z.string().nullable(),
2196
+ resetsAt: z.string().nullish().default(null),
2197
+ representativeWindow: z.string().nullable(),
2198
+ overageDisabledReason: z.string().nullable(),
2199
+ fallbackPercentage: z.number().nullish().default(null),
2200
+ activeLimit: z.string().nullish().default(null),
2201
+ planType: z.string().nullish().default(null),
2202
+ creditsAvailable: z.boolean().nullish().default(null),
2203
+ creditsUnlimited: z.boolean().nullish().default(null),
2204
+ safetyBufferingFasterModel: z.string().nullish().default(null),
2205
+ observedAt: z.string(),
2206
+ });
2207
+ export const zInferenceSeatHealth = z.enum([
2208
+ "connected",
2209
+ "exhausted",
2210
+ "transient",
2211
+ "needs_reauth",
2212
+ "blocked",
2213
+ "refresh_uncertain",
2214
+ "disabled",
2215
+ ]);
2216
+ export const zInferenceProvider = z.enum(["anthropic", "openai"]);
2217
+ export const zInferenceSubscriptionSeat = z.object({
2218
+ id: z.string(),
2219
+ provider: zInferenceProvider,
2220
+ label: z.string(),
2221
+ health: zInferenceSeatHealth,
2222
+ cooldownUntil: z.string().nullable(),
2223
+ subscriptionType: z.string().nullable(),
2224
+ rateLimitTier: z.string().nullable(),
2225
+ credentialKind: z.string(),
2226
+ workspaceId: z.string().nullable(),
2227
+ planType: z.string().nullable(),
2228
+ supportedModels: z.array(z.string()).nullable(),
2229
+ healthReason: z.string().nullable(),
2230
+ credentialExpiresAt: z.string().nullable(),
2231
+ contributor: z
2232
+ .object({
2233
+ id: z.string(),
2234
+ name: z.string(),
2235
+ })
2236
+ .nullable(),
2237
+ usage: zInferenceProviderUsage.nullable(),
2238
+ lastSelectedAt: z.string().nullable(),
2239
+ connectedAt: z.string(),
2240
+ });
2241
+ export const zInferenceCodexDeviceStatus = z.object({
2242
+ status: z.enum(["pending", "completed", "failed", "expired"]),
2243
+ seat: zInferenceSubscriptionSeat.nullable(),
2244
+ reason: z.string().nullable(),
2245
+ });
2246
+ export const zInferenceCodexDeviceStartInput = z.object({
2247
+ label: z.string().min(1).max(64).optional(),
2248
+ });
2249
+ export const zInferenceCodexDeviceStart = z.object({
2250
+ sessionId: z.string(),
2251
+ verificationUrl: z.url(),
2252
+ userCode: z.string(),
2253
+ intervalMs: z.number(),
2254
+ expiresAt: z.string(),
2255
+ });
2256
+ export const zInferenceOauthCompleteInput = z.object({
2257
+ sessionId: z.string().min(1),
2258
+ code: z.string().min(1).max(4096),
2259
+ });
2260
+ export const zInferenceOauthStartInput = z.object({
2261
+ label: z.string().min(1).max(64).optional(),
2262
+ });
2263
+ export const zInferenceOauthStart = z.object({
2264
+ sessionId: z.string(),
2265
+ authorizeUrl: z.url(),
2266
+ expiresAt: z.string(),
2267
+ });
1988
2268
  export const zGoogleWorkspaceOAuthStartResult = z.object({
1989
2269
  url: z.url(),
1990
2270
  });
@@ -2097,17 +2377,6 @@ export const zFileStore = z.object({
2097
2377
  .nullable(),
2098
2378
  mountPath: z.string(),
2099
2379
  });
2100
- export const zTemplateMemoryMb = z.union([
2101
- z.literal(1024),
2102
- z.literal(2048),
2103
- z.literal(3072),
2104
- z.literal(4096),
2105
- z.literal(5120),
2106
- z.literal(6144),
2107
- z.literal(7168),
2108
- z.literal(8192),
2109
- ]);
2110
- export const zTemplateCpuCount = z.union([z.literal(1), z.literal(2), z.literal(4), z.literal(6), z.literal(8)]);
2111
2380
  export const zEnvironmentBuildStatus = z.enum(["queued", "building", "ready", "error"]);
2112
2381
  export const zEnvironmentBuild = z.object({
2113
2382
  id: z.string(),
@@ -2128,23 +2397,6 @@ export const zEnvironmentBuild = z.object({
2128
2397
  .datetime()
2129
2398
  .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))$/),
2130
2399
  });
2131
- export const zPackagesConfig = z.object({
2132
- apt: z.array(z.string()).optional(),
2133
- npm: z.array(z.string()).optional(),
2134
- pip: z.array(z.string()).optional(),
2135
- go: z.array(z.string()).optional(),
2136
- });
2137
- export const zNetworkingConfig = z.union([
2138
- z.object({
2139
- type: z.literal("unrestricted"),
2140
- }),
2141
- z.object({
2142
- type: z.literal("limited"),
2143
- allowMcpServers: z.boolean(),
2144
- allowPackageManagers: z.boolean(),
2145
- allowedHosts: z.array(z.string()),
2146
- }),
2147
- ]);
2148
2400
  export const zEnvironment = z.object({
2149
2401
  id: z.string(),
2150
2402
  name: z.string(),
@@ -2234,6 +2486,14 @@ export const zUsageDailyPoint = z.object({
2234
2486
  credits: z.string(),
2235
2487
  eventCount: z.int().gte(-9007199254740991).lte(9007199254740991),
2236
2488
  });
2489
+ export const zUsageServedByItem = z.object({
2490
+ servedBy: z.enum(["customer_sub", "ren_sub", "paid_api", "unattributed"]),
2491
+ credits: z.string(),
2492
+ amountCents: z.int().gte(-9007199254740991).lte(9007199254740991),
2493
+ eventCount: z.int().gte(-9007199254740991).lte(9007199254740991),
2494
+ promptTokens: z.string(),
2495
+ completionTokens: z.string(),
2496
+ });
2237
2497
  export const zUsageBreakdownItem = z.object({
2238
2498
  source: z.string(),
2239
2499
  operation: z.string(),
@@ -2247,11 +2507,12 @@ export const zUsage = z.object({
2247
2507
  from: z.string().nullable(),
2248
2508
  through: z.string(),
2249
2509
  breakdown: z.array(zUsageBreakdownItem),
2510
+ servedBy: z.array(zUsageServedByItem),
2250
2511
  daily: z.array(zUsageDailyPoint),
2251
- groupBy: z.enum(["user", "member", "agent", "model", "session", "project", "pod", "source"]).nullable(),
2512
+ groupBy: z.enum(["user", "member", "agent", "model", "session", "project", "pod", "source", "servedBy"]).nullable(),
2252
2513
  groups: z.array(zUsageGroup),
2253
2514
  });
2254
- export const zBlueprintInstallProjectTarget = z.union([
2515
+ export const zBlueprintAddProjectTarget = z.union([
2255
2516
  z.object({
2256
2517
  blueprintProjectSlug: z.string().min(1),
2257
2518
  mode: z.literal("create"),
@@ -2263,31 +2524,56 @@ export const zBlueprintInstallProjectTarget = z.union([
2263
2524
  projectId: z.string().regex(/^prj_[0-9A-HJKMNP-TV-Z]{26}$/),
2264
2525
  }),
2265
2526
  ]);
2266
- export const zBlueprintInstallInput = z.object({
2527
+ export const zBlueprintAddPodTarget = z.union([
2528
+ z.object({
2529
+ blueprintPodSlug: z.string().min(1),
2530
+ mode: z.literal("create"),
2531
+ name: z.string().min(1).max(256).optional(),
2532
+ }),
2533
+ z.object({
2534
+ blueprintPodSlug: z.string().min(1),
2535
+ mode: z.literal("existing"),
2536
+ podId: z.string().regex(/^pod_[0-9A-HJKMNP-TV-Z]{26}$/),
2537
+ }),
2538
+ ]);
2539
+ export const zBlueprintAddInput = z.object({
2267
2540
  source: z.string().min(1),
2268
- podId: z.string().regex(/^pod_[0-9A-HJKMNP-TV-Z]{26}$/),
2269
- projectTargets: z.array(zBlueprintInstallProjectTarget).optional(),
2541
+ podId: z
2542
+ .string()
2543
+ .regex(/^pod_[0-9A-HJKMNP-TV-Z]{26}$/)
2544
+ .optional(),
2545
+ targetProjectId: z
2546
+ .string()
2547
+ .regex(/^prj_[0-9A-HJKMNP-TV-Z]{26}$/)
2548
+ .optional(),
2549
+ podTargets: z.array(zBlueprintAddPodTarget).optional(),
2550
+ projectTargets: z.array(zBlueprintAddProjectTarget).optional(),
2270
2551
  });
2271
- export const zBlueprintInstallProjectMapping = z.object({
2552
+ export const zBlueprintAddProjectMapping = z.object({
2272
2553
  blueprintProjectSlug: z.string(),
2273
2554
  projectId: z.string().regex(/^prj_[0-9A-HJKMNP-TV-Z]{26}$/),
2274
2555
  });
2275
- export const zBlueprintInstallRequirement = z.object({
2276
- kind: z.enum(["credential", "channel", "capability", "other"]),
2556
+ export const zBlueprintAddPodMapping = z.object({
2557
+ blueprintPodSlug: z.string(),
2558
+ podId: z.string().regex(/^pod_[0-9A-HJKMNP-TV-Z]{26}$/),
2559
+ });
2560
+ export const zBlueprintAddRequirement = z.object({
2561
+ kind: z.enum(["credential", "channel"]),
2277
2562
  message: z.string(),
2278
2563
  project: z.string().optional(),
2279
2564
  credential: z.string().optional(),
2280
2565
  });
2281
- export const zBlueprintInstallReport = z.object({
2566
+ export const zBlueprintAddReport = z.object({
2282
2567
  skills: z.array(z.string()),
2283
2568
  mcps: z.array(z.string()),
2284
2569
  skipped: z.array(z.object({
2285
- kind: z.enum(["skill", "mcp", "project", "trigger", "environment", "gitRepo"]),
2570
+ kind: z.enum(["skill", "mcp", "trigger", "environment"]),
2286
2571
  sourceId: z.string(),
2287
2572
  reason: z.string(),
2288
2573
  })),
2289
- requirements: z.array(zBlueprintInstallRequirement),
2290
- projectMappings: z.array(zBlueprintInstallProjectMapping),
2574
+ requirements: z.array(zBlueprintAddRequirement),
2575
+ podMappings: z.array(zBlueprintAddPodMapping),
2576
+ projectMappings: z.array(zBlueprintAddProjectMapping),
2291
2577
  initialPrompt: z
2292
2578
  .object({
2293
2579
  prompt: z.string(),
@@ -2298,154 +2584,16 @@ export const zBlueprintInstallReport = z.object({
2298
2584
  })
2299
2585
  .optional(),
2300
2586
  });
2301
- export const zBlueprintSelection = z.object({
2302
- projectIds: z.array(z.string()).optional().default([]),
2303
- skillIds: z.array(z.string()).optional().default([]),
2304
- mcpIds: z.array(z.string()).optional().default([]),
2305
- replayIds: z.array(z.string()).optional().default([]),
2306
- cronTriggerIds: z.array(z.string()).optional().default([]),
2307
- });
2308
- export const zSpecEnvironmentDef = z.object({
2309
- networking: zNetworkingConfig,
2310
- packages: zPackagesConfig,
2311
- cpuCount: zTemplateCpuCount.optional(),
2312
- memoryMB: zTemplateMemoryMb.optional(),
2313
- buildCommands: z.array(z.string().min(1).max(4096)).max(50).optional(),
2314
- });
2315
- export const zSpecRequirement = z.object({
2316
- id: z.string(),
2317
- kind: z.enum(["credential_present", "capability", "other"]),
2318
- must: z.string(),
2319
- agent: z
2320
- .string()
2321
- .regex(/^[a-z0-9][a-z0-9-]*$/)
2322
- .optional(),
2323
- mcp: z
2324
- .string()
2325
- .regex(/^[a-z0-9][a-z0-9-]*$/)
2326
- .optional(),
2327
- skill: z
2328
- .string()
2329
- .regex(/^[a-z0-9][a-z0-9-]*$/)
2330
- .optional(),
2331
- verify: z.string().optional(),
2332
- });
2333
- export const zSpecEnvironmentEntry = z.object({
2334
- preset: zPresetTemplate.optional(),
2335
- def: zSpecEnvironmentDef.optional(),
2336
- requirements: z.array(zSpecRequirement).optional(),
2337
- notes: z.string().optional(),
2338
- });
2339
- export const zSpecCronTriggerEntry = z.object({
2340
- slug: z.string().regex(/^[a-z0-9][a-z0-9-]*$/),
2341
- ref: z
2342
- .object({
2343
- id: z.string().regex(/^[a-z]+_[A-Za-z0-9]+$/),
2344
- })
2345
- .optional(),
2346
- project: z.string().regex(/^[a-z0-9][a-z0-9-]*$/),
2347
- schedule: z.string(),
2348
- timezone: z.string().optional(),
2349
- until: z.iso
2350
- .datetime()
2351
- .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))$/)
2352
- .optional(),
2353
- inputMessage: z.string(),
2354
- model: z.string().optional(),
2355
- enabled: z.boolean().optional(),
2356
- requirements: z.array(zSpecRequirement).optional(),
2357
- notes: z.string().optional(),
2358
- });
2359
- export const zSpecProjectDef = z.object({
2360
- name: z.string(),
2361
- description: z.string().optional(),
2362
- icon: z.string().optional(),
2363
- instructions: z.string().optional(),
2364
- references: zProjectReferences.optional(),
2365
- skills: z.array(z.string().regex(/^[a-z0-9][a-z0-9-]*$/)).optional(),
2366
- mcps: z.array(z.string().regex(/^[a-z0-9][a-z0-9-]*$/)).optional(),
2367
- permission: zPermissionConfig.optional(),
2368
- defaultModel: z.string().optional(),
2369
- gitRepos: z.array(zProjectGitRepo).optional(),
2370
- buildOrder: z.int().gte(1).lte(9007199254740991).optional(),
2371
- });
2372
- export const zSpecProjectEntry = z.object({
2373
- slug: z.string().regex(/^[a-z0-9][a-z0-9-]*$/),
2374
- ref: zSpecRef.optional(),
2375
- def: zSpecProjectDef.optional(),
2376
- channels: z.array(zSpecChannelBinding).optional(),
2377
- requirements: z.array(zSpecRequirement).optional(),
2378
- notes: z.string().optional(),
2379
- });
2380
- export const zSpecMcpDef = z.object({
2381
- name: z.string(),
2382
- registrySlug: z.string().optional(),
2383
- type: z.enum(["local", "remote"]).optional(),
2384
- remoteUrl: z.url().optional(),
2385
- auth: z.enum(["oauth", "basic", "api_key", "none", "mcp_provider"]).optional(),
2386
- timeout: z.int().gt(0).lte(9007199254740991).optional(),
2387
- requiredCredentials: z
2388
- .array(z.object({
2389
- name: z.string(),
2390
- description: z.string().optional(),
2391
- }))
2392
- .optional(),
2393
- });
2394
- export const zSpecMcpEntry = z.object({
2395
- slug: z.string().regex(/^[a-z0-9][a-z0-9-]*$/),
2396
- ref: zSpecRef.optional(),
2397
- def: zSpecMcpDef.optional(),
2398
- requirements: z.array(zSpecRequirement).optional(),
2399
- notes: z.string().optional(),
2400
- });
2401
- export const zSpecSkillDef = z.object({
2402
- name: z.string(),
2403
- registrySlug: z.string().optional(),
2404
- purpose: z.string(),
2405
- });
2406
- export const zSpecSkillEntry = z.object({
2407
- slug: z.string().regex(/^[a-z0-9][a-z0-9-]*$/),
2408
- ref: zSpecRef.optional(),
2409
- def: zSpecSkillDef.optional(),
2410
- requirements: z.array(zSpecRequirement).optional(),
2411
- notes: z.string().optional(),
2412
- });
2413
- export const zSpecBrief = z.object({
2414
- goal: z.string(),
2415
- scope: z.string().optional(),
2416
- actors: z.array(z.string()).optional(),
2417
- successCriteria: z.array(z.string()).optional(),
2418
- constraints: z.array(z.string()).optional(),
2419
- openQuestions: z.array(z.string()).optional(),
2420
- });
2421
- export const zSpecMeta = z.object({
2422
- name: z.string(),
2423
- description: z.string().optional(),
2424
- snapshotDate: z.string().optional(),
2425
- notes: z.string().optional(),
2426
- });
2427
- export const zSpec = z.object({
2428
- schemaVersion: z.literal(3),
2429
- meta: zSpecMeta,
2430
- brief: zSpecBrief.optional(),
2431
- pod: zSpecPod.optional(),
2432
- instructions: z.string().optional(),
2433
- initialPrompt: zSpecInitialPrompt.optional(),
2434
- skills: z.array(zSpecSkillEntry),
2435
- mcps: z.array(zSpecMcpEntry),
2436
- projects: z.array(zSpecProjectEntry),
2437
- triggers: z.array(zSpecCronTriggerEntry),
2438
- environment: zSpecEnvironmentEntry.optional(),
2439
- });
2440
2587
  export const zBlueprint = z.object({
2441
2588
  id: z.string(),
2442
2589
  slug: z.string(),
2443
2590
  kind: zBlueprintKind,
2444
- type: zBlueprintType.nullable(),
2591
+ categories: zBlueprintCategories,
2445
2592
  brandColor: z
2446
2593
  .string()
2447
2594
  .regex(/^#[0-9a-f]{6}$/)
2448
2595
  .nullable(),
2596
+ icon: z.string().nullable(),
2449
2597
  name: z.string(),
2450
2598
  description: z.string().nullable(),
2451
2599
  orgId: z.string(),
@@ -2454,7 +2602,6 @@ export const zBlueprint = z.object({
2454
2602
  template: zSpec,
2455
2603
  replays: z.array(z.string()),
2456
2604
  examplePrompts: z.array(z.string().min(1).max(200)).max(6),
2457
- composition: zBlueprintComposition.nullable(),
2458
2605
  websiteMetadata: zWebsiteMetadata.nullable(),
2459
2606
  createdAt: z.iso
2460
2607
  .datetime()
@@ -2487,7 +2634,7 @@ export const zAgentVersionArchiveResult = z.object({
2487
2634
  .nullable(),
2488
2635
  description: z.string().nullable(),
2489
2636
  prompt: z.string().nullable(),
2490
- model: z.string().nullable(),
2637
+ model: zModelSelection.nullable(),
2491
2638
  releaseNotes: z.string().nullable(),
2492
2639
  permission: zPermissionConfig,
2493
2640
  skills: z
@@ -2532,7 +2679,7 @@ export const zAgentVersion = z.object({
2532
2679
  .nullable(),
2533
2680
  description: z.string().nullable(),
2534
2681
  prompt: z.string().nullable(),
2535
- model: z.string().nullable(),
2682
+ model: zModelSelection.nullable(),
2536
2683
  releaseNotes: z.string().nullable(),
2537
2684
  permission: zPermissionConfig,
2538
2685
  skills: z
@@ -2623,6 +2770,19 @@ export const zAgent = z.object({
2623
2770
  publisher: zPublisherPublicView.nullish().default(null),
2624
2771
  latestVersion: zAgentLatestVersion.nullish(),
2625
2772
  });
2773
+ export const zActivation = z.object({
2774
+ steps: z.array(z.enum(["member.invited", "slack.channel.connected", "client.used", "cron_trigger.created", "artifact.created"])),
2775
+ complete: z.boolean(),
2776
+ dismissed: z.boolean(),
2777
+ });
2778
+ /**
2779
+ * Completed checklist steps and whether the checklist is finished or dismissed
2780
+ */
2781
+ export const zActivationGetResponse = zActivation;
2782
+ /**
2783
+ * Checklist state after dismissal
2784
+ */
2785
+ export const zActivationDismissResponse = zActivation;
2626
2786
  export const zAgentListQuery = z.object({
2627
2787
  limit: z.int().gte(1).lte(1000).optional(),
2628
2788
  offset: z.int().gte(0).lte(9007199254740991).optional(),
@@ -2648,7 +2808,7 @@ export const zAgentCreateBody = z.object({
2648
2808
  .default("patch"),
2649
2809
  description: z.string().optional(),
2650
2810
  prompt: z.string().optional(),
2651
- model: z.string().nullish(),
2811
+ model: zModelSelection.nullish(),
2652
2812
  permission: zPermissionConfig.optional(),
2653
2813
  skills: z
2654
2814
  .array(z.object({
@@ -2751,7 +2911,7 @@ export const zAgentVersionCreateBody = z.object({
2751
2911
  .default("patch"),
2752
2912
  description: z.string().optional(),
2753
2913
  prompt: z.string().optional(),
2754
- model: z.string().nullish(),
2914
+ model: zModelSelection.nullish(),
2755
2915
  permission: zPermissionConfig.optional(),
2756
2916
  skills: z
2757
2917
  .array(z.object({
@@ -2800,12 +2960,21 @@ export const zBlueprintListQuery = z.object({
2800
2960
  */
2801
2961
  export const zBlueprintListResponse = z.array(zBlueprint);
2802
2962
  export const zBlueprintCreateBody = z.object({
2963
+ slug: z.string().optional(),
2964
+ kind: zBlueprintKind,
2965
+ categories: zBlueprintCategories.optional(),
2803
2966
  name: z.string().min(1).max(256),
2804
2967
  description: z.string().optional().default(""),
2968
+ brandColor: z
2969
+ .string()
2970
+ .regex(/^#[0-9a-f]{6}$/)
2971
+ .nullish()
2972
+ .default(null),
2973
+ icon: z.string().nullish().default(null),
2974
+ examplePrompts: z.array(z.string().min(1).max(200)).max(6).optional().default([]),
2805
2975
  websiteMetadata: zWebsiteMetadata.nullish().default(null),
2806
- instructions: z.string().optional(),
2807
- initialPrompt: zSpecInitialPrompt.optional(),
2808
- selection: zBlueprintSelection,
2976
+ replays: z.array(z.string()).optional().default([]),
2977
+ spec: zSpec,
2809
2978
  visibility: z.enum(["private", "org"]).optional().default("org"),
2810
2979
  });
2811
2980
  /**
@@ -2817,14 +2986,14 @@ export const zBlueprintPushBody = z.object({
2817
2986
  slug: z.string().optional(),
2818
2987
  name: z.string().min(1).max(256).optional(),
2819
2988
  description: z.string().optional(),
2820
- kind: zBlueprintKind.optional(),
2821
- type: zBlueprintType.nullish(),
2989
+ kind: zBlueprintKind,
2990
+ categories: zBlueprintCategories.optional(),
2822
2991
  examplePrompts: z.array(z.string().min(1).max(200)).max(6).optional(),
2823
2992
  brandColor: z
2824
2993
  .string()
2825
2994
  .regex(/^#[0-9a-f]{6}$/)
2826
2995
  .nullish(),
2827
- composition: zBlueprintComposition.nullish(),
2996
+ icon: z.string().nullish(),
2828
2997
  websiteMetadata: zWebsiteMetadata.nullish(),
2829
2998
  spec: zSpec,
2830
2999
  });
@@ -2832,11 +3001,11 @@ export const zBlueprintPushBody = z.object({
2832
3001
  * Upserted blueprint
2833
3002
  */
2834
3003
  export const zBlueprintPushResponse = zBlueprint;
2835
- export const zBlueprintInstallBody = zBlueprintInstallInput;
3004
+ export const zBlueprintAddBody = zBlueprintAddInput;
2836
3005
  /**
2837
- * Install report
3006
+ * Add report
2838
3007
  */
2839
- export const zBlueprintInstallResponse = zBlueprintInstallReport;
3008
+ export const zBlueprintAddResponse = zBlueprintAddReport;
2840
3009
  export const zBlueprintGetPath = z.object({
2841
3010
  id: z.string().regex(/^blp_[0-9A-HJKMNP-TV-Z]{26}$/),
2842
3011
  });
@@ -2845,12 +3014,19 @@ export const zBlueprintGetPath = z.object({
2845
3014
  */
2846
3015
  export const zBlueprintGetResponse = zBlueprint;
2847
3016
  export const zBlueprintUpdateBody = z.object({
3017
+ kind: zBlueprintKind.optional(),
3018
+ categories: zBlueprintCategories.optional(),
2848
3019
  name: z.string().min(1).max(256).optional(),
2849
3020
  description: z.string().optional(),
3021
+ brandColor: z
3022
+ .string()
3023
+ .regex(/^#[0-9a-f]{6}$/)
3024
+ .nullish(),
3025
+ icon: z.string().nullish(),
3026
+ examplePrompts: z.array(z.string().min(1).max(200)).max(6).optional(),
2850
3027
  websiteMetadata: zWebsiteMetadata.nullish(),
2851
- instructions: z.string().optional(),
2852
- initialPrompt: zSpecInitialPrompt.nullish(),
2853
- selection: zBlueprintSelection.optional(),
3028
+ replays: z.array(z.string()).optional(),
3029
+ spec: zSpec.optional(),
2854
3030
  });
2855
3031
  export const zBlueprintUpdatePath = z.object({
2856
3032
  id: z.string().regex(/^blp_[0-9A-HJKMNP-TV-Z]{26}$/),
@@ -2946,7 +3122,7 @@ export const zBillingGetResponse = z.object({
2946
3122
  });
2947
3123
  export const zBillingUsageQuery = z.object({
2948
3124
  groupBy: z
2949
- .enum(["user", "member", "agent", "model", "session", "project", "pod", "source"])
3125
+ .enum(["user", "member", "agent", "model", "session", "project", "pod", "source", "servedBy"])
2950
3126
  .optional()
2951
3127
  .default("source"),
2952
3128
  start: z.iso
@@ -3412,6 +3588,72 @@ export const zGoogleConnectQuery = z.object({
3412
3588
  * Authorization URL for the user to visit
3413
3589
  */
3414
3590
  export const zGoogleConnectResponse = zGoogleWorkspaceOAuthStartResult;
3591
+ /**
3592
+ * Seat health and provider usage
3593
+ */
3594
+ export const zInferenceSubscriptionsListResponse = z.array(zInferenceSubscriptionSeat);
3595
+ export const zInferenceSubscriptionsOauthStartBody = zInferenceOauthStartInput;
3596
+ /**
3597
+ * Where to authorize, and when this attempt stops being valid
3598
+ */
3599
+ export const zInferenceSubscriptionsOauthStartResponse = zInferenceOauthStart;
3600
+ export const zInferenceSubscriptionsOauthCompleteBody = zInferenceOauthCompleteInput;
3601
+ /**
3602
+ * The connected seat
3603
+ */
3604
+ export const zInferenceSubscriptionsOauthCompleteResponse = zInferenceSubscriptionSeat;
3605
+ export const zInferenceSubscriptionsCodexDeviceStartBody = zInferenceCodexDeviceStartInput;
3606
+ /**
3607
+ * The code to enter, and where to enter it
3608
+ */
3609
+ export const zInferenceSubscriptionsCodexDeviceStartResponse = zInferenceCodexDeviceStart;
3610
+ export const zInferenceSubscriptionsCodexDevicePollPath = z.object({
3611
+ id: z.string(),
3612
+ });
3613
+ /**
3614
+ * Whether the device code has been approved yet
3615
+ */
3616
+ export const zInferenceSubscriptionsCodexDevicePollResponse = zInferenceCodexDeviceStatus;
3617
+ /**
3618
+ * The published Codex models
3619
+ */
3620
+ export const zInferenceHarnessesCodexCatalogResponse = zInferenceCodexCatalog;
3621
+ export const zInferenceSubscriptionsConnectCodexBody = zInferenceConnectCodexInput;
3622
+ /**
3623
+ * The connected seat
3624
+ */
3625
+ export const zInferenceSubscriptionsConnectCodexResponse = zInferenceSubscriptionSeat;
3626
+ export const zInferenceSubscriptionsRemovePath = z.object({
3627
+ id: z.string(),
3628
+ });
3629
+ /**
3630
+ * Removed
3631
+ */
3632
+ export const zInferenceSubscriptionsRemoveResponse = z.void();
3633
+ export const zInferenceSubscriptionsRenameBody = zInferenceSubscriptionRenameInput;
3634
+ export const zInferenceSubscriptionsRenamePath = z.object({
3635
+ id: z.string(),
3636
+ });
3637
+ /**
3638
+ * The renamed seat
3639
+ */
3640
+ export const zInferenceSubscriptionsRenameResponse = zInferenceSubscriptionSeat;
3641
+ /**
3642
+ * The caller's keys, or every key in the organization for admins
3643
+ */
3644
+ export const zInferenceKeysListResponse = z.array(zInferenceKey);
3645
+ export const zInferenceKeysCreateBody = zInferenceKeyCreateInput;
3646
+ /**
3647
+ * The new key; the secret is shown exactly once
3648
+ */
3649
+ export const zInferenceKeysCreateResponse = zInferenceKeyCreated;
3650
+ export const zInferenceKeysRevokePath = z.object({
3651
+ id: z.string(),
3652
+ });
3653
+ /**
3654
+ * Revoked
3655
+ */
3656
+ export const zInferenceKeysRevokeResponse = z.void();
3415
3657
  /**
3416
3658
  * OAuth apps
3417
3659
  */
@@ -3736,9 +3978,11 @@ export const zOnboardingStartBody = z.object({
3736
3978
  prompt: z.string().min(1).max(8000),
3737
3979
  skillIds: z.array(z.string()).max(64).optional().default([]),
3738
3980
  mcpIds: z.array(z.string()).max(64).optional().default([]),
3981
+ persona: z.string().max(64).nullish(),
3982
+ channels: z.array(z.string().max(32)).max(16).optional().default([]),
3739
3983
  });
3740
3984
  /**
3741
- * Session created and prompt sent
3985
+ * Session created and initial prompt prepared
3742
3986
  */
3743
3987
  export const zOnboardingStartResponse = zOnboardingStart;
3744
3988
  /**
@@ -3750,7 +3994,7 @@ export const zOnboardingSetupPersonalOrgResponse = zOnboardingSetupPersonalOrg;
3750
3994
  */
3751
3995
  export const zOrgGetResponse = zOrgSettings;
3752
3996
  export const zOrgUpdateBody = z.object({
3753
- defaultModel: z.string().nullish(),
3997
+ defaultModel: zModelSelection.nullish(),
3754
3998
  instructions: z.string().optional(),
3755
3999
  });
3756
4000
  /**
@@ -3832,7 +4076,7 @@ export const zPodUpdateBody = z.object({
3832
4076
  description: z.string().optional(),
3833
4077
  isPrivate: z.boolean().optional(),
3834
4078
  environmentId: z.string().nullish(),
3835
- defaultModel: z.string().nullish(),
4079
+ defaultModel: zModelSelection.nullish(),
3836
4080
  instructions: z.string().optional(),
3837
4081
  presetTemplate: zPresetTemplate.optional(),
3838
4082
  });
@@ -3847,7 +4091,7 @@ export const zPodUsagePath = z.object({
3847
4091
  id: z.string().regex(/^pod_[0-9A-HJKMNP-TV-Z]{26}$/),
3848
4092
  });
3849
4093
  export const zPodUsageQuery = z.object({
3850
- groupBy: z.enum(["user", "member", "agent", "model", "session", "project", "pod", "source"]).optional(),
4094
+ groupBy: z.enum(["user", "member", "agent", "model", "session", "project", "pod", "source", "servedBy"]).optional(),
3851
4095
  start: z.iso
3852
4096
  .datetime()
3853
4097
  .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))$/)
@@ -4086,7 +4330,7 @@ export const zProjectUpdateBody = z.object({
4086
4330
  permission: zPermissionConfig.optional(),
4087
4331
  gitRepos: z.array(zProjectGitRepo).optional(),
4088
4332
  references: zProjectReferences.optional(),
4089
- defaultModel: z.string().nullish(),
4333
+ defaultModel: zModelSelection.nullish(),
4090
4334
  instructions: z.string().optional(),
4091
4335
  });
4092
4336
  export const zProjectUpdatePath = z.object({
@@ -4100,7 +4344,7 @@ export const zProjectUsagePath = z.object({
4100
4344
  id: z.string().regex(/^prj_[0-9A-HJKMNP-TV-Z]{26}$/),
4101
4345
  });
4102
4346
  export const zProjectUsageQuery = z.object({
4103
- groupBy: z.enum(["user", "member", "agent", "model", "session", "project", "pod", "source"]).optional(),
4347
+ groupBy: z.enum(["user", "member", "agent", "model", "session", "project", "pod", "source", "servedBy"]).optional(),
4104
4348
  start: z.iso
4105
4349
  .datetime()
4106
4350
  .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))$/)
@@ -4750,6 +4994,91 @@ export const zSkillVersionArchivePath = z.object({
4750
4994
  * Archived skill version
4751
4995
  */
4752
4996
  export const zSkillVersionArchiveResponse = zSkillVersion;
4997
+ export const zTaskListQuery = z.object({
4998
+ limit: z.int().gte(1).lte(1000).optional(),
4999
+ offset: z.int().gte(0).lte(9007199254740991).optional(),
5000
+ includeDeprecated: z.boolean().optional(),
5001
+ orgId: z.string().optional(),
5002
+ userId: z.string().nullish(),
5003
+ visibility: z.enum(["private", "pod", "org"]).optional(),
5004
+ status: z.enum(["open", "in_progress", "done", "dismissed"]).optional(),
5005
+ priority: z.enum(["low", "medium", "high"]).optional(),
5006
+ label: z.string().optional(),
5007
+ podId: z.string().optional(),
5008
+ projectId: z.string().optional(),
5009
+ assignedToUserId: z.string().optional(),
5010
+ assignedToProjectAgentId: z.string().optional(),
5011
+ includeDone: z.boolean().optional(),
5012
+ });
5013
+ /**
5014
+ * List of tasks
5015
+ */
5016
+ export const zTaskListResponse = z.array(zTask);
5017
+ export const zTaskCreateBody = z.object({
5018
+ title: z.string().min(1).max(256),
5019
+ description: z.string().nullish().default(null),
5020
+ status: z.enum(["open", "in_progress", "done", "dismissed"]).optional().default("open"),
5021
+ priority: z.enum(["low", "medium", "high"]).nullish().default(null),
5022
+ labels: z.array(z.string()).optional(),
5023
+ links: z.array(z.string()).optional(),
5024
+ dueAt: z.iso
5025
+ .datetime()
5026
+ .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))$/)
5027
+ .nullish()
5028
+ .default(null),
5029
+ podId: z.string().nullish().default(null),
5030
+ projectId: z.string().nullish().default(null),
5031
+ assignedToUserId: z.string().nullish().default(null),
5032
+ assignedToProjectAgentId: z.string().nullish().default(null),
5033
+ visibility: z.enum(["private", "org"]).optional().default("org"),
5034
+ });
5035
+ /**
5036
+ * Created task
5037
+ */
5038
+ export const zTaskCreateResponse = zTask;
5039
+ export const zTaskArchivePath = z.object({
5040
+ id: z.string().regex(/^tsk_[0-9A-HJKMNP-TV-Z]{26}$/),
5041
+ });
5042
+ /**
5043
+ * Archived task
5044
+ */
5045
+ export const zTaskArchiveResponse = zTask;
5046
+ export const zTaskGetPath = z.object({
5047
+ id: z.string().regex(/^tsk_[0-9A-HJKMNP-TV-Z]{26}$/),
5048
+ });
5049
+ export const zTaskGetQuery = z.object({
5050
+ includeEvents: z.boolean().optional(),
5051
+ });
5052
+ /**
5053
+ * Task details
5054
+ */
5055
+ export const zTaskGetResponse = zTaskDetail;
5056
+ /**
5057
+ * Partial patch — the only way to change a task. An omitted field is left alone; an explicit `null` clears one, so `assignedToUserId: null` unassigns the human owner and `assignedToProjectAgentId: null` unassigns the agent. Move `status` to `done` when the work is finished, or to `dismissed` to reject a suggestion — a dismissed task stays queryable, so it is not proposed again. Changing `projectId` re-derives `podId`.
5058
+ */
5059
+ export const zTaskUpdateBody = z.object({
5060
+ title: z.string().min(1).max(256).optional(),
5061
+ description: z.string().nullish(),
5062
+ status: z.enum(["open", "in_progress", "done", "dismissed"]).optional(),
5063
+ priority: z.enum(["low", "medium", "high"]).nullish(),
5064
+ labels: z.array(z.string()).optional(),
5065
+ links: z.array(z.string()).optional(),
5066
+ dueAt: z.iso
5067
+ .datetime()
5068
+ .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))$/)
5069
+ .nullish(),
5070
+ podId: z.string().nullish(),
5071
+ projectId: z.string().nullish(),
5072
+ assignedToUserId: z.string().nullish(),
5073
+ assignedToProjectAgentId: z.string().nullish(),
5074
+ });
5075
+ export const zTaskUpdatePath = z.object({
5076
+ id: z.string().regex(/^tsk_[0-9A-HJKMNP-TV-Z]{26}$/),
5077
+ });
5078
+ /**
5079
+ * Updated task
5080
+ */
5081
+ export const zTaskUpdateResponse = zTask;
4753
5082
  /**
4754
5083
  * Agent-stack topology
4755
5084
  */
@@ -4789,7 +5118,7 @@ export const zCronTriggerListResponse = z.array(zCronTrigger);
4789
5118
  export const zCronTriggerCreateBody = z.object({
4790
5119
  projectAgentId: z.string().nullish().default(null),
4791
5120
  inputMessage: z.string(),
4792
- model: z.string().nullish().default(null),
5121
+ model: zModelSelection.nullish().default(null),
4793
5122
  schedule: z.string(),
4794
5123
  timezone: z.string().optional().default("UTC"),
4795
5124
  until: z.iso
@@ -4817,7 +5146,7 @@ export const zCronTriggerGetResponse = zCronTriggerDetail;
4817
5146
  export const zCronTriggerUpdateBody = z.object({
4818
5147
  projectAgentId: z.string().nullish(),
4819
5148
  inputMessage: z.string().optional(),
4820
- model: z.string().nullish(),
5149
+ model: zModelSelection.nullish(),
4821
5150
  schedule: z.string().optional(),
4822
5151
  timezone: z.string().optional(),
4823
5152
  until: z.iso
@@ -5212,6 +5541,11 @@ export const zRegistryBlueprintListQuery = z.object({
5212
5541
  limit: z.int().gte(1).lte(1000).optional(),
5213
5542
  offset: z.int().gte(0).lte(9007199254740991).optional(),
5214
5543
  includeDeprecated: z.boolean().optional(),
5544
+ kind: zBlueprintKind.optional(),
5545
+ usecase: z.string().min(1).optional(),
5546
+ role: z.string().min(1).optional(),
5547
+ function: z.string().min(1).optional(),
5548
+ vertical: z.string().min(1).optional(),
5215
5549
  });
5216
5550
  /**
5217
5551
  * Published blueprint list