@sixb/client 0.1.21 → 0.1.23

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 (60) hide show
  1. package/dist/agent-streams.d.ts +5 -3
  2. package/dist/agent-streams.d.ts.map +1 -1
  3. package/dist/browser.js +2 -2
  4. package/dist/{chunk-9wd8x2em.js → chunk-1v736aje.js} +1 -1
  5. package/dist/{chunk-3b154p8n.js → chunk-263m4e9p.js} +38 -7
  6. package/dist/chunk-263m4e9p.js.map +17 -0
  7. package/dist/{chunk-3f2pjdzk.js → chunk-59f4fbnk.js} +352 -3
  8. package/dist/chunk-59f4fbnk.js.map +19 -0
  9. package/dist/{chunk-qdq5gfqx.js → chunk-9gz30dxy.js} +1 -1
  10. package/dist/{chunk-s5zamywm.js → chunk-k2j71x7a.js} +2 -2
  11. package/dist/{chunk-ana8rtgb.js → chunk-tttfv49k.js} +51 -6
  12. package/dist/chunk-tttfv49k.js.map +10 -0
  13. package/dist/connectors/queries.d.ts.map +1 -1
  14. package/dist/events-builder.d.ts +12 -0
  15. package/dist/events-builder.d.ts.map +1 -1
  16. package/dist/generated/@tanstack/react-query.gen.d.ts +9503 -278
  17. package/dist/generated/@tanstack/react-query.gen.d.ts.map +1 -1
  18. package/dist/generated/index.d.ts +2 -2
  19. package/dist/generated/index.d.ts.map +1 -1
  20. package/dist/generated/sdk.gen.d.ts +225 -7
  21. package/dist/generated/sdk.gen.d.ts.map +1 -1
  22. package/dist/generated/types.gen.d.ts +7033 -1880
  23. package/dist/generated/types.gen.d.ts.map +1 -1
  24. package/dist/hooks.d.ts +1 -0
  25. package/dist/hooks.d.ts.map +1 -1
  26. package/dist/hooks.js +781 -14
  27. package/dist/hooks.js.map +9 -8
  28. package/dist/index.js +86 -6
  29. package/dist/index.js.map +1 -1
  30. package/dist/logs.js +3 -3
  31. package/dist/models.js +82 -2
  32. package/dist/models.js.map +1 -1
  33. package/dist/query-hooks.d.ts +1 -1
  34. package/dist/query-hooks.d.ts.map +1 -1
  35. package/dist/query.d.ts +12 -4
  36. package/dist/query.d.ts.map +1 -1
  37. package/dist/query.js +7 -5
  38. package/dist/query.js.map +1 -1
  39. package/dist/useAgentActivityStream.d.ts +3 -1
  40. package/dist/useAgentActivityStream.d.ts.map +1 -1
  41. package/dist/users-hooks.d.ts +109 -0
  42. package/dist/users-hooks.d.ts.map +1 -0
  43. package/package.json +2 -2
  44. package/src/agent-streams.ts +16 -5
  45. package/src/events-builder.ts +51 -0
  46. package/src/generated/@tanstack/react-query.gen.ts +1536 -46
  47. package/src/generated/index.ts +248 -0
  48. package/src/generated/sdk.gen.ts +964 -49
  49. package/src/generated/types.gen.ts +7377 -1052
  50. package/src/hooks.ts +8 -0
  51. package/src/query-hooks.ts +1 -1
  52. package/src/query.ts +86 -5
  53. package/src/useAgentActivityStream.ts +10 -1
  54. package/src/users-hooks.ts +87 -0
  55. package/dist/chunk-3b154p8n.js.map +0 -17
  56. package/dist/chunk-3f2pjdzk.js.map +0 -19
  57. package/dist/chunk-ana8rtgb.js.map +0 -10
  58. /package/dist/{chunk-9wd8x2em.js.map → chunk-1v736aje.js.map} +0 -0
  59. /package/dist/{chunk-qdq5gfqx.js.map → chunk-9gz30dxy.js.map} +0 -0
  60. /package/dist/{chunk-s5zamywm.js.map → chunk-k2j71x7a.js.map} +0 -0
