@sixb/client 0.1.6 → 0.1.8

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 (65) hide show
  1. package/README.md +25 -0
  2. package/dist/api.d.ts +5 -0
  3. package/dist/api.d.ts.map +1 -1
  4. package/dist/browser.d.ts +18 -1
  5. package/dist/browser.d.ts.map +1 -1
  6. package/dist/browser.js +180 -35
  7. package/dist/browser.js.map +3 -3
  8. package/dist/{chunk-hwg7mwq7.js → chunk-0g4bg41z.js} +46 -7
  9. package/dist/chunk-0g4bg41z.js.map +17 -0
  10. package/dist/chunk-3gvmb0w6.js +23 -0
  11. package/dist/chunk-3gvmb0w6.js.map +10 -0
  12. package/dist/{chunk-g19v53kt.js → chunk-cmfd585n.js} +17 -2
  13. package/dist/chunk-cmfd585n.js.map +10 -0
  14. package/dist/{chunk-ehjnq01h.js → chunk-n4160ht2.js} +179 -28
  15. package/dist/chunk-n4160ht2.js.map +19 -0
  16. package/dist/{chunk-ks27bq5b.js → chunk-se1tydhh.js} +2 -2
  17. package/dist/{chunk-9bwme2g7.js → chunk-v8q8185t.js} +61 -6
  18. package/dist/chunk-v8q8185t.js.map +10 -0
  19. package/dist/{chunk-5y58b4tr.js → chunk-x6pk2xhn.js} +21 -4
  20. package/dist/chunk-x6pk2xhn.js.map +12 -0
  21. package/dist/client-authority.d.ts +6 -0
  22. package/dist/client-authority.d.ts.map +1 -0
  23. package/dist/connectors/queries.d.ts.map +1 -1
  24. package/dist/events-builder.d.ts.map +1 -1
  25. package/dist/file.d.ts +11 -0
  26. package/dist/file.d.ts.map +1 -1
  27. package/dist/generated/@tanstack/react-query.gen.d.ts +2687 -378
  28. package/dist/generated/@tanstack/react-query.gen.d.ts.map +1 -1
  29. package/dist/generated/index.d.ts +2 -2
  30. package/dist/generated/index.d.ts.map +1 -1
  31. package/dist/generated/sdk.gen.d.ts +65 -7
  32. package/dist/generated/sdk.gen.d.ts.map +1 -1
  33. package/dist/generated/types.gen.d.ts +3539 -2377
  34. package/dist/generated/types.gen.d.ts.map +1 -1
  35. package/dist/hooks.js +280 -22
  36. package/dist/hooks.js.map +3 -3
  37. package/dist/index.js +41 -8
  38. package/dist/index.js.map +1 -1
  39. package/dist/logs-builder.d.ts.map +1 -1
  40. package/dist/logs.js +5 -4
  41. package/dist/logs.js.map +1 -1
  42. package/dist/models.js +32 -4
  43. package/dist/models.js.map +1 -1
  44. package/dist/query.js +5 -4
  45. package/dist/query.js.map +1 -1
  46. package/dist/ws-socket.d.ts.map +1 -1
  47. package/package.json +2 -2
  48. package/src/agent-streams.ts +0 -1
  49. package/src/api.ts +92 -3
  50. package/src/browser.ts +257 -48
  51. package/src/client-authority.ts +31 -0
  52. package/src/events-builder.ts +18 -1
  53. package/src/file.ts +36 -0
  54. package/src/generated/@tanstack/react-query.gen.ts +549 -31
  55. package/src/generated/index.ts +88 -4
  56. package/src/generated/sdk.gen.ts +375 -30
  57. package/src/generated/types.gen.ts +1746 -227
  58. package/src/logs-builder.ts +14 -1
  59. package/src/ws-socket.ts +11 -0
  60. package/dist/chunk-5y58b4tr.js.map +0 -12
  61. package/dist/chunk-9bwme2g7.js.map +0 -10
  62. package/dist/chunk-ehjnq01h.js.map +0 -19
  63. package/dist/chunk-g19v53kt.js.map +0 -10
  64. package/dist/chunk-hwg7mwq7.js.map +0 -17
  65. /package/dist/{chunk-ks27bq5b.js.map → chunk-se1tydhh.js.map} +0 -0
@@ -268,6 +268,78 @@ export type ObjectQuerySortField =
268
268
  direction?: "asc" | "desc"
269
269
  }
270
270
 
