@sixb/client 0.1.5 → 0.1.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 (41) hide show
  1. package/README.md +25 -0
  2. package/dist/browser.js +2 -2
  3. package/dist/{chunk-9bwme2g7.js → chunk-b3bfdm80.js} +1 -1
  4. package/dist/{chunk-hwg7mwq7.js → chunk-dcebhkmz.js} +25 -6
  5. package/dist/{chunk-hwg7mwq7.js.map → chunk-dcebhkmz.js.map} +4 -4
  6. package/dist/{chunk-g19v53kt.js → chunk-h80qj1f8.js} +1 -1
  7. package/dist/{chunk-5y58b4tr.js → chunk-m4by7m5r.js} +2 -2
  8. package/dist/{chunk-ks27bq5b.js → chunk-p0xrjaz6.js} +2 -2
  9. package/dist/{chunk-ehjnq01h.js → chunk-r8p88mbg.js} +78 -9
  10. package/dist/chunk-r8p88mbg.js.map +19 -0
  11. package/dist/connectors/queries.d.ts.map +1 -1
  12. package/dist/file.d.ts +11 -0
  13. package/dist/file.d.ts.map +1 -1
  14. package/dist/generated/@tanstack/react-query.gen.d.ts +2411 -395
  15. package/dist/generated/@tanstack/react-query.gen.d.ts.map +1 -1
  16. package/dist/generated/index.d.ts +2 -2
  17. package/dist/generated/index.d.ts.map +1 -1
  18. package/dist/generated/sdk.gen.d.ts +41 -7
  19. package/dist/generated/sdk.gen.d.ts.map +1 -1
  20. package/dist/generated/types.gen.d.ts +980 -172
  21. package/dist/generated/types.gen.d.ts.map +1 -1
  22. package/dist/hooks.js +166 -22
  23. package/dist/hooks.js.map +3 -3
  24. package/dist/index.js +26 -8
  25. package/dist/index.js.map +1 -1
  26. package/dist/logs.js +3 -3
  27. package/dist/models.js +20 -4
  28. package/dist/models.js.map +1 -1
  29. package/dist/query.js +3 -3
  30. package/package.json +2 -2
  31. package/src/agent-streams.ts +0 -1
  32. package/src/file.ts +36 -0
  33. package/src/generated/@tanstack/react-query.gen.ts +320 -31
  34. package/src/generated/index.ts +52 -4
  35. package/src/generated/sdk.gen.ts +197 -18
  36. package/src/generated/types.gen.ts +1271 -146
  37. package/dist/chunk-ehjnq01h.js.map +0 -19
  38. /package/dist/{chunk-9bwme2g7.js.map → chunk-b3bfdm80.js.map} +0 -0
  39. /package/dist/{chunk-g19v53kt.js.map → chunk-h80qj1f8.js.map} +0 -0
  40. /package/dist/{chunk-5y58b4tr.js.map → chunk-m4by7m5r.js.map} +0 -0
  41. /package/dist/{chunk-ks27bq5b.js.map → chunk-p0xrjaz6.js.map} +0 -0
@@ -220,6 +220,63 @@ export type ObjectQuerySortField = {
220
220
  kind: "relevance";
221
221
  direction?: "asc" | "desc";
222
222
  };
223
+ export type CreateDeviceAuthorizationData = {
224
+ body: {
225
+ clientName: string;
226
+ tokenName: string;
227
+ expiresIn?: "90d";
228
+ };
229
+ path?: never;
230
+ query?: never;
231
+ url: "/api/auth/device-authorizations";
232
+ };
233
+ export type CreateDeviceAuthorizationErrors = {
234
+ /**
235
+ * Response for status 429
236
+ */
237
+ 429: {
238
+ error: string;
239
+ };
240
+ };
241
+ export type CreateDeviceAuthorizationError = CreateDeviceAuthorizationErrors[keyof CreateDeviceAuthorizationErrors];
242
+ export type CreateDeviceAuthorizationResponses = {
243
+ /**
244
+ * Response for status 201
245
+ */
246
+ 201: {
247
+ deviceCode: string;
248
+ userCode: string;
249
+ verificationUri: string;
250
+ verificationUriComplete: string;
251
+ expiresAt: string;
252
+ interval: number;
253
+ };
254
+ };
255
+ export type CreateDeviceAuthorizationResponse = CreateDeviceAuthorizationResponses[keyof CreateDeviceAuthorizationResponses];
256
+ export type ExchangeDeviceAuthorizationData = {
257
+ body: {
258
+ deviceCode: string;
259
+ };
260
+ path?: never;
261
+ query?: never;
262
+ url: "/api/auth/device-authorizations/token";
263
+ };
264
+ export type ExchangeDeviceAuthorizationResponses = {
265
+ /**
266
+ * Response for status 200
267
+ */
268
+ 200: {
269
+ status: "pending";
270
+ } | {
271
+ status: "denied";
272
+ } | {
273
+ status: "expired";
274
+ } | {
275
+ status: "approved";
276
+ accessToken: string;
277
+ };
278
+ };
279
+ export type ExchangeDeviceAuthorizationResponse = ExchangeDeviceAuthorizationResponses[keyof ExchangeDeviceAuthorizationResponses];
223
280
  export type GetAuthSessionData = {
224
281
  body?: never;
225
282
  path?: never;
@@ -992,6 +1049,7 @@ export type CreateAuthInvitationData = {
992
1049
  destinationId?: "atlas" | "app";
993
1050
  expiresAt?: string;
994
1051
  returnTo?: string;
1052
+ revealLink?: boolean;
995
1053
  };
996
1054
  path?: never;
997
1055
  query?: never;
@@ -1054,6 +1112,10 @@ export type CreateAuthInvitationResponses = {
1054
1112
  };
1055
1113
  delivery: {
1056
1114
  status: "sent" | "skipped" | "rate_limited" | "not_supported";
1115
+ link?: {
1116
+ url: string;
1117
+ expiresAt?: string;
1118
+ };
1057
1119
  };
1058
1120
  };
1059
1121
  };
@@ -1455,6 +1517,12 @@ export type GetAiAccountingOverviewErrors = {
1455
1517
  400: {
1456
1518
  error: string;
1457
1519
  };
1520
+ /**
1521
+ * Response for status 403
1522
+ */
1523
+ 403: {
1524
+ error: string;
1525
+ };
1458
1526
  /**
1459
1527
  * Response for status 501
1460
1528
  */
@@ -1568,7 +1636,32 @@ export type GetAiAccountingOverviewResponses = {
1568
1636
  unpriceableCallCount: number;
1569
1637
  unvaluedCallCount: number;
1570
1638
  };
1571
- agentId: string;
1639
+ kind: "agent";
1640
+ } | {
1641
+ modelCallCount: number;
1642
+ usage: {
1643
+ inputTokens?: number;
1644
+ outputTokens?: number;
1645
+ totalTokens?: number;
1646
+ uncachedInputTokens?: number;
1647
+ cacheReadInputTokens?: number;
1648
+ cacheWriteInputTokens?: number;
1649
+ textOutputTokens?: number;
1650
+ reasoningOutputTokens?: number;
1651
+ reportingStatus: "complete" | "partial" | "unavailable";
1652
+ };
1653
+ costs: {
1654
+ amounts: Array<{
1655
+ currency: string;
1656
+ amountNanos: string;
1657
+ }>;
1658
+ ratedCallCount: number;
1659
+ unpriceableCallCount: number;
1660
+ unvaluedCallCount: number;
1661
+ };
1662
+ kind: "workflowAgent";
1663
+ workflowId: string;
1664
+ agentStepId: string;
1572
1665
  }>;