@@ -11,12 +11,18 @@ import type {
11
11
  AbortFileUploadData,
12
12
  AbortFileUploadErrors,
13
13
  AbortFileUploadResponses,
14
+ AddAgentThreadParticipantsData,
15
+ AddAgentThreadParticipantsErrors,
16
+ AddAgentThreadParticipantsResponses,
14
17
  AddConnectorConnectionData,
15
18
  AddConnectorConnectionErrors,
16
19
  AddConnectorConnectionResponses,
17
20
  AppendTelemetryData,
18
21
  AppendTelemetryErrors,
19
22
  AppendTelemetryResponses,
23
+ CancelAgentRunByIdData,
24
+ CancelAgentRunByIdErrors,
25
+ CancelAgentRunByIdResponses,
20
26
  CancelAgentRunData,
21
27
  CancelAgentRunErrors,
22
28
  CancelAgentRunResponses,
@@ -29,6 +35,9 @@ import type {
29
35
  CaptureActivityData,
30
36
  CaptureActivityErrors,
31
37
  CaptureActivityResponses,
38
+ ClearArtifactStateData,
39
+ ClearArtifactStateErrors,
40
+ ClearArtifactStateResponses,
32
41
  CompleteFileUploadData,
33
42
  CompleteFileUploadErrors,
34
43
  CompleteFileUploadResponses,
@@ -65,12 +74,21 @@ import type {
65
74
  CreateFileUploadData,
66
75
  CreateFileUploadErrors,
67
76
  CreateFileUploadResponses,
77
+ DecideAgentApprovalData,
78
+ DecideAgentApprovalErrors,
79
+ DecideAgentApprovalResponses,
80
+ DeleteAgentMemoryData,
81
+ DeleteAgentMemoryErrors,
82
+ DeleteAgentMemoryResponses,
68
83
  DeleteAiLimitPolicyData,
69
84
  DeleteAiLimitPolicyErrors,
70
85
  DeleteAiLimitPolicyResponses,
71
86
  DeleteArtifactData,
72
87
  DeleteArtifactErrors,
73
88
  DeleteArtifactResponses,
89
+ DeleteArtifactStateValueData,
90
+ DeleteArtifactStateValueErrors,
91
+ DeleteArtifactStateValueResponses,
74
92
  DisableAuthServiceAccountData,
75
93
  DisableAuthServiceAccountErrors,
76
94
  DisableAuthServiceAccountResponses,
@@ -88,6 +106,18 @@ import type {
88
106
  FacetObjectsData,
89
107
  FacetObjectsErrors,
90
108
  FacetObjectsResponses,
109
+ ForkAgentThreadData,
110
+ ForkAgentThreadErrors,
111
+ ForkAgentThreadResponses,
112
+ GenerateImagesData,
113
+ GenerateImagesErrors,
114
+ GenerateImagesResponses,
115
+ GenerateSpeechData,
116
+ GenerateSpeechErrors,
117
+ GenerateSpeechResponses,
118
+ GenerateTextData,
119
+ GenerateTextErrors,
120
+ GenerateTextResponses,
91
121
  GetActionData,
92
122
  GetActionErrors,
93
123
  GetActionResponses,
@@ -109,11 +139,20 @@ import type {
109
139
  GetActivityVisitTimelineData,
110
140
  GetActivityVisitTimelineErrors,
111
141
  GetActivityVisitTimelineResponses,
142
+ GetAgentChildFileContentData,
143
+ GetAgentChildFileContentErrors,
144
+ GetAgentChildFileContentResponses,
112
145
  GetAgentData,
113
146
  GetAgentErrors,
147
+ GetAgentMemoryData,
148
+ GetAgentMemoryErrors,
149
+ GetAgentMemoryResponses,
114
150
  GetAgentMessageFileContentData,
115
151
  GetAgentMessageFileContentErrors,
116
152
  GetAgentMessageFileContentResponses,
153
+ GetAgentPreferencesData,
154
+ GetAgentPreferencesErrors,
155
+ GetAgentPreferencesResponses,
117
156
  GetAgentResponses,
118
157
  GetAgentRunData,
119
158
  GetAgentRunErrors,
@@ -130,12 +169,24 @@ import type {
130
169
  GetAiLimitSubjectOptionsData,
131
170
  GetAiLimitSubjectOptionsErrors,
132
171
  GetAiLimitSubjectOptionsResponses,
172
+ GetAiModelCallFileContentData,
173
+ GetAiModelCallFileContentErrors,
174
+ GetAiModelCallFileContentResponses,
175
+ GetAiModelCallFilesData,
176
+ GetAiModelCallFilesErrors,
177
+ GetAiModelCallFilesResponses,
133
178
  GetArtifactData,
134
179
  GetArtifactErrors,
135
180
  GetArtifactFileContentData,
136
181
  GetArtifactFileContentErrors,
137
182
  GetArtifactFileContentResponses,
183
+ GetArtifactQueryData,
184
+ GetArtifactQueryErrors,
185
+ GetArtifactQueryResponses,
138
186
  GetArtifactResponses,
187
+ GetArtifactStateData,
188
+ GetArtifactStateErrors,
189
+ GetArtifactStateResponses,
139
190
  GetArtifactVersionData,
140
191
  GetArtifactVersionErrors,
141
192
  GetArtifactVersionResponses,
@@ -148,6 +199,9 @@ import type {
148
199
  GetAuthMembershipOptionsData,
149
200
  GetAuthMembershipOptionsErrors,
150
201
  GetAuthMembershipOptionsResponses,
202
+ GetAuthProfileData,
203
+ GetAuthProfileErrors,
204
+ GetAuthProfileResponses,
151
205
  GetAuthSessionData,
152
206
  GetAuthSessionResponses,
153
207
  GetBulkTelemetryHistoryData,
@@ -168,6 +222,9 @@ import type {
168
222
  GetLatestTelemetryData,
169
223
  GetLatestTelemetryErrors,
170
224
  GetLatestTelemetryResponses,
225
+ GetObjectByUniquePropertyData,
226
+ GetObjectByUniquePropertyErrors,
227
+ GetObjectByUniquePropertyResponses,
171
228
  GetObjectData,
172
229
  GetObjectErrors,
173
230
  GetObjectFileContentData,
@@ -177,6 +234,15 @@ import type {
177
234
  GetObjectTypeData,
178
235
  GetObjectTypeErrors,
179
236
  GetObjectTypeResponses,
237
+ GetObservedAgentChildFileContentData,
238
+ GetObservedAgentChildFileContentErrors,
239
+ GetObservedAgentChildFileContentResponses,
240
+ GetObservedAgentMessageFileContentData,
241
+ GetObservedAgentMessageFileContentErrors,
242
+ GetObservedAgentMessageFileContentResponses,
243
+ GetObservedAgentThreadData,
244
+ GetObservedAgentThreadErrors,
245
+ GetObservedAgentThreadResponses,
180
246
  GetPipelineData,
181
247
  GetPipelineErrors,
182
248
  GetPipelineResponses,
@@ -205,6 +271,9 @@ import type {
205
271
  GetTelemetryHistoryData,
206
272
  GetTelemetryHistoryErrors,
207
273
  GetTelemetryHistoryResponses,
274
+ GetUserData,
275
+ GetUserErrors,
276
+ GetUserResponses,
208
277
  GetWorkflowAgentNodeExecutionData,
209
278
  GetWorkflowAgentNodeExecutionErrors,
210
279
  GetWorkflowAgentNodeExecutionResponses,
@@ -226,9 +295,15 @@ import type {
226
295
  HeadActionRunFileContentData,
227
296
  HeadActionRunFileContentErrors,
228
297
  HeadActionRunFileContentResponses,
298
+ HeadAgentChildFileContentData,
299
+ HeadAgentChildFileContentErrors,
300
+ HeadAgentChildFileContentResponses,
229
301
  HeadAgentMessageFileContentData,
230
302
  HeadAgentMessageFileContentErrors,
231
303
  HeadAgentMessageFileContentResponses,
304
+ HeadAiModelCallFileContentData,
305
+ HeadAiModelCallFileContentErrors,
306
+ HeadAiModelCallFileContentResponses,
232
307
  HeadArtifactFileContentData,
233
308
  HeadArtifactFileContentErrors,
234
309
  HeadArtifactFileContentResponses,
@@ -258,6 +333,18 @@ import type {
258
333
  ListActivityVisitsData,
259
334
  ListActivityVisitsErrors,
260
335
  ListActivityVisitsResponses,
336
+ ListAgentApprovalsData,
337
+ ListAgentApprovalsErrors,
338
+ ListAgentApprovalsResponses,
339
+ ListAgentMemoryRevisionsData,
340
+ ListAgentMemoryRevisionsErrors,
341
+ ListAgentMemoryRevisionsResponses,
342
+ ListAgentThreadApprovalsData,
343
+ ListAgentThreadApprovalsErrors,
344
+ ListAgentThreadApprovalsResponses,
345
+ ListAgentThreadChildrenData,
346
+ ListAgentThreadChildrenErrors,
347
+ ListAgentThreadChildrenResponses,
261
348
  ListAgentThreadMessagesData,
262
349
  ListAgentThreadMessagesErrors,
263
350
  ListAgentThreadMessagesResponses,
@@ -324,6 +411,15 @@ import type {
324
411
  ListObjectsResponses,
325
412
  ListObjectTypesData,
326
413
  ListObjectTypesResponses,
414
+ ListObservedAgentThreadChildrenData,
415
+ ListObservedAgentThreadChildrenErrors,
416
+ ListObservedAgentThreadChildrenResponses,
417
+ ListObservedAgentThreadMessagesData,
418
+ ListObservedAgentThreadMessagesErrors,
419
+ ListObservedAgentThreadMessagesResponses,
420
+ ListObservedAgentThreadRunsData,
421
+ ListObservedAgentThreadRunsErrors,
422
+ ListObservedAgentThreadRunsResponses,
327
423
  ListPendingConnectorConnectionRunsData,
328
424
  ListPendingConnectorConnectionRunsErrors,
329
425
  ListPendingConnectorConnectionRunsResponses,
@@ -350,6 +446,9 @@ import type {
350
446
  ListSyncRunsResponses,
351
447
  ListSyncsData,
352
448
  ListSyncsResponses,
449
+ ListUsersData,
450
+ ListUsersErrors,
451
+ ListUsersResponses,
353
452
  ListWebhookRunsData,
354
453
  ListWebhookRunsErrors,
355
454
  ListWebhookRunsResponses,
@@ -385,6 +484,9 @@ import type {
385
484
  RefreshAuthSessionData,
386
485
  RefreshAuthSessionErrors,
387
486
  RefreshAuthSessionResponses,
487
+ RemoveAgentThreadParticipantData,
488
+ RemoveAgentThreadParticipantErrors,
489
+ RemoveAgentThreadParticipantResponses,
388
490
  RemoveObjectLinkData,
389
491
  RemoveObjectLinkErrors,
390
492
  RemoveObjectLinkResponses,
@@ -421,12 +523,21 @@ import type {
421
523
  RevokeSharedAccessGrantData,
422
524
  RevokeSharedAccessGrantErrors,
423
525
  RevokeSharedAccessGrantResponses,
526
+ SaveAgentMemoryData,
527
+ SaveAgentMemoryErrors,
528
+ SaveAgentMemoryResponses,
424
529
  SearchObjectsData,
425
530
  SearchObjectsErrors,
426
531
  SearchObjectsResponses,
427
532
  SelectConnectorConnectionRunAccountData,
428
533
  SelectConnectorConnectionRunAccountErrors,
429
534
  SelectConnectorConnectionRunAccountResponses,
535
+ SetAgentThreadApprovalModeData,
536
+ SetAgentThreadApprovalModeErrors,
537
+ SetAgentThreadApprovalModeResponses,
538
+ SetArtifactStateData,
539
+ SetArtifactStateErrors,
540
+ SetArtifactStateResponses,
430
541
  SignFileUploadPartData,
431
542
  SignFileUploadPartErrors,
432
543
  SignFileUploadPartResponses,
@@ -448,12 +559,21 @@ import type {
448
559
  SuspendAuthMemberData,
449
560
  SuspendAuthMemberErrors,
450
561
  SuspendAuthMemberResponses,
562
+ TranscribeAudioData,
563
+ TranscribeAudioErrors,
564
+ TranscribeAudioResponses,
565
+ UpdateAgentPreferencesData,
566
+ UpdateAgentPreferencesErrors,
567
+ UpdateAgentPreferencesResponses,
451
568
  UpdateAiLimitPolicyData,
452
569
  UpdateAiLimitPolicyErrors,
453
570
  UpdateAiLimitPolicyResponses,
454
571
  UpdateAuthMemberGroupsData,
455
572
  UpdateAuthMemberGroupsErrors,
456
573
  UpdateAuthMemberGroupsResponses,
574
+ UpdateAuthProfileData,
575
+ UpdateAuthProfileErrors,
576
+ UpdateAuthProfileResponses,
457
577
  UploadFileContentData,
458
578
  UploadFileContentErrors,
459
579
  UploadFileContentResponses,
@@ -611,6 +731,43 @@ export const signOutAll = <ThrowOnError extends boolean = false>(
611
731
  ...options,
612
732
  })
613
733
 
734
+ /**
735
+ * Get the current user's profile
736
+ */
737
+ export const getAuthProfile = <ThrowOnError extends boolean = false>(
738
+ options?: Options<GetAuthProfileData, ThrowOnError>
739
+ ) =>
740
+ (options?.client ?? client).get<GetAuthProfileResponses, GetAuthProfileErrors, ThrowOnError>({
741
+ security: [{ scheme: "bearer", type: "http" }],
742
+ url: "/api/auth/profile",
743
+ ...options,
744
+ })
745
+
746
+ /**
747
+ * Update the current user's name or picture
748
+ *
749
+ * Fields the identity provider manages, listed in `managedFields`, are refused with 403.
750
+ */
751
+ export const updateAuthProfile = <ThrowOnError extends boolean = false>(
752
+ options: Options<UpdateAuthProfileData, ThrowOnError>
753
+ ) =>
754
+ (options.client ?? client).patch<
755
+ UpdateAuthProfileResponses,
756
+ UpdateAuthProfileErrors,
757
+ ThrowOnError
758
+ >({
759
+ security: [
760
+ { name: "x-sixb-csrf", type: "apiKey" },
761
+ { scheme: "bearer", type: "http" },
762
+ ],
763
+ url: "/api/auth/profile",
764
+ ...options,
765
+ headers: {
766
+ "Content-Type": "application/json",
767
+ ...options.headers,
768
+ },
769
+ })
770
+
614
771
  /**
615
772
  * Get auth access-token management options
616
773
  */
@@ -1156,6 +1313,143 @@ export const listAiModelCallGroups = <ThrowOnError extends boolean = false>(
1156
1313
  ...options,
1157
1314
  })
1158
1315
 
1316
+ /**
1317
+ * Get the files a model call produced
1318
+ */
1319
+ export const getAiModelCallFiles = <ThrowOnError extends boolean = false>(
1320
+ options: Options<GetAiModelCallFilesData, ThrowOnError>
1321
+ ) =>
1322
+ (options.client ?? client).get<
1323
+ GetAiModelCallFilesResponses,
1324
+ GetAiModelCallFilesErrors,
1325
+ ThrowOnError
1326
+ >({
1327
+ security: [
1328
+ { scheme: "bearer", type: "http" },
1329
+ { scheme: "bearer", type: "http" },
1330
+ ],
1331
+ url: "/api/ai/model-calls/{callId}/files",
1332
+ ...options,
1333
+ })
1334
+
1335
+ /**
1336
+ * Get model call file content
1337
+ */
1338
+ export const getAiModelCallFileContent = <ThrowOnError extends boolean = false>(
1339
+ options: Options<GetAiModelCallFileContentData, ThrowOnError>
1340
+ ) =>
1341
+ (options.client ?? client).get<
1342
+ GetAiModelCallFileContentResponses,
1343
+ GetAiModelCallFileContentErrors,
1344
+ ThrowOnError
1345
+ >({
1346
+ security: [
1347
+ { scheme: "bearer", type: "http" },
1348
+ { scheme: "bearer", type: "http" },
1349
+ ],
1350
+ url: "/api/ai/model-calls/{callId}/files/content",
1351
+ ...options,
1352
+ })
1353
+
1354
+ /**
1355
+ * Head model call file content
1356
+ */
1357
+ export const headAiModelCallFileContent = <ThrowOnError extends boolean = false>(
1358
+ options: Options<HeadAiModelCallFileContentData, ThrowOnError>
1359
+ ) =>
1360
+ (options.client ?? client).head<
1361
+ HeadAiModelCallFileContentResponses,
1362
+ HeadAiModelCallFileContentErrors,
1363
+ ThrowOnError
1364
+ >({
1365
+ security: [
1366
+ { scheme: "bearer", type: "http" },
1367
+ { scheme: "bearer", type: "http" },
1368
+ ],
1369
+ url: "/api/ai/model-calls/{callId}/files/content",
1370
+ ...options,
1371
+ })
1372
+
1373
+ /**
1374
+ * Generate text with a language model
1375
+ */
1376
+ export const generateText = <ThrowOnError extends boolean = false>(
1377
+ options: Options<GenerateTextData, ThrowOnError>
1378
+ ) =>
1379
+ (options.client ?? client).post<GenerateTextResponses, GenerateTextErrors, ThrowOnError>({
1380
+ security: [
1381
+ { name: "x-sixb-csrf", type: "apiKey" },
1382
+ { scheme: "bearer", type: "http" },
1383
+ { scheme: "bearer", type: "http" },
1384
+ ],
1385
+ url: "/api/models/language/generations",
1386
+ ...options,
1387
+ headers: {
1388
+ "Content-Type": "application/json",
1389
+ ...options.headers,
1390
+ },
1391
+ })
1392
+
1393
+ /**
1394
+ * Generate images with an image model
1395
+ */
1396
+ export const generateImages = <ThrowOnError extends boolean = false>(
1397
+ options: Options<GenerateImagesData, ThrowOnError>
1398
+ ) =>
1399
+ (options.client ?? client).post<GenerateImagesResponses, GenerateImagesErrors, ThrowOnError>({
1400
+ security: [
1401
+ { name: "x-sixb-csrf", type: "apiKey" },
1402
+ { scheme: "bearer", type: "http" },
1403
+ { scheme: "bearer", type: "http" },
1404
+ ],
1405
+ url: "/api/models/image/generations",
1406
+ ...options,
1407
+ headers: {
1408
+ "Content-Type": "application/json",
1409
+ ...options.headers,
1410
+ },
1411
+ })
1412
+
1413
+ /**
1414
+ * Generate speech with a speech model
1415
+ */
1416
+ export const generateSpeech = <ThrowOnError extends boolean = false>(
1417
+ options: Options<GenerateSpeechData, ThrowOnError>
1418
+ ) =>
1419
+ (options.client ?? client).post<GenerateSpeechResponses, GenerateSpeechErrors, ThrowOnError>({
1420
+ security: [
1421
+ { name: "x-sixb-csrf", type: "apiKey" },
1422
+ { scheme: "bearer", type: "http" },
1423
+ { scheme: "bearer", type: "http" },
1424
+ ],
1425
+ url: "/api/models/audio/speech",
1426
+ ...options,
1427
+ headers: {
1428
+ "Content-Type": "application/json",
1429
+ ...options.headers,
1430
+ },
1431
+ })
1432
+
1433
+ /**
1434
+ * Transcribe audio with a transcription model
1435
+ */
1436
+ export const transcribeAudio = <ThrowOnError extends boolean = false>(
1437
+ options: Options<TranscribeAudioData, ThrowOnError>
1438
+ ) =>
1439
+ (options.client ?? client).post<TranscribeAudioResponses, TranscribeAudioErrors, ThrowOnError>({
1440
+ security: [
1441
+ { name: "x-sixb-csrf", type: "apiKey" },
1442
+ { scheme: "bearer", type: "http" },
1443
+ { scheme: "bearer", type: "http" },
1444
+ ],
1445
+ url: "/api/models/audio/transcriptions",
1446
+ ...options,
1447
+ headers: {
1448
+ "Content-Type": "application/json",
1449
+ ...options.headers,
1450
+ },
1451
+ })
1452
+
1159
1453
  /**
1160
1454
  * Get current project metadata
1161
1455
  */
@@ -2245,6 +2539,33 @@ export const upsertObject = <ThrowOnError extends boolean = false>(
2245
2539
  },
2246
2540
  })
2247
2541
 
2542
+ /**
2543
+ * Get object by a unique property
2544
+ *
2545
+ * Returns the object of exactly this type that holds the value, compared as writes store it.
2546
+ */
2547
+ export const getObjectByUniqueProperty = <ThrowOnError extends boolean = false>(
2548
+ options: Options<GetObjectByUniquePropertyData, ThrowOnError>
2549
+ ) =>
2550
+ (options.client ?? client).post<
2551
+ GetObjectByUniquePropertyResponses,
2552
+ GetObjectByUniquePropertyErrors,
2553
+ ThrowOnError
2554
+ >({
2555
+ security: [
2556
+ { name: "x-sixb-csrf", type: "apiKey" },
2557
+ { scheme: "bearer", type: "http" },
2558
+ { scheme: "bearer", type: "http" },
2559
+ { name: "x-sixb-share-grant", type: "apiKey" },
2560
+ ],
2561
+ url: "/api/objects/{objectTypeId}/by/{propertyId}",
2562
+ ...options,
2563
+ headers: {
2564
+ "Content-Type": "application/json",
2565
+ ...options.headers,
2566
+ },
2567
+ })
2568
+
2248
2569
  /**
2249
2570
  * List registered actions
2250
2571
  */
@@ -2547,6 +2868,67 @@ export const getAgentThread = <ThrowOnError extends boolean = false>(
2547
2868
  ...options,
2548
2869
  })
2549
2870
 
2871
+ /**
2872
+ * Add participants to an agent thread
2873
+ *
2874
+ * Only the thread's owner adds participants: active users of the project, by id or by email. They read the whole conversation, its files and its live stream, and send messages that run with their own rights. Nothing checks what they may see: the conversation holds what the Agent read with the rights of whoever asked.
2875
+ */
2876
+ export const addAgentThreadParticipants = <ThrowOnError extends boolean = false>(
2877
+ options: Options<AddAgentThreadParticipantsData, ThrowOnError>
2878
+ ) =>
2879
+ (options.client ?? client).post<
2880
+ AddAgentThreadParticipantsResponses,
2881
+ AddAgentThreadParticipantsErrors,
2882
+ ThrowOnError
2883
+ >({
2884
+ security: [
2885
+ { name: "x-sixb-csrf", type: "apiKey" },
2886
+ { scheme: "bearer", type: "http" },
2887
+ ],
2888
+ url: "/api/agent-threads/{threadId}/participants",
2889
+ ...options,
2890
+ headers: {
2891
+ "Content-Type": "application/json",
2892
+ ...options.headers,
2893
+ },
2894
+ })
2895
+
2896
+ /**
2897
+ * Remove a participant from an agent thread
2898
+ *
2899
+ * The thread's owner removes anyone; a participant removes only themself, to leave. Removing someone who does not take part changes nothing.
2900
+ */
2901
+ export const removeAgentThreadParticipant = <ThrowOnError extends boolean = false>(
2902
+ options: Options<RemoveAgentThreadParticipantData, ThrowOnError>
2903
+ ) =>
2904
+ (options.client ?? client).delete<
2905
+ RemoveAgentThreadParticipantResponses,
2906
+ RemoveAgentThreadParticipantErrors,
2907
+ ThrowOnError
2908
+ >({
2909
+ security: [
2910
+ { name: "x-sixb-csrf", type: "apiKey" },
2911
+ { scheme: "bearer", type: "http" },
2912
+ ],
2913
+ url: "/api/agent-threads/{threadId}/participants/{userId}",
2914
+ ...options,
2915
+ })
2916
+
2917
+ /**
2918
+ * Continue an agent thread in a new one the caller owns
2919
+ */
2920
+ export const forkAgentThread = <ThrowOnError extends boolean = false>(
2921
+ options: Options<ForkAgentThreadData, ThrowOnError>
2922
+ ) =>
2923
+ (options.client ?? client).post<ForkAgentThreadResponses, ForkAgentThreadErrors, ThrowOnError>({
2924
+ security: [
2925
+ { name: "x-sixb-csrf", type: "apiKey" },
2926
+ { scheme: "bearer", type: "http" },
2927
+ ],
2928
+ url: "/api/agent-threads/{threadId}/fork",
2929
+ ...options,
2930
+ })
2931
+
2550
2932
  /**
2551
2933
  * Explicitly recreate an unavailable or uncertain workspace without deleting its previous state
2552
2934
  */
@@ -2649,6 +3031,8 @@ export const headAgentMessageFileContent = <ThrowOnError extends boolean = false
2649
3031
 
2650
3032
  /**
2651
3033
  * Cancel an agent thread's active run
3034
+ *
3035
+ * Whoever asked for the run, or the thread's owner, can cancel it.
2652
3036
  */
2653
3037
  export const cancelAgentRun = <ThrowOnError extends boolean = false>(
2654
3038
  options: Options<CancelAgentRunData, ThrowOnError>
@@ -2668,6 +3052,8 @@ export const cancelAgentRun = <ThrowOnError extends boolean = false>(
2668
3052
 
2669
3053
  /**
2670
3054
  * Retry a failed or interrupted agent run
3055
+ *
3056
+ * Only whoever asked for the run can retry it: it runs again with their rights.
2671
3057
  */
2672
3058
  export const retryAgentRun = <ThrowOnError extends boolean = false>(
2673
3059
  options: Options<RetryAgentRunData, ThrowOnError>
@@ -2699,6 +3085,8 @@ export const listAgentThreadRuns = <ThrowOnError extends boolean = false>(
2699
3085
 
2700
3086
  /**
2701
3087
  * Get agent run
3088
+ *
3089
+ * A conversation's turn, or a sub-agent's run (`kind: "subagent"`), read through its thread: a sub-agent's run is visible exactly when its conversation is.
2702
3090
  */
2703
3091
  export const getAgentRun = <ThrowOnError extends boolean = false>(
2704
3092
  options: Options<GetAgentRunData, ThrowOnError>
@@ -2710,96 +3098,118 @@ export const getAgentRun = <ThrowOnError extends boolean = false>(
2710
3098
  })
2711
3099
 
2712
3100
  /**
2713
- * List artifacts
3101
+ * Stop an agent run
2714
3102
  *
2715
- * The caller's artifacts, most recently updated first.
3103
+ * A turn, or a sub-agent's run. Whoever asked for the turn, or the conversation's owner, can stop it, and a sub-agent's run as its turn. A queued run is cancelled at once; a running one is still running in the response, with the stop signal sent. A sub-agent's parent reads that it was stopped.
2716
3104
  */
2717
- export const listArtifacts = <ThrowOnError extends boolean = false>(
2718
- options?: Options<ListArtifactsData, ThrowOnError>
3105
+ export const cancelAgentRunById = <ThrowOnError extends boolean = false>(
3106
+ options: Options<CancelAgentRunByIdData, ThrowOnError>
2719
3107
  ) =>
2720
- (options?.client ?? client).get<ListArtifactsResponses, ListArtifactsErrors, ThrowOnError>({
3108
+ (options.client ?? client).post<
3109
+ CancelAgentRunByIdResponses,
3110
+ CancelAgentRunByIdErrors,
3111
+ ThrowOnError
3112
+ >({
2721
3113
  security: [
2722
- { scheme: "bearer", type: "http" },
3114
+ { name: "x-sixb-csrf", type: "apiKey" },
2723
3115
  { scheme: "bearer", type: "http" },
2724
3116
  ],
2725
- url: "/api/artifacts",
3117
+ url: "/api/agent-runs/{runId}/cancel",
2726
3118
  ...options,
2727
3119
  })
2728
3120
 
2729
3121
  /**
2730
- * Create an artifact
3122
+ * List the sub-agents of an agent conversation
2731
3123
  *
2732
- * Creates an artifact owned by the caller, with its first version. Store each file with POST /api/files first.
3124
+ * A sub-agent is visible exactly when its conversation is: to the thread's owner and participants; observers read it through the observed routes. What it did is its thread's messages, at `GET /api/agent-threads/:threadId/messages` with its `threadId`. `runId` keeps those one turn spawned. Each lists every run it took, the one at work by `activeRunId`.
2733
3125
  */
2734
- export const createArtifact = <ThrowOnError extends boolean = false>(
2735
- options: Options<CreateArtifactData, ThrowOnError>
3126
+ export const listAgentThreadChildren = <ThrowOnError extends boolean = false>(
3127
+ options: Options<ListAgentThreadChildrenData, ThrowOnError>
2736
3128
  ) =>
2737
- (options.client ?? client).post<CreateArtifactResponses, CreateArtifactErrors, ThrowOnError>({
2738
- security: [
2739
- { name: "x-sixb-csrf", type: "apiKey" },
2740
- { scheme: "bearer", type: "http" },
2741
- { scheme: "bearer", type: "http" },
2742
- ],
2743
- url: "/api/artifacts",
3129
+ (options.client ?? client).get<
3130
+ ListAgentThreadChildrenResponses,
3131
+ ListAgentThreadChildrenErrors,
3132
+ ThrowOnError
3133
+ >({
3134
+ security: [{ scheme: "bearer", type: "http" }],
3135
+ url: "/api/agent-threads/{threadId}/children",
2744
3136
  ...options,
2745
- headers: {
2746
- "Content-Type": "application/json",
2747
- ...options.headers,
2748
- },
2749
3137
  })
2750
3138
 
2751
3139
  /**
2752
- * Delete an artifact
3140
+ * Get a file of a sub-agent
2753
3141
  *
2754
- * Deletes the artifact with every version.
3142
+ * A sub-agent is visible exactly when its conversation is: to the thread's owner and participants; observers read it through the observed routes. What it did is its thread's messages, at `GET /api/agent-threads/:threadId/messages` with its `threadId`. `threadId` is the sub-agent's thread, `run` one of its runs, and `path` points into it: `/handedFiles/0/fileRef`, or `/files/0/fileRef` for what the run returned.
2755
3143
  */
2756
- export const deleteArtifact = <ThrowOnError extends boolean = false>(
2757
- options: Options<DeleteArtifactData, ThrowOnError>
3144
+ export const getAgentChildFileContent = <ThrowOnError extends boolean = false>(
3145
+ options: Options<GetAgentChildFileContentData, ThrowOnError>
2758
3146
  ) =>
2759
- (options.client ?? client).delete<DeleteArtifactResponses, DeleteArtifactErrors, ThrowOnError>({
3147
+ (options.client ?? client).get<
3148
+ GetAgentChildFileContentResponses,
3149
+ GetAgentChildFileContentErrors,
3150
+ ThrowOnError
3151
+ >({
2760
3152
  security: [
2761
- { name: "x-sixb-csrf", type: "apiKey" },
2762
3153
  { scheme: "bearer", type: "http" },
2763
3154
  { scheme: "bearer", type: "http" },
2764
3155
  ],
2765
- url: "/api/artifacts/{artifactId}",
3156
+ url: "/api/agent-threads/{threadId}/child-files/content",
2766
3157
  ...options,
2767
3158
  })
2768
3159
 
2769
3160
  /**
2770
- * Get an artifact and its versions
3161
+ * Head a file of a sub-agent
2771
3162
  */
2772
- export const getArtifact = <ThrowOnError extends boolean = false>(
2773
- options: Options<GetArtifactData, ThrowOnError>
3163
+ export const headAgentChildFileContent = <ThrowOnError extends boolean = false>(
3164
+ options: Options<HeadAgentChildFileContentData, ThrowOnError>
2774
3165
  ) =>
2775
- (options.client ?? client).get<GetArtifactResponses, GetArtifactErrors, ThrowOnError>({
3166
+ (options.client ?? client).head<
3167
+ HeadAgentChildFileContentResponses,
3168
+ HeadAgentChildFileContentErrors,
3169
+ ThrowOnError
3170
+ >({
2776
3171
  security: [
2777
3172
  { scheme: "bearer", type: "http" },
2778
3173
  { scheme: "bearer", type: "http" },
2779
3174
  ],
2780
- url: "/api/artifacts/{artifactId}",
3175
+ url: "/api/agent-threads/{threadId}/child-files/content",
2781
3176
  ...options,
2782
3177
  })
2783
3178
 
2784
3179
  /**
2785
- * Publish an artifact's next version
3180
+ * Get your Agent preferences
3181
+ */
3182
+ export const getAgentPreferences = <ThrowOnError extends boolean = false>(
3183
+ options?: Options<GetAgentPreferencesData, ThrowOnError>
3184
+ ) =>
3185
+ (options?.client ?? client).get<
3186
+ GetAgentPreferencesResponses,
3187
+ GetAgentPreferencesErrors,
3188
+ ThrowOnError
3189
+ >({
3190
+ security: [{ scheme: "bearer", type: "http" }],
3191
+ url: "/api/agent/preferences",
3192
+ ...options,
3193
+ })
3194
+
3195
+ /**
3196
+ * Update your Agent preferences
2786
3197
  *
2787
- * The kind must be the artifact's. The new version becomes the latest.
3198
+ * `approvalMode` is your default in the threads where you chose none: `manual` asks before every action and workflow, `accept-edits` runs the actions that only change Sixb, `auto` runs everything.
2788
3199
  */
2789
- export const publishArtifactVersion = <ThrowOnError extends boolean = false>(
2790
- options: Options<PublishArtifactVersionData, ThrowOnError>
3200
+ export const updateAgentPreferences = <ThrowOnError extends boolean = false>(
3201
+ options: Options<UpdateAgentPreferencesData, ThrowOnError>
2791
3202
  ) =>
2792
- (options.client ?? client).post<
2793
- PublishArtifactVersionResponses,
2794
- PublishArtifactVersionErrors,
3203
+ (options.client ?? client).put<
3204
+ UpdateAgentPreferencesResponses,
3205
+ UpdateAgentPreferencesErrors,
2795
3206
  ThrowOnError
2796
3207
  >({
2797
3208
  security: [
2798
3209
  { name: "x-sixb-csrf", type: "apiKey" },
2799
3210
  { scheme: "bearer", type: "http" },
2800
- { scheme: "bearer", type: "http" },
2801
3211
  ],
2802
- url: "/api/artifacts/{artifactId}/versions",
3212
+ url: "/api/agent/preferences",
2803
3213
  ...options,
2804
3214
  headers: {
2805
3215
  "Content-Type": "application/json",
@@ -2808,12 +3218,467 @@ export const publishArtifactVersion = <ThrowOnError extends boolean = false>(
2808
3218
  })
2809
3219
 
2810
3220
  /**
2811
- * Open a deck's version in a frame
3221
+ * Choose your approval mode in an agent thread
2812
3222
  *
2813
- * A short-lived path that serves a slides version's files to a sandboxed frame. It expires within an hour. Any other kind is refused with 409 artifact_kind_mismatch.
3223
+ * Applies to your next turns in the thread; other participants keep theirs. `null` follows your default again. A message can still pass its own `approvalMode`.
2814
3224
  */
2815
- export const createArtifactFrame = <ThrowOnError extends boolean = false>(
2816
- options: Options<CreateArtifactFrameData, ThrowOnError>
3225
+ export const setAgentThreadApprovalMode = <ThrowOnError extends boolean = false>(
3226
+ options: Options<SetAgentThreadApprovalModeData, ThrowOnError>
3227
+ ) =>
3228
+ (options.client ?? client).put<
3229
+ SetAgentThreadApprovalModeResponses,
3230
+ SetAgentThreadApprovalModeErrors,
3231
+ ThrowOnError
3232
+ >({
3233
+ security: [
3234
+ { name: "x-sixb-csrf", type: "apiKey" },
3235
+ { scheme: "bearer", type: "http" },
3236
+ ],
3237
+ url: "/api/agent-threads/{threadId}/approval-mode",
3238
+ ...options,
3239
+ headers: {
3240
+ "Content-Type": "application/json",
3241
+ ...options.headers,
3242
+ },
3243
+ })
3244
+
3245
+ /**
3246
+ * List an agent thread's held calls
3247
+ *
3248
+ * Oldest first. Whoever reads the thread reads its approvals.
3249
+ */
3250
+ export const listAgentThreadApprovals = <ThrowOnError extends boolean = false>(
3251
+ options: Options<ListAgentThreadApprovalsData, ThrowOnError>
3252
+ ) =>
3253
+ (options.client ?? client).get<
3254
+ ListAgentThreadApprovalsResponses,
3255
+ ListAgentThreadApprovalsErrors,
3256
+ ThrowOnError
3257
+ >({
3258
+ security: [{ scheme: "bearer", type: "http" }],
3259
+ url: "/api/agent-threads/{threadId}/approvals",
3260
+ ...options,
3261
+ })
3262
+
3263
+ /**
3264
+ * Approve or deny a held agent call
3265
+ *
3266
+ * Only whoever asked for the turn decides: an approved call runs now, as the turn, with the rights their request carries, and the approval comes back with its outcome. A turn paused on its calls resumes once all of them are decided: `run` is the turn that continues it, and the Agent reads how each call ended. Once the call ran, the decision never fails: when the turn cannot resume, `resume` says why, and whether Sixb tries again, as it does once an AI limit resets. A new message sets the calls still waiting aside. None of these routes is reachable from the Agent's sandbox.
3267
+ */
3268
+ export const decideAgentApproval = <ThrowOnError extends boolean = false>(
3269
+ options: Options<DecideAgentApprovalData, ThrowOnError>
3270
+ ) =>
3271
+ (options.client ?? client).post<
3272
+ DecideAgentApprovalResponses,
3273
+ DecideAgentApprovalErrors,
3274
+ ThrowOnError
3275
+ >({
3276
+ security: [
3277
+ { name: "x-sixb-csrf", type: "apiKey" },
3278
+ { scheme: "bearer", type: "http" },
3279
+ ],
3280
+ url: "/api/agent-threads/{threadId}/approvals/{approvalId}/decision",
3281
+ ...options,
3282
+ headers: {
3283
+ "Content-Type": "application/json",
3284
+ ...options.headers,
3285
+ },
3286
+ })
3287
+
3288
+ /**
3289
+ * List the calls held for your decision
3290
+ *
3291
+ * Your own, across threads, oldest first.
3292
+ */
3293
+ export const listAgentApprovals = <ThrowOnError extends boolean = false>(
3294
+ options?: Options<ListAgentApprovalsData, ThrowOnError>
3295
+ ) =>
3296
+ (options?.client ?? client).get<
3297
+ ListAgentApprovalsResponses,
3298
+ ListAgentApprovalsErrors,
3299
+ ThrowOnError
3300
+ >({
3301
+ security: [{ scheme: "bearer", type: "http" }],
3302
+ url: "/api/agent-approvals",
3303
+ ...options,
3304
+ })
3305
+
3306
+ /**
3307
+ * Read another user's agent thread
3308
+ *
3309
+ * Read-only, whoever owns the thread. Takes can.observe(agent.threads); the response matches the owner's route.
3310
+ */
3311
+ export const getObservedAgentThread = <ThrowOnError extends boolean = false>(
3312
+ options: Options<GetObservedAgentThreadData, ThrowOnError>
3313
+ ) =>
3314
+ (options.client ?? client).get<
3315
+ GetObservedAgentThreadResponses,
3316
+ GetObservedAgentThreadErrors,
3317
+ ThrowOnError
3318
+ >({
3319
+ security: [{ scheme: "bearer", type: "http" }],
3320
+ url: "/api/observed-agent-threads/{threadId}",
3321
+ ...options,
3322
+ })
3323
+
3324
+ /**
3325
+ * List another user's agent thread messages
3326
+ *
3327
+ * Read-only, whoever owns the thread. Takes can.observe(agent.threads); the response matches the owner's route. `authors` names who wrote the page's messages.
3328
+ */
3329
+ export const listObservedAgentThreadMessages = <ThrowOnError extends boolean = false>(
3330
+ options: Options<ListObservedAgentThreadMessagesData, ThrowOnError>
3331
+ ) =>
3332
+ (options.client ?? client).get<
3333
+ ListObservedAgentThreadMessagesResponses,
3334
+ ListObservedAgentThreadMessagesErrors,
3335
+ ThrowOnError
3336
+ >({
3337
+ security: [{ scheme: "bearer", type: "http" }],
3338
+ url: "/api/observed-agent-threads/{threadId}/messages",
3339
+ ...options,
3340
+ })
3341
+
3342
+ /**
3343
+ * Get a file of another user's agent message
3344
+ *
3345
+ * Read-only, whoever owns the thread. Takes can.observe(agent.threads); the response matches the owner's route.
3346
+ */
3347
+ export const getObservedAgentMessageFileContent = <ThrowOnError extends boolean = false>(
3348
+ options: Options<GetObservedAgentMessageFileContentData, ThrowOnError>
3349
+ ) =>
3350
+ (options.client ?? client).get<
3351
+ GetObservedAgentMessageFileContentResponses,
3352
+ GetObservedAgentMessageFileContentErrors,
3353
+ ThrowOnError
3354
+ >({
3355
+ security: [{ scheme: "bearer", type: "http" }],
3356
+ url: "/api/observed-agent-threads/{threadId}/messages/{messageId}/files/content",
3357
+ ...options,
3358
+ })
3359
+
3360
+ /**
3361
+ * List another user's agent thread runs
3362
+ *
3363
+ * Read-only, whoever owns the thread. Takes can.observe(agent.threads); the response matches the owner's route.
3364
+ */
3365
+ export const listObservedAgentThreadRuns = <ThrowOnError extends boolean = false>(
3366
+ options: Options<ListObservedAgentThreadRunsData, ThrowOnError>
3367
+ ) =>
3368
+ (options.client ?? client).get<
3369
+ ListObservedAgentThreadRunsResponses,
3370
+ ListObservedAgentThreadRunsErrors,
3371
+ ThrowOnError
3372
+ >({
3373
+ security: [{ scheme: "bearer", type: "http" }],
3374
+ url: "/api/observed-agent-threads/{threadId}/runs",
3375
+ ...options,
3376
+ })
3377
+
3378
+ /**
3379
+ * List the sub-agents of another user's agent conversation
3380
+ *
3381
+ * Read-only, whoever owns the thread. Takes can.observe(agent.threads); the response matches the owner's route.
3382
+ */
3383
+ export const listObservedAgentThreadChildren = <ThrowOnError extends boolean = false>(
3384
+ options: Options<ListObservedAgentThreadChildrenData, ThrowOnError>
3385
+ ) =>
3386
+ (options.client ?? client).get<
3387
+ ListObservedAgentThreadChildrenResponses,
3388
+ ListObservedAgentThreadChildrenErrors,
3389
+ ThrowOnError
3390
+ >({
3391
+ security: [{ scheme: "bearer", type: "http" }],
3392
+ url: "/api/observed-agent-threads/{threadId}/children",
3393
+ ...options,
3394
+ })
3395
+
3396
+ /**
3397
+ * Get a file of another user's sub-agent
3398
+ *
3399
+ * Read-only, whoever owns the thread. Takes can.observe(agent.threads); the response matches the owner's route.
3400
+ */
3401
+ export const getObservedAgentChildFileContent = <ThrowOnError extends boolean = false>(
3402
+ options: Options<GetObservedAgentChildFileContentData, ThrowOnError>
3403
+ ) =>
3404
+ (options.client ?? client).get<
3405
+ GetObservedAgentChildFileContentResponses,
3406
+ GetObservedAgentChildFileContentErrors,
3407
+ ThrowOnError
3408
+ >({
3409
+ security: [{ scheme: "bearer", type: "http" }],
3410
+ url: "/api/observed-agent-threads/{threadId}/child-files/content",
3411
+ ...options,
3412
+ })
3413
+
3414
+ /**
3415
+ * Delete an Agent memory repo
3416
+ *
3417
+ * Deletes the repo with its history.
3418
+ */
3419
+ export const deleteAgentMemory = <ThrowOnError extends boolean = false>(
3420
+ options: Options<DeleteAgentMemoryData, ThrowOnError>
3421
+ ) =>
3422
+ (options.client ?? client).delete<
3423
+ DeleteAgentMemoryResponses,
3424
+ DeleteAgentMemoryErrors,
3425
+ ThrowOnError
3426
+ >({
3427
+ security: [
3428
+ { name: "x-sixb-csrf", type: "apiKey" },
3429
+ { scheme: "bearer", type: "http" },
3430
+ { scheme: "bearer", type: "http" },
3431
+ ],
3432
+ url: "/api/agent-memory/{repo}",
3433
+ ...options,
3434
+ })
3435
+
3436
+ /**
3437
+ * Get an Agent memory repo
3438
+ *
3439
+ * Every file of the repo as of its latest revision, or as an earlier revision left it.
3440
+ */
3441
+ export const getAgentMemory = <ThrowOnError extends boolean = false>(
3442
+ options: Options<GetAgentMemoryData, ThrowOnError>
3443
+ ) =>
3444
+ (options.client ?? client).get<GetAgentMemoryResponses, GetAgentMemoryErrors, ThrowOnError>({
3445
+ security: [
3446
+ { scheme: "bearer", type: "http" },
3447
+ { scheme: "bearer", type: "http" },
3448
+ ],
3449
+ url: "/api/agent-memory/{repo}",
3450
+ ...options,
3451
+ })
3452
+
3453
+ /**
3454
+ * List an Agent memory repo's revisions
3455
+ *
3456
+ * Each save is one revision, newest first.
3457
+ */
3458
+ export const listAgentMemoryRevisions = <ThrowOnError extends boolean = false>(
3459
+ options: Options<ListAgentMemoryRevisionsData, ThrowOnError>
3460
+ ) =>
3461
+ (options.client ?? client).get<
3462
+ ListAgentMemoryRevisionsResponses,
3463
+ ListAgentMemoryRevisionsErrors,
3464
+ ThrowOnError
3465
+ >({
3466
+ security: [
3467
+ { scheme: "bearer", type: "http" },
3468
+ { scheme: "bearer", type: "http" },
3469
+ ],
3470
+ url: "/api/agent-memory/{repo}/revisions",
3471
+ ...options,
3472
+ })
3473
+
3474
+ /**
3475
+ * Save changes to an Agent memory repo
3476
+ *
3477
+ * Stores the changes as the repo's next revision. When another save changed one of the files after baseRevision, nothing is saved and the response holds those files as they are now.
3478
+ */
3479
+ export const saveAgentMemory = <ThrowOnError extends boolean = false>(
3480
+ options: Options<SaveAgentMemoryData, ThrowOnError>
3481
+ ) =>
3482
+ (options.client ?? client).post<SaveAgentMemoryResponses, SaveAgentMemoryErrors, ThrowOnError>({
3483
+ security: [
3484
+ { name: "x-sixb-csrf", type: "apiKey" },
3485
+ { scheme: "bearer", type: "http" },
3486
+ { scheme: "bearer", type: "http" },
3487
+ ],
3488
+ url: "/api/agent-memory/{repo}/revisions",
3489
+ ...options,
3490
+ headers: {
3491
+ "Content-Type": "application/json",
3492
+ ...options.headers,
3493
+ },
3494
+ })
3495
+
3496
+ /**
3497
+ * List artifacts
3498
+ *
3499
+ * The caller's artifacts, most recently updated first. With thread, every artifact the conversation shares, for whoever reads it.
3500
+ */
3501
+ export const listArtifacts = <ThrowOnError extends boolean = false>(
3502
+ options?: Options<ListArtifactsData, ThrowOnError>
3503
+ ) =>
3504
+ (options?.client ?? client).get<ListArtifactsResponses, ListArtifactsErrors, ThrowOnError>({
3505
+ security: [
3506
+ { scheme: "bearer", type: "http" },
3507
+ { scheme: "bearer", type: "http" },
3508
+ ],
3509
+ url: "/api/artifacts",
3510
+ ...options,
3511
+ })
3512
+
3513
+ /**
3514
+ * Create an artifact
3515
+ *
3516
+ * Creates an artifact owned by the caller, with its first version. Store each file with POST /api/files first.
3517
+ */
3518
+ export const createArtifact = <ThrowOnError extends boolean = false>(
3519
+ options: Options<CreateArtifactData, ThrowOnError>
3520
+ ) =>
3521
+ (options.client ?? client).post<CreateArtifactResponses, CreateArtifactErrors, ThrowOnError>({
3522
+ security: [
3523
+ { name: "x-sixb-csrf", type: "apiKey" },
3524
+ { scheme: "bearer", type: "http" },
3525
+ { scheme: "bearer", type: "http" },
3526
+ ],
3527
+ url: "/api/artifacts",
3528
+ ...options,
3529
+ headers: {
3530
+ "Content-Type": "application/json",
3531
+ ...options.headers,
3532
+ },
3533
+ })
3534
+
3535
+ /**
3536
+ * Delete an artifact
3537
+ *
3538
+ * Deletes the artifact with every version, from every conversation that shares it. Only its owner can.
3539
+ */
3540
+ export const deleteArtifact = <ThrowOnError extends boolean = false>(
3541
+ options: Options<DeleteArtifactData, ThrowOnError>
3542
+ ) =>
3543
+ (options.client ?? client).delete<DeleteArtifactResponses, DeleteArtifactErrors, ThrowOnError>({
3544
+ security: [
3545
+ { name: "x-sixb-csrf", type: "apiKey" },
3546
+ { scheme: "bearer", type: "http" },
3547
+ { scheme: "bearer", type: "http" },
3548
+ ],
3549
+ url: "/api/artifacts/{artifactId}",
3550
+ ...options,
3551
+ })
3552
+
3553
+ /**
3554
+ * Get an artifact and its versions
3555
+ */
3556
+ export const getArtifact = <ThrowOnError extends boolean = false>(
3557
+ options: Options<GetArtifactData, ThrowOnError>
3558
+ ) =>
3559
+ (options.client ?? client).get<GetArtifactResponses, GetArtifactErrors, ThrowOnError>({
3560
+ security: [
3561
+ { scheme: "bearer", type: "http" },
3562
+ { scheme: "bearer", type: "http" },
3563
+ ],
3564
+ url: "/api/artifacts/{artifactId}",
3565
+ ...options,
3566
+ })
3567
+
3568
+ /**
3569
+ * Reset what a page keeps
3570
+ *
3571
+ * Deletes every value the artifact keeps for the caller.
3572
+ */
3573
+ export const clearArtifactState = <ThrowOnError extends boolean = false>(
3574
+ options: Options<ClearArtifactStateData, ThrowOnError>
3575
+ ) =>
3576
+ (options.client ?? client).delete<
3577
+ ClearArtifactStateResponses,
3578
+ ClearArtifactStateErrors,
3579
+ ThrowOnError
3580
+ >({
3581
+ security: [
3582
+ { name: "x-sixb-csrf", type: "apiKey" },
3583
+ { scheme: "bearer", type: "http" },
3584
+ { scheme: "bearer", type: "http" },
3585
+ ],
3586
+ url: "/api/artifacts/{artifactId}/state",
3587
+ ...options,
3588
+ })
3589
+
3590
+ /**
3591
+ * Read what a page keeps
3592
+ *
3593
+ * Every value the artifact keeps for the caller as its reader, as a page keeps it with sixb.state, across its versions.
3594
+ */
3595
+ export const getArtifactState = <ThrowOnError extends boolean = false>(
3596
+ options: Options<GetArtifactStateData, ThrowOnError>
3597
+ ) =>
3598
+ (options.client ?? client).get<GetArtifactStateResponses, GetArtifactStateErrors, ThrowOnError>({
3599
+ security: [
3600
+ { scheme: "bearer", type: "http" },
3601
+ { scheme: "bearer", type: "http" },
3602
+ ],
3603
+ url: "/api/artifacts/{artifactId}/state",
3604
+ ...options,
3605
+ })
3606
+
3607
+ /**
3608
+ * Delete a value a page keeps
3609
+ */
3610
+ export const deleteArtifactStateValue = <ThrowOnError extends boolean = false>(
3611
+ options: Options<DeleteArtifactStateValueData, ThrowOnError>
3612
+ ) =>
3613
+ (options.client ?? client).delete<
3614
+ DeleteArtifactStateValueResponses,
3615
+ DeleteArtifactStateValueErrors,
3616
+ ThrowOnError
3617
+ >({
3618
+ security: [
3619
+ { name: "x-sixb-csrf", type: "apiKey" },
3620
+ { scheme: "bearer", type: "http" },
3621
+ { scheme: "bearer", type: "http" },
3622
+ ],
3623
+ url: "/api/artifacts/{artifactId}/state/{key}",
3624
+ ...options,
3625
+ })
3626
+
3627
+ /**
3628
+ * Keep a value for a page
3629
+ *
3630
+ * Keeps a JSON value under the key for the caller, replacing one there. Refused with 413 state_full past the limits.
3631
+ */
3632
+ export const setArtifactState = <ThrowOnError extends boolean = false>(
3633
+ options: Options<SetArtifactStateData, ThrowOnError>
3634
+ ) =>
3635
+ (options.client ?? client).put<SetArtifactStateResponses, SetArtifactStateErrors, ThrowOnError>({
3636
+ security: [
3637
+ { name: "x-sixb-csrf", type: "apiKey" },
3638
+ { scheme: "bearer", type: "http" },
3639
+ { scheme: "bearer", type: "http" },
3640
+ ],
3641
+ url: "/api/artifacts/{artifactId}/state/{key}",
3642
+ ...options,
3643
+ headers: {
3644
+ "Content-Type": "application/json",
3645
+ ...options.headers,
3646
+ },
3647
+ })
3648
+
3649
+ /**
3650
+ * Publish an artifact's next version
3651
+ *
3652
+ * The kind must be the artifact's. The new version becomes the latest. With baseVersion, it is refused with 409 artifact_moved when another version was published since.
3653
+ */
3654
+ export const publishArtifactVersion = <ThrowOnError extends boolean = false>(
3655
+ options: Options<PublishArtifactVersionData, ThrowOnError>
3656
+ ) =>
3657
+ (options.client ?? client).post<
3658
+ PublishArtifactVersionResponses,
3659
+ PublishArtifactVersionErrors,
3660
+ ThrowOnError
3661
+ >({
3662
+ security: [
3663
+ { name: "x-sixb-csrf", type: "apiKey" },
3664
+ { scheme: "bearer", type: "http" },
3665
+ { scheme: "bearer", type: "http" },
3666
+ ],
3667
+ url: "/api/artifacts/{artifactId}/versions",
3668
+ ...options,
3669
+ headers: {
3670
+ "Content-Type": "application/json",
3671
+ ...options.headers,
3672
+ },
3673
+ })
3674
+
3675
+ /**
3676
+ * Open a version in a frame
3677
+ *
3678
+ * A short-lived path that serves the files of a version that opens in a sandboxed frame, as slides do. It expires within an hour. A kind that does not open in a frame is refused with 409 artifact_kind_mismatch.
3679
+ */
3680
+ export const createArtifactFrame = <ThrowOnError extends boolean = false>(
3681
+ options: Options<CreateArtifactFrameData, ThrowOnError>
2817
3682
  ) =>
2818
3683
  (options.client ?? client).post<
2819
3684
  CreateArtifactFrameResponses,
@@ -2850,6 +3715,23 @@ export const getArtifactVersion = <ThrowOnError extends boolean = false>(
2850
3715
  ...options,
2851
3716
  })
2852
3717
 
3718
+ /**
3719
+ * Run an artifact's query
3720
+ *
3721
+ * Runs the version's queries/<name>.json as the caller, with their rights: a type they cannot view is refused with 403, and a marked property they are not cleared for is left out of each row. Rows are serialized as POST /api/objects/query returns them, beside the schema of what they hold as the caller may view it. Use "latest" for the newest version. A query the ontology no longer admits is refused with 409 query_invalid.
3722
+ */
3723
+ export const getArtifactQuery = <ThrowOnError extends boolean = false>(
3724
+ options: Options<GetArtifactQueryData, ThrowOnError>
3725
+ ) =>
3726
+ (options.client ?? client).get<GetArtifactQueryResponses, GetArtifactQueryErrors, ThrowOnError>({
3727
+ security: [
3728
+ { scheme: "bearer", type: "http" },
3729
+ { scheme: "bearer", type: "http" },
3730
+ ],
3731
+ url: "/api/artifacts/{artifactId}/versions/{version}/queries/{name}",
3732
+ ...options,
3733
+ })
3734
+
2853
3735
  /**
2854
3736
  * Get a file of an artifact version
2855
3737
  */
@@ -2889,13 +3771,16 @@ export const headArtifactFileContent = <ThrowOnError extends boolean = false>(
2889
3771
  })
2890
3772
 
2891
3773
  /**
2892
- * List the project model catalog
3774
+ * List the project's models of every kind, with their options and prices
2893
3775
  */
2894
3776
  export const listModels = <ThrowOnError extends boolean = false>(
2895
3777
  options?: Options<ListModelsData, ThrowOnError>
2896
3778
  ) =>
2897
3779
  (options?.client ?? client).get<ListModelsResponses, unknown, ThrowOnError>({
2898
- security: [{ scheme: "bearer", type: "http" }],
3780
+ security: [
3781
+ { scheme: "bearer", type: "http" },
3782
+ { scheme: "bearer", type: "http" },
3783
+ ],
2899
3784
  url: "/api/models",
2900
3785
  ...options,
2901
3786
  })
@@ -3214,6 +4099,36 @@ export const listActivityConnections = <ThrowOnError extends boolean = false>(
3214
4099
  ...options,
3215
4100
  })
3216
4101
 
4102
+ /**
4103
+ * List project members
4104
+ */
4105
+ export const listUsers = <ThrowOnError extends boolean = false>(
4106
+ options?: Options<ListUsersData, ThrowOnError>
4107
+ ) =>
4108
+ (options?.client ?? client).get<ListUsersResponses, ListUsersErrors, ThrowOnError>({
4109
+ security: [
4110
+ { scheme: "bearer", type: "http" },
4111
+ { scheme: "bearer", type: "http" },
4112
+ ],
4113
+ url: "/api/users",
4114
+ ...options,
4115
+ })
4116
+
4117
+ /**
4118
+ * Get a project member
4119
+ */
4120
+ export const getUser = <ThrowOnError extends boolean = false>(
4121
+ options: Options<GetUserData, ThrowOnError>
4122
+ ) =>
4123
+ (options.client ?? client).get<GetUserResponses, GetUserErrors, ThrowOnError>({
4124
+ security: [
4125
+ { scheme: "bearer", type: "http" },
4126
+ { scheme: "bearer", type: "http" },
4127
+ ],
4128
+ url: "/api/users/{userId}",
4129
+ ...options,
4130
+ })
4131
+
3217
4132
  /**
3218
4133
  * List all projection definitions
3219
4134
  */