@kammcs/buildit-mcp 0.8.0 → 0.10.0

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.
@@ -2,7 +2,7 @@
2
2
  * Exact schemas for the agent API: closed objects and enums, patterns and bounds. The test fake uses them to check requests and its own responses against the contract; the server parses responses with the tolerant schemas.ts.
3
3
  *
4
4
  * GENERATED by scripts/generate.ts from openapi/openapi.json (agent API
5
- * 1.9.0). Do not edit: change the contract, then run
5
+ * 1.11.0). Do not edit: change the contract, then run
6
6
  * `npm run generate`.
7
7
  */
8
8
  import { z } from 'zod';
@@ -93,6 +93,7 @@ export const EntityKindSchema = z.enum([
93
93
  'agent',
94
94
  'approval',
95
95
  'handoff',
96
+ 'upload',
96
97
  ]);
97
98
  export const EstimateSchema = z.number().min(0).max(9999.99);
98
99
  export const EstimateScaleSchema = z.enum(['none', 'points', 'tshirt']);
@@ -114,6 +115,7 @@ export const FieldKindSchema = z.enum([
114
115
  'url',
115
116
  'checkbox',
116
117
  ]);
118
+ export const FileKindSchema = z.enum(['image', 'video', 'text', 'other']);
117
119
  export const InitiativeKeySchema = z
118
120
  .string()
119
121
  .regex(new RegExp('^[A-Z][A-Z0-9]{1,5}-[1-9][0-9]{0,8}$', 'u'));
@@ -202,6 +204,7 @@ export const RateLimitsSchema = z.strictObject({
202
204
  typing_per_minute: z.int().optional(),
203
205
  approvals_per_minute: z.int().optional(),
204
206
  handoffs_per_minute: z.int().optional(),
207
+ files_per_minute: z.int().optional(),
205
208
  });
206
209
  export const ReleaseRefSchema = z.string().min(1).max(80);
207
210
  export const ReleaseStatusSchema = z.enum(['unreleased', 'released', 'archived']);
@@ -213,6 +216,8 @@ export const ScopeSchema = z.enum([
213
216
  'pages:read',
214
217
  'pages:write',
215
218
  'chat:read',
219
+ 'files:read',
220
+ 'files:write',
216
221
  ]);
217
222
  export const SearchMatchSchema = z.strictObject({
218
223
  score: z.number(),
@@ -290,6 +295,19 @@ export const BoardColumnSchema = z.strictObject({
290
295
  });
291
296
  export const ChannelBriefSchema = z.strictObject({ id: UuidSchema, name: z.string() });
292
297
  export const CloseSessionCardResponseSchema = z.strictObject({ closed_at: TimestampSchema });
298
+ export const CompleteSessionUploadResponseSchema = z.strictObject({
299
+ upload: z.strictObject({
300
+ id: UuidSchema,
301
+ status: z.enum(['ready', 'posted']),
302
+ content_type: z.string(),
303
+ kind: FileKindSchema,
304
+ size_bytes: z.int().min(0),
305
+ width: z.int().min(1).optional(),
306
+ height: z.int().min(1).optional(),
307
+ duration_ms: z.int().min(1).optional(),
308
+ thumbnail: z.boolean(),
309
+ }),
310
+ });
293
311
  export const ConnectPollRequestSchema = z.strictObject({ device_code: DeviceCodeSchema });
294
312
  export const ConnectStartRequestSchema = z.strictObject({
295
313
  client: z.string().min(1).max(100),
@@ -341,6 +359,28 @@ export const CreateReleaseRequestSchema = z.strictObject({
341
359
  start_date: DateSchema.optional(),
342
360
  target_date: DateSchema.optional(),
343
361
  });
362
+ export const CreateSessionAttachmentLinkRequestSchema = z.strictObject({
363
+ message_id: UuidSchema,
364
+ file_id: UuidSchema.optional(),
365
+ variant: z.enum(['original', 'thumbnail']).optional(),
366
+ auto: z.boolean().optional(),
367
+ });
368
+ export const CreateSessionUploadRequestSchema = z.strictObject({
369
+ id: UuidSchema,
370
+ thread_id: UuidSchema.optional(),
371
+ file_name: z.string().min(1).max(255),
372
+ content_type: z.string().min(1).max(255),
373
+ size_bytes: z.int().min(0),
374
+ duration_ms: z.int().min(1).max(86400000).optional(),
375
+ thumbnail: z
376
+ .strictObject({
377
+ content_type: z.enum(['image/jpeg', 'image/webp']),
378
+ size_bytes: z.int().min(1).max(65536),
379
+ width: z.int().min(1).max(320),
380
+ height: z.int().min(1).max(320),
381
+ })
382
+ .optional(),
383
+ });
344
384
  export const CreateSprintRequestSchema = z.strictObject({
345
385
  name: z.string().min(1).max(80),
346
386
  goal: z.string().max(500).optional(),
@@ -444,6 +484,8 @@ export const ErrorSchema = z.strictObject({
444
484
  'pages:read',
445
485
  'pages:write',
446
486
  'chat:read',
487
+ 'files:read',
488
+ 'files:write',
447
489
  ]),
448
490
  granted: z.array(z.enum([
449
491
  'projects:read',
@@ -453,6 +495,8 @@ export const ErrorSchema = z.strictObject({
453
495
  'pages:read',
454
496
  'pages:write',
455
497
  'chat:read',
498
+ 'files:read',
499
+ 'files:write',
456
500
  ])),
457
501
  }),
458
502
  }),
@@ -636,6 +680,7 @@ export const ErrorSchema = z.strictObject({
636
680
  'session_typing_per_minute',
637
681
  'session_approvals_per_minute',
638
682
  'session_handoffs_per_minute',
683
+ 'session_files_per_minute',
639
684
  ]),
640
685
  }),
641
686
  }),
