@sixb/client 0.2.5 → 0.2.7

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 (49) hide show
  1. package/dist/agent-streams.d.ts +11 -2
  2. package/dist/agent-streams.d.ts.map +1 -1
  3. package/dist/artifact-live.js +1 -1
  4. package/dist/browser.js +1 -1
  5. package/dist/{chunk-ktqfenfd.js → chunk-3dxa8d3r.js} +46 -6
  6. package/dist/chunk-3dxa8d3r.js.map +10 -0
  7. package/dist/{chunk-zta9jf24.js → chunk-4t68c4gf.js} +10 -3
  8. package/dist/{chunk-zta9jf24.js.map → chunk-4t68c4gf.js.map} +3 -3
  9. package/dist/{chunk-tm588tr7.js → chunk-6caavk8p.js} +1 -1
  10. package/dist/{chunk-pn4b10k4.js → chunk-pzz6gtn5.js} +2 -2
  11. package/dist/{chunk-60fdvjxa.js → chunk-vydypkf1.js} +39 -2
  12. package/dist/chunk-vydypkf1.js.map +10 -0
  13. package/dist/connectors/connection.d.ts +12 -0
  14. package/dist/connectors/connection.d.ts.map +1 -1
  15. package/dist/connectors/index.d.ts +1 -1
  16. package/dist/connectors/index.d.ts.map +1 -1
  17. package/dist/connectors/queries.d.ts.map +1 -1
  18. package/dist/generated/@tanstack/react-query.gen.d.ts +1068 -153
  19. package/dist/generated/@tanstack/react-query.gen.d.ts.map +1 -1
  20. package/dist/generated/index.d.ts +2 -2
  21. package/dist/generated/index.d.ts.map +1 -1
  22. package/dist/generated/sdk.gen.d.ts +27 -3
  23. package/dist/generated/sdk.gen.d.ts.map +1 -1
  24. package/dist/generated/types.gen.d.ts +1011 -51
  25. package/dist/generated/types.gen.d.ts.map +1 -1
  26. package/dist/hooks.js +87 -5
  27. package/dist/hooks.js.map +4 -4
  28. package/dist/index.js +13 -5
  29. package/dist/index.js.map +1 -1
  30. package/dist/logs.js +3 -3
  31. package/dist/models.js +10 -2
  32. package/dist/models.js.map +1 -1
  33. package/dist/query.js +2 -2
  34. package/dist/users-hooks.d.ts.map +1 -1
  35. package/dist/ws-socket.d.ts +2 -0
  36. package/dist/ws-socket.d.ts.map +1 -1
  37. package/package.json +2 -2
  38. package/src/agent-streams.ts +22 -0
  39. package/src/connectors/connection.ts +59 -0
  40. package/src/connectors/index.ts +1 -0
  41. package/src/generated/@tanstack/react-query.gen.ts +131 -2
  42. package/src/generated/index.ts +20 -0
  43. package/src/generated/sdk.gen.ts +93 -2
  44. package/src/generated/types.gen.ts +1451 -37
  45. package/src/ws-socket.ts +62 -7
  46. package/dist/chunk-60fdvjxa.js.map +0 -10
  47. package/dist/chunk-ktqfenfd.js.map +0 -10
  48. /package/dist/{chunk-tm588tr7.js.map → chunk-6caavk8p.js.map} +0 -0
  49. /package/dist/{chunk-pn4b10k4.js.map → chunk-pzz6gtn5.js.map} +0 -0
@@ -1995,6 +1995,10 @@ export type GetAiAccountingOverviewData = {
1995
1995
  */
1996
1996
  kind?: "language" | "image" | "video" | "embedding" | "decision" | "transcription" | "speech" | "reranking" | "web-search";
1997
1997
  bucket: "hour" | "day" | "week";
1998
+ /**
1999
+ * The IANA time zone whose days, weeks or hours the periods follow, such as America/New_York; UTC when absent
2000
+ */
2001
+ timeZone?: string;
1998
2002
  };
1999
2003
  url: "/api/ai/accounting/overview";
2000
2004
  };
@@ -4100,6 +4104,12 @@ export type TranscribeAudioResponses = {
4100
4104
  reason?: string;
4101
4105
  };
4102
4106
  text: string;
4107
+ words?: Array<{
4108
+ text: string;
4109
+ startMs: number;
4110
+ endMs: number;
4111
+ speaker?: string;
4112
+ }>;
4103
4113
  };
4104
4114
  };
4105
4115
  export type TranscribeAudioResponse = TranscribeAudioResponses[keyof TranscribeAudioResponses];