1573
1666
  workflows: Array<{
1574
1667
  modelCallCount: number;
@@ -1592,12 +1685,663 @@ export type GetAiAccountingOverviewResponses = {
1592
1685
  unpriceableCallCount: number;
1593
1686
  unvaluedCallCount: number;
1594
1687
  };
1595
- workflowId: string;
1596
- }>;
1688
+ workflowId: string;
1689
+ }>;
1690
+ };
1691
+ };
1692
+ export type GetAiAccountingOverviewResponse = GetAiAccountingOverviewResponses[keyof GetAiAccountingOverviewResponses];
1693
+ export type ListAiModelCallsData = {
1694
+ body?: never;
1695
+ path?: never;
1696
+ query: {
1697
+ from: string;
1698
+ to: string;
1699
+ providerId?: string;
1700
+ modelId?: string;
1701
+ executionId?: string;
1702
+ valuationStatus?: "rated" | "unpriceable" | "unvalued";
1703
+ limit?: string;
1704
+ offset?: string;
1705
+ };
1706
+ url: "/api/ai/model-calls";
1707
+ };
1708
+ export type ListAiModelCallsErrors = {
1709
+ /**
1710
+ * Response for status 400
1711
+ */
1712
+ 400: {
1713
+ error: string;
1714
+ };
1715
+ /**
1716
+ * Response for status 403
1717
+ */
1718
+ 403: {
1719
+ error: string;
1720
+ };
1721
+ /**
1722
+ * Response for status 501
1723
+ */
1724
+ 501: {
1725
+ error: string;
1726
+ };
1727
+ };
1728
+ export type ListAiModelCallsError = ListAiModelCallsErrors[keyof ListAiModelCallsErrors];
1729
+ export type ListAiModelCallsResponses = {
1730
+ /**
1731
+ * Response for status 200
1732
+ */
1733
+ 200: {
1734
+ items: Array<{
1735
+ usage: {
1736
+ id: string;
1737
+ executionId: string;
1738
+ attempt: number;
1739
+ callId: string;
1740
+ providerId: string;
1741
+ requestedModelId: string;
1742
+ requestedReasoning?: "provider-default" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | {
1743
+ budgetTokens: number;
1744
+ };
1745
+ responseModelId?: string;
1746
+ responseId: string;
1747
+ providerIds: {
1748
+ requestId?: string;
1749
+ responseId?: string;
1750
+ generationId?: string;
1751
+ } | null;
1752
+ usage: {
1753
+ inputTokens?: number;
1754
+ outputTokens?: number;
1755
+ totalTokens?: number;
1756
+ uncachedInputTokens?: number;
1757
+ cacheReadInputTokens?: number;
1758
+ cacheWriteInputTokens?: number;
1759
+ textOutputTokens?: number;
1760
+ reasoningOutputTokens?: number;
1761
+ reportingStatus: "complete" | "partial" | "unavailable";
1762
+ };
1763
+ occurredAt: string;
1764
+ recordedAt: string;
1765
+ };
1766
+ attribution?: {
1767
+ kind: "agent";
1768
+ agentRunId: string;
1769
+ threadId: string;
1770
+ } | {
1771
+ kind: "workflowAgent";
1772
+ agentStepId: string;
1773
+ nodeRunId: string;
1774
+ workflowId: string;
1775
+ workflowRunId: string;
1776
+ } | {
1777
+ kind: "subagent";
1778
+ subagentRunId: string;
1779
+ parentRunId: string;
1780
+ };
1781
+ cost?: {
1782
+ status: "rated";
1783
+ source: "estimate" | "provider" | "unknown";
1784
+ estimate?: {
1785
+ status: "rated";
1786
+ money: {
1787
+ currency: string;
1788
+ amountNanos: string;
1789
+ };
1790
+ components: Array<{
1791
+ meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
1792
+ quantity: string;
1793
+ rateAmountNanosPerMillion: string;
1794
+ chargeAmountNanos: string;
1795
+ }>;
1796
+ } | {
1797
+ status: "unpriceable";
1798
+ reason: "missingBillingIdentity" | "missingRateCard" | "missingUsageMeter" | "unsupportedPricingDimension" | "invalidUsageForFormula";
1799
+ missingMeters?: Array<"tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning">;
1800
+ };
1801
+ billingIdentity: {
1802
+ providerId: string;
1803
+ modelId: string;
1804
+ };
1805
+ pricingContext: {
1806
+ serviceTier?: string;
1807
+ batch?: boolean;
1808
+ region?: string;
1809
+ inferenceGeo?: string;
1810
+ routedProviderId?: string;
1811
+ routedModelId?: string;
1812
+ deploymentId?: string;
1813
+ inferenceProfileId?: string;
1814
+ cacheWriteTtlSeconds?: number;
1815
+ mode?: string;
1816
+ };
1817
+ priceSource: {
1818
+ sourceId: string;
1819
+ sourceEntryId: string;
1820
+ sourceVersion: string;
1821
+ sourceUrl?: string;
1822
+ observedAt: string;
1823
+ };
1824
+ money: {
1825
+ currency: string;
1826
+ amountNanos: string;
1827
+ };
1828
+ components: Array<{
1829
+ meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
1830
+ quantity: string;
1831
+ rateAmountNanosPerMillion: string;
1832
+ chargeAmountNanos: string;
1833
+ }>;
1834
+ ratedAt: string;
1835
+ } | {
1836
+ status: "unpriceable";
1837
+ source: "estimate" | "provider" | "unknown";
1838
+ estimate?: {
1839
+ status: "rated";
1840
+ money: {
1841
+ currency: string;
1842
+ amountNanos: string;
1843
+ };
1844
+ components: Array<{
1845
+ meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
1846
+ quantity: string;
1847
+ rateAmountNanosPerMillion: string;
1848
+ chargeAmountNanos: string;
1849
+ }>;
1850
+ } | {
1851
+ status: "unpriceable";
1852
+ reason: "missingBillingIdentity" | "missingRateCard" | "missingUsageMeter" | "unsupportedPricingDimension" | "invalidUsageForFormula";
1853
+ missingMeters?: Array<"tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning">;
1854
+ };
1855
+ billingIdentity?: {
1856
+ providerId: string;
1857
+ modelId: string;
1858
+ };
1859
+ pricingContext: {
1860
+ serviceTier?: string;
1861
+ batch?: boolean;
1862
+ region?: string;
1863
+ inferenceGeo?: string;
1864
+ routedProviderId?: string;
1865
+ routedModelId?: string;
1866
+ deploymentId?: string;
1867
+ inferenceProfileId?: string;
1868
+ cacheWriteTtlSeconds?: number;
1869
+ mode?: string;
1870
+ };
1871
+ priceSource?: {
1872
+ sourceId: string;
1873
+ sourceEntryId: string;
1874
+ sourceVersion: string;
1875
+ sourceUrl?: string;
1876
+ observedAt: string;
1877
+ };
1878
+ reason: "missingBillingIdentity" | "missingRateCard" | "missingUsageMeter" | "unsupportedPricingDimension" | "invalidUsageForFormula";
1879
+ missingMeters?: Array<"tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning">;
1880
+ ratedAt: string;
1881
+ };
1882
+ valuationStatus: "rated" | "unpriceable" | "unvalued";
1883
+ }>;
1884
+ hasMore: boolean;
1885
+ total: number;
1886
+ };
1887
+ };
1888
+ export type ListAiModelCallsResponse = ListAiModelCallsResponses[keyof ListAiModelCallsResponses];
1889
+ export type ListAiLimitPoliciesData = {
1890
+ body?: never;
1891
+ path?: never;
1892
+ query?: {
1893
+ includeDisabled?: "true" | "false";
1894
+ };
1895
+ url: "/api/ai/limits";
1896
+ };
1897
+ export type ListAiLimitPoliciesErrors = {
1898
+ /**
1899
+ * Response for status 400
1900
+ */
1901
+ 400: {
1902
+ error: string;
1903
+ };
1904
+ /**
1905
+ * Response for status 403
1906
+ */
1907
+ 403: {
1908
+ error: string;
1909
+ };
1910
+ /**
1911
+ * Response for status 501
1912
+ */
1913
+ 501: {
1914
+ error: string;
1915
+ };
1916
+ };
1917
+ export type ListAiLimitPoliciesError = ListAiLimitPoliciesErrors[keyof ListAiLimitPoliciesErrors];
1918
+ export type ListAiLimitPoliciesResponses = {
1919
+ /**
1920
+ * Response for status 200
1921
+ */
1922
+ 200: {
1923
+ items: Array<{
1924
+ id: string;
1925
+ subject: {
1926
+ type: "project";
1927
+ } | {
1928
+ type: "group";
1929
+ id: string;
1930
+ } | {
1931
+ type: "user";
1932
+ id: string;
1933
+ } | {
1934
+ type: "serviceAccount";
1935
+ id: string;
1936
+ };
1937
+ limit: {
1938
+ meter: "tokens.total";
1939
+ amount: number;
1940
+ } | {
1941
+ meter: "cost.catalogEstimated";
1942
+ amount: {
1943
+ currency: "USD";
1944
+ amountNanos: string;
1945
+ };
1946
+ };
1947
+ period: "calendarMonth";
1948
+ enabled: boolean;
1949
+ createdAt: string;
1950
+ updatedAt: string;
1951
+ }>;
1952
+ capabilities: {
1953
+ manage: boolean;
1954
+ };
1955
+ };
1956
+ };
1957
+ export type ListAiLimitPoliciesResponse = ListAiLimitPoliciesResponses[keyof ListAiLimitPoliciesResponses];
1958
+ export type CreateAiLimitPolicyData = {
1959
+ body: {
1960
+ subject: {
1961
+ type: "project";
1962
+ } | {
1963
+ type: "group";
1964
+ id: string;
1965
+ } | {
1966
+ type: "user";
1967
+ id: string;
1968
+ } | {
1969
+ type: "serviceAccount";
1970
+ id: string;
1971
+ };
1972
+ limit: {
1973
+ meter: "tokens.total";
1974
+ amount: number;
1975
+ } | {
1976
+ meter: "cost.catalogEstimated";
1977
+ amount: {
1978
+ currency: "USD";
1979
+ amountNanos: string;
1980
+ };
1981
+ };
1982
+ enabled?: boolean;
1983
+ };
1984
+ path?: never;
1985
+ query?: never;
1986
+ url: "/api/ai/limits";
1987
+ };
1988
+ export type CreateAiLimitPolicyErrors = {
1989
+ /**
1990
+ * Response for status 400
1991
+ */
1992
+ 400: {
1993
+ error: string;
1994
+ };
1995
+ /**
1996
+ * Response for status 403
1997
+ */
1998
+ 403: {
1999
+ error: string;
2000
+ };
2001
+ /**
2002
+ * Response for status 409
2003
+ */
2004
+ 409: {
2005
+ error: string;
2006
+ };
2007
+ /**
2008
+ * Response for status 501
2009
+ */
2010
+ 501: {
2011
+ error: string;
2012
+ };
2013
+ };
2014
+ export type CreateAiLimitPolicyError = CreateAiLimitPolicyErrors[keyof CreateAiLimitPolicyErrors];
2015
+ export type CreateAiLimitPolicyResponses = {
2016
+ /**
2017
+ * Response for status 200
2018
+ */
2019
+ 200: {
2020
+ id: string;
2021
+ subject: {
2022
+ type: "project";
2023
+ } | {
2024
+ type: "group";
2025
+ id: string;
2026
+ } | {
2027
+ type: "user";
2028
+ id: string;
2029
+ } | {
2030
+ type: "serviceAccount";
2031
+ id: string;
2032
+ };
2033
+ limit: {
2034
+ meter: "tokens.total";
2035
+ amount: number;
2036
+ } | {
2037
+ meter: "cost.catalogEstimated";
2038
+ amount: {
2039
+ currency: "USD";
2040
+ amountNanos: string;
2041
+ };
2042
+ };
2043
+ period: "calendarMonth";
2044
+ enabled: boolean;
2045
+ createdAt: string;
2046
+ updatedAt: string;
2047
+ };
2048
+ };
2049
+ export type CreateAiLimitPolicyResponse = CreateAiLimitPolicyResponses[keyof CreateAiLimitPolicyResponses];
2050
+ export type GetAiLimitStatusData = {
2051
+ body?: never;
2052
+ path?: never;
2053
+ query?: {
2054
+ includeDisabled?: "true" | "false";
2055
+ };
2056
+ url: "/api/ai/limits/status";
2057
+ };
2058
+ export type GetAiLimitStatusErrors = {
2059
+ /**
2060
+ * Response for status 400
2061
+ */
2062
+ 400: {
2063
+ error: string;
2064
+ };
2065
+ /**
2066
+ * Response for status 403
2067
+ */
2068
+ 403: {
2069
+ error: string;
2070
+ };
2071
+ /**
2072
+ * Response for status 501
2073
+ */
2074
+ 501: {
2075
+ error: string;
2076
+ };
2077
+ };
2078
+ export type GetAiLimitStatusError = GetAiLimitStatusErrors[keyof GetAiLimitStatusErrors];
2079
+ export type GetAiLimitStatusResponses = {
2080
+ /**
2081
+ * Response for status 200
2082
+ */
2083
+ 200: {
2084
+ items: Array<{
2085
+ policy: {
2086
+ id: string;
2087
+ subject: {
2088
+ type: "project";
2089
+ } | {
2090
+ type: "group";
2091
+ id: string;
2092
+ } | {
2093
+ type: "user";
2094
+ id: string;
2095
+ } | {
2096
+ type: "serviceAccount";
2097
+ id: string;
2098
+ };
2099
+ limit: {
2100
+ meter: "tokens.total";
2101
+ amount: number;
2102
+ } | {
2103
+ meter: "cost.catalogEstimated";
2104
+ amount: {
2105
+ currency: "USD";
2106
+ amountNanos: string;
2107
+ };
2108
+ };
2109
+ period: "calendarMonth";
2110
+ enabled: boolean;
2111
+ createdAt: string;
2112
+ updatedAt: string;
2113
+ };
2114
+ period: {
2115
+ kind: "calendarMonth";
2116
+ start: string;
2117
+ end: string;
2118
+ resetAt: string;
2119
+ };
2120
+ consumption: {
2121
+ actual: {
2122
+ meter: "tokens.total";
2123
+ amount: number;
2124
+ } | {
2125
+ meter: "cost.catalogEstimated";
2126
+ amount: {
2127
+ currency: "USD";
2128
+ amountNanos: string;
2129
+ };
2130
+ };
2131
+ reserved: {
2132
+ meter: "tokens.total";
2133
+ amount: number;
2134
+ } | {
2135
+ meter: "cost.catalogEstimated";
2136
+ amount: {
2137
+ currency: "USD";
2138
+ amountNanos: string;
2139
+ };
2140
+ };
2141
+ unknown: {
2142
+ meter: "tokens.total";
2143
+ amount: number;
2144
+ } | {
2145
+ meter: "cost.catalogEstimated";
2146
+ amount: {
2147
+ currency: "USD";
2148
+ amountNanos: string;
2149
+ };
2150
+ };
2151
+ remaining: {
2152
+ meter: "tokens.total";
2153
+ amount: number;
2154
+ } | {
2155
+ meter: "cost.catalogEstimated";
2156
+ amount: {
2157
+ currency: "USD";
2158
+ amountNanos: string;
2159
+ };
2160
+ };
2161
+ };
2162
+ accountingStatus: "complete" | "unavailable";
2163
+ exhausted: boolean;
2164
+ orphaned: boolean;
2165
+ }>;
2166
+ capabilities: {
2167
+ manage: boolean;
2168
+ };
2169
+ };
2170
+ };
2171
+ export type GetAiLimitStatusResponse = GetAiLimitStatusResponses[keyof GetAiLimitStatusResponses];
2172
+ export type GetAiLimitSubjectOptionsData = {
2173
+ body?: never;
2174
+ path?: never;
2175
+ query?: never;
2176
+ url: "/api/ai/limits/subjects";
2177
+ };
2178
+ export type GetAiLimitSubjectOptionsErrors = {
2179
+ /**
2180
+ * Response for status 400
2181
+ */
2182
+ 400: {
2183
+ error: string;
2184
+ };
2185
+ /**
2186
+ * Response for status 403
2187
+ */
2188
+ 403: {
2189
+ error: string;
2190
+ };
2191
+ };
2192
+ export type GetAiLimitSubjectOptionsError = GetAiLimitSubjectOptionsErrors[keyof GetAiLimitSubjectOptionsErrors];
2193
+ export type GetAiLimitSubjectOptionsResponses = {
2194
+ /**
2195
+ * Response for status 200
2196
+ */
2197
+ 200: {
2198
+ groups: Array<{
2199
+ id: string;
2200
+ label?: string;
2201
+ description?: string;
2202
+ }>;
2203
+ users: Array<{
2204
+ id: string;
2205
+ email: string;
2206
+ displayName?: string;
2207
+ status: "active" | "suspended";
2208
+ }>;
2209
+ serviceAccounts: Array<{
2210
+ id: string;
2211
+ name: string;
2212
+ description?: string;
2213
+ status: "active" | "suspended";
2214
+ }>;
2215
+ };
2216
+ };
2217
+ export type GetAiLimitSubjectOptionsResponse = GetAiLimitSubjectOptionsResponses[keyof GetAiLimitSubjectOptionsResponses];
2218
+ export type DeleteAiLimitPolicyData = {
2219
+ body?: never;
2220
+ path: {
2221
+ limitId: string;
2222
+ };
2223
+ query?: never;
2224
+ url: "/api/ai/limits/{limitId}";
2225
+ };
2226
+ export type DeleteAiLimitPolicyErrors = {
2227
+ /**
2228
+ * Response for status 400
2229
+ */
2230
+ 400: {
2231
+ error: string;
2232
+ };
2233
+ /**
2234
+ * Response for status 403
2235
+ */
2236
+ 403: {
2237
+ error: string;
2238
+ };
2239
+ /**
2240
+ * Response for status 404
2241
+ */
2242
+ 404: {
2243
+ error: string;
2244
+ };
2245
+ /**
2246
+ * Response for status 501
2247
+ */
2248
+ 501: {
2249
+ error: string;
2250
+ };
2251
+ };
2252
+ export type DeleteAiLimitPolicyError = DeleteAiLimitPolicyErrors[keyof DeleteAiLimitPolicyErrors];
2253
+ export type DeleteAiLimitPolicyResponses = {
2254
+ /**
2255
+ * Response for status 200
2256
+ */
2257
+ 200: {
2258
+ success: boolean;
2259
+ };
2260
+ };
2261
+ export type DeleteAiLimitPolicyResponse = DeleteAiLimitPolicyResponses[keyof DeleteAiLimitPolicyResponses];
2262
+ export type UpdateAiLimitPolicyData = {
2263
+ body: {
2264
+ limit?: {
2265
+ meter: "tokens.total";
2266
+ amount: number;
2267
+ } | {
2268
+ meter: "cost.catalogEstimated";
2269
+ amount: {
2270
+ currency: "USD";
2271
+ amountNanos: string;
2272
+ };
2273
+ };
2274
+ enabled?: boolean;
2275
+ };
2276
+ path: {
2277
+ limitId: string;
2278
+ };
2279
+ query?: never;
2280
+ url: "/api/ai/limits/{limitId}";
2281
+ };
2282
+ export type UpdateAiLimitPolicyErrors = {
2283
+ /**
2284
+ * Response for status 400
2285
+ */
2286
+ 400: {
2287
+ error: string;
2288
+ };
2289
+ /**
2290
+ * Response for status 403
2291
+ */
2292
+ 403: {
2293
+ error: string;
2294
+ };
2295
+ /**
2296
+ * Response for status 404
2297
+ */
2298
+ 404: {
2299
+ error: string;
2300
+ };
2301
+ /**
2302
+ * Response for status 501
2303
+ */
2304
+ 501: {
2305
+ error: string;
2306
+ };
2307
+ };
2308
+ export type UpdateAiLimitPolicyError = UpdateAiLimitPolicyErrors[keyof UpdateAiLimitPolicyErrors];
2309
+ export type UpdateAiLimitPolicyResponses = {
2310
+ /**
2311
+ * Response for status 200
2312
+ */
2313
+ 200: {
2314
+ id: string;
2315
+ subject: {
2316
+ type: "project";
2317
+ } | {
2318
+ type: "group";
2319
+ id: string;
2320
+ } | {
2321
+ type: "user";
2322
+ id: string;
2323
+ } | {
2324
+ type: "serviceAccount";
2325
+ id: string;
2326
+ };
2327
+ limit: {
2328
+ meter: "tokens.total";
2329
+ amount: number;
2330
+ } | {
2331
+ meter: "cost.catalogEstimated";
2332
+ amount: {
2333
+ currency: "USD";
2334
+ amountNanos: string;
2335
+ };
2336
+ };
2337
+ period: "calendarMonth";
2338
+ enabled: boolean;
2339
+ createdAt: string;
2340
+ updatedAt: string;
1597
2341
  };
1598
2342
  };