@@ -894,6 +939,132 @@ export const ErrorSchema = z.strictObject({
894
939
  .regex(new RegExp('^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$', 'u')),
895
940
  }),
896
941
  }),
942
+ z.strictObject({
943
+ code: z.literal('files_off'),
944
+ message: z.string().min(1),
945
+ hint: z.string().optional(),
946
+ details: z.strictObject({ by: z.enum(['platform']) }),
947
+ }),
948
+ z.strictObject({
949
+ code: z.literal('attachment_not_found'),
950
+ message: z.string().min(1),
951
+ hint: z.string().optional(),
952
+ details: z.strictObject({
953
+ message_id: z
954
+ .string()
955
+ .regex(new RegExp('^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$', 'u')),
956
+ file_id: z
957
+ .string()
958
+ .regex(new RegExp('^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$', 'u'))
959
+ .nullable(),
960
+ reason: z.enum(['no_thumbnail']).optional(),
961
+ }),
962
+ }),
963
+ z.strictObject({
964
+ code: z.literal('file_required'),
965
+ message: z.string().min(1),
966
+ hint: z.string().optional(),
967
+ details: z.strictObject({
968
+ message_id: z
969
+ .string()
970
+ .regex(new RegExp('^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$', 'u')),
971
+ files: z.int().min(2),
972
+ }),
973
+ }),
974
+ z.strictObject({
975
+ code: z.literal('not_ready'),
976
+ message: z.string().min(1),
977
+ hint: z.string().optional(),
978
+ details: z.strictObject({
979
+ file_id: z
980
+ .string()
981
+ .regex(new RegExp('^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$', 'u')),
982
+ }),
983
+ }),
984
+ z.strictObject({
985
+ code: z.literal('budget_exceeded'),
986
+ message: z.string().min(1),
987
+ hint: z.string().optional(),
988
+ details: z.strictObject({
989
+ kind: z.enum(['download', 'upload']),
990
+ limit_bytes: z.int().min(0),
991
+ used_bytes: z.int().min(0),
992
+ limit_files: z.int().min(0),
993
+ used_files: z.int().min(0),
994
+ resets_at: z.string(),
995
+ }),
996
+ }),
997
+ z.strictObject({
998
+ code: z.literal('name_not_allowed'),
999
+ message: z.string().min(1),
1000
+ hint: z.string().optional(),
1001
+ details: z.strictObject({ file_name: z.string() }),
1002
+ }),
1003
+ z.strictObject({
1004
+ code: z.literal('too_large'),
1005
+ message: z.string().min(1),
1006
+ hint: z.string().optional(),
1007
+ details: z.strictObject({ max_bytes: z.int().min(1) }),
1008
+ }),
1009
+ z.strictObject({
1010
+ code: z.literal('blocked_type'),
1011
+ message: z.string().min(1),
1012
+ hint: z.string().optional(),
1013
+ details: z.strictObject({}),
1014
+ }),
1015
+ z.strictObject({
1016
+ code: z.literal('too_many_pending'),
1017
+ message: z.string().min(1),
1018
+ hint: z.string().optional(),
1019
+ details: z.strictObject({ max: z.int().min(1) }),
1020
+ }),
1021
+ z.strictObject({
1022
+ code: z.literal('upload_missing'),
1023
+ message: z.string().min(1),
1024
+ hint: z.string().optional(),
1025
+ details: z.strictObject({}),
1026
+ }),
1027
+ z.strictObject({
1028
+ code: z.literal('upload_mismatch'),
1029
+ message: z.string().min(1),
1030
+ hint: z.string().optional(),
1031
+ details: z.strictObject({ mismatch: z.enum(['size', 'type', 'not_video']) }),
1032
+ }),
1033
+ z.strictObject({
1034
+ code: z.literal('location_found'),
1035
+ message: z.string().min(1),
1036
+ hint: z.string().optional(),
1037
+ details: z.strictObject({}),
1038
+ }),
1039
+ z.strictObject({
1040
+ code: z.literal('credential_found'),
1041
+ message: z.string().min(1),
1042
+ hint: z.string().optional(),
1043
+ details: z.strictObject({
1044
+ lines: z.array(z.int().min(1)).max(20),
1045
+ kinds: z.array(z.string()),
1046
+ }),
1047
+ }),
1048
+ z.strictObject({
1049
+ code: z.literal('upload_used'),
1050
+ message: z.string().min(1),
1051
+ hint: z.string().optional(),
1052
+ details: z.strictObject({
1053
+ upload_id: z
1054
+ .string()
1055
+ .regex(new RegExp('^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$', 'u')),
1056
+ }),
1057
+ }),
1058
+ z.strictObject({
1059
+ code: z.literal('upload_thread_mismatch'),
1060
+ message: z.string().min(1),
1061
+ hint: z.string().optional(),
1062
+ details: z.strictObject({
1063
+ upload_id: z
1064
+ .string()
1065
+ .regex(new RegExp('^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$', 'u')),
1066
+ }),
1067
+ }),
897
1068
  ]),