271
+ export type CreateDeviceAuthorizationData = {
272
+ body: {
273
+ clientName: string
274
+ tokenName: string
275
+ expiresIn?: "90d"
276
+ }
277
+ path?: never
278
+ query?: never
279
+ url: "/api/auth/device-authorizations"
280
+ }
281
+
282
+ export type CreateDeviceAuthorizationErrors = {
283
+ /**
284
+ * Response for status 429
285
+ */
286
+ 429: {
287
+ error: string
288
+ }
289
+ }
290
+
291
+ export type CreateDeviceAuthorizationError =
292
+ CreateDeviceAuthorizationErrors[keyof CreateDeviceAuthorizationErrors]
293
+
294
+ export type CreateDeviceAuthorizationResponses = {
295
+ /**
296
+ * Response for status 201
297
+ */
298
+ 201: {
299
+ deviceCode: string
300
+ userCode: string
301
+ verificationUri: string
302
+ verificationUriComplete: string
303
+ expiresAt: string
304
+ interval: number
305
+ }
306
+ }
307
+
308
+ export type CreateDeviceAuthorizationResponse =
309
+ CreateDeviceAuthorizationResponses[keyof CreateDeviceAuthorizationResponses]
310
+
311
+ export type ExchangeDeviceAuthorizationData = {
312
+ body: {
313
+ deviceCode: string
314
+ }
315
+ path?: never
316
+ query?: never
317
+ url: "/api/auth/device-authorizations/token"
318
+ }
319
+
320
+ export type ExchangeDeviceAuthorizationResponses = {
321
+ /**
322
+ * Response for status 200
323
+ */
324
+ 200:
325
+ | {
326
+ status: "pending"
327
+ }
328
+ | {
329
+ status: "denied"
330
+ }
331
+ | {
332
+ status: "expired"
333
+ }
334
+ | {
335
+ status: "approved"
336
+ accessToken: string
337
+ }
338
+ }
339
+
340
+ export type ExchangeDeviceAuthorizationResponse =
341
+ ExchangeDeviceAuthorizationResponses[keyof ExchangeDeviceAuthorizationResponses]
342
+
271
343
  export type GetAuthSessionData = {
272
344
  body?: never
273
345
  path?: never
@@ -1660,6 +1732,12 @@ export type GetAiAccountingOverviewErrors = {
1660
1732
  400: {
1661
1733
  error: string
1662
1734
  }
1735
+ /**
1736
+ * Response for status 403
1737
+ */
1738
+ 403: {
1739
+ error: string
1740
+ }
1663
1741
  /**
1664
1742
  * Response for status 501
1665
1743
  */
@@ -1754,30 +1832,58 @@ export type GetAiAccountingOverviewResponses = {
1754
1832
  providerId: string
1755
1833
  modelId: string
1756
1834
  }>
1757
- agents: Array<{
1758
- modelCallCount: number
1759
- usage: {
1760
- inputTokens?: number
1761
- outputTokens?: number
1762
- totalTokens?: number
1763
- uncachedInputTokens?: number
1764
- cacheReadInputTokens?: number
1765
- cacheWriteInputTokens?: number
1766
- textOutputTokens?: number
1767
- reasoningOutputTokens?: number
1768
- reportingStatus: "complete" | "partial" | "unavailable"
1769
- }
1770
- costs: {
1771
- amounts: Array<{
1772
- currency: string
1773
- amountNanos: string
1774
- }>
1775
- ratedCallCount: number
1776
- unpriceableCallCount: number
1777
- unvaluedCallCount: number
1778
- }
1779
- agentId: string
1780
- }>
1835
+ agents: Array<
1836
+ | {
1837
+ modelCallCount: number
1838
+ usage: {
1839
+ inputTokens?: number
1840
+ outputTokens?: number
1841
+ totalTokens?: number
1842
+ uncachedInputTokens?: number
1843
+ cacheReadInputTokens?: number
1844
+ cacheWriteInputTokens?: number
1845
+ textOutputTokens?: number
1846
+ reasoningOutputTokens?: number
1847
+ reportingStatus: "complete" | "partial" | "unavailable"
1848
+ }
1849
+ costs: {
1850
+ amounts: Array<{
1851
+ currency: string
1852
+ amountNanos: string
1853
+ }>
1854
+ ratedCallCount: number
1855
+ unpriceableCallCount: number
1856
+ unvaluedCallCount: number
1857
+ }
1858
+ kind: "agent"
1859
+ }
1860
+ | {
1861
+ modelCallCount: number
1862
+ usage: {
1863
+ inputTokens?: number
1864
+ outputTokens?: number
1865
+ totalTokens?: number
1866
+ uncachedInputTokens?: number
1867
+ cacheReadInputTokens?: number
1868
+ cacheWriteInputTokens?: number
1869
+ textOutputTokens?: number
1870
+ reasoningOutputTokens?: number
1871
+ reportingStatus: "complete" | "partial" | "unavailable"
1872
+ }
1873
+ costs: {
1874
+ amounts: Array<{
1875
+ currency: string
1876
+ amountNanos: string
1877
+ }>
1878
+ ratedCallCount: number
1879
+ unpriceableCallCount: number
1880
+ unvaluedCallCount: number
1881
+ }
1882
+ kind: "workflowAgent"
1883
+ workflowId: string
1884
+ agentStepId: string
1885
+ }
1886
+ >
1781
1887
  workflows: Array<{
1782
1888
  modelCallCount: number
1783
1889
  usage: {
@@ -1831,6 +1937,12 @@ export type ListAiModelCallsErrors = {
1831
1937
  400: {
1832
1938
  error: string
1833
1939
  }
1940
+ /**
1941
+ * Response for status 403
1942
+ */
1943
+ 403: {
1944
+ error: string
1945
+ }
1834
1946
  /**
1835
1947
  * Response for status 501
1836
1948
  */
@@ -1854,8 +1966,25 @@ export type ListAiModelCallsResponses = {
1854
1966
  callId: string
1855
1967
  providerId: string
1856
1968
  requestedModelId: string
1969
+ requestedReasoning?:
1970
+ | "provider-default"
1971
+ | "none"
1972
+ | "minimal"
1973
+ | "low"
1974
+ | "medium"
1975
+ | "high"
1976
+ | "xhigh"
1977
+ | "max"
1978
+ | {
1979
+ budgetTokens: number
1980
+ }
1857
1981
  responseModelId?: string
1858
1982
  responseId: string
1983
+ providerIds: {
1984
+ requestId?: string
1985
+ responseId?: string
1986
+ generationId?: string
1987
+ } | null
1859
1988
  usage: {
1860
1989
  inputTokens?: number
1861
1990
  outputTokens?: number
@@ -1873,20 +2002,68 @@ export type ListAiModelCallsResponses = {
1873
2002
  attribution?:
1874
2003
  | {
1875
2004
  kind: "agent"
1876
- agentId: string
1877
2005
  agentRunId: string
1878
2006
  threadId: string
1879
2007
  }
1880
2008
  | {
1881
2009
  kind: "workflowAgent"
1882
- agentId: string
2010
+ agentStepId: string
1883
2011
  nodeRunId: string
1884
2012
  workflowId: string
1885
2013
  workflowRunId: string
1886
2014
  }
2015
+ | {
2016
+ kind: "subagent"
2017
+ subagentRunId: string
2018
+ parentRunId: string
2019
+ }
1887
2020
  cost?:
1888
2021
  | {
1889
2022
  status: "rated"
2023
+ source: "estimate" | "provider" | "unknown"
2024
+ estimate?:
2025
+ | {
2026
+ status: "rated"
2027
+ money: {
2028
+ currency: string
2029
+ amountNanos: string
2030
+ }
2031
+ components: Array<{
2032
+ meter:
2033
+ | "tokens.input.total"
2034
+ | "tokens.input.uncached"
2035
+ | "tokens.input.cacheRead"
2036
+ | "tokens.input.cacheWrite"
2037
+ | "tokens.input.cacheWrite5m"
2038
+ | "tokens.input.cacheWrite1h"
2039
+ | "tokens.output.total"
2040
+ | "tokens.output.text"
2041
+ | "tokens.output.reasoning"
2042
+ quantity: string
2043
+ rateAmountNanosPerMillion: string
2044
+ chargeAmountNanos: string
2045
+ }>
2046
+ }
2047
+ | {
2048
+ status: "unpriceable"
2049
+ reason:
2050
+ | "missingBillingIdentity"
2051
+ | "missingRateCard"
2052
+ | "missingUsageMeter"
2053
+ | "unsupportedPricingDimension"
2054
+ | "invalidUsageForFormula"
2055
+ missingMeters?: Array<
2056
+ | "tokens.input.total"
2057
+ | "tokens.input.uncached"
2058
+ | "tokens.input.cacheRead"
2059
+ | "tokens.input.cacheWrite"
2060
+ | "tokens.input.cacheWrite5m"
2061
+ | "tokens.input.cacheWrite1h"
2062
+ | "tokens.output.total"
2063
+ | "tokens.output.text"
2064
+ | "tokens.output.reasoning"
2065
+ >
2066
+ }
1890
2067
  billingIdentity: {
1891
2068
  providerId: string
1892
2069
  modelId: string
@@ -1897,6 +2074,7 @@ export type ListAiModelCallsResponses = {
1897
2074
  region?: string
1898
2075
  inferenceGeo?: string
1899
2076
  routedProviderId?: string
2077
+ routedModelId?: string
1900
2078
  deploymentId?: string
1901
2079
  inferenceProfileId?: string
1902
2080
  cacheWriteTtlSeconds?: number
@@ -1906,7 +2084,7 @@ export type ListAiModelCallsResponses = {
1906
2084
  sourceId: string
1907
2085
  sourceEntryId: string
1908
2086
  sourceVersion: string
1909
- sourceUrl: string
2087
+ sourceUrl?: string
1910
2088
  observedAt: string
1911
2089
  }
1912
2090
  money: {
@@ -1919,6 +2097,8 @@ export type ListAiModelCallsResponses = {
1919
2097
  | "tokens.input.uncached"
1920
2098
  | "tokens.input.cacheRead"
1921
2099
  | "tokens.input.cacheWrite"
2100
+ | "tokens.input.cacheWrite5m"
2101
+ | "tokens.input.cacheWrite1h"
1922
2102
  | "tokens.output.total"
1923
2103
  | "tokens.output.text"
1924
2104
  | "tokens.output.reasoning"
@@ -1930,6 +2110,50 @@ export type ListAiModelCallsResponses = {
1930
2110
  }
1931
2111
  | {
1932
2112
  status: "unpriceable"
2113
+ source: "estimate" | "provider" | "unknown"
2114
+ estimate?:
2115
+ | {
2116
+ status: "rated"
2117
+ money: {
2118
+ currency: string
2119
+ amountNanos: string
2120
+ }
2121
+ components: Array<{
2122
+ meter:
2123
+ | "tokens.input.total"
2124
+ | "tokens.input.uncached"
2125
+ | "tokens.input.cacheRead"
2126
+ | "tokens.input.cacheWrite"
2127
+ | "tokens.input.cacheWrite5m"
2128
+ | "tokens.input.cacheWrite1h"
2129
+ | "tokens.output.total"
2130
+ | "tokens.output.text"
2131
+ | "tokens.output.reasoning"
2132
+ quantity: string
2133
+ rateAmountNanosPerMillion: string
2134
+ chargeAmountNanos: string
2135
+ }>
2136
+ }
2137
+ | {
2138
+ status: "unpriceable"
2139
+ reason:
2140
+ | "missingBillingIdentity"
2141
+ | "missingRateCard"
2142
+ | "missingUsageMeter"
2143
+ | "unsupportedPricingDimension"
2144
+ | "invalidUsageForFormula"
2145
+ missingMeters?: Array<
2146
+ | "tokens.input.total"
2147
+ | "tokens.input.uncached"
2148
+ | "tokens.input.cacheRead"
2149
+ | "tokens.input.cacheWrite"
2150
+ | "tokens.input.cacheWrite5m"
2151
+ | "tokens.input.cacheWrite1h"
2152
+ | "tokens.output.total"
2153
+ | "tokens.output.text"
2154
+ | "tokens.output.reasoning"
2155
+ >
2156
+ }
1933
2157
  billingIdentity?: {
1934
2158
  providerId: string
1935
2159
  modelId: string
@@ -1940,21 +2164,22 @@ export type ListAiModelCallsResponses = {
1940
2164
  region?: string
1941
2165
  inferenceGeo?: string
1942
2166
  routedProviderId?: string
2167
+ routedModelId?: string
1943
2168
  deploymentId?: string
1944
2169
  inferenceProfileId?: string
1945
2170
  cacheWriteTtlSeconds?: number
1946
2171
  mode?: string
1947
2172
  }
1948
- priceSource: {
2173
+ priceSource?: {
1949
2174
  sourceId: string
1950
2175
  sourceEntryId: string
1951
2176
  sourceVersion: string
1952
- sourceUrl: string
2177
+ sourceUrl?: string
1953
2178
  observedAt: string
1954
2179
  }
1955
2180
  reason:
1956
2181
  | "missingBillingIdentity"
1957
- | "missingCatalogEntry"
2182
+ | "missingRateCard"
1958
2183
  | "missingUsageMeter"
1959
2184
  | "unsupportedPricingDimension"
1960
2185
  | "invalidUsageForFormula"
@@ -1963,6 +2188,8 @@ export type ListAiModelCallsResponses = {
1963
2188
  | "tokens.input.uncached"
1964
2189
  | "tokens.input.cacheRead"
1965
2190
  | "tokens.input.cacheWrite"
2191
+ | "tokens.input.cacheWrite5m"
2192
+ | "tokens.input.cacheWrite1h"
1966
2193
  | "tokens.output.total"
1967
2194
  | "tokens.output.text"
1968
2195
  | "tokens.output.reasoning"
@@ -1978,119 +2205,777 @@ export type ListAiModelCallsResponses = {
1978
2205
 
1979
2206
  export type ListAiModelCallsResponse = ListAiModelCallsResponses[keyof ListAiModelCallsResponses]
1980
2207
 
1981
- export type GetProjectInfoData = {
2208
+ export type ListAiLimitPoliciesData = {
1982
2209
  body?: never
1983
2210
  path?: never
1984
- query?: never
1985
- url: "/api/project"
2211
+ query?: {
2212
+ includeDisabled?: "true" | "false"
2213
+ }
2214
+ url: "/api/ai/limits"
1986
2215
  }
1987
2216
 
1988
- export type GetProjectInfoResponses = {
2217
+ export type ListAiLimitPoliciesErrors = {
1989
2218
  /**
1990
- * Response for status 200
2219
+ * Response for status 400
1991
2220
  */
1992
- 200: {
1993
- id: string
2221
+ 400: {
2222
+ error: string
1994
2223
  }
1995
- }
1996
-
1997
- export type GetProjectInfoResponse = GetProjectInfoResponses[keyof GetProjectInfoResponses]
1998
-
1999
- export type GetStatusData = {
2000
- body?: never
2001
- path?: never
2002
- query?: never
2003
- url: "/api/status"
2004
- }
2005
-
2006
- export type GetStatusResponses = {
2007
2224
  /**
2008
- * Response for status 200
2225
+ * Response for status 403
2009
2226
  */
2010
- 200: {
2011
- status: "ok" | "degraded"
2012
- objectTypes: number
2013
- maintenance: {
2014
- running: boolean
2015
- intervalMs: number
2016
- lastStartedAt: string | null
2017
- lastCompletedAt: string | null
2018
- lastDurationMs: number | null
2019
- consecutiveFailures: number
2020
- lastError: string | null
2021
- outbox: {
2022
- pendingCount: number
2023
- oldestPendingAt: string | null
2024
- retryingCount: number
2025
- maxAttempts: number
2026
- } | null
2027
- terminalSources: {
2028
- count: number
2029
- oldestTerminalAt: string | null
2030
- } | null
2031
- cleanup: {
2032
- publishedOutboxRowsDeleted: number
2033
- terminalSourceRowsDeleted: number
2034
- terminalSourceMaterializationsDeleted: number
2035
- } | null
2036
- }
2227
+ 403: {
2228
+ error: string
2229
+ }
2230
+ /**
2231
+ * Response for status 501
2232
+ */
2233
+ 501: {
2234
+ error: string
2037
2235
  }
2038
2236
  }
2039
2237
 
2040
- export type GetStatusResponse = GetStatusResponses[keyof GetStatusResponses]
2041
-
2042
- export type ListConnectorsData = {
2043
- body?: never
2044
- path?: never
2045
- query?: never
2046
- url: "/api/connectors"
2047
- }
2238
+ export type ListAiLimitPoliciesError = ListAiLimitPoliciesErrors[keyof ListAiLimitPoliciesErrors]
2048
2239
 
2049
- export type ListConnectorsResponses = {
2240
+ export type ListAiLimitPoliciesResponses = {
2050
2241
  /**
2051
2242
  * Response for status 200
2052
2243
  */
2053
- 200: Array<{
2054
- id: string
2055
- type: string
2056
- connection: {
2057
- authentication: "oauth2"
2058
- } | null
2059
- syncIds: Array<string>
2060
- webhooks: Array<{
2244
+ 200: {
2245
+ items: Array<{
2061
2246
  id: string
2062
- method: "POST"
2063
- route: string
2064
- bodyFormat: "json" | "text" | "raw"
2065
- hasVerify: boolean
2066
- hasIdempotency: boolean
2247
+ subject:
2248
+ | {
2249
+ type: "project"
2250
+ }
2251
+ | {
2252
+ type: "group"
2253
+ id: string
2254
+ }
2255
+ | {
2256
+ type: "user"
2257
+ id: string
2258
+ }
2259
+ | {
2260
+ type: "serviceAccount"
2261
+ id: string
2262
+ }
2263
+ limit:
2264
+ | {
2265
+ meter: "tokens.total"
2266
+ amount: number
2267
+ }
2268
+ | {
2269
+ meter: "cost.catalogEstimated"
2270
+ amount: {
2271
+ currency: "USD"
2272
+ amountNanos: string
2273
+ }
2274
+ }
2275
+ period: "calendarMonth"
2276
+ enabled: boolean
2277
+ createdAt: string
2278
+ updatedAt: string
2067
2279
  }>
2068
- }>
2280
+ capabilities: {
2281
+ manage: boolean
2282
+ }
2283
+ }
2069
2284
  }
2070
2285
 
2071
- export type ListConnectorsResponse = ListConnectorsResponses[keyof ListConnectorsResponses]
2286
+ export type ListAiLimitPoliciesResponse =
2287
+ ListAiLimitPoliciesResponses[keyof ListAiLimitPoliciesResponses]
2072
2288
 
2073
- export type GetConnectorData = {
2074
- body?: never
2075
- path: {
2076
- connectorId: string
2289
+ export type CreateAiLimitPolicyData = {
2290
+ body: {
2291
+ subject:
2292
+ | {
2293
+ type: "project"
2294
+ }
2295
+ | {
2296
+ type: "group"
2297
+ id: string
2298
+ }
2299
+ | {
2300
+ type: "user"
2301
+ id: string
2302
+ }
2303
+ | {
2304
+ type: "serviceAccount"
2305
+ id: string
2306
+ }
2307
+ limit:
2308
+ | {
2309
+ meter: "tokens.total"
2310
+ amount: number
2311
+ }
2312
+ | {
2313
+ meter: "cost.catalogEstimated"
2314
+ amount: {
2315
+ currency: "USD"
2316
+ amountNanos: string
2317
+ }
2318
+ }
2319
+ enabled?: boolean
2077
2320
  }
2321
+ path?: never
2078
2322
  query?: never
2079
- url: "/api/connectors/{connectorId}"
2323
+ url: "/api/ai/limits"
2080
2324
  }
2081
2325
 
2082
- export type GetConnectorErrors = {
2326
+ export type CreateAiLimitPolicyErrors = {
2083
2327
  /**
2084
- * Response for status 404
2328
+ * Response for status 400
2085
2329
  */
2086
- 404: {
2330
+ 400: {
2087
2331
  error: string
2088
2332
  }
2089
- }
2090
-
2091
- export type GetConnectorError = GetConnectorErrors[keyof GetConnectorErrors]
2092
-
2093
- export type GetConnectorResponses = {
2333
+ /**
2334
+ * Response for status 403
2335
+ */
2336
+ 403: {
2337
+ error: string
2338
+ }
2339
+ /**
2340
+ * Response for status 409
2341
+ */
2342
+ 409: {
2343
+ error: string
2344
+ }
2345
+ /**
2346
+ * Response for status 501
2347
+ */
2348
+ 501: {
2349
+ error: string
2350
+ }
2351
+ }
2352
+
2353
+ export type CreateAiLimitPolicyError = CreateAiLimitPolicyErrors[keyof CreateAiLimitPolicyErrors]
2354
+
2355
+ export type CreateAiLimitPolicyResponses = {
2356
+ /**
2357
+ * Response for status 200
2358
+ */
2359
+ 200: {
2360
+ id: string
2361
+ subject:
2362
+ | {
2363
+ type: "project"
2364
+ }
2365
+ | {
2366
+ type: "group"
2367
+ id: string
2368
+ }
2369
+ | {
2370
+ type: "user"
2371
+ id: string
2372
+ }
2373
+ | {
2374
+ type: "serviceAccount"
2375
+ id: string
2376
+ }
2377
+ limit:
2378
+ | {
2379
+ meter: "tokens.total"
2380
+ amount: number
2381
+ }
2382
+ | {
2383
+ meter: "cost.catalogEstimated"
2384
+ amount: {
2385
+ currency: "USD"
2386
+ amountNanos: string
2387
+ }
2388
+ }
2389
+ period: "calendarMonth"
2390
+ enabled: boolean
2391
+ createdAt: string
2392
+ updatedAt: string
2393
+ }
2394
+ }
2395
+
2396
+ export type CreateAiLimitPolicyResponse =
2397
+ CreateAiLimitPolicyResponses[keyof CreateAiLimitPolicyResponses]
2398
+
2399
+ export type GetAiLimitStatusData = {
2400
+ body?: never
2401
+ path?: never
2402
+ query?: {
2403
+ includeDisabled?: "true" | "false"
2404
+ }
2405
+ url: "/api/ai/limits/status"
2406
+ }
2407
+
2408
+ export type GetAiLimitStatusErrors = {
2409
+ /**
2410
+ * Response for status 400
2411
+ */
2412
+ 400: {
2413
+ error: string
2414
+ }
2415
+ /**
2416
+ * Response for status 403
2417
+ */
2418
+ 403: {
2419
+ error: string
2420
+ }
2421
+ /**
2422
+ * Response for status 501
2423
+ */
2424
+ 501: {
2425
+ error: string
2426
+ }
2427
+ }
2428
+
2429
+ export type GetAiLimitStatusError = GetAiLimitStatusErrors[keyof GetAiLimitStatusErrors]
2430
+
2431
+ export type GetAiLimitStatusResponses = {
2432
+ /**
2433
+ * Response for status 200
2434
+ */
2435
+ 200: {
2436
+ items: Array<{
2437
+ policy: {
2438
+ id: string
2439
+ subject:
2440
+ | {
2441
+ type: "project"
2442
+ }
2443
+ | {
2444
+ type: "group"
2445
+ id: string
2446
+ }
2447
+ | {
2448
+ type: "user"
2449
+ id: string
2450
+ }
2451
+ | {
2452
+ type: "serviceAccount"
2453
+ id: string
2454
+ }
2455
+ limit:
2456
+ | {
2457
+ meter: "tokens.total"
2458
+ amount: number
2459
+ }
2460
+ | {
2461
+ meter: "cost.catalogEstimated"
2462
+ amount: {
2463
+ currency: "USD"
2464
+ amountNanos: string
2465
+ }
2466
+ }
2467
+ period: "calendarMonth"
2468
+ enabled: boolean
2469
+ createdAt: string
2470
+ updatedAt: string
2471
+ }
2472
+ period: {
2473
+ kind: "calendarMonth"
2474
+ start: string
2475
+ end: string
2476
+ resetAt: string
2477
+ }
2478
+ consumption: {
2479
+ actual:
2480
+ | {
2481
+ meter: "tokens.total"
2482
+ amount: number
2483
+ }
2484
+ | {
2485
+ meter: "cost.catalogEstimated"
2486
+ amount: {
2487
+ currency: "USD"
2488
+ amountNanos: string
2489
+ }
2490
+ }
2491
+ reserved:
2492
+ | {
2493
+ meter: "tokens.total"
2494
+ amount: number
2495
+ }
2496
+ | {
2497
+ meter: "cost.catalogEstimated"
2498
+ amount: {
2499
+ currency: "USD"
2500
+ amountNanos: string
2501
+ }
2502
+ }
2503
+ unknown:
2504
+ | {
2505
+ meter: "tokens.total"
2506
+ amount: number
2507
+ }
2508
+ | {
2509
+ meter: "cost.catalogEstimated"
2510
+ amount: {
2511
+ currency: "USD"
2512
+ amountNanos: string
2513
+ }
2514
+ }
2515
+ remaining:
2516
+ | {
2517
+ meter: "tokens.total"
2518
+ amount: number
2519
+ }
2520
+ | {
2521
+ meter: "cost.catalogEstimated"
2522
+ amount: {
2523
+ currency: "USD"
2524
+ amountNanos: string
2525
+ }
2526
+ }
2527
+ }
2528
+ accountingStatus: "complete" | "unavailable"
2529
+ exhausted: boolean
2530
+ orphaned: boolean
2531
+ }>
2532
+ capabilities: {
2533
+ manage: boolean
2534
+ }
2535
+ }
2536
+ }
2537
+
2538
+ export type GetAiLimitStatusResponse = GetAiLimitStatusResponses[keyof GetAiLimitStatusResponses]
2539
+
2540
+ export type GetAiLimitSubjectOptionsData = {
2541
+ body?: never
2542
+ path?: never
2543
+ query?: never
2544
+ url: "/api/ai/limits/subjects"
2545
+ }
2546
+
2547
+ export type GetAiLimitSubjectOptionsErrors = {
2548
+ /**
2549
+ * Response for status 400
2550
+ */
2551
+ 400: {
2552
+ error: string
2553
+ }
2554
+ /**
2555
+ * Response for status 403
2556
+ */
2557
+ 403: {
2558
+ error: string
2559
+ }
2560
+ }
2561
+
2562
+ export type GetAiLimitSubjectOptionsError =
2563
+ GetAiLimitSubjectOptionsErrors[keyof GetAiLimitSubjectOptionsErrors]
2564
+
2565
+ export type GetAiLimitSubjectOptionsResponses = {
2566
+ /**
2567
+ * Response for status 200
2568
+ */
2569
+ 200: {
2570
+ groups: Array<{
2571
+ id: string
2572
+ label?: string
2573
+ description?: string
2574
+ }>
2575
+ users: Array<{
2576
+ id: string
2577
+ email: string
2578
+ displayName?: string
2579
+ status: "active" | "suspended"
2580
+ }>
2581
+ serviceAccounts: Array<{
2582
+ id: string
2583
+ name: string
2584
+ description?: string
2585
+ status: "active" | "suspended"
2586
+ }>
2587
+ }
2588
+ }
2589
+
2590
+ export type GetAiLimitSubjectOptionsResponse =
2591
+ GetAiLimitSubjectOptionsResponses[keyof GetAiLimitSubjectOptionsResponses]
2592
+
2593
+ export type DeleteAiLimitPolicyData = {
2594
+ body?: never
2595
+ path: {
2596
+ limitId: string
2597
+ }
2598
+ query?: never
2599
+ url: "/api/ai/limits/{limitId}"
2600
+ }
2601
+
2602
+ export type DeleteAiLimitPolicyErrors = {
2603
+ /**
2604
+ * Response for status 400
2605
+ */
2606
+ 400: {
2607
+ error: string
2608
+ }
2609
+ /**
2610
+ * Response for status 403
2611
+ */
2612
+ 403: {
2613
+ error: string
2614
+ }
2615
+ /**
2616
+ * Response for status 404
2617
+ */
2618
+ 404: {
2619
+ error: string
2620
+ }
2621
+ /**
2622
+ * Response for status 501
2623
+ */
2624
+ 501: {
2625
+ error: string
2626
+ }
2627
+ }
2628
+
2629
+ export type DeleteAiLimitPolicyError = DeleteAiLimitPolicyErrors[keyof DeleteAiLimitPolicyErrors]
2630
+
2631
+ export type DeleteAiLimitPolicyResponses = {
2632
+ /**
2633
+ * Response for status 200
2634
+ */
2635
+ 200: {
2636
+ success: boolean
2637
+ }
2638
+ }
2639
+
2640
+ export type DeleteAiLimitPolicyResponse =
2641
+ DeleteAiLimitPolicyResponses[keyof DeleteAiLimitPolicyResponses]
2642
+
2643
+ export type UpdateAiLimitPolicyData = {
2644
+ body: {
2645
+ limit?:
2646
+ | {
2647
+ meter: "tokens.total"
2648
+ amount: number
2649
+ }
2650
+ | {
2651
+ meter: "cost.catalogEstimated"
2652
+ amount: {
2653
+ currency: "USD"
2654
+ amountNanos: string
2655
+ }
2656
+ }
2657
+ enabled?: boolean
2658
+ }
2659
+ path: {
2660
+ limitId: string
2661
+ }
2662
+ query?: never
2663
+ url: "/api/ai/limits/{limitId}"
2664
+ }
2665
+
2666
+ export type UpdateAiLimitPolicyErrors = {
2667
+ /**
2668
+ * Response for status 400
2669
+ */
2670
+ 400: {
2671
+ error: string
2672
+ }
2673
+ /**
2674
+ * Response for status 403
2675
+ */
2676
+ 403: {
2677
+ error: string
2678
+ }
2679
+ /**
2680
+ * Response for status 404
2681
+ */
2682
+ 404: {
2683
+ error: string
2684
+ }
2685
+ /**
2686
+ * Response for status 501
2687
+ */
2688
+ 501: {
2689
+ error: string
2690
+ }
2691
+ }
2692
+
2693
+ export type UpdateAiLimitPolicyError = UpdateAiLimitPolicyErrors[keyof UpdateAiLimitPolicyErrors]
2694
+
2695
+ export type UpdateAiLimitPolicyResponses = {
2696
+ /**
2697
+ * Response for status 200
2698
+ */
2699
+ 200: {
2700
+ id: string
2701
+ subject:
2702
+ | {
2703
+ type: "project"
2704
+ }
2705
+ | {
2706
+ type: "group"
2707
+ id: string
2708
+ }
2709
+ | {
2710
+ type: "user"
2711
+ id: string
2712
+ }
2713
+ | {
2714
+ type: "serviceAccount"
2715
+ id: string
2716
+ }
2717
+ limit:
2718
+ | {
2719
+ meter: "tokens.total"
2720
+ amount: number
2721
+ }
2722
+ | {
2723
+ meter: "cost.catalogEstimated"
2724
+ amount: {
2725
+ currency: "USD"
2726
+ amountNanos: string
2727
+ }
2728
+ }
2729
+ period: "calendarMonth"
2730
+ enabled: boolean
2731
+ createdAt: string
2732
+ updatedAt: string
2733
+ }
2734
+ }
2735
+
2736
+ export type UpdateAiLimitPolicyResponse =
2737
+ UpdateAiLimitPolicyResponses[keyof UpdateAiLimitPolicyResponses]
2738
+
2739
+ export type ListAiModelCallGroupsData = {
2740
+ body?: never
2741
+ path?: never
2742
+ query: {
2743
+ from: string
2744
+ to: string
2745
+ providerId?: string
2746
+ modelId?: string
2747
+ valuationStatus?: "rated" | "unpriceable" | "unvalued"
2748
+ limit?: string
2749
+ offset?: string
2750
+ }
2751
+ url: "/api/ai/model-call-groups"
2752
+ }
2753
+
2754
+ export type ListAiModelCallGroupsErrors = {
2755
+ /**
2756
+ * Response for status 400
2757
+ */
2758
+ 400: {
2759
+ error: string
2760
+ }
2761
+ /**
2762
+ * Response for status 403
2763
+ */
2764
+ 403: {
2765
+ error: string
2766
+ }
2767
+ /**
2768
+ * Response for status 501
2769
+ */
2770
+ 501: {
2771
+ error: string
2772
+ }
2773
+ }
2774
+
2775
+ export type ListAiModelCallGroupsError =
2776
+ ListAiModelCallGroupsErrors[keyof ListAiModelCallGroupsErrors]
2777
+
2778
+ export type ListAiModelCallGroupsResponses = {
2779
+ /**
2780
+ * Response for status 200
2781
+ */
2782
+ 200: {
2783
+ items: Array<{
2784
+ executionId: string
2785
+ attribution?:
2786
+ | {
2787
+ kind: "agent"
2788
+ agentRunId: string
2789
+ threadId: string
2790
+ }
2791
+ | {
2792
+ kind: "workflowAgent"
2793
+ agentStepId: string
2794
+ nodeRunId: string
2795
+ workflowId: string
2796
+ workflowRunId: string
2797
+ }
2798
+ | {
2799
+ kind: "subagent"
2800
+ subagentRunId: string
2801
+ parentRunId: string
2802
+ }
2803
+ modelCallCount: number
2804
+ totalTokens?: number
2805
+ costs: {
2806
+ amounts: Array<{
2807
+ currency: string
2808
+ amountNanos: string
2809
+ }>
2810
+ ratedCallCount: number
2811
+ unpriceableCallCount: number
2812
+ unvaluedCallCount: number
2813
+ }
2814
+ firstCallAt: string
2815
+ lastCallAt: string
2816
+ label?: string
2817
+ executions: Array<{
2818
+ executionId: string
2819
+ attribution?:
2820
+ | {
2821
+ kind: "agent"
2822
+ agentRunId: string
2823
+ threadId: string
2824
+ }
2825
+ | {
2826
+ kind: "workflowAgent"
2827
+ agentStepId: string
2828
+ nodeRunId: string
2829
+ workflowId: string
2830
+ workflowRunId: string
2831
+ }
2832
+ | {
2833
+ kind: "subagent"
2834
+ subagentRunId: string
2835
+ parentRunId: string
2836
+ }
2837
+ modelCallCount: number
2838
+ totalTokens?: number
2839
+ costs: {
2840
+ amounts: Array<{
2841
+ currency: string
2842
+ amountNanos: string
2843
+ }>
2844
+ ratedCallCount: number
2845
+ unpriceableCallCount: number
2846
+ unvaluedCallCount: number
2847
+ }
2848
+ firstCallAt: string
2849
+ lastCallAt: string
2850
+ models: Array<{
2851
+ providerId: string
2852
+ modelId: string
2853
+ }>
2854
+ label?: string
2855
+ }>
2856
+ canOpenThread: boolean
2857
+ }>
2858
+ total: number
2859
+ hasMore: boolean
2860
+ }
2861
+ }
2862
+
2863
+ export type ListAiModelCallGroupsResponse =
2864
+ ListAiModelCallGroupsResponses[keyof ListAiModelCallGroupsResponses]
2865
+
2866
+ export type GetProjectInfoData = {
2867
+ body?: never
2868
+ path?: never
2869
+ query?: never
2870
+ url: "/api/project"
2871
+ }
2872
+
2873
+ export type GetProjectInfoResponses = {
2874
+ /**
2875
+ * Response for status 200
2876
+ */
2877
+ 200: {
2878
+ id: string
2879
+ }
2880
+ }
2881
+
2882
+ export type GetProjectInfoResponse = GetProjectInfoResponses[keyof GetProjectInfoResponses]
2883
+
2884
+ export type GetStatusData = {
2885
+ body?: never
2886
+ path?: never
2887
+ query?: never
2888
+ url: "/api/status"
2889
+ }
2890
+
2891
+ export type GetStatusResponses = {
2892
+ /**
2893
+ * Response for status 200
2894
+ */
2895
+ 200: {
2896
+ status: "ok" | "degraded"
2897
+ objectTypes: number
2898
+ maintenance: {
2899
+ running: boolean
2900
+ intervalMs: number
2901
+ lastStartedAt: string | null
2902
+ lastCompletedAt: string | null
2903
+ lastDurationMs: number | null
2904
+ consecutiveFailures: number
2905
+ lastError: string | null
2906
+ outbox: {
2907
+ pendingCount: number
2908
+ oldestPendingAt: string | null
2909
+ retryingCount: number
2910
+ maxAttempts: number
2911
+ } | null
2912
+ terminalSources: {
2913
+ count: number
2914
+ oldestTerminalAt: string | null
2915
+ } | null
2916
+ cleanup: {
2917
+ publishedOutboxRowsDeleted: number
2918
+ terminalSourceRowsDeleted: number
2919
+ terminalSourceMaterializationsDeleted: number
2920
+ } | null
2921
+ }
2922
+ }
2923
+ }
2924
+
2925
+ export type GetStatusResponse = GetStatusResponses[keyof GetStatusResponses]
2926
+
2927
+ export type ListConnectorsData = {
2928
+ body?: never
2929
+ path?: never
2930
+ query?: never
2931
+ url: "/api/connectors"
2932
+ }
2933
+
2934
+ export type ListConnectorsResponses = {
2935
+ /**
2936
+ * Response for status 200
2937
+ */
2938
+ 200: Array<{
2939
+ id: string
2940
+ type: string
2941
+ connection: {
2942
+ authentication: "oauth2"
2943
+ } | null
2944
+ syncIds: Array<string>
2945
+ webhooks: Array<{
2946
+ id: string
2947
+ method: "POST"
2948
+ route: string
2949
+ bodyFormat: "json" | "text" | "raw"
2950
+ hasVerify: boolean
2951
+ hasIdempotency: boolean
2952
+ }>
2953
+ }>
2954
+ }
2955
+
2956
+ export type ListConnectorsResponse = ListConnectorsResponses[keyof ListConnectorsResponses]
2957
+
2958
+ export type GetConnectorData = {
2959
+ body?: never
2960
+ path: {
2961
+ connectorId: string
2962
+ }
2963
+ query?: never
2964
+ url: "/api/connectors/{connectorId}"
2965
+ }
2966
+
2967
+ export type GetConnectorErrors = {
2968
+ /**
2969
+ * Response for status 404
2970
+ */
2971
+ 404: {
2972
+ error: string
2973
+ }
2974
+ }
2975
+
2976
+ export type GetConnectorError = GetConnectorErrors[keyof GetConnectorErrors]
2977
+
2978
+ export type GetConnectorResponses = {
2094
2979
  /**
2095
2980
  * Response for status 200
2096
2981
  */
@@ -3249,6 +4134,7 @@ export type ListDatasetsResponses = {
3249
4134
  id: string
3250
4135
  description?: string
3251
4136
  primaryKey?: string | Array<string>
4137
+ sequenceBy?: string
3252
4138
  partitionBy?: Array<string>
3253
4139
  schema: {
3254
4140
  columns: Array<{
@@ -3322,6 +4208,7 @@ export type GetDatasetResponses = {
3322
4208
  id: string
3323
4209
  description?: string
3324
4210
  primaryKey?: string | Array<string>
4211
+ sequenceBy?: string
3325
4212
  partitionBy?: Array<string>
3326
4213
  schema: {
3327
4214
  columns: Array<{
@@ -3417,7 +4304,7 @@ export type ListDatasetVersionsResponses = {
3417
4304
  }>
3418
4305
  }
3419
4306
  producer?: {
3420
- kind: "sync" | "pipeline"
4307
+ kind: "sync" | "pipeline" | "ingest"
3421
4308
  id?: string
3422
4309
  runId?: string
3423
4310
  }
@@ -3493,7 +4380,7 @@ export type GetDatasetVersionResponses = {
3493
4380
  }>
3494
4381
  }
3495
4382
  producer?: {
3496
- kind: "sync" | "pipeline"
4383
+ kind: "sync" | "pipeline" | "ingest"
3497
4384
  id?: string
3498
4385
  runId?: string
3499
4386
  }
@@ -3573,7 +4460,7 @@ export type ListDatasetRowsResponses = {
3573
4460
  }>
3574
4461
  }
3575
4462
  producer?: {
3576
- kind: "sync" | "pipeline"
4463
+ kind: "sync" | "pipeline" | "ingest"
3577
4464
  id?: string
3578
4465
  runId?: string
3579
4466
  }
@@ -3622,6 +4509,7 @@ export type ListSyncsResponses = {
3622
4509
  id: string
3623
4510
  description?: string
3624
4511
  primaryKey?: string | Array<string>
4512
+ sequenceBy?: string
3625
4513
  partitionBy?: Array<string>
3626
4514
  schema: {
3627
4515
  columns: Array<{
@@ -3728,6 +4616,7 @@ export type GetSyncResponses = {
3728
4616
  id: string
3729
4617
  description?: string
3730
4618
  primaryKey?: string | Array<string>
4619
+ sequenceBy?: string
3731
4620
  partitionBy?: Array<string>
3732
4621
  schema: {
3733
4622
  columns: Array<{
@@ -3970,6 +4859,7 @@ export type ListPipelinesResponses = {
3970
4859
  id: string
3971
4860
  description?: string
3972
4861
  primaryKey?: string | Array<string>
4862
+ sequenceBy?: string
3973
4863
  partitionBy?: Array<string>
3974
4864
  schema: {
3975
4865
  columns: Array<{
@@ -3993,6 +4883,7 @@ export type ListPipelinesResponses = {
3993
4883
  id: string
3994
4884
  description?: string
3995
4885
  primaryKey?: string | Array<string>
4886
+ sequenceBy?: string
3996
4887
  partitionBy?: Array<string>
3997
4888
  schema: {
3998
4889
  columns: Array<{
@@ -4106,6 +4997,7 @@ export type GetPipelineResponses = {
4106
4997
  id: string
4107
4998
  description?: string
4108
4999
  primaryKey?: string | Array<string>
5000
+ sequenceBy?: string
4109
5001
  partitionBy?: Array<string>
4110
5002
  schema: {
4111
5003
  columns: Array<{
@@ -4129,6 +5021,7 @@ export type GetPipelineResponses = {
4129
5021
  id: string
4130
5022
  description?: string
4131
5023
  primaryKey?: string | Array<string>
5024
+ sequenceBy?: string
4132
5025
  partitionBy?: Array<string>
4133
5026
  schema: {
4134
5027
  columns: Array<{
@@ -4545,7 +5438,6 @@ export type ListWorkflowsResponses = {
4545
5438
  type: "agent"
4546
5439
  id: string
4547
5440
  key: string
4548
- agentId: string
4549
5441
  input: {
4550
5442
  [key: string]:
4551
5443
  | string
@@ -4579,7 +5471,12 @@ export type ListWorkflowsResponses = {
4579
5471
  startedAt: string
4580
5472
  finishedAt?: string
4581
5473
  error?: {
4582
- code: "internal.unexpected" | "runtime.cancelled" | "workflow.node_failed"
5474
+ code:
5475
+ | "internal.unexpected"
5476
+ | "runtime.cancelled"
5477
+ | "workflow.node_failed"
5478
+ | "ai.usage_limit_exceeded"
5479
+ | "ai.usage_limit_unavailable"
4583
5480
  message: string
4584
5481
  retryable: boolean
4585
5482
  at: string
@@ -4725,7 +5622,6 @@ export type GetWorkflowResponses = {
4725
5622
  type: "agent"
4726
5623
  id: string
4727
5624
  key: string
4728
- agentId: string
4729
5625
  input: {
4730
5626
  [key: string]:
4731
5627
  | string
@@ -4759,7 +5655,12 @@ export type GetWorkflowResponses = {
4759
5655
  startedAt: string
4760
5656
  finishedAt?: string
4761
5657
  error?: {
4762
- code: "internal.unexpected" | "runtime.cancelled" | "workflow.node_failed"
5658
+ code:
5659
+ | "internal.unexpected"
5660
+ | "runtime.cancelled"
5661
+ | "workflow.node_failed"
5662
+ | "ai.usage_limit_exceeded"
5663
+ | "ai.usage_limit_unavailable"
4763
5664
  message: string
4764
5665
  retryable: boolean
4765
5666
  at: string
@@ -5261,7 +6162,12 @@ export type ListWorkflowRunsResponses = {
5261
6162
  startedAt: string
5262
6163
  finishedAt?: string
5263
6164
  error?: {
5264
- code: "internal.unexpected" | "runtime.cancelled" | "workflow.node_failed"
6165
+ code:
6166
+ | "internal.unexpected"
6167
+ | "runtime.cancelled"
6168
+ | "workflow.node_failed"
6169
+ | "ai.usage_limit_exceeded"
6170
+ | "ai.usage_limit_unavailable"
5265
6171
  message: string
5266
6172
  retryable: boolean
5267
6173
  at: string
@@ -5337,7 +6243,12 @@ export type GetWorkflowRunResponses = {
5337
6243
  startedAt: string
5338
6244
  finishedAt?: string
5339
6245
  error?: {
5340
- code: "internal.unexpected" | "runtime.cancelled" | "workflow.node_failed"
6246
+ code:
6247
+ | "internal.unexpected"
6248
+ | "runtime.cancelled"
6249
+ | "workflow.node_failed"
6250
+ | "ai.usage_limit_exceeded"
6251
+ | "ai.usage_limit_unavailable"
5341
6252
  message: string
5342
6253
  retryable: boolean
5343
6254
  at: string
@@ -5417,7 +6328,12 @@ export type GetWorkflowRunResponses = {
5417
6328
  | null
5418
6329
  }
5419
6330
  error?: {
5420
- code: "internal.unexpected" | "runtime.cancelled" | "workflow.node_failed"
6331
+ code:
6332
+ | "internal.unexpected"
6333
+ | "runtime.cancelled"
6334
+ | "workflow.node_failed"
6335
+ | "ai.usage_limit_exceeded"
6336
+ | "ai.usage_limit_unavailable"
5421
6337
  message: string
5422
6338
  retryable: boolean
5423
6339
  at: string
@@ -5436,7 +6352,6 @@ export type GetWorkflowRunResponses = {
5436
6352
  truncated?: true
5437
6353
  }
5438
6354
  agentExecution?: {
5439
- agentId: string
5440
6355
  status: "queued" | "running" | "succeeded" | "failed" | "cancelled"
5441
6356
  attempt: number
5442
6357
  modelId?: string
@@ -5509,7 +6424,6 @@ export type GetWorkflowAgentNodeExecutionResponses = {
5509
6424
  * Response for status 200
5510
6425
  */
5511
6426
  200: {
5512
- agentId: string
5513
6427
  status: "queued" | "running" | "succeeded" | "failed" | "cancelled"
5514
6428
  attempt: number
5515
6429
  modelId?: string
@@ -5597,6 +6511,22 @@ export type GetWorkflowAgentNodeExecutionResponses = {
5597
6511
  }
5598
6512
  | null
5599
6513
  }
6514
+ | {
6515
+ type: "provider-state"
6516
+ providerId: string
6517
+ /**
6518
+ * Any JSON-compatible value.
6519
+ */
6520
+ data:
6521
+ | string
6522
+ | number
6523
+ | boolean
6524
+ | Array<unknown>
6525
+ | {
6526
+ [key: string]: unknown
6527
+ }
6528
+ | null
6529
+ }
5600
6530
  | {
5601
6531
  context:
5602
6532
  | {
@@ -5717,7 +6647,12 @@ export type GetWorkflowAgentNodeExecutionResponses = {
5717
6647
  >
5718
6648
  failurePhase?: "agent-loop" | "structured-finalizer"
5719
6649
  error?: {
5720
- code: "internal.unexpected" | "runtime.cancelled" | "agent.execution_failed"
6650
+ code:
6651
+ | "internal.unexpected"
6652
+ | "runtime.cancelled"
6653
+ | "agent.execution_failed"
6654
+ | "ai.usage_limit_exceeded"
6655
+ | "ai.usage_limit_unavailable"
5721
6656
  message: string
5722
6657
  retryable: boolean
5723
6658
  at: string
@@ -5790,7 +6725,12 @@ export type CancelWorkflowRunResponses = {
5790
6725
  startedAt: string
5791
6726
  finishedAt?: string
5792
6727
  error?: {
5793
- code: "internal.unexpected" | "runtime.cancelled" | "workflow.node_failed"
6728
+ code:
6729
+ | "internal.unexpected"
6730
+ | "runtime.cancelled"
6731
+ | "workflow.node_failed"
6732
+ | "ai.usage_limit_exceeded"
6733
+ | "ai.usage_limit_unavailable"
5794
6734
  message: string
5795
6735
  retryable: boolean
5796
6736
  at: string
@@ -5870,7 +6810,12 @@ export type CancelWorkflowRunResponses = {
5870
6810
  | null
5871
6811
  }
5872
6812
  error?: {
5873
- code: "internal.unexpected" | "runtime.cancelled" | "workflow.node_failed"
6813
+ code:
6814
+ | "internal.unexpected"
6815
+ | "runtime.cancelled"
6816
+ | "workflow.node_failed"
6817
+ | "ai.usage_limit_exceeded"
6818
+ | "ai.usage_limit_unavailable"
5874
6819
  message: string
5875
6820
  retryable: boolean
5876
6821
  at: string
@@ -5889,7 +6834,6 @@ export type CancelWorkflowRunResponses = {
5889
6834
  truncated?: true
5890
6835
  }
5891
6836
  agentExecution?: {
5892
- agentId: string
5893
6837
  status: "queued" | "running" | "succeeded" | "failed" | "cancelled"
5894
6838
  attempt: number
5895
6839
  modelId?: string
@@ -5931,6 +6875,10 @@ export type GetWorkflowRunFileContentData = {
5931
6875
  query: {
5932
6876
  path: string
5933
6877
  disposition?: "inline" | "attachment"
6878
+ /**
6879
+ * Client cache key; the route still resolves the current file
6880
+ */
6881
+ v?: string
5934
6882
  }
5935
6883
  url: "/api/workflow-runs/{runId}/files/content"
5936
6884
  }
@@ -5979,6 +6927,10 @@ export type HeadWorkflowRunFileContentData = {
5979
6927
  query: {
5980
6928
  path: string
5981
6929
  disposition?: "inline" | "attachment"
6930
+ /**
6931
+ * Client cache key; the route still resolves the current file
6932
+ */
6933
+ v?: string
5982
6934
  }
5983
6935
  url: "/api/workflow-runs/{runId}/files/content"
5984
6936
  }
@@ -6025,6 +6977,10 @@ export type GetWorkflowNodeRunFileContentData = {
6025
6977
  query: {
6026
6978
  path: string
6027
6979
  disposition?: "inline" | "attachment"
6980
+ /**
6981
+ * Client cache key; the route still resolves the current file
6982
+ */
6983
+ v?: string
6028
6984
  }
6029
6985
  url: "/api/workflow-runs/{runId}/nodes/{nodeKey}/files/content"
6030
6986
  }
@@ -6074,6 +7030,10 @@ export type HeadWorkflowNodeRunFileContentData = {
6074
7030
  query: {
6075
7031
  path: string
6076
7032
  disposition?: "inline" | "attachment"
7033
+ /**
7034
+ * Client cache key; the route still resolves the current file
7035
+ */
7036
+ v?: string
6077
7037
  }
6078
7038
  url: "/api/workflow-runs/{runId}/nodes/{nodeKey}/files/content"
6079
7039
  }
@@ -6445,60 +7405,451 @@ export type GetRuleResponses = {
6445
7405
  }
6446
7406
  }
6447
7407
 
6448
- export type GetRuleResponse = GetRuleResponses[keyof GetRuleResponses]
7408
+ export type GetRuleResponse = GetRuleResponses[keyof GetRuleResponses]
7409
+
7410
+ export type ListRuleStatesData = {
7411
+ body?: never
7412
+ path?: never
7413
+ query?: {
7414
+ ruleId?: string
7415
+ objectTypeId?: string
7416
+ primaryId?: string
7417
+ limit?: string
7418
+ offset?: string
7419
+ order?: "asc" | "desc"
7420
+ }
7421
+ url: "/api/rule-states"
7422
+ }
7423
+
7424
+ export type ListRuleStatesErrors = {
7425
+ /**
7426
+ * Response for status 400
7427
+ */
7428
+ 400: {
7429
+ error: string
7430
+ }
7431
+ /**
7432
+ * Response for status 501
7433
+ */
7434
+ 501: {
7435
+ error: string
7436
+ }
7437
+ }
7438
+
7439
+ export type ListRuleStatesError = ListRuleStatesErrors[keyof ListRuleStatesErrors]
7440
+
7441
+ export type ListRuleStatesResponses = {
7442
+ /**
7443
+ * Response for status 200
7444
+ */
7445
+ 200: {
7446
+ states: Array<{
7447
+ projectId: string
7448
+ ruleId: string
7449
+ subject: {
7450
+ kind: "object"
7451
+ objectTypeId: string
7452
+ primaryId: string
7453
+ }
7454
+ triggeredAt: string
7455
+ }>
7456
+ hasMore: boolean
7457
+ total: number
7458
+ }
7459
+ }
7460
+
7461
+ export type ListRuleStatesResponse = ListRuleStatesResponses[keyof ListRuleStatesResponses]
7462
+
7463
+ export type ListSharedAccessGrantsData = {
7464
+ body?: never
7465
+ path?: never
7466
+ query: {
7467
+ definitionId: string
7468
+ primaryId?: string
7469
+ includeRevoked?: boolean
7470
+ includeExpired?: boolean
7471
+ limit?: number
7472
+ offset?: number
7473
+ }
7474
+ url: "/api/share-grants"
7475
+ }
7476
+
7477
+ export type ListSharedAccessGrantsErrors = {
7478
+ /**
7479
+ * Response for status 400
7480
+ */
7481
+ 400: {
7482
+ error: string
7483
+ }
7484
+ /**
7485
+ * Response for status 401
7486
+ */
7487
+ 401: {
7488
+ error: string
7489
+ }
7490
+ /**
7491
+ * Response for status 403
7492
+ */
7493
+ 403: {
7494
+ error: string
7495
+ }
7496
+ /**
7497
+ * Response for status 404
7498
+ */
7499
+ 404: {
7500
+ error: string
7501
+ }
7502
+ /**
7503
+ * Response for status 500
7504
+ */
7505
+ 500: {
7506
+ error: string
7507
+ }
7508
+ /**
7509
+ * Response for status 501
7510
+ */
7511
+ 501: {
7512
+ error: string
7513
+ }
7514
+ }
7515
+
7516
+ export type ListSharedAccessGrantsError =
7517
+ ListSharedAccessGrantsErrors[keyof ListSharedAccessGrantsErrors]
7518
+
7519
+ export type ListSharedAccessGrantsResponses = {
7520
+ /**
7521
+ * Response for status 200
7522
+ */
7523
+ 200: {
7524
+ grants: Array<{
7525
+ id: string
7526
+ definitionId: string
7527
+ target: {
7528
+ objectTypeId: string
7529
+ primaryId: string
7530
+ }
7531
+ issuedBy: {
7532
+ type: "user" | "serviceAccount"
7533
+ id: string
7534
+ }
7535
+ destinationPath: string
7536
+ createdAt: string
7537
+ expiresAt: string
7538
+ revokedAt?: string
7539
+ revokedBy?: {
7540
+ type: "user" | "serviceAccount" | "system"
7541
+ id: string
7542
+ }
7543
+ }>
7544
+ hasMore: boolean
7545
+ total: number
7546
+ }
7547
+ }
7548
+
7549
+ export type ListSharedAccessGrantsResponse =
7550
+ ListSharedAccessGrantsResponses[keyof ListSharedAccessGrantsResponses]
7551
+
7552
+ export type IssueSharedAccessGrantData = {
7553
+ body: {
7554
+ definitionId: string
7555
+ target: {
7556
+ objectTypeId: string
7557
+ primaryId: string
7558
+ }
7559
+ destinationPath: string
7560
+ expiresAt: string
7561
+ }
7562
+ path?: never
7563
+ query?: never
7564
+ url: "/api/share-grants"
7565
+ }
7566
+
7567
+ export type IssueSharedAccessGrantErrors = {
7568
+ /**
7569
+ * Response for status 400
7570
+ */
7571
+ 400: {
7572
+ error: string
7573
+ }
7574
+ /**
7575
+ * Response for status 401
7576
+ */
7577
+ 401: {
7578
+ error: string
7579
+ }
7580
+ /**
7581
+ * Response for status 403
7582
+ */
7583
+ 403: {
7584
+ error: string
7585
+ }
7586
+ /**
7587
+ * Response for status 404
7588
+ */
7589
+ 404: {
7590
+ error: string
7591
+ }
7592
+ /**
7593
+ * Response for status 500
7594
+ */
7595
+ 500: {
7596
+ error: string
7597
+ }
7598
+ /**
7599
+ * Response for status 501
7600
+ */
7601
+ 501: {
7602
+ error: string
7603
+ }
7604
+ }
7605
+
7606
+ export type IssueSharedAccessGrantError =
7607
+ IssueSharedAccessGrantErrors[keyof IssueSharedAccessGrantErrors]
7608
+
7609
+ export type IssueSharedAccessGrantResponses = {
7610
+ /**
7611
+ * Response for status 201
7612
+ */
7613
+ 201: {
7614
+ grant: {
7615
+ id: string
7616
+ definitionId: string
7617
+ target: {
7618
+ objectTypeId: string
7619
+ primaryId: string
7620
+ }
7621
+ issuedBy: {
7622
+ type: "user" | "serviceAccount"
7623
+ id: string
7624
+ }
7625
+ destinationPath: string
7626
+ createdAt: string
7627
+ expiresAt: string
7628
+ revokedAt?: string
7629
+ revokedBy?: {
7630
+ type: "user" | "serviceAccount" | "system"
7631
+ id: string
7632
+ }
7633
+ }
7634
+ url: string
7635
+ }
7636
+ }
7637
+
7638
+ export type IssueSharedAccessGrantResponse =
7639
+ IssueSharedAccessGrantResponses[keyof IssueSharedAccessGrantResponses]
7640
+
7641
+ export type RevokeSharedAccessGrantData = {
7642
+ body?: never
7643
+ path: {
7644
+ grantId: string
7645
+ }
7646
+ query?: never
7647
+ url: "/api/share-grants/{grantId}"
7648
+ }
7649
+
7650
+ export type RevokeSharedAccessGrantErrors = {
7651
+ /**
7652
+ * Response for status 400
7653
+ */
7654
+ 400: {
7655
+ error: string
7656
+ }
7657
+ /**
7658
+ * Response for status 401
7659
+ */
7660
+ 401: {
7661
+ error: string
7662
+ }
7663
+ /**
7664
+ * Response for status 403
7665
+ */
7666
+ 403: {
7667
+ error: string
7668
+ }
7669
+ /**
7670
+ * Response for status 404
7671
+ */
7672
+ 404: {
7673
+ error: string
7674
+ }
7675
+ /**
7676
+ * Response for status 500
7677
+ */
7678
+ 500: {
7679
+ error: string
7680
+ }
7681
+ /**
7682
+ * Response for status 501
7683
+ */
7684
+ 501: {
7685
+ error: string
7686
+ }
7687
+ }
7688
+
7689
+ export type RevokeSharedAccessGrantError =
7690
+ RevokeSharedAccessGrantErrors[keyof RevokeSharedAccessGrantErrors]
7691
+
7692
+ export type RevokeSharedAccessGrantResponses = {
7693
+ /**
7694
+ * Response for status 200
7695
+ */
7696
+ 200: {
7697
+ grant: {
7698
+ id: string
7699
+ definitionId: string
7700
+ target: {
7701
+ objectTypeId: string
7702
+ primaryId: string
7703
+ }
7704
+ issuedBy: {
7705
+ type: "user" | "serviceAccount"
7706
+ id: string
7707
+ }
7708
+ destinationPath: string
7709
+ createdAt: string
7710
+ expiresAt: string
7711
+ revokedAt?: string
7712
+ revokedBy?: {
7713
+ type: "user" | "serviceAccount" | "system"
7714
+ id: string
7715
+ }
7716
+ }
7717
+ }
7718
+ }
7719
+
7720
+ export type RevokeSharedAccessGrantResponse =
7721
+ RevokeSharedAccessGrantResponses[keyof RevokeSharedAccessGrantResponses]
6449
7722
 
6450
- export type ListRuleStatesData = {
7723
+ export type ExchangeSharedAccessData = {
7724
+ body: {
7725
+ secret: string
7726
+ }
7727
+ path: {
7728
+ grantId: string
7729
+ }
7730
+ query?: never
7731
+ url: "/api/shared-access/{grantId}/exchange"
7732
+ }
7733
+
7734
+ export type ExchangeSharedAccessErrors = {
7735
+ /**
7736
+ * Response for status 401
7737
+ */
7738
+ 401: {
7739
+ error: string
7740
+ }
7741
+ /**
7742
+ * Response for status 503
7743
+ */
7744
+ 503: {
7745
+ error: string
7746
+ }
7747
+ }
7748
+
7749
+ export type ExchangeSharedAccessError = ExchangeSharedAccessErrors[keyof ExchangeSharedAccessErrors]
7750
+
7751
+ export type ExchangeSharedAccessResponses = {
7752
+ /**
7753
+ * Response for status 200
7754
+ */
7755
+ 200: {
7756
+ grantId: string
7757
+ destinationPath: string
7758
+ expiresAt: string
7759
+ absoluteExpiresAt: string
7760
+ csrfToken: string
7761
+ }
7762
+ }
7763
+
7764
+ export type ExchangeSharedAccessResponse =
7765
+ ExchangeSharedAccessResponses[keyof ExchangeSharedAccessResponses]
7766
+
7767
+ export type GetSharedAccessSessionData = {
6451
7768
  body?: never
6452
- path?: never
6453
- query?: {
6454
- ruleId?: string
6455
- objectTypeId?: string
6456
- primaryId?: string
6457
- limit?: string
6458
- offset?: string
6459
- order?: "asc" | "desc"
7769
+ path: {
7770
+ grantId: string
6460
7771
  }
6461
- url: "/api/rule-states"
7772
+ query?: never
7773
+ url: "/api/shared-access/{grantId}/session"
6462
7774
  }
6463
7775
 
6464
- export type ListRuleStatesErrors = {
7776
+ export type GetSharedAccessSessionErrors = {
6465
7777
  /**
6466
- * Response for status 400
7778
+ * Response for status 401
6467
7779
  */
6468
- 400: {
7780
+ 401: {
6469
7781
  error: string
6470
7782
  }
6471
7783
  /**
6472
- * Response for status 501
7784
+ * Response for status 503
6473
7785
  */
6474
- 501: {
7786
+ 503: {
6475
7787
  error: string
6476
7788
  }
6477
7789
  }
6478
7790
 
6479
- export type ListRuleStatesError = ListRuleStatesErrors[keyof ListRuleStatesErrors]
7791
+ export type GetSharedAccessSessionError =
7792
+ GetSharedAccessSessionErrors[keyof GetSharedAccessSessionErrors]
6480
7793
 
6481
- export type ListRuleStatesResponses = {
7794
+ export type GetSharedAccessSessionResponses = {
6482
7795
  /**
6483
7796
  * Response for status 200
6484
7797
  */
6485
7798
  200: {
6486
- states: Array<{
6487
- projectId: string
6488
- ruleId: string
6489
- subject: {
6490
- kind: "object"
6491
- objectTypeId: string
6492
- primaryId: string
6493
- }
6494
- triggeredAt: string
6495
- }>
6496
- hasMore: boolean
6497
- total: number
7799
+ grantId: string
7800
+ destinationPath: string
7801
+ expiresAt: string
7802
+ absoluteExpiresAt: string
7803
+ csrfToken: string
6498
7804
  }
6499
7805
  }
6500
7806
 
6501
- export type ListRuleStatesResponse = ListRuleStatesResponses[keyof ListRuleStatesResponses]
7807
+ export type GetSharedAccessSessionResponse =
7808
+ GetSharedAccessSessionResponses[keyof GetSharedAccessSessionResponses]
7809
+
7810
+ export type SignOutSharedAccessData = {
7811
+ body?: never
7812
+ path: {
7813
+ grantId: string
7814
+ }
7815
+ query?: never
7816
+ url: "/api/shared-access/{grantId}/sign-out"
7817
+ }
7818
+
7819
+ export type SignOutSharedAccessErrors = {
7820
+ /**
7821
+ * Response for status 401
7822
+ */
7823
+ 401: {
7824
+ error: string
7825
+ }
7826
+ /**
7827
+ * Response for status 403
7828
+ */
7829
+ 403: {
7830
+ error: string
7831
+ }
7832
+ /**
7833
+ * Response for status 503
7834
+ */
7835
+ 503: {
7836
+ error: string
7837
+ }
7838
+ }
7839
+
7840
+ export type SignOutSharedAccessError = SignOutSharedAccessErrors[keyof SignOutSharedAccessErrors]
7841
+
7842
+ export type SignOutSharedAccessResponses = {
7843
+ /**
7844
+ * Response for status 200
7845
+ */
7846
+ 200: {
7847
+ signedOut: true
7848
+ }
7849
+ }
7850
+
7851
+ export type SignOutSharedAccessResponse =
7852
+ SignOutSharedAccessResponses[keyof SignOutSharedAccessResponses]
6502
7853
 
6503
7854
  export type ListObjectTypesData = {
6504
7855
  body?: never
@@ -6976,6 +8327,10 @@ export type GetObjectFileContentData = {
6976
8327
  query: {
6977
8328
  path: string
6978
8329
  disposition?: "inline" | "attachment"
8330
+ /**
8331
+ * Client cache key; the route still resolves the current file
8332
+ */
8333
+ v?: string
6979
8334
  }
6980
8335
  url: "/api/objects/{objectTypeId}/{objectId}/files/content"
6981
8336
  }
@@ -7020,6 +8375,10 @@ export type HeadObjectFileContentData = {
7020
8375
  query: {
7021
8376
  path: string
7022
8377
  disposition?: "inline" | "attachment"
8378
+ /**
8379
+ * Client cache key; the route still resolves the current file
8380
+ */
8381
+ v?: string
7023
8382
  }
7024
8383
  url: "/api/objects/{objectTypeId}/{objectId}/files/content"
7025
8384
  }
@@ -7870,6 +9229,10 @@ export type GetActionRunFileContentData = {
7870
9229
  query: {
7871
9230
  path: string
7872
9231
  disposition?: "inline" | "attachment"
9232
+ /**
9233
+ * Client cache key; the route still resolves the current file
9234
+ */
9235
+ v?: string
7873
9236
  }
7874
9237
  url: "/api/action-runs/{runId}/files/content"
7875
9238
  }
@@ -7918,6 +9281,10 @@ export type HeadActionRunFileContentData = {
7918
9281
  query: {
7919
9282
  path: string
7920
9283
  disposition?: "inline" | "attachment"
9284
+ /**
9285
+ * Client cache key; the route still resolves the current file
9286
+ */
9287
+ v?: string
7921
9288
  }
7922
9289
  url: "/api/action-runs/{runId}/files/content"
7923
9290
  }
@@ -7955,46 +9322,11 @@ export type HeadActionRunFileContentResponses = {
7955
9322
  206: unknown
7956
9323
  }
7957
9324
 
7958
- export type ListAgentsData = {
7959
- body?: never
7960
- path?: never
7961
- query?: never
7962
- url: "/api/agents"
7963
- }
7964
-
7965
- export type ListAgentsResponses = {
7966
- /**
7967
- * Response for status 200
7968
- */
7969
- 200: Array<{
7970
- id: string
7971
- name: string
7972
- description?: string
7973
- modelId?: string
7974
- reasoning?: "provider-default" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh"
7975
- groupIds: Array<string>
7976
- loop?: {
7977
- stopWhen?: {
7978
- maxSteps?: number
7979
- }
7980
- context?: {
7981
- windowTokens?: number
7982
- reserveTokens?: number
7983
- keepRecentTokens?: number
7984
- }
7985
- }
7986
- }>
7987
- }
7988
-
7989
- export type ListAgentsResponse = ListAgentsResponses[keyof ListAgentsResponses]
7990
-
7991
9325
  export type GetAgentData = {
7992
9326
  body?: never
7993
- path: {
7994
- agentId: string
7995
- }
9327
+ path?: never
7996
9328
  query?: never
7997
- url: "/api/agents/{agentId}"
9329
+ url: "/api/agent"
7998
9330
  }
7999
9331
 
8000
9332
  export type GetAgentErrors = {
@@ -8013,21 +9345,10 @@ export type GetAgentResponses = {
8013
9345
  * Response for status 200
8014
9346
  */
8015
9347
  200: {
8016
- id: string
8017
9348
  name: string
8018
- description?: string
8019
- modelId?: string
8020
- reasoning?: "provider-default" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh"
8021
- groupIds: Array<string>
8022
- loop?: {
8023
- stopWhen?: {
8024
- maxSteps?: number
8025
- }
8026
- context?: {
8027
- windowTokens?: number
8028
- reserveTokens?: number
8029
- keepRecentTokens?: number
8030
- }
9349
+ model: {
9350
+ provider: string
9351
+ modelId: string
8031
9352
  }
8032
9353
  }
8033
9354
  }
@@ -8038,7 +9359,6 @@ export type ListAgentThreadsData = {
8038
9359
  body?: never
8039
9360
  path?: never
8040
9361
  query?: {
8041
- agentId?: string
8042
9362
  status?: "active" | "archived"
8043
9363
  limit?: string
8044
9364
  offset?: string
@@ -8072,7 +9392,6 @@ export type ListAgentThreadsResponses = {
8072
9392
  threads: Array<{
8073
9393
  id: string
8074
9394
  projectId: string
8075
- agentId: string
8076
9395
  ownerPrincipal: {
8077
9396
  type: "user" | "serviceAccount" | "system"
8078
9397
  id: string
@@ -8094,7 +9413,6 @@ export type ListAgentThreadsResponse = ListAgentThreadsResponses[keyof ListAgent
8094
9413
 
8095
9414
  export type CreateAgentThreadData = {
8096
9415
  body: {
8097
- agentId: string
8098
9416
  title?: string
8099
9417
  threadId?: string
8100
9418
  }
@@ -8140,7 +9458,6 @@ export type CreateAgentThreadResponses = {
8140
9458
  thread: {
8141
9459
  id: string
8142
9460
  projectId: string
8143
- agentId: string
8144
9461
  ownerPrincipal: {
8145
9462
  type: "user" | "serviceAccount" | "system"
8146
9463
  id: string
@@ -8197,7 +9514,6 @@ export type GetAgentThreadResponses = {
8197
9514
  200: {
8198
9515
  id: string
8199
9516
  projectId: string
8200
- agentId: string
8201
9517
  ownerPrincipal: {
8202
9518
  type: "user" | "serviceAccount" | "system"
8203
9519
  id: string
@@ -8327,6 +9643,22 @@ export type ListAgentThreadMessagesResponses = {
8327
9643
  }
8328
9644
  | null
8329
9645
  }
9646
+ | {
9647
+ type: "provider-state"
9648
+ providerId: string
9649
+ /**
9650
+ * Any JSON-compatible value.
9651
+ */
9652
+ data:
9653
+ | string
9654
+ | number
9655
+ | boolean
9656
+ | Array<unknown>
9657
+ | {
9658
+ [key: string]: unknown
9659
+ }
9660
+ | null
9661
+ }
8330
9662
  | {
8331
9663
  context:
8332
9664
  | {
@@ -8480,6 +9812,22 @@ export type ListAgentThreadMessagesResponse =
8480
9812
  export type PostAgentThreadMessageData = {
8481
9813
  body: {
8482
9814
  text: string
9815
+ model?: {
9816
+ provider: string
9817
+ modelId: string
9818
+ }
9819
+ reasoning?:
9820
+ | "provider-default"
9821
+ | "none"
9822
+ | "minimal"
9823
+ | "low"
9824
+ | "medium"
9825
+ | "high"
9826
+ | "xhigh"
9827
+ | "max"
9828
+ | {
9829
+ budgetTokens: number
9830
+ }
8483
9831
  attachments?: Array<{
8484
9832
  blobId: string
8485
9833
  digest: string
@@ -8551,6 +9899,28 @@ export type PostAgentThreadMessageErrors = {
8551
9899
  409: {
8552
9900
  error: string
8553
9901
  }
9902
+ /**
9903
+ * Response for status 429
9904
+ */
9905
+ 429: {
9906
+ error: string
9907
+ /**
9908
+ * Stable machine-readable failure code for programmatic handling.
9909
+ */
9910
+ code: "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable"
9911
+ /**
9912
+ * Any JSON-compatible value.
9913
+ */
9914
+ details?:
9915
+ | string
9916
+ | number
9917
+ | boolean
9918
+ | Array<unknown>
9919
+ | {
9920
+ [key: string]: unknown
9921
+ }
9922
+ | null
9923
+ }
8554
9924
  /**
8555
9925
  * Response for status 501
8556
9926
  */
@@ -8571,13 +9941,28 @@ export type PostAgentThreadMessageResponses = {
8571
9941
  id: string
8572
9942
  projectId: string
8573
9943
  threadId: string
8574
- agentId: string
8575
9944
  triggerMessageId: string
8576
9945
  requestedBy?: {
8577
9946
  type: "user" | "serviceAccount"
8578
9947
  id: string
8579
9948
  }
8580
9949
  status: "queued" | "running" | "succeeded" | "failed" | "cancelled"
9950
+ model?: {
9951
+ provider: string
9952
+ modelId: string
9953
+ }
9954
+ reasoning?:
9955
+ | "provider-default"
9956
+ | "none"
9957
+ | "minimal"
9958
+ | "low"
9959
+ | "medium"
9960
+ | "high"
9961
+ | "xhigh"
9962
+ | "max"
9963
+ | {
9964
+ budgetTokens: number
9965
+ }
8581
9966
  modelId?: string
8582
9967
  finishReason?:
8583
9968
  | "stop"
@@ -8622,7 +10007,12 @@ export type PostAgentThreadMessageResponses = {
8622
10007
  message: string
8623
10008
  }>
8624
10009
  error?: {
8625
- code: "internal.unexpected" | "runtime.cancelled" | "agent.execution_failed"
10010
+ code:
10011
+ | "internal.unexpected"
10012
+ | "runtime.cancelled"
10013
+ | "agent.execution_failed"
10014
+ | "ai.usage_limit_exceeded"
10015
+ | "ai.usage_limit_unavailable"
8626
10016
  message: string
8627
10017
  retryable: boolean
8628
10018
  at: string
@@ -8661,6 +10051,10 @@ export type GetAgentMessageFileContentData = {
8661
10051
  query: {
8662
10052
  path: string
8663
10053
  disposition?: "inline" | "attachment"
10054
+ /**
10055
+ * Client cache key; the route still resolves the current file
10056
+ */
10057
+ v?: string
8664
10058
  }
8665
10059
  url: "/api/agent-threads/{threadId}/messages/{messageId}/files/content"
8666
10060
  }
@@ -8710,6 +10104,10 @@ export type HeadAgentMessageFileContentData = {
8710
10104
  query: {
8711
10105
  path: string
8712
10106
  disposition?: "inline" | "attachment"
10107
+ /**
10108
+ * Client cache key; the route still resolves the current file
10109
+ */
10110
+ v?: string
8713
10111
  }
8714
10112
  url: "/api/agent-threads/{threadId}/messages/{messageId}/files/content"
8715
10113
  }
@@ -8796,13 +10194,28 @@ export type CancelAgentRunResponses = {
8796
10194
  id: string
8797
10195
  projectId: string
8798
10196
  threadId: string
8799
- agentId: string
8800
10197
  triggerMessageId: string
8801
10198
  requestedBy?: {
8802
10199
  type: "user" | "serviceAccount"
8803
10200
  id: string
8804
10201
  }
8805
10202
  status: "queued" | "running" | "succeeded" | "failed" | "cancelled"
10203
+ model?: {
10204
+ provider: string
10205
+ modelId: string
10206
+ }
10207
+ reasoning?:
10208
+ | "provider-default"
10209
+ | "none"
10210
+ | "minimal"
10211
+ | "low"
10212
+ | "medium"
10213
+ | "high"
10214
+ | "xhigh"
10215
+ | "max"
10216
+ | {
10217
+ budgetTokens: number
10218
+ }
8806
10219
  modelId?: string
8807
10220
  finishReason?:
8808
10221
  | "stop"
@@ -8847,7 +10260,12 @@ export type CancelAgentRunResponses = {
8847
10260
  message: string
8848
10261
  }>
8849
10262
  error?: {
8850
- code: "internal.unexpected" | "runtime.cancelled" | "agent.execution_failed"
10263
+ code:
10264
+ | "internal.unexpected"
10265
+ | "runtime.cancelled"
10266
+ | "agent.execution_failed"
10267
+ | "ai.usage_limit_exceeded"
10268
+ | "ai.usage_limit_unavailable"
8851
10269
  message: string
8852
10270
  retryable: boolean
8853
10271
  at: string
@@ -8905,6 +10323,28 @@ export type RetryAgentRunErrors = {
8905
10323
  409: {
8906
10324
  error: string
8907
10325
  }
10326
+ /**
10327
+ * Response for status 429
10328
+ */
10329
+ 429: {
10330
+ error: string
10331
+ /**
10332
+ * Stable machine-readable failure code for programmatic handling.
10333
+ */
10334
+ code: "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable"
10335
+ /**
10336
+ * Any JSON-compatible value.
10337
+ */
10338
+ details?:
10339
+ | string
10340
+ | number
10341
+ | boolean
10342
+ | Array<unknown>
10343
+ | {
10344
+ [key: string]: unknown
10345
+ }
10346
+ | null
10347
+ }
8908
10348
  /**
8909
10349
  * Response for status 501
8910
10350
  */
@@ -8924,13 +10364,28 @@ export type RetryAgentRunResponses = {
8924
10364
  id: string
8925
10365
  projectId: string
8926
10366
  threadId: string
8927
- agentId: string
8928
10367
  triggerMessageId: string
8929
10368
  requestedBy?: {
8930
10369
  type: "user" | "serviceAccount"
8931
10370
  id: string
8932
10371
  }
8933
10372
  status: "queued" | "running" | "succeeded" | "failed" | "cancelled"
10373
+ model?: {
10374
+ provider: string
10375
+ modelId: string
10376
+ }
10377
+ reasoning?:
10378
+ | "provider-default"
10379
+ | "none"
10380
+ | "minimal"
10381
+ | "low"
10382
+ | "medium"
10383
+ | "high"
10384
+ | "xhigh"
10385
+ | "max"
10386
+ | {
10387
+ budgetTokens: number
10388
+ }
8934
10389
  modelId?: string
8935
10390
  finishReason?:
8936
10391
  | "stop"
@@ -8975,7 +10430,12 @@ export type RetryAgentRunResponses = {
8975
10430
  message: string
8976
10431
  }>
8977
10432
  error?: {
8978
- code: "internal.unexpected" | "runtime.cancelled" | "agent.execution_failed"
10433
+ code:
10434
+ | "internal.unexpected"
10435
+ | "runtime.cancelled"
10436
+ | "agent.execution_failed"
10437
+ | "ai.usage_limit_exceeded"
10438
+ | "ai.usage_limit_unavailable"
8979
10439
  message: string
8980
10440
  retryable: boolean
8981
10441
  at: string
@@ -9050,13 +10510,28 @@ export type ListAgentThreadRunsResponses = {
9050
10510
  id: string
9051
10511
  projectId: string
9052
10512
  threadId: string
9053
- agentId: string
9054
10513
  triggerMessageId: string
9055
10514
  requestedBy?: {
9056
10515
  type: "user" | "serviceAccount"
9057
10516
  id: string
9058
10517
  }
9059
10518
  status: "queued" | "running" | "succeeded" | "failed" | "cancelled"
10519
+ model?: {
10520
+ provider: string
10521
+ modelId: string
10522
+ }
10523
+ reasoning?:
10524
+ | "provider-default"
10525
+ | "none"
10526
+ | "minimal"
10527
+ | "low"
10528
+ | "medium"
10529
+ | "high"
10530
+ | "xhigh"
10531
+ | "max"
10532
+ | {
10533
+ budgetTokens: number
10534
+ }
9060
10535
  modelId?: string
9061
10536
  finishReason?:
9062
10537
  | "stop"
@@ -9101,7 +10576,12 @@ export type ListAgentThreadRunsResponses = {
9101
10576
  message: string
9102
10577
  }>
9103
10578
  error?: {
9104
- code: "internal.unexpected" | "runtime.cancelled" | "agent.execution_failed"
10579
+ code:
10580
+ | "internal.unexpected"
10581
+ | "runtime.cancelled"
10582
+ | "agent.execution_failed"
10583
+ | "ai.usage_limit_exceeded"
10584
+ | "ai.usage_limit_unavailable"
9105
10585
  message: string
9106
10586
  retryable: boolean
9107
10587
  at: string
@@ -9173,13 +10653,28 @@ export type GetAgentRunResponses = {
9173
10653
  id: string
9174
10654
  projectId: string
9175
10655
  threadId: string
9176
- agentId: string
9177
10656
  triggerMessageId: string
9178
10657
  requestedBy?: {
9179
10658
  type: "user" | "serviceAccount"
9180
10659
  id: string
9181
10660
  }
9182
10661
  status: "queued" | "running" | "succeeded" | "failed" | "cancelled"
10662
+ model?: {
10663
+ provider: string
10664
+ modelId: string
10665
+ }
10666
+ reasoning?:
10667
+ | "provider-default"
10668
+ | "none"
10669
+ | "minimal"
10670
+ | "low"
10671
+ | "medium"
10672
+ | "high"
10673
+ | "xhigh"
10674
+ | "max"
10675
+ | {
10676
+ budgetTokens: number
10677
+ }
9183
10678
  modelId?: string
9184
10679
  finishReason?:
9185
10680
  | "stop"
@@ -9224,7 +10719,12 @@ export type GetAgentRunResponses = {
9224
10719
  message: string
9225
10720
  }>
9226
10721
  error?: {
9227
- code: "internal.unexpected" | "runtime.cancelled" | "agent.execution_failed"
10722
+ code:
10723
+ | "internal.unexpected"
10724
+ | "runtime.cancelled"
10725
+ | "agent.execution_failed"
10726
+ | "ai.usage_limit_exceeded"
10727
+ | "ai.usage_limit_unavailable"
9228
10728
  message: string
9229
10729
  retryable: boolean
9230
10730
  at: string
@@ -9268,6 +10768,25 @@ export type ListModelsResponses = {
9268
10768
  provider: string
9269
10769
  modelId: string
9270
10770
  isDefault: boolean
10771
+ name: string
10772
+ description?: string
10773
+ publisher: {
10774
+ id: string
10775
+ name: string
10776
+ }
10777
+ via?: string
10778
+ capabilities: {
10779
+ input: Array<"text" | "image" | "audio" | "video" | "pdf">
10780
+ output: Array<"text" | "image" | "audio" | "video" | "pdf">
10781
+ attachments?: boolean
10782
+ reasoning?: boolean
10783
+ tools?: boolean
10784
+ structuredOutput?: boolean
10785
+ contextWindowTokens?: number
10786
+ }
10787
+ reasoningLevels: Array<
10788
+ "provider-default" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max"
10789
+ >
9271
10790
  }>
9272
10791
  }
9273
10792
  }