@@ -4164,6 +4174,10 @@ export type ListConnectorsResponses = {
4164
4174
  */
4165
4175
  200: Array<{
4166
4176
  id: string;
4177
+ /**
4178
+ * Folder below the definition's directory, such as `raw/erp`; absent at its top.
4179
+ */
4180
+ folder?: string;
4167
4181
  type: string;
4168
4182
  connection: {
4169
4183
  authentication: "oauth2";
@@ -4203,6 +4217,10 @@ export type GetConnectorResponses = {
4203
4217
  */
4204
4218
  200: {
4205
4219
  id: string;
4220
+ /**
4221
+ * Folder below the definition's directory, such as `raw/erp`; absent at its top.
4222
+ */
4223
+ folder?: string;
4206
4224
  type: string;
4207
4225
  connection: {
4208
4226
  authentication: "oauth2";
@@ -5474,6 +5492,10 @@ export type ListDatasetsResponses = {
5474
5492
  }>;
5475
5493
  };
5476
5494
  kind: "dataset";
5495
+ /**
5496
+ * Folder below the definition's directory, such as `raw/erp`; absent at its top.
5497
+ */
5498
+ folder?: string;
5477
5499
  materialized: boolean;
5478
5500
  latestVersion: {
5479
5501
  datasetId: string;
@@ -5534,6 +5556,10 @@ export type GetDatasetResponses = {
5534
5556
  }>;
5535
5557
  };
5536
5558
  kind: "dataset";
5559
+ /**
5560
+ * Folder below the definition's directory, such as `raw/erp`; absent at its top.
5561
+ */
5562
+ folder?: string;
5537
5563
  materialized: boolean;
5538
5564
  latestVersion: {
5539
5565
  datasetId: string;
@@ -5933,6 +5959,10 @@ export type ListSyncsResponses = {
5933
5959
  */
5934
5960
  200: Array<{
5935
5961
  id: string;
5962
+ /**
5963
+ * Folder below the definition's directory, such as `raw/erp`; absent at its top.
5964
+ */
5965
+ folder?: string;
5936
5966
  mode: "snapshot" | "append" | "merge";
5937
5967
  connector: {
5938
5968
  id: string;
@@ -5963,6 +5993,7 @@ export type ListSyncsResponses = {
5963
5993
  id: string;
5964
5994
  projectId: string;
5965
5995
  syncId: string;
5996
+ connectionId?: string;
5966
5997
  datasetId: string;
5967
5998
  mode: "snapshot" | "append" | "merge";
5968
5999
  status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
@@ -5978,7 +6009,7 @@ export type ListSyncsResponses = {
5978
6009
  expectedLatestVersionId?: string;
5979
6010
  commitMessage?: string;
5980
6011
  error?: {
5981
- code: "internal.unexpected" | "runtime.cancelled" | "queue.enqueue_failed" | "sync.execution_failed";
6012
+ code: "internal.unexpected" | "runtime.cancelled" | "queue.enqueue_failed" | "sync.execution_failed" | "connector.authorization_required";
5982
6013
  message: string;
5983
6014
  retryable: boolean;
5984
6015
  at: string;
@@ -5993,6 +6024,14 @@ export type ListSyncsResponses = {
5993
6024
  truncated?: true;
5994
6025
  };
5995
6026
  } | null;
6027
+ accounts?: {
6028
+ total: number;
6029
+ running: number;
6030
+ needsReconnecting: number;
6031
+ failing: number;
6032
+ synced: number;
6033
+ lastSyncedAt?: string;
6034
+ };
5996
6035
  }>;
5997
6036
  };
5998
6037
  export type ListSyncsResponse = ListSyncsResponses[keyof ListSyncsResponses];
@@ -6019,6 +6058,10 @@ export type GetSyncResponses = {
6019
6058
  */
6020
6059
  200: {
6021
6060
  id: string;
6061
+ /**
6062
+ * Folder below the definition's directory, such as `raw/erp`; absent at its top.
6063
+ */
6064
+ folder?: string;
6022
6065
  mode: "snapshot" | "append" | "merge";
6023
6066
  connector: {
6024
6067
  id: string;
@@ -6049,6 +6092,7 @@ export type GetSyncResponses = {
6049
6092
  id: string;
6050
6093
  projectId: string;
6051
6094
  syncId: string;
6095
+ connectionId?: string;
6052
6096
  datasetId: string;
6053
6097
  mode: "snapshot" | "append" | "merge";
6054
6098
  status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
@@ -6064,7 +6108,7 @@ export type GetSyncResponses = {
6064
6108
  expectedLatestVersionId?: string;
6065
6109
  commitMessage?: string;
6066
6110
  error?: {
6067
- code: "internal.unexpected" | "runtime.cancelled" | "queue.enqueue_failed" | "sync.execution_failed";
6111
+ code: "internal.unexpected" | "runtime.cancelled" | "queue.enqueue_failed" | "sync.execution_failed" | "connector.authorization_required";
6068
6112
  message: string;
6069
6113
  retryable: boolean;
6070
6114
  at: string;
@@ -6079,14 +6123,142 @@ export type GetSyncResponses = {
6079
6123
  truncated?: true;
6080
6124
  };
6081
6125
  } | null;
6126
+ accounts?: {
6127
+ total: number;
6128
+ running: number;
6129
+ needsReconnecting: number;
6130
+ failing: number;
6131
+ synced: number;
6132
+ lastSyncedAt?: string;
6133
+ };
6082
6134
  };
6083
6135
  };
6084
6136
  export type GetSyncResponse = GetSyncResponses[keyof GetSyncResponses];
6137
+ export type ListConnectorAccountsData = {
6138
+ body?: never;
6139
+ path: {
6140
+ connectorId: string;
6141
+ };
6142
+ query?: never;
6143
+ url: "/api/connectors/{connectorId}/accounts";
6144
+ };
6145
+ export type ListConnectorAccountsResponses = {
6146
+ /**
6147
+ * Response for status 200
6148
+ */
6149
+ 200: {
6150
+ accounts: Array<{
6151
+ connection: {
6152
+ id: string;
6153
+ owner: {
6154
+ type: "project";
6155
+ } | {
6156
+ type: "user";
6157
+ id: string;
6158
+ };
6159
+ slot: string;
6160
+ account: {
6161
+ id: string;
6162
+ label: string;
6163
+ };
6164
+ };
6165
+ latestRuns: Array<{
6166
+ id: string;
6167
+ projectId: string;
6168
+ syncId: string;
6169
+ connectionId?: string;
6170
+ datasetId: string;
6171
+ mode: "snapshot" | "append" | "merge";
6172
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
6173
+ attempt: number;
6174
+ queuedAt: string;
6175
+ startedAt?: string;
6176
+ finishedAt?: string;
6177
+ rowsRead?: number;
6178
+ output?: {
6179
+ datasetId: string;
6180
+ versionId: string;
6181
+ };
6182
+ expectedLatestVersionId?: string;
6183
+ commitMessage?: string;
6184
+ error?: {
6185
+ code: "internal.unexpected" | "runtime.cancelled" | "queue.enqueue_failed" | "sync.execution_failed" | "connector.authorization_required";
6186
+ message: string;
6187
+ retryable: boolean;
6188
+ at: string;
6189
+ /**
6190
+ * Any JSON-compatible value.
6191
+ */
6192
+ details?: string | number | boolean | Array<unknown> | {
6193
+ [key: string]: unknown;
6194
+ } | null;
6195
+ httpStatus?: number;
6196
+ redacted?: true;
6197
+ truncated?: true;
6198
+ };
6199
+ }>;
6200
+ }>;
6201
+ };
6202
+ };
6203
+ export type ListConnectorAccountsResponse = ListConnectorAccountsResponses[keyof ListConnectorAccountsResponses];
6204
+ export type ListConnectorConnectionSyncRunsData = {
6205
+ body?: never;
6206
+ path: {
6207
+ connectorId: string;
6208
+ connectionId: string;
6209
+ };
6210
+ query?: never;
6211
+ url: "/api/connectors/{connectorId}/connections/{connectionId}/sync-runs";
6212
+ };
6213
+ export type ListConnectorConnectionSyncRunsResponses = {
6214
+ /**
6215
+ * Response for status 200
6216
+ */
6217
+ 200: {
6218
+ runs: Array<{
6219
+ id: string;
6220
+ projectId: string;
6221
+ syncId: string;
6222
+ connectionId?: string;
6223
+ datasetId: string;
6224
+ mode: "snapshot" | "append" | "merge";
6225
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
6226
+ attempt: number;
6227
+ queuedAt: string;
6228
+ startedAt?: string;
6229
+ finishedAt?: string;
6230
+ rowsRead?: number;
6231
+ output?: {
6232
+ datasetId: string;
6233
+ versionId: string;
6234
+ };
6235
+ expectedLatestVersionId?: string;
6236
+ commitMessage?: string;
6237
+ error?: {
6238
+ code: "internal.unexpected" | "runtime.cancelled" | "queue.enqueue_failed" | "sync.execution_failed" | "connector.authorization_required";
6239
+ message: string;
6240
+ retryable: boolean;
6241
+ at: string;
6242
+ /**
6243
+ * Any JSON-compatible value.
6244
+ */
6245
+ details?: string | number | boolean | Array<unknown> | {
6246
+ [key: string]: unknown;
6247
+ } | null;
6248
+ httpStatus?: number;
6249
+ redacted?: true;
6250
+ truncated?: true;
6251
+ };
6252
+ }>;
6253
+ };
6254
+ };
6255
+ export type ListConnectorConnectionSyncRunsResponse = ListConnectorConnectionSyncRunsResponses[keyof ListConnectorConnectionSyncRunsResponses];
6085
6256
  export type ListSyncRunsData = {
6086
6257
  body?: never;
6087
6258
  path?: never;
6088
6259
  query?: {
6089
6260
  syncId?: string;
6261
+ connectionId?: string;
6090
6262
  datasetId?: string;
6091
6263
  status?: "queued" | "running" | "succeeded" | "failed" | "cancelled";
6092
6264
  startedAfter?: string;
@@ -6121,6 +6293,7 @@ export type ListSyncRunsResponses = {
6121
6293
  id: string;
6122
6294
  projectId: string;
6123
6295
  syncId: string;
6296
+ connectionId?: string;
6124
6297
  datasetId: string;
6125
6298
  mode: "snapshot" | "append" | "merge";
6126
6299
  status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
@@ -6136,7 +6309,7 @@ export type ListSyncRunsResponses = {
6136
6309
  expectedLatestVersionId?: string;
6137
6310
  commitMessage?: string;
6138
6311
  error?: {
6139
- code: "internal.unexpected" | "runtime.cancelled" | "queue.enqueue_failed" | "sync.execution_failed";
6312
+ code: "internal.unexpected" | "runtime.cancelled" | "queue.enqueue_failed" | "sync.execution_failed" | "connector.authorization_required";
6140
6313
  message: string;
6141
6314
  retryable: boolean;
6142
6315
  at: string;
@@ -6158,6 +6331,7 @@ export type ListSyncRunsResponses = {
6158
6331
  export type ListSyncRunsResponse = ListSyncRunsResponses[keyof ListSyncRunsResponses];
6159
6332
  export type RequestSyncRunData = {
6160
6333
  body: {
6334
+ connectionId?: string;
6161
6335
  expectedLatestVersionId?: string;
6162
6336
  commitMessage?: string;
6163
6337
  };
@@ -6193,10 +6367,13 @@ export type RequestSyncRunResponses = {
6193
6367
  * Response for status 202
6194
6368
  */
6195
6369
  202: {
6196
- runId: string;
6197
- jobId: string;
6198
- syncId: string;
6199
- queuedAt: string;
6370
+ runs: Array<{
6371
+ runId: string;
6372
+ jobId: string;
6373
+ syncId: string;
6374
+ connectionId?: string;
6375
+ queuedAt: string;
6376
+ }>;
6200
6377
  };
6201
6378
  };
6202
6379
  export type RequestSyncRunResponse = RequestSyncRunResponses[keyof RequestSyncRunResponses];
@@ -6212,6 +6389,10 @@ export type ListPipelinesResponses = {
6212
6389
  */
6213
6390
  200: Array<{
6214
6391
  id: string;
6392
+ /**
6393
+ * Folder below the definition's directory, such as `raw/erp`; absent at its top.
6394
+ */
6395
+ folder?: string;
6215
6396
  triggers: Array<{
6216
6397
  type: "schedule";
6217
6398
  scheduleId: string;
@@ -6318,6 +6499,10 @@ export type GetPipelineResponses = {
6318
6499
  */
6319
6500
  200: {
6320
6501
  id: string;
6502
+ /**
6503
+ * Folder below the definition's directory, such as `raw/erp`; absent at its top.
6504
+ */
6505
+ folder?: string;
6321
6506
  triggers: Array<{
6322
6507
  type: "schedule";
6323
6508
  scheduleId: string;
@@ -6624,6 +6809,10 @@ export type ListWorkflowsResponses = {
6624
6809
  */
6625
6810
  200: Array<{
6626
6811
  id: string;
6812
+ /**
6813
+ * Folder below the definition's directory, such as `raw/erp`; absent at its top.
6814
+ */
6815
+ folder?: string;
6627
6816
  input: {
6628
6817
  [key: string]: string | number | boolean | Array<unknown> | {
6629
6818
  [key: string]: unknown;
@@ -6741,6 +6930,10 @@ export type GetWorkflowResponses = {
6741
6930
  */
6742
6931
  200: {
6743
6932
  id: string;
6933
+ /**
6934
+ * Folder below the definition's directory, such as `raw/erp`; absent at its top.
6935
+ */
6936
+ folder?: string;
6744
6937
  input: {
6745
6938
  [key: string]: string | number | boolean | Array<unknown> | {
6746
6939
  [key: string]: unknown;
@@ -8101,6 +8294,10 @@ export type ListRulesResponses = {
8101
8294
  200: Array<{
8102
8295
  kind: "rule";
8103
8296
  id: string;
8297
+ /**
8298
+ * Folder below the definition's directory, such as `raw/erp`; absent at its top.
8299
+ */
8300
+ folder?: string;
8104
8301
  subject: {
8105
8302
  kind: "object";
8106
8303
  objectTypeId: string;
@@ -8213,6 +8410,10 @@ export type GetRuleResponses = {
8213
8410
  200: {
8214
8411
  kind: "rule";
8215
8412
  id: string;
8413
+ /**
8414
+ * Folder below the definition's directory, such as `raw/erp`; absent at its top.
8415
+ */
8416
+ folder?: string;
8216
8417
  subject: {
8217
8418
  kind: "object";
8218
8419
  objectTypeId: string;
@@ -8789,6 +8990,10 @@ export type ListObjectTypesResponses = {
8789
8990
  */
8790
8991
  200: Array<{
8791
8992
  id: string;
8993
+ /**
8994
+ * Folder below the definition's directory, such as `raw/erp`; absent at its top.
8995
+ */
8996
+ folder?: string;
8792
8997
  name: string;
8793
8998
  description?: string;
8794
8999
  extends?: string;
@@ -8911,6 +9116,10 @@ export type GetObjectTypeResponses = {
8911
9116
  */
8912
9117
  200: {
8913
9118
  id: string;
9119
+ /**
9120
+ * Folder below the definition's directory, such as `raw/erp`; absent at its top.
9121
+ */
9122
+ folder?: string;
8914
9123
  name: string;
8915
9124
  description?: string;
8916
9125
  extends?: string;
@@ -9640,6 +9849,10 @@ export type ListActionsResponses = {
9640
9849
  */
9641
9850
  200: Array<{
9642
9851
  id: string;
9852
+ /**
9853
+ * Folder below the definition's directory, such as `raw/erp`; absent at its top.
9854
+ */
9855
+ folder?: string;
9643
9856
  name: string;
9644
9857
  description?: string;
9645
9858
  objectTypeId?: string;
@@ -9684,6 +9897,10 @@ export type GetActionResponses = {
9684
9897
  */
9685
9898
  200: {
9686
9899
  id: string;
9900
+ /**
9901
+ * Folder below the definition's directory, such as `raw/erp`; absent at its top.
9902
+ */
9903
+ folder?: string;
9687
9904
  name: string;
9688
9905
  description?: string;
9689
9906
  objectTypeId?: string;
@@ -10585,6 +10802,24 @@ export type ListAgentThreadsResponses = {
10585
10802
  messageCount: number;
10586
10803
  createdAt: string;
10587
10804
  updatedAt: string;
10805
+ read?: {
10806
+ threadId: string;
10807
+ throughSeq: number;
10808
+ headSeq: number;
10809
+ unread: number;
10810
+ readAt?: string;
10811
+ };
10812
+ lastRun?: {
10813
+ id: string;
10814
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
10815
+ finishReason?: "stop" | "length" | "content-filter" | "tool-calls" | "timeout" | "interrupted" | "awaiting_approval" | "awaiting_answer" | "error" | "other" | "unknown";
10816
+ errorCode?: "internal.unexpected" | "runtime.cancelled" | "agent.context_limit_exceeded" | "agent.execution_failed" | "agent.step_limit_reached" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable";
10817
+ completedAt?: string;
10818
+ requestedBy?: {
10819
+ type: "user" | "serviceAccount";
10820
+ id: string;
10821
+ };
10822
+ };
10588
10823
  approvalMode?: "manual" | "accept-edits" | "auto";
10589
10824
  approvalModeSource?: "thread" | "default" | "fallback" | "run";
10590
10825
  }>;
@@ -10710,6 +10945,24 @@ export type CreateAgentThreadResponses = {
10710
10945
  messageCount: number;
10711
10946
  createdAt: string;
10712
10947
  updatedAt: string;
10948
+ read?: {
10949
+ threadId: string;
10950
+ throughSeq: number;
10951
+ headSeq: number;
10952
+ unread: number;
10953
+ readAt?: string;
10954
+ };
10955
+ lastRun?: {
10956
+ id: string;
10957
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
10958
+ finishReason?: "stop" | "length" | "content-filter" | "tool-calls" | "timeout" | "interrupted" | "awaiting_approval" | "awaiting_answer" | "error" | "other" | "unknown";
10959
+ errorCode?: "internal.unexpected" | "runtime.cancelled" | "agent.context_limit_exceeded" | "agent.execution_failed" | "agent.step_limit_reached" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable";
10960
+ completedAt?: string;
10961
+ requestedBy?: {
10962
+ type: "user" | "serviceAccount";
10963
+ id: string;
10964
+ };
10965
+ };
10713
10966
  approvalMode?: "manual" | "accept-edits" | "auto";
10714
10967
  approvalModeSource?: "thread" | "default" | "fallback" | "run";
10715
10968
  };
@@ -10814,6 +11067,24 @@ export type GetAgentThreadResponses = {
10814
11067
  messageCount: number;
10815
11068
  createdAt: string;
10816
11069
  updatedAt: string;
11070
+ read?: {
11071
+ threadId: string;
11072
+ throughSeq: number;
11073
+ headSeq: number;
11074
+ unread: number;
11075
+ readAt?: string;
11076
+ };
11077
+ lastRun?: {
11078
+ id: string;
11079
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
11080
+ finishReason?: "stop" | "length" | "content-filter" | "tool-calls" | "timeout" | "interrupted" | "awaiting_approval" | "awaiting_answer" | "error" | "other" | "unknown";
11081
+ errorCode?: "internal.unexpected" | "runtime.cancelled" | "agent.context_limit_exceeded" | "agent.execution_failed" | "agent.step_limit_reached" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable";
11082
+ completedAt?: string;
11083
+ requestedBy?: {
11084
+ type: "user" | "serviceAccount";
11085
+ id: string;
11086
+ };
11087
+ };
10817
11088
  approvalMode?: "manual" | "accept-edits" | "auto";
10818
11089
  approvalModeSource?: "thread" | "default" | "fallback" | "run";
10819
11090
  };
@@ -10939,6 +11210,24 @@ export type AddAgentThreadParticipantsResponses = {
10939
11210
  messageCount: number;
10940
11211
  createdAt: string;
10941
11212
  updatedAt: string;
11213
+ read?: {
11214
+ threadId: string;
11215
+ throughSeq: number;
11216
+ headSeq: number;
11217
+ unread: number;
11218
+ readAt?: string;
11219
+ };
11220
+ lastRun?: {
11221
+ id: string;
11222
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
11223
+ finishReason?: "stop" | "length" | "content-filter" | "tool-calls" | "timeout" | "interrupted" | "awaiting_approval" | "awaiting_answer" | "error" | "other" | "unknown";
11224
+ errorCode?: "internal.unexpected" | "runtime.cancelled" | "agent.context_limit_exceeded" | "agent.execution_failed" | "agent.step_limit_reached" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable";
11225
+ completedAt?: string;
11226
+ requestedBy?: {
11227
+ type: "user" | "serviceAccount";
11228
+ id: string;
11229
+ };
11230
+ };
10942
11231
  approvalMode?: "manual" | "accept-edits" | "auto";
10943
11232
  approvalModeSource?: "thread" | "default" | "fallback" | "run";
10944
11233
  };
@@ -11102,6 +11391,24 @@ export type ForkAgentThreadResponses = {
11102
11391
  messageCount: number;
11103
11392
  createdAt: string;
11104
11393
  updatedAt: string;
11394
+ read?: {
11395
+ threadId: string;
11396
+ throughSeq: number;
11397
+ headSeq: number;
11398
+ unread: number;
11399
+ readAt?: string;
11400
+ };
11401
+ lastRun?: {
11402
+ id: string;
11403
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
11404
+ finishReason?: "stop" | "length" | "content-filter" | "tool-calls" | "timeout" | "interrupted" | "awaiting_approval" | "awaiting_answer" | "error" | "other" | "unknown";
11405
+ errorCode?: "internal.unexpected" | "runtime.cancelled" | "agent.context_limit_exceeded" | "agent.execution_failed" | "agent.step_limit_reached" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable";
11406
+ completedAt?: string;
11407
+ requestedBy?: {
11408
+ type: "user" | "serviceAccount";
11409
+ id: string;
11410
+ };
11411
+ };
11105
11412
  approvalMode?: "manual" | "accept-edits" | "auto";
11106
11413
  approvalModeSource?: "thread" | "default" | "fallback" | "run";
11107
11414
  };
@@ -11216,6 +11523,24 @@ export type RecreateAgentThreadSandboxResponses = {
11216
11523
  messageCount: number;
11217
11524
  createdAt: string;
11218
11525
  updatedAt: string;
11526
+ read?: {
11527
+ threadId: string;
11528
+ throughSeq: number;
11529
+ headSeq: number;
11530
+ unread: number;
11531
+ readAt?: string;
11532
+ };
11533
+ lastRun?: {
11534
+ id: string;
11535
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
11536
+ finishReason?: "stop" | "length" | "content-filter" | "tool-calls" | "timeout" | "interrupted" | "awaiting_approval" | "awaiting_answer" | "error" | "other" | "unknown";
11537
+ errorCode?: "internal.unexpected" | "runtime.cancelled" | "agent.context_limit_exceeded" | "agent.execution_failed" | "agent.step_limit_reached" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable";
11538
+ completedAt?: string;
11539
+ requestedBy?: {
11540
+ type: "user" | "serviceAccount";
11541
+ id: string;
11542
+ };
11543
+ };
11219
11544
  approvalMode?: "manual" | "accept-edits" | "auto";
11220
11545
  approvalModeSource?: "thread" | "default" | "fallback" | "run";
11221
11546
  };
@@ -11329,6 +11654,24 @@ export type RestoreAgentThreadSandboxResponses = {
11329
11654
  messageCount: number;
11330
11655
  createdAt: string;
11331
11656
  updatedAt: string;
11657
+ read?: {
11658
+ threadId: string;
11659
+ throughSeq: number;
11660
+ headSeq: number;
11661
+ unread: number;
11662
+ readAt?: string;
11663
+ };
11664
+ lastRun?: {
11665
+ id: string;
11666
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
11667
+ finishReason?: "stop" | "length" | "content-filter" | "tool-calls" | "timeout" | "interrupted" | "awaiting_approval" | "awaiting_answer" | "error" | "other" | "unknown";
11668
+ errorCode?: "internal.unexpected" | "runtime.cancelled" | "agent.context_limit_exceeded" | "agent.execution_failed" | "agent.step_limit_reached" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable";
11669
+ completedAt?: string;
11670
+ requestedBy?: {
11671
+ type: "user" | "serviceAccount";
11672
+ id: string;
11673
+ };
11674
+ };
11332
11675
  approvalMode?: "manual" | "accept-edits" | "auto";
11333
11676
  approvalModeSource?: "thread" | "default" | "fallback" | "run";
11334
11677
  };
@@ -11585,7 +11928,7 @@ export type ListAgentThreadMessagesResponses = {
11585
11928
  afterAnswer?: true;
11586
11929
  }>;
11587
11930
  annotations: Array<{
11588
- code: "step_limit_reached" | "output_limit_reached";
11931
+ code: "step_limit_reached" | "output_limit_reached" | "workspace_not_saved";
11589
11932
  severity: "warning" | "error";
11590
11933
  scope: "run";
11591
11934
  message: string;
@@ -11754,6 +12097,10 @@ export type PostAgentThreadMessageResponses = {
11754
12097
  };
11755
12098
  approvalMode?: "manual" | "accept-edits" | "auto";
11756
12099
  runsOn?: "computer";
12100
+ computer?: {
12101
+ id: string;
12102
+ folder: string;
12103
+ };
11757
12104
  modelId?: string;
11758
12105
  finishReason?: "stop" | "length" | "content-filter" | "tool-calls" | "timeout" | "interrupted" | "awaiting_approval" | "awaiting_answer" | "error" | "other" | "unknown";
11759
12106
  usage?: {
@@ -11797,7 +12144,7 @@ export type PostAgentThreadMessageResponses = {
11797
12144
  unvaluedCallCount: number;
11798
12145
  };
11799
12146
  diagnostics?: Array<{
11800
- code: "step_limit_reached" | "output_limit_reached";
12147
+ code: "step_limit_reached" | "output_limit_reached" | "workspace_not_saved";
11801
12148
  severity: "warning" | "error";
11802
12149
  scope: "run";
11803
12150
  message: string;
@@ -12047,6 +12394,7 @@ export type PostAgentThreadMessageResponses = {
12047
12394
  timeZone?: string;
12048
12395
  locale?: string;
12049
12396
  immediate?: boolean;
12397
+ replacesMessageId?: string;
12050
12398
  createdAt: string;
12051
12399
  updatedAt: string;
12052
12400
  };
@@ -12403,6 +12751,7 @@ export type ListAgentThreadInboxResponses = {
12403
12751
  timeZone?: string;
12404
12752
  locale?: string;
12405
12753
  immediate?: boolean;
12754
+ replacesMessageId?: string;
12406
12755
  createdAt: string;
12407
12756
  updatedAt: string;
12408
12757
  }>;
@@ -12746,47 +13095,486 @@ export type UpdateAgentThreadInboxItemResponses = {
12746
13095
  timeZone?: string;
12747
13096
  locale?: string;
12748
13097
  immediate?: boolean;
13098
+ replacesMessageId?: string;
12749
13099
  createdAt: string;
12750
13100
  updatedAt: string;
12751
13101
  };
12752
13102
  };
12753
13103
  };
12754
13104
  export type UpdateAgentThreadInboxItemResponse = UpdateAgentThreadInboxItemResponses[keyof UpdateAgentThreadInboxItemResponses];
12755
- export type CancelAgentRunData = {
13105
+ export type EditAgentThreadMessageData = {
12756
13106
  body: {
12757
- runId: string;
12758
- };
12759
- path: {
12760
- threadId: string;
12761
- };
12762
- query?: never;
12763
- url: "/api/agent-threads/{threadId}/cancel";
12764
- };
12765
- export type CancelAgentRunErrors = {
12766
- /**
12767
- * Response for status 400
12768
- */
12769
- 400: {
12770
- error: string;
12771
- code?: string;
12772
- };
12773
- /**
12774
- * Response for status 403
12775
- */
12776
- 403: {
12777
- error: string;
12778
- code?: string;
12779
- };
12780
- /**
12781
- * Response for status 404
12782
- */
12783
- 404: {
12784
- error: string;
12785
- };
12786
- /**
12787
- * Response for status 409
12788
- */
12789
- 409: {
13107
+ text?: string;
13108
+ model?: {
13109
+ provider: string;
13110
+ modelId: string;
13111
+ };
13112
+ reasoning?: "provider-default" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | {
13113
+ budgetTokens: number;
13114
+ };
13115
+ timeZone?: string;
13116
+ locale?: string;
13117
+ approvalMode?: "manual" | "accept-edits" | "auto";
13118
+ attachments?: Array<{
13119
+ blobId: string;
13120
+ digest: string;
13121
+ sizeBytes: number;
13122
+ fileName?: string;
13123
+ mediaType?: string;
13124
+ logicalPath?: string;
13125
+ }>;
13126
+ context?: Array<{
13127
+ context: {
13128
+ kind: "object";
13129
+ ref: {
13130
+ objectTypeId: string;
13131
+ primaryId: string;
13132
+ };
13133
+ /**
13134
+ * Shown in the chat instead of the object's title. Never sent to the model.
13135
+ */
13136
+ label?: string;
13137
+ } | {
13138
+ kind: "app-state";
13139
+ id: string;
13140
+ label: string;
13141
+ description: string;
13142
+ /**
13143
+ * Any JSON-compatible value.
13144
+ */
13145
+ value: string | number | boolean | Array<unknown> | {
13146
+ [key: string]: unknown;
13147
+ } | null;
13148
+ };
13149
+ origin: "ambient" | "explicit";
13150
+ }>;
13151
+ nextMessageId?: string;
13152
+ };
13153
+ path: {
13154
+ threadId: string;
13155
+ messageId: string;
13156
+ };
13157
+ query?: never;
13158
+ url: "/api/agent-threads/{threadId}/messages/{messageId}/edit";
13159
+ };
13160
+ export type EditAgentThreadMessageErrors = {
13161
+ /**
13162
+ * Response for status 400
13163
+ */
13164
+ 400: {
13165
+ error: string;
13166
+ code?: string;
13167
+ };
13168
+ /**
13169
+ * Response for status 403
13170
+ */
13171
+ 403: {
13172
+ error: string;
13173
+ code?: string;
13174
+ };
13175
+ /**
13176
+ * Response for status 404
13177
+ */
13178
+ 404: {
13179
+ error: string;
13180
+ };
13181
+ /**
13182
+ * Response for status 409
13183
+ */
13184
+ 409: {
13185
+ error: string;
13186
+ code?: string;
13187
+ };
13188
+ /**
13189
+ * Response for status 429
13190
+ */
13191
+ 429: {
13192
+ error: string;
13193
+ /**
13194
+ * Stable machine-readable failure code for programmatic handling.
13195
+ */
13196
+ code: "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable";
13197
+ /**
13198
+ * Any JSON-compatible value.
13199
+ */
13200
+ details?: string | number | boolean | Array<unknown> | {
13201
+ [key: string]: unknown;
13202
+ } | null;
13203
+ };
13204
+ /**
13205
+ * Response for status 501
13206
+ */
13207
+ 501: {
13208
+ error: string;
13209
+ };
13210
+ };
13211
+ export type EditAgentThreadMessageError = EditAgentThreadMessageErrors[keyof EditAgentThreadMessageErrors];
13212
+ export type EditAgentThreadMessageResponses = {
13213
+ /**
13214
+ * Response for status 202
13215
+ */
13216
+ 202: {
13217
+ run?: {
13218
+ id: string;
13219
+ projectId: string;
13220
+ kind: "conversation" | "subagent";
13221
+ threadId: string;
13222
+ triggerMessageId: string;
13223
+ parentRunId?: string;
13224
+ requestedBy?: {
13225
+ type: "user" | "serviceAccount";
13226
+ id: string;
13227
+ };
13228
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
13229
+ model?: {
13230
+ provider: string;
13231
+ modelId: string;
13232
+ };
13233
+ tier?: "light" | "standard" | "heavy";
13234
+ reasoning?: "provider-default" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | {
13235
+ budgetTokens: number;
13236
+ };
13237
+ approvalMode?: "manual" | "accept-edits" | "auto";
13238
+ runsOn?: "computer";
13239
+ computer?: {
13240
+ id: string;
13241
+ folder: string;
13242
+ };
13243
+ modelId?: string;
13244
+ finishReason?: "stop" | "length" | "content-filter" | "tool-calls" | "timeout" | "interrupted" | "awaiting_approval" | "awaiting_answer" | "error" | "other" | "unknown";
13245
+ usage?: {
13246
+ inputTokens?: number;
13247
+ outputTokens?: number;
13248
+ totalTokens?: number;
13249
+ uncachedInputTokens?: number;
13250
+ cacheReadInputTokens?: number;
13251
+ cacheWriteInputTokens?: number;
13252
+ textOutputTokens?: number;
13253
+ reasoningOutputTokens?: number;
13254
+ /**
13255
+ * Audio content duration in milliseconds; not billed duration.
13256
+ */
13257
+ audioDurationMs?: number;
13258
+ /**
13259
+ * Output tokens that encode generated images, within outputTokens.
13260
+ */
13261
+ imageOutputTokens?: number;
13262
+ /**
13263
+ * Output tokens that encode generated audio, within outputTokens.
13264
+ */
13265
+ audioOutputTokens?: number;
13266
+ /**
13267
+ * Images the call returned.
13268
+ */
13269
+ outputImages?: number;
13270
+ /**
13271
+ * Input characters, counted by the provider's own billing rule.
13272
+ */
13273
+ inputCharacters?: number;
13274
+ reportingStatus: "complete" | "partial" | "unavailable";
13275
+ };
13276
+ cost?: {
13277
+ amounts: Array<{
13278
+ currency: string;
13279
+ amountNanos: string;
13280
+ }>;
13281
+ ratedCallCount: number;
13282
+ unpriceableCallCount: number;
13283
+ unvaluedCallCount: number;
13284
+ };
13285
+ diagnostics?: Array<{
13286
+ code: "step_limit_reached" | "output_limit_reached" | "workspace_not_saved";
13287
+ severity: "warning" | "error";
13288
+ scope: "run";
13289
+ message: string;
13290
+ }>;
13291
+ error?: {
13292
+ code: "internal.unexpected" | "runtime.cancelled" | "agent.context_limit_exceeded" | "agent.execution_failed" | "agent.step_limit_reached" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable";
13293
+ message: string;
13294
+ retryable: boolean;
13295
+ at: string;
13296
+ /**
13297
+ * Any JSON-compatible value.
13298
+ */
13299
+ details?: string | number | boolean | Array<unknown> | {
13300
+ [key: string]: unknown;
13301
+ } | null;
13302
+ httpStatus?: number;
13303
+ redacted?: true;
13304
+ truncated?: true;
13305
+ };
13306
+ attempt: number;
13307
+ streamId: string;
13308
+ createdAt: string;
13309
+ startedAt?: string;
13310
+ completedAt?: string;
13311
+ };
13312
+ item?: {
13313
+ id: string;
13314
+ projectId: string;
13315
+ threadId: string;
13316
+ messageId: string;
13317
+ seq: number;
13318
+ authorPrincipal: {
13319
+ type: "user" | "serviceAccount" | "system";
13320
+ id: string;
13321
+ };
13322
+ mode: "steer" | "queue";
13323
+ parts: Array<{
13324
+ type: "text";
13325
+ text: string;
13326
+ /**
13327
+ * Any JSON-compatible value.
13328
+ */
13329
+ providerMetadata?: string | number | boolean | Array<unknown> | {
13330
+ [key: string]: unknown;
13331
+ } | null;
13332
+ } | {
13333
+ type: "continuation";
13334
+ } | {
13335
+ type: "approval-outcome";
13336
+ approvalId: string;
13337
+ status: "approved" | "denied" | "cancelled" | "superseded" | "expired";
13338
+ call: {
13339
+ kind: "action";
13340
+ actionId: string;
13341
+ subject: {
13342
+ kind: "none";
13343
+ } | {
13344
+ kind: "object";
13345
+ objectTypeId: string;
13346
+ primaryId: string;
13347
+ };
13348
+ } | {
13349
+ kind: "workflow";
13350
+ workflowId: string;
13351
+ };
13352
+ outcome?: {
13353
+ kind: "action-run";
13354
+ runId: string;
13355
+ status: "succeeded" | "failed";
13356
+ error?: {
13357
+ code: "internal.unexpected" | "runtime.cancelled" | "action.phase_failed" | "action.read_conflict" | "action.rejected" | "action.timeout" | "object.unique_violation";
13358
+ message: string;
13359
+ retryable: boolean;
13360
+ at: string;
13361
+ details: {
13362
+ actionId: string;
13363
+ runId: string;
13364
+ phase: "validation" | "writeback" | "edits" | "commit" | "effects";
13365
+ };
13366
+ httpStatus?: number;
13367
+ redacted?: true;
13368
+ truncated?: true;
13369
+ };
13370
+ } | {
13371
+ kind: "workflow-run";
13372
+ runId: string;
13373
+ queuedAt: string;
13374
+ } | {
13375
+ kind: "error";
13376
+ error: {
13377
+ code: "action.phase_failed" | "action.read_conflict" | "action.rejected" | "action.run_in_progress" | "action.timeout" | "agent.approval_authority_lost" | "agent.context_limit_exceeded" | "agent.execution_failed" | "agent.step_limit_reached" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "connector.adapter_invalid" | "connector.authorization_invalid" | "connector.authorization_required" | "connector.configuration_invalid" | "connector.credentials_unavailable" | "connector.not_found" | "connector.operation_conflict" | "connector.operation_in_progress" | "connector.provider_failed" | "connector.provider_unavailable" | "connector.replacement_required" | "connector.revocation_pending" | "dataset.change_refused" | "dataset.not_found" | "dataset.version_incompatible" | "dataset.version_not_found" | "dataset.version_read_inconsistent" | "event.delivery_failed" | "internal.unexpected" | "queue.enqueue_failed" | "object.not_found" | "object.unique_violation" | "pipeline.step_failed" | "projection.definition_invalid" | "projection.execution_failed" | "projection.not_found" | "projection.run_already_terminal" | "projection.run_identity_mismatch" | "runtime.cancelled" | "runtime.stopping" | "vector.model_unavailable" | "vector.response_invalid" | "vector.outcome_unknown" | "storage.unavailable" | "sync.execution_failed" | "webhook.delivery_failed" | "webhook.delivery_rejected" | "workflow.node_failed";
13378
+ message: string;
13379
+ retryable: boolean;
13380
+ at: string;
13381
+ /**
13382
+ * Any JSON-compatible value.
13383
+ */
13384
+ details?: string | number | boolean | Array<unknown> | {
13385
+ [key: string]: unknown;
13386
+ } | null;
13387
+ httpStatus?: number;
13388
+ redacted?: true;
13389
+ truncated?: true;
13390
+ };
13391
+ };
13392
+ caller?: {
13393
+ runId: string;
13394
+ key: string;
13395
+ continues?: true;
13396
+ };
13397
+ } | {
13398
+ type: "reasoning";
13399
+ text: string;
13400
+ /**
13401
+ * Any JSON-compatible value.
13402
+ */
13403
+ providerMetadata?: string | number | boolean | Array<unknown> | {
13404
+ [key: string]: unknown;
13405
+ } | null;
13406
+ } | {
13407
+ type: "step-start";
13408
+ } | {
13409
+ type: "file";
13410
+ fileRef: {
13411
+ blobId: string;
13412
+ digest: string;
13413
+ sizeBytes: number;
13414
+ fileName?: string;
13415
+ mediaType?: string;
13416
+ logicalPath?: string;
13417
+ };
13418
+ /**
13419
+ * Any JSON-compatible value.
13420
+ */
13421
+ providerMetadata?: string | number | boolean | Array<unknown> | {
13422
+ [key: string]: unknown;
13423
+ } | null;
13424
+ } | {
13425
+ type: "provider-state";
13426
+ providerId: string;
13427
+ /**
13428
+ * Any JSON-compatible value.
13429
+ */
13430
+ data: string | number | boolean | Array<unknown> | {
13431
+ [key: string]: unknown;
13432
+ } | null;
13433
+ } | {
13434
+ context: {
13435
+ kind: "object";
13436
+ ref: {
13437
+ objectTypeId: string;
13438
+ primaryId: string;
13439
+ };
13440
+ /**
13441
+ * Shown in the chat instead of the object's title. Never sent to the model.
13442
+ */
13443
+ label?: string;
13444
+ } | {
13445
+ kind: "app-state";
13446
+ id: string;
13447
+ label: string;
13448
+ description: string;
13449
+ /**
13450
+ * Any JSON-compatible value.
13451
+ */
13452
+ value: string | number | boolean | Array<unknown> | {
13453
+ [key: string]: unknown;
13454
+ } | null;
13455
+ };
13456
+ origin: "ambient" | "explicit";
13457
+ type: "context";
13458
+ } | {
13459
+ type: "tool-call";
13460
+ toolCallId: string;
13461
+ toolName: string;
13462
+ dynamic?: boolean;
13463
+ providerExecuted?: boolean;
13464
+ /**
13465
+ * Any JSON-compatible value.
13466
+ */
13467
+ input: string | number | boolean | Array<unknown> | {
13468
+ [key: string]: unknown;
13469
+ } | null;
13470
+ /**
13471
+ * Any JSON-compatible value.
13472
+ */
13473
+ providerMetadata?: string | number | boolean | Array<unknown> | {
13474
+ [key: string]: unknown;
13475
+ } | null;
13476
+ state: "output-available";
13477
+ /**
13478
+ * Any JSON-compatible value.
13479
+ */
13480
+ output: string | number | boolean | Array<unknown> | {
13481
+ [key: string]: unknown;
13482
+ } | null;
13483
+ outputFile?: {
13484
+ fileRef: {
13485
+ blobId: string;
13486
+ digest: string;
13487
+ sizeBytes: number;
13488
+ fileName?: string;
13489
+ mediaType?: string;
13490
+ logicalPath?: string;
13491
+ };
13492
+ path: string;
13493
+ };
13494
+ } | {
13495
+ type: "tool-call";
13496
+ toolCallId: string;
13497
+ toolName: string;
13498
+ dynamic?: boolean;
13499
+ providerExecuted?: boolean;
13500
+ /**
13501
+ * Any JSON-compatible value.
13502
+ */
13503
+ input: string | number | boolean | Array<unknown> | {
13504
+ [key: string]: unknown;
13505
+ } | null;
13506
+ /**
13507
+ * Any JSON-compatible value.
13508
+ */
13509
+ providerMetadata?: string | number | boolean | Array<unknown> | {
13510
+ [key: string]: unknown;
13511
+ } | null;
13512
+ state: "output-error";
13513
+ errorText: string;
13514
+ } | {
13515
+ type: "mail";
13516
+ id: string;
13517
+ from: "parent";
13518
+ kind: "message" | "answer";
13519
+ inReplyTo?: string;
13520
+ text: string;
13521
+ afterAnswer?: true;
13522
+ }>;
13523
+ spec?: {
13524
+ model?: {
13525
+ provider: string;
13526
+ modelId: string;
13527
+ };
13528
+ reasoning?: "provider-default" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | {
13529
+ budgetTokens: number;
13530
+ };
13531
+ approvalMode?: "manual" | "accept-edits" | "auto";
13532
+ };
13533
+ timeZone?: string;
13534
+ locale?: string;
13535
+ immediate?: boolean;
13536
+ replacesMessageId?: string;
13537
+ createdAt: string;
13538
+ updatedAt: string;
13539
+ };
13540
+ };
13541
+ };
13542
+ export type EditAgentThreadMessageResponse = EditAgentThreadMessageResponses[keyof EditAgentThreadMessageResponses];
13543
+ export type CancelAgentRunData = {
13544
+ body: {
13545
+ runId: string;
13546
+ };
13547
+ path: {
13548
+ threadId: string;
13549
+ };
13550
+ query?: never;
13551
+ url: "/api/agent-threads/{threadId}/cancel";
13552
+ };
13553
+ export type CancelAgentRunErrors = {
13554
+ /**
13555
+ * Response for status 400
13556
+ */
13557
+ 400: {
13558
+ error: string;
13559
+ code?: string;
13560
+ };
13561
+ /**
13562
+ * Response for status 403
13563
+ */
13564
+ 403: {
13565
+ error: string;
13566
+ code?: string;
13567
+ };
13568
+ /**
13569
+ * Response for status 404
13570
+ */
13571
+ 404: {
13572
+ error: string;
13573
+ };
13574
+ /**
13575
+ * Response for status 409
13576
+ */
13577
+ 409: {
12790
13578
  error: string;
12791
13579
  code?: string;
12792
13580
  };
@@ -12825,6 +13613,10 @@ export type CancelAgentRunResponses = {
12825
13613
  };
12826
13614
  approvalMode?: "manual" | "accept-edits" | "auto";
12827
13615
  runsOn?: "computer";
13616
+ computer?: {
13617
+ id: string;
13618
+ folder: string;
13619
+ };
12828
13620
  modelId?: string;
12829
13621
  finishReason?: "stop" | "length" | "content-filter" | "tool-calls" | "timeout" | "interrupted" | "awaiting_approval" | "awaiting_answer" | "error" | "other" | "unknown";
12830
13622
  usage?: {
@@ -12868,7 +13660,7 @@ export type CancelAgentRunResponses = {
12868
13660
  unvaluedCallCount: number;
12869
13661
  };
12870
13662
  diagnostics?: Array<{
12871
- code: "step_limit_reached" | "output_limit_reached";
13663
+ code: "step_limit_reached" | "output_limit_reached" | "workspace_not_saved";
12872
13664
  severity: "warning" | "error";
12873
13665
  scope: "run";
12874
13666
  message: string;
@@ -12985,6 +13777,10 @@ export type RetryAgentRunResponses = {
12985
13777
  };
12986
13778
  approvalMode?: "manual" | "accept-edits" | "auto";
12987
13779
  runsOn?: "computer";
13780
+ computer?: {
13781
+ id: string;
13782
+ folder: string;
13783
+ };
12988
13784
  modelId?: string;
12989
13785
  finishReason?: "stop" | "length" | "content-filter" | "tool-calls" | "timeout" | "interrupted" | "awaiting_approval" | "awaiting_answer" | "error" | "other" | "unknown";
12990
13786
  usage?: {
@@ -13028,7 +13824,7 @@ export type RetryAgentRunResponses = {
13028
13824
  unvaluedCallCount: number;
13029
13825
  };
13030
13826
  diagnostics?: Array<{
13031
- code: "step_limit_reached" | "output_limit_reached";
13827
+ code: "step_limit_reached" | "output_limit_reached" | "workspace_not_saved";
13032
13828
  severity: "warning" | "error";
13033
13829
  scope: "run";
13034
13830
  message: string;
@@ -13194,6 +13990,10 @@ export type ListAgentThreadRunsResponses = {
13194
13990
  };
13195
13991
  approvalMode?: "manual" | "accept-edits" | "auto";
13196
13992
  runsOn?: "computer";
13993
+ computer?: {
13994
+ id: string;
13995
+ folder: string;
13996
+ };
13197
13997
  modelId?: string;
13198
13998
  finishReason?: "stop" | "length" | "content-filter" | "tool-calls" | "timeout" | "interrupted" | "awaiting_approval" | "awaiting_answer" | "error" | "other" | "unknown";
13199
13999
  usage?: {
@@ -13237,7 +14037,7 @@ export type ListAgentThreadRunsResponses = {
13237
14037
  unvaluedCallCount: number;
13238
14038
  };
13239
14039
  diagnostics?: Array<{
13240
- code: "step_limit_reached" | "output_limit_reached";
14040
+ code: "step_limit_reached" | "output_limit_reached" | "workspace_not_saved";
13241
14041
  severity: "warning" | "error";
13242
14042
  scope: "run";
13243
14043
  message: string;
@@ -13323,6 +14123,10 @@ export type GetAgentRunResponses = {
13323
14123
  };
13324
14124
  approvalMode?: "manual" | "accept-edits" | "auto";
13325
14125
  runsOn?: "computer";
14126
+ computer?: {
14127
+ id: string;
14128
+ folder: string;
14129
+ };
13326
14130
  modelId?: string;
13327
14131
  finishReason?: "stop" | "length" | "content-filter" | "tool-calls" | "timeout" | "interrupted" | "awaiting_approval" | "awaiting_answer" | "error" | "other" | "unknown";
13328
14132
  usage?: {
@@ -13366,7 +14170,7 @@ export type GetAgentRunResponses = {
13366
14170
  unvaluedCallCount: number;
13367
14171
  };
13368
14172
  diagnostics?: Array<{
13369
- code: "step_limit_reached" | "output_limit_reached";
14173
+ code: "step_limit_reached" | "output_limit_reached" | "workspace_not_saved";
13370
14174
  severity: "warning" | "error";
13371
14175
  scope: "run";
13372
14176
  message: string;
@@ -13465,6 +14269,10 @@ export type CancelAgentRunByIdResponses = {
13465
14269
  };
13466
14270
  approvalMode?: "manual" | "accept-edits" | "auto";
13467
14271
  runsOn?: "computer";
14272
+ computer?: {
14273
+ id: string;
14274
+ folder: string;
14275
+ };
13468
14276
  modelId?: string;
13469
14277
  finishReason?: "stop" | "length" | "content-filter" | "tool-calls" | "timeout" | "interrupted" | "awaiting_approval" | "awaiting_answer" | "error" | "other" | "unknown";
13470
14278
  usage?: {
@@ -13508,7 +14316,7 @@ export type CancelAgentRunByIdResponses = {
13508
14316
  unvaluedCallCount: number;
13509
14317
  };
13510
14318
  diagnostics?: Array<{
13511
- code: "step_limit_reached" | "output_limit_reached";
14319
+ code: "step_limit_reached" | "output_limit_reached" | "workspace_not_saved";
13512
14320
  severity: "warning" | "error";
13513
14321
  scope: "run";
13514
14322
  message: string;
@@ -13537,6 +14345,54 @@ export type CancelAgentRunByIdResponses = {
13537
14345
  };
13538
14346
  };
13539
14347
  export type CancelAgentRunByIdResponse = CancelAgentRunByIdResponses[keyof CancelAgentRunByIdResponses];
14348
+ export type MarkAgentThreadReadData = {
14349
+ body: {
14350
+ throughMessageId?: string;
14351
+ };
14352
+ path: {
14353
+ threadId: string;
14354
+ };
14355
+ query?: never;
14356
+ url: "/api/agent-threads/{threadId}/read";
14357
+ };
14358
+ export type MarkAgentThreadReadErrors = {
14359
+ /**
14360
+ * Response for status 400
14361
+ */
14362
+ 400: {
14363
+ error: string;
14364
+ code?: string;
14365
+ };
14366
+ /**
14367
+ * Response for status 404
14368
+ */
14369
+ 404: {
14370
+ error: string;
14371
+ code?: string;
14372
+ };
14373
+ /**
14374
+ * Response for status 501
14375
+ */
14376
+ 501: {
14377
+ error: string;
14378
+ };
14379
+ };
14380
+ export type MarkAgentThreadReadError = MarkAgentThreadReadErrors[keyof MarkAgentThreadReadErrors];
14381
+ export type MarkAgentThreadReadResponses = {
14382
+ /**
14383
+ * Response for status 200
14384
+ */
14385
+ 200: {
14386
+ read: {
14387
+ threadId: string;
14388
+ throughSeq: number;
14389
+ headSeq: number;
14390
+ unread: number;
14391
+ readAt?: string;
14392
+ };
14393
+ };
14394
+ };
14395
+ export type MarkAgentThreadReadResponse = MarkAgentThreadReadResponses[keyof MarkAgentThreadReadResponses];
13540
14396
  export type ListAgentThreadChildrenData = {
13541
14397
  body?: never;
13542
14398
  path: {
@@ -13810,6 +14666,24 @@ export type MoveAgentThreadToCloudResponses = {
13810
14666
  messageCount: number;
13811
14667
  createdAt: string;
13812
14668
  updatedAt: string;
14669
+ read?: {
14670
+ threadId: string;
14671
+ throughSeq: number;
14672
+ headSeq: number;
14673
+ unread: number;
14674
+ readAt?: string;
14675
+ };
14676
+ lastRun?: {
14677
+ id: string;
14678
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
14679
+ finishReason?: "stop" | "length" | "content-filter" | "tool-calls" | "timeout" | "interrupted" | "awaiting_approval" | "awaiting_answer" | "error" | "other" | "unknown";
14680
+ errorCode?: "internal.unexpected" | "runtime.cancelled" | "agent.context_limit_exceeded" | "agent.execution_failed" | "agent.step_limit_reached" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable";
14681
+ completedAt?: string;
14682
+ requestedBy?: {
14683
+ type: "user" | "serviceAccount";
14684
+ id: string;
14685
+ };
14686
+ };
13813
14687
  approvalMode?: "manual" | "accept-edits" | "auto";
13814
14688
  approvalModeSource?: "thread" | "default" | "fallback" | "run";
13815
14689
  };
@@ -13935,6 +14809,24 @@ export type MoveAgentThreadToComputerResponses = {
13935
14809
  messageCount: number;
13936
14810
  createdAt: string;
13937
14811
  updatedAt: string;
14812
+ read?: {
14813
+ threadId: string;
14814
+ throughSeq: number;
14815
+ headSeq: number;
14816
+ unread: number;
14817
+ readAt?: string;
14818
+ };
14819
+ lastRun?: {
14820
+ id: string;
14821
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
14822
+ finishReason?: "stop" | "length" | "content-filter" | "tool-calls" | "timeout" | "interrupted" | "awaiting_approval" | "awaiting_answer" | "error" | "other" | "unknown";
14823
+ errorCode?: "internal.unexpected" | "runtime.cancelled" | "agent.context_limit_exceeded" | "agent.execution_failed" | "agent.step_limit_reached" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable";
14824
+ completedAt?: string;
14825
+ requestedBy?: {
14826
+ type: "user" | "serviceAccount";
14827
+ id: string;
14828
+ };
14829
+ };
13938
14830
  approvalMode?: "manual" | "accept-edits" | "auto";
13939
14831
  approvalModeSource?: "thread" | "default" | "fallback" | "run";
13940
14832
  };
@@ -14264,6 +15156,24 @@ export type SetAgentThreadApprovalModeResponses = {
14264
15156
  messageCount: number;
14265
15157
  createdAt: string;
14266
15158
  updatedAt: string;
15159
+ read?: {
15160
+ threadId: string;
15161
+ throughSeq: number;
15162
+ headSeq: number;
15163
+ unread: number;
15164
+ readAt?: string;
15165
+ };
15166
+ lastRun?: {
15167
+ id: string;
15168
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
15169
+ finishReason?: "stop" | "length" | "content-filter" | "tool-calls" | "timeout" | "interrupted" | "awaiting_approval" | "awaiting_answer" | "error" | "other" | "unknown";
15170
+ errorCode?: "internal.unexpected" | "runtime.cancelled" | "agent.context_limit_exceeded" | "agent.execution_failed" | "agent.step_limit_reached" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable";
15171
+ completedAt?: string;
15172
+ requestedBy?: {
15173
+ type: "user" | "serviceAccount";
15174
+ id: string;
15175
+ };
15176
+ };
14267
15177
  approvalMode?: "manual" | "accept-edits" | "auto";
14268
15178
  approvalModeSource?: "thread" | "default" | "fallback" | "run";
14269
15179
  };
@@ -14570,6 +15480,10 @@ export type DecideAgentApprovalResponses = {
14570
15480
  };
14571
15481
  approvalMode?: "manual" | "accept-edits" | "auto";
14572
15482
  runsOn?: "computer";
15483
+ computer?: {
15484
+ id: string;
15485
+ folder: string;
15486
+ };
14573
15487
  modelId?: string;
14574
15488
  finishReason?: "stop" | "length" | "content-filter" | "tool-calls" | "timeout" | "interrupted" | "awaiting_approval" | "awaiting_answer" | "error" | "other" | "unknown";
14575
15489
  usage?: {
@@ -14613,7 +15527,7 @@ export type DecideAgentApprovalResponses = {
14613
15527
  unvaluedCallCount: number;
14614
15528
  };
14615
15529
  diagnostics?: Array<{
14616
- code: "step_limit_reached" | "output_limit_reached";
15530
+ code: "step_limit_reached" | "output_limit_reached" | "workspace_not_saved";
14617
15531
  severity: "warning" | "error";
14618
15532
  scope: "run";
14619
15533
  message: string;
@@ -14878,6 +15792,24 @@ export type GetObservedAgentThreadResponses = {
14878
15792
  messageCount: number;
14879
15793
  createdAt: string;
14880
15794
  updatedAt: string;
15795
+ read?: {
15796
+ threadId: string;
15797
+ throughSeq: number;
15798
+ headSeq: number;
15799
+ unread: number;
15800
+ readAt?: string;
15801
+ };
15802
+ lastRun?: {
15803
+ id: string;
15804
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
15805
+ finishReason?: "stop" | "length" | "content-filter" | "tool-calls" | "timeout" | "interrupted" | "awaiting_approval" | "awaiting_answer" | "error" | "other" | "unknown";
15806
+ errorCode?: "internal.unexpected" | "runtime.cancelled" | "agent.context_limit_exceeded" | "agent.execution_failed" | "agent.step_limit_reached" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable";
15807
+ completedAt?: string;
15808
+ requestedBy?: {
15809
+ type: "user" | "serviceAccount";
15810
+ id: string;
15811
+ };
15812
+ };
14881
15813
  approvalMode?: "manual" | "accept-edits" | "auto";
14882
15814
  approvalModeSource?: "thread" | "default" | "fallback" | "run";
14883
15815
  };
@@ -15140,7 +16072,7 @@ export type ListObservedAgentThreadMessagesResponses = {
15140
16072
  afterAnswer?: true;
15141
16073
  }>;
15142
16074
  annotations: Array<{
15143
- code: "step_limit_reached" | "output_limit_reached";
16075
+ code: "step_limit_reached" | "output_limit_reached" | "workspace_not_saved";
15144
16076
  severity: "warning" | "error";
15145
16077
  scope: "run";
15146
16078
  message: string;
@@ -15287,6 +16219,10 @@ export type ListObservedAgentThreadRunsResponses = {
15287
16219
  };
15288
16220
  approvalMode?: "manual" | "accept-edits" | "auto";
15289
16221
  runsOn?: "computer";
16222
+ computer?: {
16223
+ id: string;
16224
+ folder: string;
16225
+ };
15290
16226
  modelId?: string;
15291
16227
  finishReason?: "stop" | "length" | "content-filter" | "tool-calls" | "timeout" | "interrupted" | "awaiting_approval" | "awaiting_answer" | "error" | "other" | "unknown";
15292
16228
  usage?: {
@@ -15330,7 +16266,7 @@ export type ListObservedAgentThreadRunsResponses = {
15330
16266
  unvaluedCallCount: number;
15331
16267
  };
15332
16268
  diagnostics?: Array<{
15333
- code: "step_limit_reached" | "output_limit_reached";
16269
+ code: "step_limit_reached" | "output_limit_reached" | "workspace_not_saved";
15334
16270
  severity: "warning" | "error";
15335
16271
  scope: "run";
15336
16272
  message: string;
@@ -22283,6 +23219,10 @@ export type ListProjectionsResponses = {
22283
23219
  objectProjections: Array<{
22284
23220
  _tag: "ObjectProjectionDefinition";
22285
23221
  id: string;
23222
+ /**
23223
+ * Folder below the definition's directory, such as `raw/erp`; absent at its top.
23224
+ */
23225
+ folder?: string;
22286
23226
  objectTypeId: string;
22287
23227
  datasetId: string;
22288
23228
  properties: {
@@ -22447,6 +23387,10 @@ export type ListProjectionsResponses = {
22447
23387
  linkProjections: Array<{
22448
23388
  _tag: "LinkProjectionDefinition";
22449
23389
  id: string;
23390
+ /**
23391
+ * Folder below the definition's directory, such as `raw/erp`; absent at its top.
23392
+ */
23393
+ folder?: string;
22450
23394
  linkId: string;
22451
23395
  sourceObjectTypeId: string;
22452
23396
  targetObjectTypeId: string;
@@ -22594,6 +23538,10 @@ export type ListProjectionsResponses = {
22594
23538
  telemetryProjections: Array<{
22595
23539
  _tag: "TelemetryProjectionDefinition";
22596
23540
  id: string;
23541
+ /**
23542
+ * Folder below the definition's directory, such as `raw/erp`; absent at its top.
23543
+ */
23544
+ folder?: string;
22597
23545
  objectTypeId: string;
22598
23546
  datasetId: string;
22599
23547
  objectIdField: string;
@@ -22769,6 +23717,10 @@ export type GetProjectionResponses = {
22769
23717
  200: {
22770
23718
  _tag: "ObjectProjectionDefinition";
22771
23719
  id: string;
23720
+ /**
23721
+ * Folder below the definition's directory, such as `raw/erp`; absent at its top.
23722
+ */
23723
+ folder?: string;
22772
23724
  objectTypeId: string;
22773
23725
  datasetId: string;
22774
23726
  properties: {
@@ -22932,6 +23884,10 @@ export type GetProjectionResponses = {
22932
23884
  } | {
22933
23885
  _tag: "LinkProjectionDefinition";
22934
23886
  id: string;
23887
+ /**
23888
+ * Folder below the definition's directory, such as `raw/erp`; absent at its top.
23889
+ */
23890
+ folder?: string;
22935
23891
  linkId: string;
22936
23892
  sourceObjectTypeId: string;
22937
23893
  targetObjectTypeId: string;
@@ -23078,6 +24034,10 @@ export type GetProjectionResponses = {
23078
24034
  } | {
23079
24035
  _tag: "TelemetryProjectionDefinition";
23080
24036
  id: string;
24037
+ /**
24038
+ * Folder below the definition's directory, such as `raw/erp`; absent at its top.
24039
+ */
24040
+ folder?: string;
23081
24041
  objectTypeId: string;
23082
24042
  datasetId: string;
23083
24043
  objectIdField: string;