898
1069
  });
899
1070
  export const FeedbackSchema = z.strictObject({
@@ -1027,11 +1198,18 @@ export const PostPlanCardRequestSchema = z.strictObject({
1027
1198
  });
1028
1199
  export const PostSessionMessageRequestSchema = z.strictObject({
1029
1200
  id: UuidSchema,
1030
- text: SessionTextSchema,
1201
+ text: SessionTextSchema.optional(),
1031
1202
  thread_id: UuidSchema.optional(),
1032
1203
  reply_to_id: UuidSchema.optional(),
1033
1204
  conversation_id: UuidSchema.optional(),
1034
1205
  card: QuestionCardSchema.optional(),
1206
+ files: z.array(UuidSchema).min(1).max(10).optional(),
1207
+ });
1208
+ export const PresignedPutSchema = z.strictObject({
1209
+ url: z.string(),
1210
+ method: z.literal('PUT'),
1211
+ headers: z.record(z.string(), z.string()),
1212
+ expires_at: TimestampSchema,
1035
1213
  });
1036
1214
  export const ProjectBriefSchema = z.strictObject({
1037
1215
  id: UuidSchema,
@@ -1153,52 +1331,6 @@ export const SessionChildItemSchema = z.strictObject({
1153
1331
  .strictObject({ key: z.string().nullable(), name: z.string().nullable(), category: z.string() })
1154
1332
  .nullable(),
1155
1333
  });
1156
- export const SessionChildResultSchema = z.strictObject({
1157
- untrusted: z.literal(true),
1158
- message: z.strictObject({
1159
- id: UuidSchema,
1160
- author: z.strictObject({
1161
- kind: z.enum(['user', 'app', 'agent']),
1162
- id: UuidSchema.nullable(),
1163
- name: z.string(),
1164
- }),
1165
- from_owner: z.boolean(),
1166
- via_agent: z.string().nullable(),
1167
- text: z.string(),
1168
- created_at: TimestampSchema,
1169
- }),
1170
- });
1171
- export const SessionContextMessageSchema = z.strictObject({
1172
- id: UuidSchema,
1173
- author: z.strictObject({
1174
- kind: z.enum(['user', 'app', 'agent']),
1175
- id: UuidSchema.nullable(),
1176
- name: z.string(),
1177
- }),
1178
- from_owner: z.boolean(),
1179
- via_agent: z.string().nullable().optional(),
1180
- text: z.string(),
1181
- created_at: TimestampSchema,
1182
- });
1183
- export const SessionEventMessageSchema = z.strictObject({
1184
- id: UuidSchema,
1185
- thread_id: UuidSchema.nullable(),
1186
- reply_to_id: UuidSchema.nullable(),
1187
- text: z.string(),
1188
- mentions: z.array(UuidSchema),
1189
- has_card: z.boolean(),
1190
- created_at: TimestampSchema,
1191
- edited_at: TimestampSchema.nullable(),
1192
- via_agent: z.string().nullable().optional(),
1193
- forwarded: z.boolean(),
1194
- forwarded_from: z
1195
- .strictObject({
1196
- message_id: UuidSchema,
1197
- user: z.strictObject({ id: UuidSchema, name: z.string() }).nullable(),
1198
- app: z.strictObject({ id: UuidSchema, name: z.string() }).nullable(),
1199
- })
1200
- .nullable(),
1201
- });
1202
1334
  export const SessionEventProjectSchema = z.strictObject({ id: UuidSchema, key: z.string() });
1203
1335
  export const SessionEventUserSchema = z.strictObject({
1204
1336
  id: UuidSchema,
@@ -1206,6 +1338,18 @@ export const SessionEventUserSchema = z.strictObject({
1206
1338
  is_guest: z.boolean(),
1207
1339
  locale: z.string().nullable(),
1208
1340
  });
1341
+ export const SessionFileSchema = z.strictObject({
1342
+ id: UuidSchema,
1343
+ name: z.string(),
1344
+ type: z.string(),
1345
+ size_bytes: z.int().min(0),
1346
+ kind: FileKindSchema,
1347
+ width: z.int().min(1).optional(),
1348
+ height: z.int().min(1).optional(),
1349
+ duration_ms: z.int().min(1).optional(),
1350
+ alt: z.string().optional(),
1351
+ position: z.int().min(0),
1352
+ });
1209
1353
  export const SessionHeartbeatRequestSchema = z.strictObject({ state: SessionStateSchema });
1210
1354
  export const SessionHeartbeatResponseSchema = z.strictObject({
1211
1355
  state: SessionStateSchema,
@@ -1217,6 +1361,16 @@ export const SessionItemStatusSchema = z.strictObject({
1217
1361
  name: z.string().nullable(),
1218
1362
  category: z.string(),
1219
1363
  });
1364
+ export const SessionLinkFileSchema = z.strictObject({
1365
+ id: UuidSchema,
1366
+ name: z.string(),
1367
+ type: z.string(),
1368
+ size_bytes: z.int().min(0),
1369
+ kind: FileKindSchema,
1370
+ width: z.int().min(1).optional(),
1371
+ height: z.int().min(1).optional(),
1372
+ duration_ms: z.int().min(1).optional(),
1373
+ });
1220
1374
  export const SessionOwnerSchema = z.strictObject({ id: UuidSchema, name: z.string() });
1221
1375
  export const SessionRuleSchema = z.union([
1222
1376
  z.strictObject({
@@ -1432,6 +1586,8 @@ export const CommentSchema = z.strictObject({
1432
1586
  created_at: TimestampSchema,
1433
1587
  edited_at: TimestampSchema.nullable(),
1434
1588
  via_agent: z.string().nullable(),
1589
+ kind: MessageKindSchema.optional(),
1590
+ system_event: z.string().nullable().optional(),
1435
1591
  });
1436
1592
  export const CompleteSprintResponseSchema = z.strictObject({
1437
1593
  sprint: SprintSchema,
@@ -1472,6 +1628,31 @@ export const CreateItemRequestSchema = z.strictObject({
1472
1628
  position: RankPositionSchema.optional(),
1473
1629
  idempotency_key: UuidSchema.optional(),
1474
1630
  });
1631
+ export const CreateSessionAttachmentLinkResponseSchema = z.strictObject({
1632
+ url: z.string(),
1633
+ method: z.literal('GET'),
1634
+ expires_at: TimestampSchema,
1635
+ variant: z.enum(['original', 'thumbnail']),
1636
+ file: SessionLinkFileSchema,
1637
+ message: z.strictObject({
1638
+ id: UuidSchema,
1639
+ thread_id: UuidSchema.nullable(),
1640
+ author: z
1641
+ .strictObject({ kind: z.enum(['user', 'app']), id: UuidSchema.nullable(), name: z.string() })
1642
+ .nullable(),
1643
+ from_owner: z.boolean(),
1644
+ via_agent: z.string().nullable(),
1645
+ forwarded: z.boolean(),
1646
+ forwarded_from: z
1647
+ .strictObject({
1648
+ message_id: UuidSchema,
1649
+ user: z.strictObject({ id: UuidSchema, name: z.string() }).nullable(),
1650
+ app: z.strictObject({ id: UuidSchema, name: z.string() }).nullable(),
1651
+ })
1652
+ .nullable(),
1653
+ }),
1654
+ budget: z.strictObject({ down_bytes_left: z.int().min(0), resets_at: TimestampSchema }),
1655
+ });
1475
1656
  export const CustomValueOutSchema = z.union([
1476
1657
  z.string(),
1477
1658
  z.number(),
@@ -1753,6 +1934,35 @@ export const SessionCardResponseDataSchema = z.strictObject({
1753
1934
  pseudonym: z.string().nullable(),
1754
1935
  private: z.unknown(),
1755
1936
  });
1937
+ export const SessionChildResultSchema = z.strictObject({
1938
+ untrusted: z.literal(true),
1939
+ message: z.strictObject({
1940
+ id: UuidSchema,
1941
+ author: z.strictObject({
1942
+ kind: z.enum(['user', 'app', 'agent']),
1943
+ id: UuidSchema.nullable(),
1944
+ name: z.string(),
1945
+ }),
1946
+ from_owner: z.boolean(),
1947
+ via_agent: z.string().nullable(),
1948
+ text: z.string(),
1949
+ created_at: TimestampSchema,
1950
+ files: z.array(SessionFileSchema).max(10).optional(),
1951
+ }),
1952
+ });
1953
+ export const SessionContextMessageSchema = z.strictObject({
1954
+ id: UuidSchema,
1955
+ author: z.strictObject({
1956
+ kind: z.enum(['user', 'app', 'agent']),
1957
+ id: UuidSchema.nullable(),
1958
+ name: z.string(),
1959
+ }),
1960
+ from_owner: z.boolean(),
1961
+ via_agent: z.string().nullable().optional(),
1962
+ text: z.string(),
1963
+ created_at: TimestampSchema,
1964
+ files: z.array(SessionFileSchema).max(10).optional(),
1965
+ });
1756
1966
  export const SessionEventItemSchema = z.strictObject({
1757
1967
  id: UuidSchema,
1758
1968
  key: z.string(),
@@ -1767,16 +1977,32 @@ export const SessionEventItemSchema = z.strictObject({
1767
1977
  description_excerpt: z.string().optional(),
1768
1978
  description_truncated: z.boolean().optional(),
1769
1979
  });
1980
+ export const SessionEventMessageSchema = z.strictObject({
1981
+ id: UuidSchema,
1982
+ thread_id: UuidSchema.nullable(),
1983
+ reply_to_id: UuidSchema.nullable(),
1984
+ text: z.string(),
1985
+ mentions: z.array(UuidSchema),
1986
+ has_card: z.boolean(),
1987
+ created_at: TimestampSchema,
1988
+ edited_at: TimestampSchema.nullable(),
1989
+ via_agent: z.string().nullable().optional(),
1990
+ forwarded: z.boolean(),
1991
+ forwarded_from: z
1992
+ .strictObject({
1993
+ message_id: UuidSchema,
1994
+ user: z.strictObject({ id: UuidSchema, name: z.string() }).nullable(),
1995
+ app: z.strictObject({ id: UuidSchema, name: z.string() }).nullable(),
1996
+ })
1997
+ .nullable(),
1998
+ files: z.array(SessionFileSchema).max(10).optional(),
1999
+ });
1770
2000
  export const SessionItemAssignmentSchema = z.strictObject({
1771
2001
  agent: AgentBriefSchema,
1772
2002
  owner: SessionOwnerSchema,
1773
2003
  by: SessionEventUserSchema.nullable(),
1774
2004
  at: TimestampSchema,
1775
2005
  });
1776
- export const SessionItemContextSchema = z.strictObject({
1777
- untrusted: z.literal(true),
1778
- messages: z.array(SessionContextMessageSchema).max(10),
1779
- });
1780
2006
  export const SessionMessageSchema = z.strictObject({
1781
2007
  id: UuidSchema,
1782
2008
  conversation_id: UuidSchema,
@@ -1806,6 +2032,13 @@ export const SessionResponseSchema = z.strictObject({
1806
2032
  org: z.strictObject({ id: UuidSchema, name: z.string() }),
1807
2033
  dm: z.strictObject({ conversation_id: UuidSchema }),
1808
2034
  poll_interval_s: z.int().min(1),
2035
+ files_budget: z
2036
+ .strictObject({
2037
+ down_bytes_left: z.int().min(0),
2038
+ up_bytes_left: z.int().min(0),
2039
+ resets_at: TimestampSchema,
2040
+ })
2041
+ .optional(),
1809
2042
  });
1810
2043
  export const SessionThreadSchema = z.strictObject({
1811
2044
  thread_id: UuidSchema,
@@ -1843,6 +2076,17 @@ export const SessionThreadSchema = z.strictObject({
1843
2076
  .nullable()
1844
2077
  .optional(),
1845
2078
  });
2079
+ export const SessionUploadSchema = z.strictObject({
2080
+ id: UuidSchema,
2081
+ file_name: z.string(),
2082
+ content_type: z.string(),
2083
+ size_bytes: z.int().min(0),
2084
+ kind: FileKindSchema,
2085
+ status: z.enum(['uploading', 'ready', 'posted']),
2086
+ thread_id: UuidSchema.nullable(),
2087
+ put: PresignedPutSchema.optional(),
2088
+ thumbnail_put: PresignedPutSchema.optional(),
2089
+ });
1846
2090
  export const SprintItemsResponseSchema = z.strictObject({
1847
2091
  sprint: SprintSchema,
1848
2092
  changed: z.array(ItemBriefSchema),
@@ -1941,6 +2185,10 @@ export const CreateProjectResponseSchema = z.strictObject({
1941
2185
  project: ProjectSummarySchema,
1942
2186
  created: z.boolean(),
1943
2187
  });
2188
+ export const CreateSessionUploadResponseSchema = z.strictObject({
2189
+ created: z.boolean(),
2190
+ upload: SessionUploadSchema,
2191
+ });
1944
2192
  export const CustomFieldValueSchema = z.strictObject({
1945
2193
  field_id: UuidSchema,
1946
2194
  field: z.string(),
@@ -2044,6 +2292,7 @@ export const PostSessionApprovalResponseSchema = z.strictObject({
2044
2292
  export const PostSessionMessageResponseSchema = z.strictObject({
2045
2293
  created: z.boolean(),
2046
2294
  message: SessionMessageSchema,
2295
+ messages: z.array(SessionMessageSchema).min(1).max(10).optional(),
2047
2296
  });
2048
2297
  export const RankItemResponseSchema = z.strictObject({ item: ItemSummarySchema });
2049
2298
  export const SearchPagesResponseSchema = z.strictObject({
@@ -2086,15 +2335,6 @@ export const SessionChildDoneDataSchema = z.strictObject({
2086
2335
  .nullable(),
2087
2336
  result: SessionChildResultSchema.nullable(),
2088
2337
  });
2089
- export const SessionEventDataSchema = z.strictObject({
2090
- channel: z.strictObject({ id: UuidSchema, name: z.string().nullable() }).optional(),
2091
- message: SessionEventMessageSchema.optional(),
2092
- user: SessionEventUserSchema.nullable().optional(),
2093
- project: SessionEventProjectSchema.optional(),
2094
- item: SessionEventItemSchema.optional(),
2095
- assignment: SessionItemAssignmentSchema.nullable().optional(),
2096
- context: SessionItemContextSchema.optional(),
2097
- });
2098
2338
  export const SessionHandoffSchema = z.strictObject({
2099
2339
  id: UuidSchema,
2100
2340
  item: ItemIdKeySchema,
@@ -2170,14 +2410,9 @@ export const SessionHandoffOutcomeSchema = z.strictObject({
2170
2410
  target: HandoffTargetSchema.optional(),
2171
2411
  queued: z.boolean().optional(),
2172
2412
  });
2173
- export const SessionItemAssignedDataSchema = z.strictObject({
2174
- channel: z.strictObject({ id: UuidSchema, name: z.string().nullable() }),
2175
- project: SessionEventProjectSchema,
2176
- item: SessionEventItemSchema,
2177
- assignment: SessionItemAssignmentSchema,
2178
- context: SessionItemContextSchema,
2179
- user: SessionEventUserSchema.nullable(),
2180
- handoff: SessionAssignedHandoffSchema.optional(),
2413
+ export const SessionItemContextSchema = z.strictObject({
2414
+ untrusted: z.literal(true),
2415
+ messages: z.array(SessionContextMessageSchema).max(10),
2181
2416
  });
2182
2417
  export const SessionItemUnassignedDataSchema = z.strictObject({
2183
2418
  channel: z.strictObject({ id: UuidSchema, name: z.string().nullable() }),
@@ -2196,15 +2431,6 @@ export const SessionItemUnassignedDataSchema = z.strictObject({
2196
2431
  ]),
2197
2432
  user: SessionEventUserSchema.nullable(),
2198
2433
  });
2199
- export const SessionMentionDataSchema = z.strictObject({
2200
- channel: z.strictObject({ id: UuidSchema, name: z.string().nullable() }),
2201
- project: SessionEventProjectSchema,
2202
- item: SessionEventItemSchema,
2203
- assignment: SessionItemAssignmentSchema.nullable(),
2204
- context: SessionItemContextSchema,
2205
- message: SessionEventMessageSchema,
2206
- user: SessionEventUserSchema,
2207
- });
2208
2434
  export const ThreadResponseSchema = z.strictObject({
2209
2435
  root: MessageSchema,
2210
2436
  replies: z.array(MessageSchema),
@@ -2332,17 +2558,24 @@ export const SessionChildDoneEventSchema = z.strictObject({
2332
2558
  session: SessionBriefSchema,
2333
2559
  data: SessionChildDoneDataSchema,
2334
2560
  });
2561
+ export const SessionEventDataSchema = z.strictObject({
2562
+ channel: z.strictObject({ id: UuidSchema, name: z.string().nullable() }).optional(),
2563
+ message: SessionEventMessageSchema.optional(),
2564
+ user: SessionEventUserSchema.nullable().optional(),
2565
+ project: SessionEventProjectSchema.optional(),
2566
+ item: SessionEventItemSchema.optional(),
2567
+ assignment: SessionItemAssignmentSchema.nullable().optional(),
2568
+ context: SessionItemContextSchema.optional(),
2569
+ });
2335
2570
  export const SessionHandoffResponseSchema = z.strictObject({ handoff: SessionHandoffSchema });
2336
- export const SessionItemAssignedEventSchema = z.strictObject({
2337
- v: z.literal(1),
2338
- id: UuidSchema,
2339
- type: z.literal('work_item.assigned'),
2340
- created_at: TimestampSchema,
2341
- org: z.strictObject({ id: UuidSchema }),
2342
- app: z.strictObject({ id: UuidSchema, installation_id: UuidSchema }),
2343
- attempt: z.int().min(1),
2344
- session: SessionBriefSchema,
2345
- data: SessionItemAssignedDataSchema,
2571
+ export const SessionItemAssignedDataSchema = z.strictObject({
2572
+ channel: z.strictObject({ id: UuidSchema, name: z.string().nullable() }),
2573
+ project: SessionEventProjectSchema,
2574
+ item: SessionEventItemSchema,
2575
+ assignment: SessionItemAssignmentSchema,
2576
+ context: SessionItemContextSchema,
2577
+ user: SessionEventUserSchema.nullable(),
2578
+ handoff: SessionAssignedHandoffSchema.optional(),
2346
2579
  });
2347
2580
  export const SessionItemUnassignedEventSchema = z.strictObject({
2348
2581
  v: z.literal(1),
@@ -2355,27 +2588,14 @@ export const SessionItemUnassignedEventSchema = z.strictObject({
2355
2588
  session: SessionBriefSchema,
2356
2589
  data: SessionItemUnassignedDataSchema,
2357
2590
  });
2358
- export const SessionMentionEventSchema = z.strictObject({
2359
- v: z.literal(1),
2360
- id: UuidSchema,
2361
- type: z.literal('app.mentioned'),
2362
- created_at: TimestampSchema,
2363
- org: z.strictObject({ id: UuidSchema }),
2364
- app: z.strictObject({ id: UuidSchema, installation_id: UuidSchema }),
2365
- attempt: z.int().min(1),
2366
- session: SessionBriefSchema,
2367
- data: SessionMentionDataSchema,
2368
- });
2369
- export const SessionMessageEventSchema = z.strictObject({
2370
- v: z.literal(1),
2371
- id: UuidSchema,
2372
- type: z.literal('message.posted'),
2373
- created_at: TimestampSchema,
2374
- org: z.strictObject({ id: UuidSchema }),
2375
- app: z.strictObject({ id: UuidSchema, installation_id: UuidSchema }),
2376
- attempt: z.int().min(1),
2377
- session: SessionBriefSchema,
2378
- data: SessionEventDataSchema,
2591
+ export const SessionMentionDataSchema = z.strictObject({
2592
+ channel: z.strictObject({ id: UuidSchema, name: z.string().nullable() }),
2593
+ project: SessionEventProjectSchema,
2594
+ item: SessionEventItemSchema,
2595
+ assignment: SessionItemAssignmentSchema.nullable(),
2596
+ context: SessionItemContextSchema,
2597
+ message: SessionEventMessageSchema,
2598
+ user: SessionEventUserSchema,
2379
2599
  });
2380
2600
  export const SessionPlanOutcomeSchema = z.strictObject({
2381
2601
  handle: PlanHandleSchema,
@@ -2426,6 +2646,39 @@ export const SessionCardClosedDataSchema = z.strictObject({
2426
2646
  approval: SessionApprovalOutcomeSchema.optional(),
2427
2647
  handoff: SessionHandoffOutcomeSchema.optional(),
2428
2648
  });
2649
+ export const SessionItemAssignedEventSchema = z.strictObject({
2650
+ v: z.literal(1),
2651
+ id: UuidSchema,
2652
+ type: z.literal('work_item.assigned'),
2653
+ created_at: TimestampSchema,
2654
+ org: z.strictObject({ id: UuidSchema }),
2655
+ app: z.strictObject({ id: UuidSchema, installation_id: UuidSchema }),
2656
+ attempt: z.int().min(1),
2657
+ session: SessionBriefSchema,
2658
+ data: SessionItemAssignedDataSchema,
2659
+ });
2660
+ export const SessionMentionEventSchema = z.strictObject({
2661
+ v: z.literal(1),
2662
+ id: UuidSchema,
2663
+ type: z.literal('app.mentioned'),
2664
+ created_at: TimestampSchema,
2665
+ org: z.strictObject({ id: UuidSchema }),
2666
+ app: z.strictObject({ id: UuidSchema, installation_id: UuidSchema }),
2667
+ attempt: z.int().min(1),
2668
+ session: SessionBriefSchema,
2669
+ data: SessionMentionDataSchema,
2670
+ });
2671
+ export const SessionMessageEventSchema = z.strictObject({
2672
+ v: z.literal(1),
2673
+ id: UuidSchema,
2674
+ type: z.literal('message.posted'),
2675
+ created_at: TimestampSchema,
2676
+ org: z.strictObject({ id: UuidSchema }),
2677
+ app: z.strictObject({ id: UuidSchema, installation_id: UuidSchema }),
2678
+ attempt: z.int().min(1),
2679
+ session: SessionBriefSchema,
2680
+ data: SessionEventDataSchema,
2681
+ });
2429
2682
  export const SessionCardClosedEventSchema = z.strictObject({
2430
2683
  v: z.literal(1),
2431
2684
  id: UuidSchema,
@@ -2466,6 +2719,7 @@ export const QUERY_SCHEMAS = {
2466
2719
  close_session_approval: z.strictObject({}),
2467
2720
  close_session_card: z.strictObject({}),
2468
2721
  close_session_handoff: z.strictObject({}),
2722
+ complete_session_upload: z.strictObject({}),
2469
2723
  complete_sprint: z.strictObject({}),
2470
2724
  connect_poll: z.strictObject({}),
2471
2725
  connect_start: z.strictObject({}),
@@ -2475,6 +2729,8 @@ export const QUERY_SCHEMAS = {
2475
2729
  create_plan: z.strictObject({}),
2476
2730
  create_project: z.strictObject({}),
2477
2731
  create_release: z.strictObject({}),
2732
+ create_session_attachment_link: z.strictObject({}),
2733
+ create_session_upload: z.strictObject({}),
2478
2734
  create_sprint: z.strictObject({}),
2479
2735
  decline_session_handoff: z.strictObject({}),
2480
2736
  describe_project: z.strictObject({}),
@@ -2629,6 +2885,7 @@ export const REQUEST_SCHEMAS = {
2629
2885
  close_session_approval: CloseSessionApprovalRequestSchema,
2630
2886
  close_session_card: EmptyRequestSchema,
2631
2887
  close_session_handoff: EmptyRequestSchema,
2888
+ complete_session_upload: EmptyRequestSchema,
2632
2889
  complete_sprint: CompleteSprintRequestSchema,
2633
2890
  connect_poll: ConnectPollRequestSchema,
2634
2891
  connect_start: ConnectStartRequestSchema,
@@ -2638,6 +2895,8 @@ export const REQUEST_SCHEMAS = {
2638
2895
  create_plan: CreatePlanRequestSchema,
2639
2896
  create_project: CreateProjectRequestSchema,
2640
2897
  create_release: CreateReleaseRequestSchema,
2898
+ create_session_attachment_link: CreateSessionAttachmentLinkRequestSchema,
2899
+ create_session_upload: CreateSessionUploadRequestSchema,
2641
2900
  create_sprint: CreateSprintRequestSchema,
2642
2901
  decline_session_handoff: DeclineSessionHandoffRequestSchema,
2643
2902
  describe_project: null,
@@ -2703,6 +2962,7 @@ export const RESPONSE_SCHEMAS = {
2703
2962
  close_session_approval: CloseSessionApprovalResponseSchema,
2704
2963
  close_session_card: CloseSessionCardResponseSchema,
2705
2964
  close_session_handoff: SessionHandoffResponseSchema,
2965
+ complete_session_upload: CompleteSessionUploadResponseSchema,
2706
2966
  complete_sprint: CompleteSprintResponseSchema,
2707
2967
  connect_poll: ConnectPollResponseSchema,
2708
2968
  connect_start: ConnectStartResponseSchema,
@@ -2712,6 +2972,8 @@ export const RESPONSE_SCHEMAS = {
2712
2972
  create_plan: CreatePlanResponseSchema,
2713
2973
  create_project: CreateProjectResponseSchema,
2714
2974
  create_release: ReleaseResponseSchema,
2975
+ create_session_attachment_link: CreateSessionAttachmentLinkResponseSchema,
2976
+ create_session_upload: CreateSessionUploadResponseSchema,
2715
2977
  create_sprint: SprintResponseSchema,
2716
2978
  decline_session_handoff: SessionHandoffResponseSchema,
2717
2979
  describe_project: DescribeProjectResponseSchema,