1599
- export type GetAiAccountingOverviewResponse = GetAiAccountingOverviewResponses[keyof GetAiAccountingOverviewResponses];
1600
- export type ListAiModelCallsData = {
2343
+ export type UpdateAiLimitPolicyResponse = UpdateAiLimitPolicyResponses[keyof UpdateAiLimitPolicyResponses];
2344
+ export type ListAiModelCallGroupsData = {
1601
2345
  body?: never;
1602
2346
  path?: never;
1603
2347
  query: {
@@ -1605,20 +2349,25 @@ export type ListAiModelCallsData = {
1605
2349
  to: string;
1606
2350
  providerId?: string;
1607
2351
  modelId?: string;
1608
- executionId?: string;
1609
2352
  valuationStatus?: "rated" | "unpriceable" | "unvalued";
1610
2353
  limit?: string;
1611
2354
  offset?: string;
1612
2355
  };
1613
- url: "/api/ai/model-calls";
2356
+ url: "/api/ai/model-call-groups";
1614
2357
  };
1615
- export type ListAiModelCallsErrors = {
2358
+ export type ListAiModelCallGroupsErrors = {
1616
2359
  /**
1617
2360
  * Response for status 400
1618
2361
  */
1619
2362
  400: {
1620
2363
  error: string;
1621
2364
  };
2365
+ /**
2366
+ * Response for status 403
2367
+ */
2368
+ 403: {
2369
+ error: string;
2370
+ };
1622
2371
  /**
1623
2372
  * Response for status 501
1624
2373
  */
@@ -1626,118 +2375,86 @@ export type ListAiModelCallsErrors = {
1626
2375
  error: string;
1627
2376
  };
1628
2377
  };
1629
- export type ListAiModelCallsError = ListAiModelCallsErrors[keyof ListAiModelCallsErrors];
1630
- export type ListAiModelCallsResponses = {
2378
+ export type ListAiModelCallGroupsError = ListAiModelCallGroupsErrors[keyof ListAiModelCallGroupsErrors];
2379
+ export type ListAiModelCallGroupsResponses = {
1631
2380
  /**
1632
2381
  * Response for status 200
1633
2382
  */
1634
2383
  200: {
1635
2384
  items: Array<{
1636
- usage: {
1637
- id: string;
1638
- executionId: string;
1639
- attempt: number;
1640
- callId: string;
1641
- providerId: string;
1642
- requestedModelId: string;
1643
- responseModelId?: string;
1644
- responseId: string;
1645
- usage: {
1646
- inputTokens?: number;
1647
- outputTokens?: number;
1648
- totalTokens?: number;
1649
- uncachedInputTokens?: number;
1650
- cacheReadInputTokens?: number;
1651
- cacheWriteInputTokens?: number;
1652
- textOutputTokens?: number;
1653
- reasoningOutputTokens?: number;
1654
- reportingStatus: "complete" | "partial" | "unavailable";
1655
- };
1656
- occurredAt: string;
1657
- recordedAt: string;
1658
- };
2385
+ executionId: string;
1659
2386
  attribution?: {
1660
2387
  kind: "agent";
1661
- agentId: string;
1662
2388
  agentRunId: string;
1663
2389
  threadId: string;
1664
2390
  } | {
1665
2391
  kind: "workflowAgent";
1666
- agentId: string;
2392
+ agentStepId: string;
1667
2393
  nodeRunId: string;
1668
2394
  workflowId: string;
1669
2395
  workflowRunId: string;
2396
+ } | {
2397
+ kind: "subagent";
2398
+ subagentRunId: string;
2399
+ parentRunId: string;
1670
2400
  };
1671
- cost?: {
1672
- status: "rated";
1673
- billingIdentity: {
1674
- providerId: string;
1675
- modelId: string;
1676
- };
1677
- pricingContext: {
1678
- serviceTier?: string;
1679
- batch?: boolean;
1680
- region?: string;
1681
- inferenceGeo?: string;
1682
- routedProviderId?: string;
1683
- deploymentId?: string;
1684
- inferenceProfileId?: string;
1685
- cacheWriteTtlSeconds?: number;
1686
- mode?: string;
1687
- };
1688
- priceSource: {
1689
- sourceId: string;
1690
- sourceEntryId: string;
1691
- sourceVersion: string;
1692
- sourceUrl: string;
1693
- observedAt: string;
1694
- };
1695
- money: {
2401
+ modelCallCount: number;
2402
+ totalTokens?: number;
2403
+ costs: {
2404
+ amounts: Array<{
1696
2405
  currency: string;
1697
2406
  amountNanos: string;
1698
- };
1699
- components: Array<{
1700
- meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
1701
- quantity: string;
1702
- rateAmountNanosPerMillion: string;
1703
- chargeAmountNanos: string;
1704
2407
  }>;
1705
- ratedAt: string;
1706
- } | {
1707
- status: "unpriceable";
1708
- billingIdentity?: {
1709
- providerId: string;
1710
- modelId: string;
1711
- };
1712
- pricingContext: {
1713
- serviceTier?: string;
1714
- batch?: boolean;
1715
- region?: string;
1716
- inferenceGeo?: string;
1717
- routedProviderId?: string;
1718
- deploymentId?: string;
1719
- inferenceProfileId?: string;
1720
- cacheWriteTtlSeconds?: number;
1721
- mode?: string;
2408
+ ratedCallCount: number;
2409
+ unpriceableCallCount: number;
2410
+ unvaluedCallCount: number;
2411
+ };
2412
+ firstCallAt: string;
2413
+ lastCallAt: string;
2414
+ label?: string;
2415
+ executions: Array<{
2416
+ executionId: string;
2417
+ attribution?: {
2418
+ kind: "agent";
2419
+ agentRunId: string;
2420
+ threadId: string;
2421
+ } | {
2422
+ kind: "workflowAgent";
2423
+ agentStepId: string;
2424
+ nodeRunId: string;
2425
+ workflowId: string;
2426
+ workflowRunId: string;
2427
+ } | {
2428
+ kind: "subagent";
2429
+ subagentRunId: string;
2430
+ parentRunId: string;
1722
2431
  };
1723
- priceSource: {
1724
- sourceId: string;
1725
- sourceEntryId: string;
1726
- sourceVersion: string;
1727
- sourceUrl: string;
1728
- observedAt: string;
2432
+ modelCallCount: number;
2433
+ totalTokens?: number;
2434
+ costs: {
2435
+ amounts: Array<{
2436
+ currency: string;
2437
+ amountNanos: string;
2438
+ }>;
2439
+ ratedCallCount: number;
2440
+ unpriceableCallCount: number;
2441
+ unvaluedCallCount: number;
1729
2442
  };
1730
- reason: "missingBillingIdentity" | "missingCatalogEntry" | "missingUsageMeter" | "unsupportedPricingDimension" | "invalidUsageForFormula";
1731
- missingMeters?: Array<"tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning">;
1732
- ratedAt: string;
1733
- };
1734
- valuationStatus: "rated" | "unpriceable" | "unvalued";
2443
+ firstCallAt: string;
2444
+ lastCallAt: string;
2445
+ models: Array<{
2446
+ providerId: string;
2447
+ modelId: string;
2448
+ }>;
2449
+ label?: string;
2450
+ }>;
2451
+ canOpenThread: boolean;
1735
2452
  }>;
1736
- hasMore: boolean;
1737
2453
  total: number;
2454
+ hasMore: boolean;
1738
2455
  };
1739
2456
  };
1740
- export type ListAiModelCallsResponse = ListAiModelCallsResponses[keyof ListAiModelCallsResponses];
2457
+ export type ListAiModelCallGroupsResponse = ListAiModelCallGroupsResponses[keyof ListAiModelCallGroupsResponses];
1741
2458
  export type GetProjectInfoData = {
1742
2459
  body?: never;
1743
2460
  path?: never;
@@ -3847,7 +4564,6 @@ export type ListWorkflowsResponses = {
3847
4564
  type: "agent";
3848
4565
  id: string;
3849
4566
  key: string;
3850
- agentId: string;
3851
4567
  input: {
3852
4568
  [key: string]: string | number | boolean | Array<unknown> | {
3853
4569
  [key: string]: unknown;
@@ -3868,7 +4584,7 @@ export type ListWorkflowsResponses = {
3868
4584
  startedAt: string;
3869
4585
  finishedAt?: string;
3870
4586
  error?: {
3871
- code: "internal.unexpected" | "runtime.cancelled" | "workflow.node_failed";
4587
+ code: "internal.unexpected" | "runtime.cancelled" | "workflow.node_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable";
3872
4588
  message: string;
3873
4589
  retryable: boolean;
3874
4590
  at: string;
@@ -3963,7 +4679,6 @@ export type GetWorkflowResponses = {
3963
4679
  type: "agent";
3964
4680
  id: string;
3965
4681
  key: string;
3966
- agentId: string;
3967
4682
  input: {
3968
4683
  [key: string]: string | number | boolean | Array<unknown> | {
3969
4684
  [key: string]: unknown;
@@ -3984,7 +4699,7 @@ export type GetWorkflowResponses = {
3984
4699
  startedAt: string;
3985
4700
  finishedAt?: string;
3986
4701
  error?: {
3987
- code: "internal.unexpected" | "runtime.cancelled" | "workflow.node_failed";
4702
+ code: "internal.unexpected" | "runtime.cancelled" | "workflow.node_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable";
3988
4703
  message: string;
3989
4704
  retryable: boolean;
3990
4705
  at: string;
@@ -4369,7 +5084,7 @@ export type ListWorkflowRunsResponses = {
4369
5084
  startedAt: string;
4370
5085
  finishedAt?: string;
4371
5086
  error?: {
4372
- code: "internal.unexpected" | "runtime.cancelled" | "workflow.node_failed";
5087
+ code: "internal.unexpected" | "runtime.cancelled" | "workflow.node_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable";
4373
5088
  message: string;
4374
5089
  retryable: boolean;
4375
5090
  at: string;
@@ -4434,7 +5149,7 @@ export type GetWorkflowRunResponses = {
4434
5149
  startedAt: string;
4435
5150
  finishedAt?: string;
4436
5151
  error?: {
4437
- code: "internal.unexpected" | "runtime.cancelled" | "workflow.node_failed";
5152
+ code: "internal.unexpected" | "runtime.cancelled" | "workflow.node_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable";
4438
5153
  message: string;
4439
5154
  retryable: boolean;
4440
5155
  at: string;
@@ -4484,7 +5199,7 @@ export type GetWorkflowRunResponses = {
4484
5199
  } | null;
4485
5200
  };
4486
5201
  error?: {
4487
- code: "internal.unexpected" | "runtime.cancelled" | "workflow.node_failed";
5202
+ code: "internal.unexpected" | "runtime.cancelled" | "workflow.node_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable";
4488
5203
  message: string;
4489
5204
  retryable: boolean;
4490
5205
  at: string;
@@ -4497,7 +5212,6 @@ export type GetWorkflowRunResponses = {
4497
5212
  truncated?: true;
4498
5213
  };
4499
5214
  agentExecution?: {
4500
- agentId: string;
4501
5215
  status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
4502
5216
  attempt: number;
4503
5217
  modelId?: string;
@@ -4564,7 +5278,6 @@ export type GetWorkflowAgentNodeExecutionResponses = {
4564
5278
  * Response for status 200
4565
5279
  */
4566
5280
  200: {
4567
- agentId: string;
4568
5281
  status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
4569
5282
  attempt: number;
4570
5283
  modelId?: string;
@@ -4629,6 +5342,15 @@ export type GetWorkflowAgentNodeExecutionResponses = {
4629
5342
  providerMetadata?: string | number | boolean | Array<unknown> | {
4630
5343
  [key: string]: unknown;
4631
5344
  } | null;
5345
+ } | {
5346
+ type: "provider-state";
5347
+ providerId: string;
5348
+ /**
5349
+ * Any JSON-compatible value.
5350
+ */
5351
+ data: string | number | boolean | Array<unknown> | {
5352
+ [key: string]: unknown;
5353
+ } | null;
4632
5354
  } | {
4633
5355
  context: {
4634
5356
  kind: "object";
@@ -4701,7 +5423,7 @@ export type GetWorkflowAgentNodeExecutionResponses = {
4701
5423
  } | null>;
4702
5424
  failurePhase?: "agent-loop" | "structured-finalizer";
4703
5425
  error?: {
4704
- code: "internal.unexpected" | "runtime.cancelled" | "agent.execution_failed";
5426
+ code: "internal.unexpected" | "runtime.cancelled" | "agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable";
4705
5427
  message: string;
4706
5428
  retryable: boolean;
4707
5429
  at: string;
@@ -4762,7 +5484,7 @@ export type CancelWorkflowRunResponses = {
4762
5484
  startedAt: string;
4763
5485
  finishedAt?: string;
4764
5486
  error?: {
4765
- code: "internal.unexpected" | "runtime.cancelled" | "workflow.node_failed";
5487
+ code: "internal.unexpected" | "runtime.cancelled" | "workflow.node_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable";
4766
5488
  message: string;
4767
5489
  retryable: boolean;
4768
5490
  at: string;
@@ -4812,7 +5534,7 @@ export type CancelWorkflowRunResponses = {
4812
5534
  } | null;
4813
5535
  };
4814
5536
  error?: {
4815
- code: "internal.unexpected" | "runtime.cancelled" | "workflow.node_failed";
5537
+ code: "internal.unexpected" | "runtime.cancelled" | "workflow.node_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable";
4816
5538
  message: string;
4817
5539
  retryable: boolean;
4818
5540
  at: string;
@@ -4825,7 +5547,6 @@ export type CancelWorkflowRunResponses = {
4825
5547
  truncated?: true;
4826
5548
  };
4827
5549
  agentExecution?: {
4828
- agentId: string;
4829
5550
  status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
4830
5551
  attempt: number;
4831
5552
  modelId?: string;
@@ -4865,6 +5586,10 @@ export type GetWorkflowRunFileContentData = {
4865
5586
  query: {
4866
5587
  path: string;
4867
5588
  disposition?: "inline" | "attachment";
5589
+ /**
5590
+ * Client cache key; the route still resolves the current file
5591
+ */
5592
+ v?: string;
4868
5593
  };
4869
5594
  url: "/api/workflow-runs/{runId}/files/content";
4870
5595
  };
@@ -4906,6 +5631,10 @@ export type HeadWorkflowRunFileContentData = {
4906
5631
  query: {
4907
5632
  path: string;
4908
5633
  disposition?: "inline" | "attachment";
5634
+ /**
5635
+ * Client cache key; the route still resolves the current file
5636
+ */
5637
+ v?: string;
4909
5638
  };
4910
5639
  url: "/api/workflow-runs/{runId}/files/content";
4911
5640
  };
@@ -4947,6 +5676,10 @@ export type GetWorkflowNodeRunFileContentData = {
4947
5676
  query: {
4948
5677
  path: string;
4949
5678
  disposition?: "inline" | "attachment";
5679
+ /**
5680
+ * Client cache key; the route still resolves the current file
5681
+ */
5682
+ v?: string;
4950
5683
  };
4951
5684
  url: "/api/workflow-runs/{runId}/nodes/{nodeKey}/files/content";
4952
5685
  };
@@ -4989,6 +5722,10 @@ export type HeadWorkflowNodeRunFileContentData = {
4989
5722
  query: {
4990
5723
  path: string;
4991
5724
  disposition?: "inline" | "attachment";
5725
+ /**
5726
+ * Client cache key; the route still resolves the current file
5727
+ */
5728
+ v?: string;
4992
5729
  };
4993
5730
  url: "/api/workflow-runs/{runId}/nodes/{nodeKey}/files/content";
4994
5731
  };
@@ -5768,6 +6505,10 @@ export type GetObjectFileContentData = {
5768
6505
  query: {
5769
6506
  path: string;
5770
6507
  disposition?: "inline" | "attachment";
6508
+ /**
6509
+ * Client cache key; the route still resolves the current file
6510
+ */
6511
+ v?: string;
5771
6512
  };
5772
6513
  url: "/api/objects/{objectTypeId}/{objectId}/files/content";
5773
6514
  };
@@ -5806,6 +6547,10 @@ export type HeadObjectFileContentData = {
5806
6547
  query: {
5807
6548
  path: string;
5808
6549
  disposition?: "inline" | "attachment";
6550
+ /**
6551
+ * Client cache key; the route still resolves the current file
6552
+ */
6553
+ v?: string;
5809
6554
  };
5810
6555
  url: "/api/objects/{objectTypeId}/{objectId}/files/content";
5811
6556
  };
@@ -6519,6 +7264,10 @@ export type GetActionRunFileContentData = {
6519
7264
  query: {
6520
7265
  path: string;
6521
7266
  disposition?: "inline" | "attachment";
7267
+ /**
7268
+ * Client cache key; the route still resolves the current file
7269
+ */
7270
+ v?: string;
6522
7271
  };
6523
7272
  url: "/api/action-runs/{runId}/files/content";
6524
7273
  };
@@ -6560,6 +7309,10 @@ export type HeadActionRunFileContentData = {
6560
7309
  query: {
6561
7310
  path: string;
6562
7311
  disposition?: "inline" | "attachment";
7312
+ /**
7313
+ * Client cache key; the route still resolves the current file
7314
+ */
7315
+ v?: string;
6563
7316
  };
6564
7317
  url: "/api/action-runs/{runId}/files/content";
6565
7318
  };
@@ -6592,43 +7345,11 @@ export type HeadActionRunFileContentResponses = {
6592
7345
  */
6593
7346
  206: unknown;
6594
7347
  };
6595
- export type ListAgentsData = {
6596
- body?: never;
6597
- path?: never;
6598
- query?: never;
6599
- url: "/api/agents";
6600
- };
6601
- export type ListAgentsResponses = {
6602
- /**
6603
- * Response for status 200
6604
- */
6605
- 200: Array<{
6606
- id: string;
6607
- name: string;
6608
- description?: string;
6609
- modelId?: string;
6610
- reasoning?: "provider-default" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh";
6611
- groupIds: Array<string>;
6612
- loop?: {
6613
- stopWhen?: {
6614
- maxSteps?: number;
6615
- };
6616
- context?: {
6617
- windowTokens?: number;
6618
- reserveTokens?: number;
6619
- keepRecentTokens?: number;
6620
- };
6621
- };
6622
- }>;
6623
- };
6624
- export type ListAgentsResponse = ListAgentsResponses[keyof ListAgentsResponses];
6625
7348
  export type GetAgentData = {
6626
7349
  body?: never;
6627
- path: {
6628
- agentId: string;
6629
- };
7350
+ path?: never;
6630
7351
  query?: never;
6631
- url: "/api/agents/{agentId}";
7352
+ url: "/api/agent";
6632
7353
  };
6633
7354
  export type GetAgentErrors = {
6634
7355
  /**
@@ -6644,21 +7365,10 @@ export type GetAgentResponses = {
6644
7365
  * Response for status 200
6645
7366
  */
6646
7367
  200: {
6647
- id: string;
6648
7368
  name: string;
6649
- description?: string;
6650
- modelId?: string;
6651
- reasoning?: "provider-default" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh";
6652
- groupIds: Array<string>;
6653
- loop?: {
6654
- stopWhen?: {
6655
- maxSteps?: number;
6656
- };
6657
- context?: {
6658
- windowTokens?: number;
6659
- reserveTokens?: number;
6660
- keepRecentTokens?: number;
6661
- };
7369
+ model: {
7370
+ provider: string;
7371
+ modelId: string;
6662
7372
  };
6663
7373
  };
6664
7374
  };
@@ -6667,7 +7377,6 @@ export type ListAgentThreadsData = {
6667
7377
  body?: never;
6668
7378
  path?: never;
6669
7379
  query?: {
6670
- agentId?: string;
6671
7380
  status?: "active" | "archived";
6672
7381
  limit?: string;
6673
7382
  offset?: string;
@@ -6698,7 +7407,6 @@ export type ListAgentThreadsResponses = {
6698
7407
  threads: Array<{
6699
7408
  id: string;
6700
7409
  projectId: string;
6701
- agentId: string;
6702
7410
  ownerPrincipal: {
6703
7411
  type: "user" | "serviceAccount" | "system";
6704
7412
  id: string;
@@ -6718,7 +7426,6 @@ export type ListAgentThreadsResponses = {
6718
7426
  export type ListAgentThreadsResponse = ListAgentThreadsResponses[keyof ListAgentThreadsResponses];
6719
7427
  export type CreateAgentThreadData = {
6720
7428
  body: {
6721
- agentId: string;
6722
7429
  title?: string;
6723
7430
  threadId?: string;
6724
7431
  };
@@ -6761,7 +7468,6 @@ export type CreateAgentThreadResponses = {
6761
7468
  thread: {
6762
7469
  id: string;
6763
7470
  projectId: string;
6764
- agentId: string;
6765
7471
  ownerPrincipal: {
6766
7472
  type: "user" | "serviceAccount" | "system";
6767
7473
  id: string;
@@ -6813,7 +7519,6 @@ export type GetAgentThreadResponses = {
6813
7519
  200: {
6814
7520
  id: string;
6815
7521
  projectId: string;
6816
- agentId: string;
6817
7522
  ownerPrincipal: {
6818
7523
  type: "user" | "serviceAccount" | "system";
6819
7524
  id: string;
@@ -6914,6 +7619,15 @@ export type ListAgentThreadMessagesResponses = {
6914
7619
  providerMetadata?: string | number | boolean | Array<unknown> | {
6915
7620
  [key: string]: unknown;
6916
7621
  } | null;
7622
+ } | {
7623
+ type: "provider-state";
7624
+ providerId: string;
7625
+ /**
7626
+ * Any JSON-compatible value.
7627
+ */
7628
+ data: string | number | boolean | Array<unknown> | {
7629
+ [key: string]: unknown;
7630
+ } | null;
6917
7631
  } | {
6918
7632
  context: {
6919
7633
  kind: "object";
@@ -7011,6 +7725,13 @@ export type ListAgentThreadMessagesResponse = ListAgentThreadMessagesResponses[k
7011
7725
  export type PostAgentThreadMessageData = {
7012
7726
  body: {
7013
7727
  text: string;
7728
+ model?: {
7729
+ provider: string;
7730
+ modelId: string;
7731
+ };
7732
+ reasoning?: "provider-default" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | {
7733
+ budgetTokens: number;
7734
+ };
7014
7735
  attachments?: Array<{
7015
7736
  blobId: string;
7016
7737
  digest: string;
@@ -7073,6 +7794,22 @@ export type PostAgentThreadMessageErrors = {
7073
7794
  409: {
7074
7795
  error: string;
7075
7796
  };
7797
+ /**
7798
+ * Response for status 429
7799
+ */
7800
+ 429: {
7801
+ error: string;
7802
+ /**
7803
+ * Stable machine-readable failure code for programmatic handling.
7804
+ */
7805
+ code: "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable";
7806
+ /**
7807
+ * Any JSON-compatible value.
7808
+ */
7809
+ details?: string | number | boolean | Array<unknown> | {
7810
+ [key: string]: unknown;
7811
+ } | null;
7812
+ };
7076
7813
  /**
7077
7814
  * Response for status 501
7078
7815
  */
@@ -7090,13 +7827,19 @@ export type PostAgentThreadMessageResponses = {
7090
7827
  id: string;
7091
7828
  projectId: string;
7092
7829
  threadId: string;
7093
- agentId: string;
7094
7830
  triggerMessageId: string;
7095
7831
  requestedBy?: {
7096
7832
  type: "user" | "serviceAccount";
7097
7833
  id: string;
7098
7834
  };
7099
7835
  status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
7836
+ model?: {
7837
+ provider: string;
7838
+ modelId: string;
7839
+ };
7840
+ reasoning?: "provider-default" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | {
7841
+ budgetTokens: number;
7842
+ };
7100
7843
  modelId?: string;
7101
7844
  finishReason?: "stop" | "length" | "content-filter" | "tool-calls" | "timeout" | "error" | "other" | "unknown";
7102
7845
  usage?: {
@@ -7127,7 +7870,7 @@ export type PostAgentThreadMessageResponses = {
7127
7870
  message: string;
7128
7871
  }>;
7129
7872
  error?: {
7130
- code: "internal.unexpected" | "runtime.cancelled" | "agent.execution_failed";
7873
+ code: "internal.unexpected" | "runtime.cancelled" | "agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable";
7131
7874
  message: string;
7132
7875
  retryable: boolean;
7133
7876
  at: string;
@@ -7157,6 +7900,10 @@ export type GetAgentMessageFileContentData = {
7157
7900
  query: {
7158
7901
  path: string;
7159
7902
  disposition?: "inline" | "attachment";
7903
+ /**
7904
+ * Client cache key; the route still resolves the current file
7905
+ */
7906
+ v?: string;
7160
7907
  };
7161
7908
  url: "/api/agent-threads/{threadId}/messages/{messageId}/files/content";
7162
7909
  };
@@ -7199,6 +7946,10 @@ export type HeadAgentMessageFileContentData = {
7199
7946
  query: {
7200
7947
  path: string;
7201
7948
  disposition?: "inline" | "attachment";
7949
+ /**
7950
+ * Client cache key; the route still resolves the current file
7951
+ */
7952
+ v?: string;
7202
7953
  };
7203
7954
  url: "/api/agent-threads/{threadId}/messages/{messageId}/files/content";
7204
7955
  };
@@ -7277,13 +8028,19 @@ export type CancelAgentRunResponses = {
7277
8028
  id: string;
7278
8029
  projectId: string;
7279
8030
  threadId: string;
7280
- agentId: string;
7281
8031
  triggerMessageId: string;
7282
8032
  requestedBy?: {
7283
8033
  type: "user" | "serviceAccount";
7284
8034
  id: string;
7285
8035
  };
7286
8036
  status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
8037
+ model?: {
8038
+ provider: string;
8039
+ modelId: string;
8040
+ };
8041
+ reasoning?: "provider-default" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | {
8042
+ budgetTokens: number;
8043
+ };
7287
8044
  modelId?: string;
7288
8045
  finishReason?: "stop" | "length" | "content-filter" | "tool-calls" | "timeout" | "error" | "other" | "unknown";
7289
8046
  usage?: {
@@ -7314,7 +8071,7 @@ export type CancelAgentRunResponses = {
7314
8071
  message: string;
7315
8072
  }>;
7316
8073
  error?: {
7317
- code: "internal.unexpected" | "runtime.cancelled" | "agent.execution_failed";
8074
+ code: "internal.unexpected" | "runtime.cancelled" | "agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable";
7318
8075
  message: string;
7319
8076
  retryable: boolean;
7320
8077
  at: string;
@@ -7363,6 +8120,22 @@ export type RetryAgentRunErrors = {
7363
8120
  409: {
7364
8121
  error: string;
7365
8122
  };
8123
+ /**
8124
+ * Response for status 429
8125
+ */
8126
+ 429: {
8127
+ error: string;
8128
+ /**
8129
+ * Stable machine-readable failure code for programmatic handling.
8130
+ */
8131
+ code: "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable";
8132
+ /**
8133
+ * Any JSON-compatible value.
8134
+ */
8135
+ details?: string | number | boolean | Array<unknown> | {
8136
+ [key: string]: unknown;
8137
+ } | null;
8138
+ };
7366
8139
  /**
7367
8140
  * Response for status 501
7368
8141
  */
@@ -7380,13 +8153,19 @@ export type RetryAgentRunResponses = {
7380
8153
  id: string;
7381
8154
  projectId: string;
7382
8155
  threadId: string;
7383
- agentId: string;
7384
8156
  triggerMessageId: string;
7385
8157
  requestedBy?: {
7386
8158
  type: "user" | "serviceAccount";
7387
8159
  id: string;
7388
8160
  };
7389
8161
  status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
8162
+ model?: {
8163
+ provider: string;
8164
+ modelId: string;
8165
+ };
8166
+ reasoning?: "provider-default" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | {
8167
+ budgetTokens: number;
8168
+ };
7390
8169
  modelId?: string;
7391
8170
  finishReason?: "stop" | "length" | "content-filter" | "tool-calls" | "timeout" | "error" | "other" | "unknown";
7392
8171
  usage?: {
@@ -7417,7 +8196,7 @@ export type RetryAgentRunResponses = {
7417
8196
  message: string;
7418
8197
  }>;
7419
8198
  error?: {
7420
- code: "internal.unexpected" | "runtime.cancelled" | "agent.execution_failed";
8199
+ code: "internal.unexpected" | "runtime.cancelled" | "agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable";
7421
8200
  message: string;
7422
8201
  retryable: boolean;
7423
8202
  at: string;
@@ -7481,13 +8260,19 @@ export type ListAgentThreadRunsResponses = {
7481
8260
  id: string;
7482
8261
  projectId: string;
7483
8262
  threadId: string;
7484
- agentId: string;
7485
8263
  triggerMessageId: string;
7486
8264
  requestedBy?: {
7487
8265
  type: "user" | "serviceAccount";
7488
8266
  id: string;
7489
8267
  };
7490
8268
  status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
8269
+ model?: {
8270
+ provider: string;
8271
+ modelId: string;
8272
+ };
8273
+ reasoning?: "provider-default" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | {
8274
+ budgetTokens: number;
8275
+ };
7491
8276
  modelId?: string;
7492
8277
  finishReason?: "stop" | "length" | "content-filter" | "tool-calls" | "timeout" | "error" | "other" | "unknown";
7493
8278
  usage?: {
@@ -7518,7 +8303,7 @@ export type ListAgentThreadRunsResponses = {
7518
8303
  message: string;
7519
8304
  }>;
7520
8305
  error?: {
7521
- code: "internal.unexpected" | "runtime.cancelled" | "agent.execution_failed";
8306
+ code: "internal.unexpected" | "runtime.cancelled" | "agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable";
7522
8307
  message: string;
7523
8308
  retryable: boolean;
7524
8309
  at: string;
@@ -7578,13 +8363,19 @@ export type GetAgentRunResponses = {
7578
8363
  id: string;
7579
8364
  projectId: string;
7580
8365
  threadId: string;
7581
- agentId: string;
7582
8366
  triggerMessageId: string;
7583
8367
  requestedBy?: {
7584
8368
  type: "user" | "serviceAccount";
7585
8369
  id: string;
7586
8370
  };
7587
8371
  status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
8372
+ model?: {
8373
+ provider: string;
8374
+ modelId: string;
8375
+ };
8376
+ reasoning?: "provider-default" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | {
8377
+ budgetTokens: number;
8378
+ };
7588
8379
  modelId?: string;
7589
8380
  finishReason?: "stop" | "length" | "content-filter" | "tool-calls" | "timeout" | "error" | "other" | "unknown";
7590
8381
  usage?: {
@@ -7615,7 +8406,7 @@ export type GetAgentRunResponses = {
7615
8406
  message: string;
7616
8407
  }>;
7617
8408
  error?: {
7618
- code: "internal.unexpected" | "runtime.cancelled" | "agent.execution_failed";
8409
+ code: "internal.unexpected" | "runtime.cancelled" | "agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable";
7619
8410
  message: string;
7620
8411
  retryable: boolean;
7621
8412
  at: string;
@@ -7650,6 +8441,23 @@ export type ListModelsResponses = {
7650
8441
  provider: string;
7651
8442
  modelId: string;
7652
8443
  isDefault: boolean;
8444
+ name: string;
8445
+ description?: string;
8446
+ publisher: {
8447
+ id: string;
8448
+ name: string;
8449
+ };
8450
+ via?: string;
8451
+ capabilities: {
8452
+ input: Array<"text" | "image" | "audio" | "video" | "pdf">;
8453
+ output: Array<"text" | "image" | "audio" | "video" | "pdf">;
8454
+ attachments?: boolean;
8455
+ reasoning?: boolean;
8456
+ tools?: boolean;
8457
+ structuredOutput?: boolean;
8458
+ contextWindowTokens?: number;
8459
+ };
8460
+ reasoningLevels: Array<"provider-default" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max">;
7653
8461
  }>;
7654
8462
  };
7655
8463
  };