@miosa/sdk 2.0.1 → 2.0.3

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.
package/dist/index.js CHANGED
@@ -168,7 +168,7 @@ var TokenRefreshFailedError = class extends MiosaError {
168
168
  };
169
169
 
170
170
  // src/version.ts
171
- var SDK_VERSION = "2.0.1";
171
+ var SDK_VERSION = "2.0.3";
172
172
  var SDK_USER_AGENT = `@miosa/sdk/${SDK_VERSION}`;
173
173
 
174
174
  // src/http.ts
@@ -1524,8 +1524,190 @@ var ApiKeys = class {
1524
1524
  }
1525
1525
  };
1526
1526
 
1527
- // src/resources/audit-log.ts
1527
+ // src/resources/app-documents.ts
1528
1528
  function unwrap8(payload) {
1529
+ return payload && typeof payload === "object" && "data" in payload ? payload.data : payload;
1530
+ }
1531
+ var AppDocuments = class {
1532
+ constructor(http) {
1533
+ this.http = http;
1534
+ }
1535
+ http;
1536
+ async list(workspaceId2) {
1537
+ const payload = await this.http.get(
1538
+ "/builder/apps",
1539
+ { workspace_id: workspaceId2 }
1540
+ );
1541
+ return payload.data;
1542
+ }
1543
+ async get(id) {
1544
+ return unwrap8(
1545
+ await this.http.get(
1546
+ `/builder/apps/${id}`
1547
+ )
1548
+ );
1549
+ }
1550
+ async create(params) {
1551
+ const { workspaceId: workspaceId2, ...body5 } = params;
1552
+ return unwrap8(
1553
+ await this.http.post(
1554
+ "/builder/apps",
1555
+ { ...body5, workspace_id: workspaceId2 }
1556
+ )
1557
+ );
1558
+ }
1559
+ async update(id, params) {
1560
+ return unwrap8(
1561
+ await this.http.patch(`/builder/apps/${id}`, params)
1562
+ );
1563
+ }
1564
+ async archive(id) {
1565
+ await this.http.delete(`/builder/apps/${id}`);
1566
+ }
1567
+ async diagnostics(id) {
1568
+ return unwrap8(
1569
+ await this.http.get(`/builder/apps/${id}/diagnostics`)
1570
+ );
1571
+ }
1572
+ async stageCandidate(id) {
1573
+ return unwrap8(
1574
+ await this.http.post(`/builder/apps/${id}/candidates`, {})
1575
+ );
1576
+ }
1577
+ async approveExactVersion(id, releaseId, reason) {
1578
+ return unwrap8(
1579
+ await this.http.post(`/builder/apps/${id}/approvals`, {
1580
+ reason,
1581
+ release_id: releaseId
1582
+ })
1583
+ );
1584
+ }
1585
+ async publishExactRelease(id) {
1586
+ const payload = await this.http.post(`/builder/apps/${id}/publish`, {});
1587
+ return unwrap8(payload).app;
1588
+ }
1589
+ async listData(id, collection) {
1590
+ const payload = await this.http.get(
1591
+ `/builder/apps/${encodeURIComponent(id)}/data/${encodeURIComponent(collection)}`
1592
+ );
1593
+ return payload.data;
1594
+ }
1595
+ async getData(id, collection, key) {
1596
+ return unwrap8(
1597
+ await this.http.get(
1598
+ `/builder/apps/${encodeURIComponent(id)}/data/${encodeURIComponent(collection)}/${encodeURIComponent(key)}`
1599
+ )
1600
+ );
1601
+ }
1602
+ async putData(id, collection, key, value, expectedVersion) {
1603
+ return unwrap8(
1604
+ await this.http.put(
1605
+ `/builder/apps/${encodeURIComponent(id)}/data/${encodeURIComponent(collection)}/${encodeURIComponent(key)}`,
1606
+ { value, expected_version: expectedVersion }
1607
+ )
1608
+ );
1609
+ }
1610
+ async deleteData(id, collection, key, expectedVersion) {
1611
+ const suffix = expectedVersion === void 0 ? "" : `?expected_version=${encodeURIComponent(String(expectedVersion))}`;
1612
+ await this.http.delete(
1613
+ `/builder/apps/${encodeURIComponent(id)}/data/${encodeURIComponent(collection)}/${encodeURIComponent(key)}${suffix}`
1614
+ );
1615
+ }
1616
+ async authorizeAction(id, input) {
1617
+ return this.http.request(
1618
+ `/actions/apps/${encodeURIComponent(id)}/authorize`,
1619
+ {
1620
+ method: "POST",
1621
+ headers: {
1622
+ "x-miosa-app-callback-token": input.callbackToken
1623
+ },
1624
+ body: {
1625
+ release_id: input.releaseId,
1626
+ capability: input.capability,
1627
+ request_fingerprint: input.requestFingerprint,
1628
+ params_fingerprint: input.paramsFingerprint,
1629
+ connector_id: input.connectorId
1630
+ }
1631
+ }
1632
+ );
1633
+ }
1634
+ async mintRuntimeToken(id) {
1635
+ return unwrap8(
1636
+ await this.http.post(
1637
+ `/builder/apps/${encodeURIComponent(id)}/runtime-token`,
1638
+ {}
1639
+ )
1640
+ );
1641
+ }
1642
+ async resolveBinding(id, bindingId, receiptId, callbackToken) {
1643
+ return unwrap8(
1644
+ await this.http.request(
1645
+ `/builder/apps/${encodeURIComponent(id)}/runtime/bindings/${encodeURIComponent(bindingId)}?receipt_id=${encodeURIComponent(receiptId)}`,
1646
+ {
1647
+ method: "GET",
1648
+ headers: {
1649
+ "x-miosa-app-callback-token": callbackToken
1650
+ }
1651
+ }
1652
+ )
1653
+ );
1654
+ }
1655
+ async listAutomationRuns(id) {
1656
+ const payload = await this.http.get(
1657
+ `/builder/apps/${encodeURIComponent(id)}/automation-runs`
1658
+ );
1659
+ return payload.data;
1660
+ }
1661
+ async startAutomationRun(id, automationId, trigger = {}) {
1662
+ return unwrap8(
1663
+ await this.http.post(
1664
+ `/builder/apps/${encodeURIComponent(id)}/automations/${encodeURIComponent(automationId)}/runs`,
1665
+ { trigger }
1666
+ )
1667
+ );
1668
+ }
1669
+ async claimAutomationStep(id, runId) {
1670
+ return unwrap8(
1671
+ await this.http.post(
1672
+ `/builder/apps/${encodeURIComponent(id)}/automation-runs/${encodeURIComponent(runId)}/claim`,
1673
+ {}
1674
+ )
1675
+ );
1676
+ }
1677
+ async completeAutomationStep(id, runId, cursor, idempotencyKey11, output = null) {
1678
+ return unwrap8(
1679
+ await this.http.post(
1680
+ `/builder/apps/${encodeURIComponent(id)}/automation-runs/${encodeURIComponent(runId)}/complete`,
1681
+ {
1682
+ cursor,
1683
+ idempotency_key: idempotencyKey11,
1684
+ output
1685
+ }
1686
+ )
1687
+ );
1688
+ }
1689
+ async failAutomationStep(id, runId, cursor, idempotencyKey11, reason) {
1690
+ return unwrap8(
1691
+ await this.http.post(
1692
+ `/builder/apps/${encodeURIComponent(id)}/automation-runs/${encodeURIComponent(runId)}/fail`,
1693
+ {
1694
+ cursor,
1695
+ idempotency_key: idempotencyKey11,
1696
+ reason
1697
+ }
1698
+ )
1699
+ );
1700
+ }
1701
+ async revokeApproval(id, approvalId) {
1702
+ await this.http.post(
1703
+ `/builder/apps/${id}/approvals/${approvalId}/revoke`,
1704
+ {}
1705
+ );
1706
+ }
1707
+ };
1708
+
1709
+ // src/resources/audit-log.ts
1710
+ function unwrap9(payload) {
1529
1711
  if (payload && typeof payload === "object") {
1530
1712
  const p = payload;
1531
1713
  for (const k of ["data", "audit_log", "events", "items"]) {
@@ -1548,14 +1730,14 @@ var AuditLog = class {
1548
1730
  async list(params = {}) {
1549
1731
  const query3 = stripUndefined7(params);
1550
1732
  const data = await this.http.get("/audit-log", query3);
1551
- const result = unwrap8(data);
1733
+ const result = unwrap9(data);
1552
1734
  if (Array.isArray(result)) return result;
1553
1735
  return [];
1554
1736
  }
1555
1737
  };
1556
1738
 
1557
1739
  // src/resources/benchmarks.ts
1558
- function unwrap9(data) {
1740
+ function unwrap10(data) {
1559
1741
  if (data && typeof data === "object") {
1560
1742
  const d = data;
1561
1743
  for (const k of ["data", "benchmarks", "samples", "items"]) {
@@ -1587,7 +1769,7 @@ var Benchmarks = class {
1587
1769
  return unwrapList(data);
1588
1770
  }
1589
1771
  async get(benchmarkId) {
1590
- return unwrap9(
1772
+ return unwrap10(
1591
1773
  await this.http.get(`/admin/benchmarks/${benchmarkId}`)
1592
1774
  );
1593
1775
  }
@@ -1596,10 +1778,10 @@ var Benchmarks = class {
1596
1778
  const body5 = Object.fromEntries(
1597
1779
  Object.entries(params).filter(([, v]) => v !== void 0)
1598
1780
  );
1599
- return unwrap9(await this.http.post("/admin/benchmarks", body5));
1781
+ return unwrap10(await this.http.post("/admin/benchmarks", body5));
1600
1782
  }
1601
1783
  async cancel(benchmarkId) {
1602
- return unwrap9(
1784
+ return unwrap10(
1603
1785
  await this.http.post(`/admin/benchmarks/${benchmarkId}/cancel`)
1604
1786
  );
1605
1787
  }
@@ -1619,14 +1801,14 @@ var Benchmarks = class {
1619
1801
  const body5 = Object.fromEntries(
1620
1802
  Object.entries(params).filter(([, v]) => v !== void 0)
1621
1803
  );
1622
- return unwrap9(
1804
+ return unwrap10(
1623
1805
  await this.http.post("/admin/benchmarks/compare", body5)
1624
1806
  );
1625
1807
  }
1626
1808
  };
1627
1809
 
1628
1810
  // src/resources/builder-sessions.ts
1629
- function unwrap10(data) {
1811
+ function unwrap11(data) {
1630
1812
  if (data && typeof data === "object") {
1631
1813
  const d = data;
1632
1814
  for (const k of ["data", "sessions", "items"]) {
@@ -1663,7 +1845,7 @@ var BuilderSessions = class {
1663
1845
  return all.find((s) => s.id === sessionId) ?? {};
1664
1846
  }
1665
1847
  async updateTitle(sessionId, title) {
1666
- return unwrap10(
1848
+ return unwrap11(
1667
1849
  await this.http.patch(`/builder/sessions/${sessionId}/title`, {
1668
1850
  title
1669
1851
  })
@@ -1675,7 +1857,7 @@ var BuilderSessions = class {
1675
1857
  };
1676
1858
 
1677
1859
  // src/resources/channels.ts
1678
- function unwrap11(payload) {
1860
+ function unwrap12(payload) {
1679
1861
  if (payload && typeof payload === "object") {
1680
1862
  const p = payload;
1681
1863
  for (const k of ["data", "channels", "notifications", "items"]) {
@@ -1703,26 +1885,26 @@ var Channels = class {
1703
1885
  async list(params = {}) {
1704
1886
  const query3 = stripUndefined8(params);
1705
1887
  const data = await this.http.get("/channels", query3);
1706
- const result = unwrap11(data);
1888
+ const result = unwrap12(data);
1707
1889
  if (Array.isArray(result)) return result;
1708
1890
  return [];
1709
1891
  }
1710
1892
  /** Get a single channel. */
1711
1893
  async get(channelId) {
1712
1894
  const data = await this.http.get(`/channels/${channelId}`);
1713
- return unwrap11(data);
1895
+ return unwrap12(data);
1714
1896
  }
1715
1897
  /** Create a new channel. */
1716
1898
  async create(params) {
1717
1899
  const body5 = stripUndefObj(params);
1718
1900
  const data = await this.http.post("/channels", body5);
1719
- return unwrap11(data);
1901
+ return unwrap12(data);
1720
1902
  }
1721
1903
  /** Update a channel. */
1722
1904
  async update(channelId, params) {
1723
1905
  const body5 = stripUndefObj(params);
1724
1906
  const data = await this.http.patch(`/channels/${channelId}`, body5);
1725
- return unwrap11(data);
1907
+ return unwrap12(data);
1726
1908
  }
1727
1909
  /** Delete a channel. */
1728
1910
  async delete(channelId) {
@@ -1732,30 +1914,30 @@ var Channels = class {
1732
1914
  /** Get notification preferences across all channels. */
1733
1915
  async listNotifications() {
1734
1916
  const data = await this.http.get("/channels/notifications");
1735
- return unwrap11(data);
1917
+ return unwrap12(data);
1736
1918
  }
1737
1919
  /** Update notification preferences. */
1738
1920
  async updateNotifications(params) {
1739
1921
  const body5 = stripUndefObj(params);
1740
1922
  const data = await this.http.put("/channels/notifications", body5);
1741
- return unwrap11(data);
1923
+ return unwrap12(data);
1742
1924
  }
1743
1925
  /** Enable a channel. */
1744
1926
  async enable(channelId) {
1745
1927
  const data = await this.http.post(`/channels/${channelId}/enable`);
1746
- return unwrap11(data);
1928
+ return unwrap12(data);
1747
1929
  }
1748
1930
  /** Disable a channel. */
1749
1931
  async disable(channelId) {
1750
1932
  const data = await this.http.post(
1751
1933
  `/channels/${channelId}/disable`
1752
1934
  );
1753
- return unwrap11(data);
1935
+ return unwrap12(data);
1754
1936
  }
1755
1937
  };
1756
1938
 
1757
1939
  // src/resources/cloud.ts
1758
- function unwrap12(payload) {
1940
+ function unwrap13(payload) {
1759
1941
  if (payload !== null && typeof payload === "object" && "data" in payload && payload.data !== void 0) {
1760
1942
  return payload.data;
1761
1943
  }
@@ -1830,12 +2012,12 @@ var Cloud = class {
1830
2012
  }
1831
2013
  http;
1832
2014
  async listAccounts() {
1833
- return unwrap12(
2015
+ return unwrap13(
1834
2016
  await this.http.get("/cloud/accounts")
1835
2017
  );
1836
2018
  }
1837
2019
  async createAccount(params) {
1838
- return unwrap12(
2020
+ return unwrap13(
1839
2021
  await this.http.post(
1840
2022
  "/cloud/accounts",
1841
2023
  accountBody(params)
@@ -1843,7 +2025,7 @@ var Cloud = class {
1843
2025
  );
1844
2026
  }
1845
2027
  async attachAwsRole(id, params) {
1846
- return unwrap12(
2028
+ return unwrap13(
1847
2029
  await this.http.post(
1848
2030
  `/cloud/accounts/${encodeURIComponent(id)}/aws/role`,
1849
2031
  stripUndefined9({
@@ -1854,7 +2036,7 @@ var Cloud = class {
1854
2036
  );
1855
2037
  }
1856
2038
  async listRegions(params = {}) {
1857
- return unwrap12(
2039
+ return unwrap13(
1858
2040
  await this.http.get(
1859
2041
  "/cloud/regions",
1860
2042
  query(params)
@@ -1862,7 +2044,7 @@ var Cloud = class {
1862
2044
  );
1863
2045
  }
1864
2046
  async createRegion(params) {
1865
- return unwrap12(
2047
+ return unwrap13(
1866
2048
  await this.http.post(
1867
2049
  "/cloud/regions",
1868
2050
  regionBody(params)
@@ -1870,12 +2052,12 @@ var Cloud = class {
1870
2052
  );
1871
2053
  }
1872
2054
  async listPools(params = {}) {
1873
- return unwrap12(
2055
+ return unwrap13(
1874
2056
  await this.http.get("/cloud/pools", query(params))
1875
2057
  );
1876
2058
  }
1877
2059
  async createPool(params) {
1878
- return unwrap12(
2060
+ return unwrap13(
1879
2061
  await this.http.post(
1880
2062
  "/cloud/pools",
1881
2063
  poolBody(params)
@@ -1883,7 +2065,7 @@ var Cloud = class {
1883
2065
  );
1884
2066
  }
1885
2067
  async listPreflights(params = {}) {
1886
- return unwrap12(
2068
+ return unwrap13(
1887
2069
  await this.http.get(
1888
2070
  "/cloud/preflights",
1889
2071
  query(params)
@@ -1891,7 +2073,7 @@ var Cloud = class {
1891
2073
  );
1892
2074
  }
1893
2075
  async recordPreflight(params) {
1894
- return unwrap12(
2076
+ return unwrap13(
1895
2077
  await this.http.post(
1896
2078
  "/cloud/preflights",
1897
2079
  preflightBody(params)
@@ -1901,7 +2083,7 @@ var Cloud = class {
1901
2083
  };
1902
2084
 
1903
2085
  // src/resources/command-center.ts
1904
- function unwrap13(data) {
2086
+ function unwrap14(data) {
1905
2087
  if (data && typeof data === "object") {
1906
2088
  const d = data;
1907
2089
  for (const k of [
@@ -1935,7 +2117,7 @@ var CommandCenter = class {
1935
2117
  http;
1936
2118
  /** Top-level snapshot (GET /command-center). */
1937
2119
  async overview() {
1938
- return unwrap13(await this.http.get("/command-center"));
2120
+ return unwrap14(await this.http.get("/command-center"));
1939
2121
  }
1940
2122
  async agents() {
1941
2123
  return unwrapList3(await this.http.get("/command-center/agents"));
@@ -1946,13 +2128,13 @@ var CommandCenter = class {
1946
2128
  );
1947
2129
  }
1948
2130
  async metrics() {
1949
- return unwrap13(await this.http.get("/command-center/metrics"));
2131
+ return unwrap14(await this.http.get("/command-center/metrics"));
1950
2132
  }
1951
2133
  async presets() {
1952
2134
  return unwrapList3(await this.http.get("/command-center/presets"));
1953
2135
  }
1954
2136
  async tiers() {
1955
- return unwrap13(await this.http.get("/command-center/tiers"));
2137
+ return unwrap14(await this.http.get("/command-center/tiers"));
1956
2138
  }
1957
2139
  /** Stream live command-center events via SSE. */
1958
2140
  events() {
@@ -1961,7 +2143,7 @@ var CommandCenter = class {
1961
2143
  };
1962
2144
 
1963
2145
  // src/resources/community.ts
1964
- function unwrap14(data) {
2146
+ function unwrap15(data) {
1965
2147
  if (data && typeof data === "object") {
1966
2148
  const d = data;
1967
2149
  for (const k of ["data", "templates", "agents", "items"]) {
@@ -1993,7 +2175,7 @@ var Community = class {
1993
2175
  return unwrapList4(await this.http.get("/community/agents", query3));
1994
2176
  }
1995
2177
  async getAgent(agentId) {
1996
- return unwrap14(await this.http.get(`/community/agents/${agentId}`));
2178
+ return unwrap15(await this.http.get(`/community/agents/${agentId}`));
1997
2179
  }
1998
2180
  // ── Templates ─────────────────────────────────────────────────────────
1999
2181
  async listTemplates(filters = {}) {
@@ -2005,7 +2187,7 @@ var Community = class {
2005
2187
  );
2006
2188
  }
2007
2189
  async getTemplate(templateId) {
2008
- return unwrap14(
2190
+ return unwrap15(
2009
2191
  await this.http.get(`/community/templates/${templateId}`)
2010
2192
  );
2011
2193
  }
@@ -2014,7 +2196,7 @@ var Community = class {
2014
2196
  const body5 = Object.fromEntries(
2015
2197
  Object.entries(opts).filter(([, v]) => v !== void 0)
2016
2198
  );
2017
- return unwrap14(
2199
+ return unwrap15(
2018
2200
  await this.http.post(
2019
2201
  `/community/templates/${templateId}/install`,
2020
2202
  body5
@@ -2029,7 +2211,7 @@ var Community = class {
2029
2211
  Object.entries(opts).filter(([, v]) => v !== void 0)
2030
2212
  )
2031
2213
  };
2032
- return unwrap14(
2214
+ return unwrap15(
2033
2215
  await this.http.post(
2034
2216
  `/community/templates/${templateId}/rate`,
2035
2217
  body5
@@ -2039,7 +2221,7 @@ var Community = class {
2039
2221
  };
2040
2222
 
2041
2223
  // src/resources/completions.ts
2042
- function unwrap15(data) {
2224
+ function unwrap16(data) {
2043
2225
  if (data && typeof data === "object") {
2044
2226
  const d = data;
2045
2227
  if (Array.isArray(d.choices)) return d;
@@ -2065,7 +2247,7 @@ var Completions = class {
2065
2247
  { method: "POST", body: body5 }
2066
2248
  );
2067
2249
  }
2068
- return this.http.post("/intelligence/completions", body5).then(unwrap15);
2250
+ return this.http.post("/intelligence/completions", body5).then(unwrap16);
2069
2251
  }
2070
2252
  chat(params) {
2071
2253
  const body5 = buildBody(params);
@@ -2075,7 +2257,7 @@ var Completions = class {
2075
2257
  { method: "POST", body: body5 }
2076
2258
  );
2077
2259
  }
2078
- return this.http.post("/intelligence/chat/completions", body5).then(unwrap15);
2260
+ return this.http.post("/intelligence/chat/completions", body5).then(unwrap16);
2079
2261
  }
2080
2262
  };
2081
2263
 
@@ -2198,7 +2380,7 @@ var Checkpoints = class {
2198
2380
  };
2199
2381
 
2200
2382
  // src/resources/computer-auto-stop.ts
2201
- function unwrap16(data) {
2383
+ function unwrap17(data) {
2202
2384
  if (data && typeof data === "object") {
2203
2385
  const d = data;
2204
2386
  if ("data" in d && Object.keys(d).length <= 2) {
@@ -2216,13 +2398,13 @@ var ComputerAutoStop = class {
2216
2398
  computerId;
2217
2399
  /** Return the current auto-stop configuration. */
2218
2400
  async get() {
2219
- return unwrap16(
2401
+ return unwrap17(
2220
2402
  await this.http.get(`/computers/${this.computerId}/auto-stop`)
2221
2403
  );
2222
2404
  }
2223
2405
  /** Set the idle timeout in seconds (0 disables auto-stop). */
2224
2406
  async update(seconds) {
2225
- return unwrap16(
2407
+ return unwrap17(
2226
2408
  await this.http.patch(
2227
2409
  `/computers/${this.computerId}/auto-stop`,
2228
2410
  { seconds }
@@ -2232,7 +2414,7 @@ var ComputerAutoStop = class {
2232
2414
  };
2233
2415
 
2234
2416
  // src/resources/computer-env.ts
2235
- function unwrap17(data) {
2417
+ function unwrap18(data) {
2236
2418
  if (data && typeof data === "object") {
2237
2419
  const d = data;
2238
2420
  if ("data" in d && Object.keys(d).length <= 2) {
@@ -2267,11 +2449,11 @@ var ComputerEnv = class {
2267
2449
  }
2268
2450
  /** Create a new env var. Use update() to change an existing one. */
2269
2451
  async set(name, value) {
2270
- return unwrap17(await this.http.post(this.base(), { name, value }));
2452
+ return unwrap18(await this.http.post(this.base(), { name, value }));
2271
2453
  }
2272
2454
  /** Patch the value of an existing env var by name. */
2273
2455
  async update(name, value) {
2274
- return unwrap17(
2456
+ return unwrap18(
2275
2457
  await this.http.patch(`${this.base()}/${name}`, { value })
2276
2458
  );
2277
2459
  }
@@ -2288,7 +2470,7 @@ var ComputerEnv = class {
2288
2470
  };
2289
2471
 
2290
2472
  // src/resources/computer-logs.ts
2291
- function unwrap18(data) {
2473
+ function unwrap19(data) {
2292
2474
  if (data && typeof data === "object") {
2293
2475
  const d = data;
2294
2476
  if ("data" in d && Object.keys(d).length <= 2) {
@@ -2309,7 +2491,7 @@ var ComputerLogs = class {
2309
2491
  const query3 = Object.fromEntries(
2310
2492
  Object.entries(params).filter(([, v]) => v !== void 0)
2311
2493
  );
2312
- return unwrap18(
2494
+ return unwrap19(
2313
2495
  await this.http.get(`/computers/${this.computerId}/logs`, query3)
2314
2496
  );
2315
2497
  }
@@ -2322,7 +2504,7 @@ var ComputerLogs = class {
2322
2504
  };
2323
2505
 
2324
2506
  // src/resources/computer-osa.ts
2325
- function unwrap19(data) {
2507
+ function unwrap20(data) {
2326
2508
  if (data && typeof data === "object") {
2327
2509
  const d = data;
2328
2510
  if ("data" in d && Object.keys(d).length <= 2) {
@@ -2346,7 +2528,7 @@ var ComputerOsa = class {
2346
2528
  Object.entries(params).filter(([, v]) => v !== void 0)
2347
2529
  )
2348
2530
  };
2349
- return unwrap19(
2531
+ return unwrap20(
2350
2532
  await this.http.post(
2351
2533
  `/computers/${this.computerId}/osa/task`,
2352
2534
  body5
@@ -2355,13 +2537,13 @@ var ComputerOsa = class {
2355
2537
  }
2356
2538
  /** Cancel the currently-running OSA task, if any. */
2357
2539
  async cancelTask() {
2358
- return unwrap19(
2540
+ return unwrap20(
2359
2541
  await this.http.delete(`/computers/${this.computerId}/osa/task`)
2360
2542
  );
2361
2543
  }
2362
2544
  /** Return OSA's current task / configuration / health snapshot. */
2363
2545
  async status() {
2364
- return unwrap19(
2546
+ return unwrap20(
2365
2547
  await this.http.get(`/computers/${this.computerId}/osa/status`)
2366
2548
  );
2367
2549
  }
@@ -2370,7 +2552,7 @@ var ComputerOsa = class {
2370
2552
  const body5 = Object.fromEntries(
2371
2553
  Object.entries(config).filter(([, v]) => v !== void 0)
2372
2554
  );
2373
- return unwrap19(
2555
+ return unwrap20(
2374
2556
  await this.http.post(
2375
2557
  `/computers/${this.computerId}/osa/configure`,
2376
2558
  body5
@@ -2380,7 +2562,7 @@ var ComputerOsa = class {
2380
2562
  };
2381
2563
 
2382
2564
  // src/resources/computer-ports.ts
2383
- function unwrap20(data) {
2565
+ function unwrap21(data) {
2384
2566
  if (data && typeof data === "object") {
2385
2567
  const d = data;
2386
2568
  if ("data" in d && Object.keys(d).length <= 2) {
@@ -2425,14 +2607,14 @@ var ComputerPorts = class {
2425
2607
  Object.entries(opts).filter(([, v]) => v !== void 0)
2426
2608
  )
2427
2609
  };
2428
- return unwrap20(await this.http.post(this.base(), body5));
2610
+ return unwrap21(await this.http.post(this.base(), body5));
2429
2611
  }
2430
2612
  /** Patch visibility / auth options for port. */
2431
2613
  async update(port, opts) {
2432
2614
  const body5 = Object.fromEntries(
2433
2615
  Object.entries(opts).filter(([, v]) => v !== void 0)
2434
2616
  );
2435
- return unwrap20(
2617
+ return unwrap21(
2436
2618
  await this.http.patch(`${this.base()}/${port}`, body5)
2437
2619
  );
2438
2620
  }
@@ -2459,7 +2641,7 @@ var ComputerTerminal = class {
2459
2641
  `/computers/${this.computerId}/terminal`,
2460
2642
  body5
2461
2643
  );
2462
- return unwrap21(raw);
2644
+ return unwrap22(raw);
2463
2645
  }
2464
2646
  /** Resize an existing PTY session. */
2465
2647
  async resize(sessionId, cols, rows) {
@@ -2467,10 +2649,10 @@ var ComputerTerminal = class {
2467
2649
  `/computers/${this.computerId}/pty/${sessionId}/resize`,
2468
2650
  { cols, rows }
2469
2651
  );
2470
- return unwrap21(raw);
2652
+ return unwrap22(raw);
2471
2653
  }
2472
2654
  };
2473
- function unwrap21(data) {
2655
+ function unwrap22(data) {
2474
2656
  if (data && typeof data === "object") {
2475
2657
  const d = data;
2476
2658
  if ("data" in d && Object.keys(d).length <= 2) {
@@ -2481,7 +2663,7 @@ function unwrap21(data) {
2481
2663
  }
2482
2664
 
2483
2665
  // src/resources/computer-volumes.ts
2484
- function unwrap22(data) {
2666
+ function unwrap23(data) {
2485
2667
  if (data && typeof data === "object") {
2486
2668
  const d = data;
2487
2669
  if ("data" in d && Object.keys(d).length <= 2) {
@@ -2515,7 +2697,7 @@ var ComputerVolumes = class {
2515
2697
  }
2516
2698
  /** Attach volumeId at mountPath inside the VM. */
2517
2699
  async attach(volumeId, mountPath) {
2518
- return unwrap22(
2700
+ return unwrap23(
2519
2701
  await this.http.post(this.base(), {
2520
2702
  volume_id: volumeId,
2521
2703
  mount_path: mountPath
@@ -2529,7 +2711,7 @@ var ComputerVolumes = class {
2529
2711
  };
2530
2712
 
2531
2713
  // src/resources/connectors.ts
2532
- function unwrap23(payload) {
2714
+ function unwrap24(payload) {
2533
2715
  if (payload && typeof payload === "object") {
2534
2716
  const p = payload;
2535
2717
  for (const key of ["data", "binding"]) {
@@ -2740,7 +2922,7 @@ var Connectors = class {
2740
2922
  const data = await this.http.get(
2741
2923
  `/connect/connectors/${connectorPath(connector)}`
2742
2924
  );
2743
- return unwrap23(data);
2925
+ return unwrap24(data);
2744
2926
  }
2745
2927
  show(connector) {
2746
2928
  return this.get(connector);
@@ -2751,7 +2933,7 @@ var Connectors = class {
2751
2933
  "/connect/connectors",
2752
2934
  bodyFromCreateParams(provider, params)
2753
2935
  );
2754
- return unwrap23(data);
2936
+ return unwrap24(data);
2755
2937
  }
2756
2938
  /** Request a runtime provider token for a connector. */
2757
2939
  async getToken(connector, params = {}) {
@@ -2759,7 +2941,7 @@ var Connectors = class {
2759
2941
  `/connect/token/${connectorPath(connector)}`,
2760
2942
  tokenBody(params)
2761
2943
  );
2762
- return unwrap23(data);
2944
+ return unwrap24(data);
2763
2945
  }
2764
2946
  token(connector, params = {}) {
2765
2947
  return this.getToken(connector, params);
@@ -2781,7 +2963,7 @@ var Connectors = class {
2781
2963
  ...externalAttributionParams(params)
2782
2964
  })
2783
2965
  );
2784
- return unwrap23(data);
2966
+ return unwrap24(data);
2785
2967
  }
2786
2968
  /** List connector installations/grants. */
2787
2969
  async installations(params = {}) {
@@ -2821,7 +3003,7 @@ var Connectors = class {
2821
3003
  "/connect/defaults/materialize",
2822
3004
  materializeDefaultsBody(params)
2823
3005
  );
2824
- return unwrap23(data);
3006
+ return unwrap24(data);
2825
3007
  }
2826
3008
  /** Create an inherited connector default for future runtime resources. */
2827
3009
  async createDefault(params) {
@@ -2829,7 +3011,7 @@ var Connectors = class {
2829
3011
  "/connect/defaults",
2830
3012
  defaultBody(params)
2831
3013
  );
2832
- return unwrap23(data);
3014
+ return unwrap24(data);
2833
3015
  }
2834
3016
  /** Delete an inherited connector default. */
2835
3017
  async deleteDefault(id) {
@@ -2849,7 +3031,7 @@ var Connectors = class {
2849
3031
  "/connect/triggers",
2850
3032
  triggerBody(params)
2851
3033
  );
2852
- return unwrap23(data);
3034
+ return unwrap24(data);
2853
3035
  }
2854
3036
  /** List inbound provider trigger delivery attempts. */
2855
3037
  async triggerDeliveries(params = {}) {
@@ -2876,7 +3058,7 @@ var Connectors = class {
2876
3058
  "/connect/project-links",
2877
3059
  projectLinkBody(params)
2878
3060
  );
2879
- return unwrap23(data);
3061
+ return unwrap24(data);
2880
3062
  }
2881
3063
  /** Delete a project connector link. */
2882
3064
  async deleteProjectLink(id) {
@@ -2912,7 +3094,7 @@ var RuntimeConnectors = class {
2912
3094
  ...externalAttributionParams(params)
2913
3095
  })
2914
3096
  );
2915
- return unwrap23(data);
3097
+ return unwrap24(data);
2916
3098
  }
2917
3099
  /** Detach a connector binding by binding id or connector UID. */
2918
3100
  async detach(bindingOrConnector) {
@@ -2921,7 +3103,7 @@ var RuntimeConnectors = class {
2921
3103
  /** Sync or materialize connector placeholder env vars for this runtime resource. */
2922
3104
  async sync() {
2923
3105
  const data = await this.http.post(`${this.basePath}/sync`, {});
2924
- return unwrap23(data);
3106
+ return unwrap24(data);
2925
3107
  }
2926
3108
  /** Verify a required connector is attached before agent work begins. */
2927
3109
  async preflight(params = {}) {
@@ -2929,7 +3111,7 @@ var RuntimeConnectors = class {
2929
3111
  `${this.basePath}/preflight`,
2930
3112
  stripUndefined10(params)
2931
3113
  );
2932
- return unwrap23(data);
3114
+ return unwrap24(data);
2933
3115
  }
2934
3116
  };
2935
3117
  var SandboxConnectors = class extends RuntimeConnectors {
@@ -3132,7 +3314,7 @@ var Desktop = class {
3132
3314
  };
3133
3315
 
3134
3316
  // src/resources/egressAudit.ts
3135
- function unwrap24(payload) {
3317
+ function unwrap25(payload) {
3136
3318
  if (payload && typeof payload === "object") {
3137
3319
  const p = payload;
3138
3320
  for (const k of ["data", "event", "items"]) {
@@ -3198,7 +3380,7 @@ var EgressAudit = class {
3198
3380
  const data = await this.http.get(
3199
3381
  `/egress/audit/${id}`
3200
3382
  );
3201
- return unwrap24(data);
3383
+ return unwrap25(data);
3202
3384
  }
3203
3385
  /**
3204
3386
  * Long-poll the audit endpoint and yield new events as they appear.
@@ -3274,7 +3456,7 @@ var ComputerAudit = class extends SandboxAudit {
3274
3456
  };
3275
3457
 
3276
3458
  // src/resources/egressNetwork.ts
3277
- function unwrap25(payload) {
3459
+ function unwrap26(payload) {
3278
3460
  if (payload && typeof payload === "object") {
3279
3461
  const p = payload;
3280
3462
  for (const k of ["data", "policy", "rule", "items"]) {
@@ -3333,7 +3515,7 @@ var EgressNetwork = class {
3333
3515
  "/egress/allowlist",
3334
3516
  ruleBody(host, params, "allow")
3335
3517
  );
3336
- return unwrap25(data);
3518
+ return unwrap26(data);
3337
3519
  }
3338
3520
  /** Add a `deny` rule for `host` to the allowlist. */
3339
3521
  async deny(host, params = {}) {
@@ -3341,7 +3523,7 @@ var EgressNetwork = class {
3341
3523
  "/egress/allowlist",
3342
3524
  ruleBody(host, params, "deny")
3343
3525
  );
3344
- return unwrap25(data);
3526
+ return unwrap26(data);
3345
3527
  }
3346
3528
  /** List allowlist rules. */
3347
3529
  async rules(params = {}) {
@@ -3385,7 +3567,7 @@ var EgressNetwork = class {
3385
3567
  "/egress/policies",
3386
3568
  body5
3387
3569
  );
3388
- return unwrap25(data);
3570
+ return unwrap26(data);
3389
3571
  }
3390
3572
  /** Update an egress policy by id. */
3391
3573
  async updatePolicy(policyId, params) {
@@ -3399,7 +3581,7 @@ var EgressNetwork = class {
3399
3581
  `/egress/policies/${policyId}`,
3400
3582
  body5
3401
3583
  );
3402
- return unwrap25(data);
3584
+ return unwrap26(data);
3403
3585
  }
3404
3586
  // ── mode helpers ──────────────────────────────────────────────────────────
3405
3587
  /** Set the policy to `mode="enforce"` — denied egress is blocked. */
@@ -3426,7 +3608,7 @@ var EgressNetwork = class {
3426
3608
  "/egress/policies",
3427
3609
  body5
3428
3610
  );
3429
- return unwrap25(data);
3611
+ return unwrap26(data);
3430
3612
  }
3431
3613
  // ── suggestions ───────────────────────────────────────────────────────────
3432
3614
  /** AI-generated allowlist suggestions from recent denied egress. */
@@ -3517,7 +3699,7 @@ var ComputerNetwork = class extends SandboxNetwork {
3517
3699
  };
3518
3700
 
3519
3701
  // src/resources/egressSecrets.ts
3520
- function unwrap26(payload) {
3702
+ function unwrap27(payload) {
3521
3703
  if (payload && typeof payload === "object") {
3522
3704
  const p = payload;
3523
3705
  for (const k of ["data", "secret", "binding", "items"]) {
@@ -3653,7 +3835,7 @@ var OAuthFlow = class {
3653
3835
  const data = await this.http.get("/egress/oauth/status", {
3654
3836
  state: this.state
3655
3837
  });
3656
- const payload = unwrap26(data) ?? {};
3838
+ const payload = unwrap27(data) ?? {};
3657
3839
  const status = payload.status;
3658
3840
  if (status === "completed" || status === "ready" || status === "succeeded") {
3659
3841
  return payload;
@@ -3685,7 +3867,7 @@ var EgressSecrets = class {
3685
3867
  "/egress/secrets",
3686
3868
  setBody(params)
3687
3869
  );
3688
- return unwrap26(data);
3870
+ return unwrap27(data);
3689
3871
  }
3690
3872
  /** List secrets. */
3691
3873
  async list(params = {}) {
@@ -3700,7 +3882,7 @@ var EgressSecrets = class {
3700
3882
  const data = await this.http.get(
3701
3883
  `/egress/secrets/${id}`
3702
3884
  );
3703
- return unwrap26(data);
3885
+ return unwrap27(data);
3704
3886
  }
3705
3887
  /** Rotate the secret's value. */
3706
3888
  async rotate(id, params) {
@@ -3709,7 +3891,7 @@ var EgressSecrets = class {
3709
3891
  `/egress/secrets/${id}`,
3710
3892
  body5
3711
3893
  );
3712
- return unwrap26(data);
3894
+ return unwrap27(data);
3713
3895
  }
3714
3896
  /** Delete a secret. */
3715
3897
  async delete(id) {
@@ -3722,7 +3904,7 @@ var EgressSecrets = class {
3722
3904
  "/egress/bindings",
3723
3905
  bindingBody(params)
3724
3906
  );
3725
- return unwrap26(data);
3907
+ return unwrap27(data);
3726
3908
  }
3727
3909
  /** List secret bindings. */
3728
3910
  async listBindings(params = {}) {
@@ -3755,7 +3937,7 @@ var EgressSecrets = class {
3755
3937
  "/egress/oauth/start",
3756
3938
  oauthBody(params)
3757
3939
  );
3758
- const payload = unwrap26(data) ?? {};
3940
+ const payload = unwrap27(data) ?? {};
3759
3941
  return new OAuthFlow(this.http, payload, params.provider);
3760
3942
  }
3761
3943
  };
@@ -4919,7 +5101,7 @@ var Credits = class {
4919
5101
  return this.http.get("/credits/usage");
4920
5102
  }
4921
5103
  };
4922
- function unwrap27(payload) {
5104
+ function unwrap28(payload) {
4923
5105
  if (payload && typeof payload === "object" && "data" in payload) {
4924
5106
  return payload.data;
4925
5107
  }
@@ -4955,7 +5137,7 @@ var CronJobs = class {
4955
5137
  }
4956
5138
  async get(jobId) {
4957
5139
  const data = await this.http.get(`/cron-jobs/${jobId}`);
4958
- return unwrap27(data);
5140
+ return unwrap28(data);
4959
5141
  }
4960
5142
  async create(params) {
4961
5143
  const { idempotencyKey: ikey, ...rest } = params;
@@ -4965,12 +5147,12 @@ var CronJobs = class {
4965
5147
  body: body5,
4966
5148
  headers: { "Idempotency-Key": idempotencyKey2(ikey) }
4967
5149
  });
4968
- return unwrap27(data);
5150
+ return unwrap28(data);
4969
5151
  }
4970
5152
  async update(jobId, params) {
4971
5153
  const body5 = stripUndefined14(params);
4972
5154
  const data = await this.http.patch(`/cron-jobs/${jobId}`, body5);
4973
- return unwrap27(data);
5155
+ return unwrap28(data);
4974
5156
  }
4975
5157
  async delete(jobId) {
4976
5158
  await this.http.delete(`/cron-jobs/${jobId}`);
@@ -4978,11 +5160,11 @@ var CronJobs = class {
4978
5160
  // ── Control ────────────────────────────────────────────────────────────────
4979
5161
  async pause(jobId) {
4980
5162
  const data = await this.http.post(`/cron-jobs/${jobId}/pause`);
4981
- return unwrap27(data);
5163
+ return unwrap28(data);
4982
5164
  }
4983
5165
  async resume(jobId) {
4984
5166
  const data = await this.http.post(`/cron-jobs/${jobId}/resume`);
4985
- return unwrap27(data);
5167
+ return unwrap28(data);
4986
5168
  }
4987
5169
  async runNow(jobId, opts = {}) {
4988
5170
  const data = await this.http.request(
@@ -4992,7 +5174,7 @@ var CronJobs = class {
4992
5174
  headers: { "Idempotency-Key": idempotencyKey2(opts.idempotencyKey) }
4993
5175
  }
4994
5176
  );
4995
- return unwrap27(data);
5177
+ return unwrap28(data);
4996
5178
  }
4997
5179
  // ── Execution history ──────────────────────────────────────────────────────
4998
5180
  async listExecutions(jobId) {
@@ -5007,12 +5189,12 @@ var CronJobs = class {
5007
5189
  const data = await this.http.get(
5008
5190
  `/cron-jobs/${jobId}/executions/${executionId}`
5009
5191
  );
5010
- return unwrap27(data);
5192
+ return unwrap28(data);
5011
5193
  }
5012
5194
  };
5013
5195
 
5014
5196
  // src/resources/dashboard.ts
5015
- function unwrap28(payload) {
5197
+ function unwrap29(payload) {
5016
5198
  if (payload && typeof payload === "object") {
5017
5199
  const p = payload;
5018
5200
  for (const k of ["data", "dashboard", "overview", "items"]) {
@@ -5029,15 +5211,15 @@ var Dashboard = class {
5029
5211
  /** Aggregated user dashboard payload. */
5030
5212
  async summary() {
5031
5213
  const data = await this.http.get("/dashboard");
5032
- return unwrap28(data);
5214
+ return unwrap29(data);
5033
5215
  }
5034
5216
  /** Status / health overview (public endpoint). */
5035
5217
  async overview() {
5036
5218
  const data = await this.http.get("/overview");
5037
- return unwrap28(data);
5219
+ return unwrap29(data);
5038
5220
  }
5039
5221
  };
5040
- function unwrap29(payload) {
5222
+ function unwrap30(payload) {
5041
5223
  if (payload && typeof payload === "object" && "data" in payload) {
5042
5224
  return payload.data;
5043
5225
  }
@@ -5073,7 +5255,7 @@ var Databases = class {
5073
5255
  }
5074
5256
  async get(databaseId) {
5075
5257
  const data = await this.http.get(`/databases/${databaseId}`);
5076
- return unwrap29(data);
5258
+ return unwrap30(data);
5077
5259
  }
5078
5260
  async create(params) {
5079
5261
  const {
@@ -5097,7 +5279,7 @@ var Databases = class {
5097
5279
  )
5098
5280
  }
5099
5281
  });
5100
- return unwrap29(data);
5282
+ return unwrap30(data);
5101
5283
  }
5102
5284
  async delete(databaseId) {
5103
5285
  await this.http.delete(`/databases/${databaseId}`);
@@ -5107,24 +5289,24 @@ var Databases = class {
5107
5289
  const data = await this.http.post(
5108
5290
  `/databases/${databaseId}/start`
5109
5291
  );
5110
- return unwrap29(data);
5292
+ return unwrap30(data);
5111
5293
  }
5112
5294
  async stop(databaseId) {
5113
5295
  const data = await this.http.post(`/databases/${databaseId}/stop`);
5114
- return unwrap29(data);
5296
+ return unwrap30(data);
5115
5297
  }
5116
5298
  async restart(databaseId) {
5117
5299
  const data = await this.http.post(
5118
5300
  `/databases/${databaseId}/restart`
5119
5301
  );
5120
- return unwrap29(data);
5302
+ return unwrap30(data);
5121
5303
  }
5122
5304
  // ── Credentials + logs ────────────────────────────────────────────────────
5123
5305
  async credentials(databaseId) {
5124
5306
  const data = await this.http.get(
5125
5307
  `/databases/${databaseId}/credentials`
5126
5308
  );
5127
- return unwrap29(data);
5309
+ return unwrap30(data);
5128
5310
  }
5129
5311
  async logs(databaseId, params = {}) {
5130
5312
  const query3 = stripUndefined15({
@@ -5154,7 +5336,7 @@ function attributionBody(p) {
5154
5336
  function idempotencyKey4(key) {
5155
5337
  return key ?? randomUUID();
5156
5338
  }
5157
- function unwrap30(payload) {
5339
+ function unwrap31(payload) {
5158
5340
  if (payload && typeof payload === "object" && "data" in payload) {
5159
5341
  return payload.data;
5160
5342
  }
@@ -5263,7 +5445,7 @@ var DeploymentVersions = class {
5263
5445
  const data = await this.http.get(
5264
5446
  `/deployments/${this.deploymentId}/versions/${versionId}`
5265
5447
  );
5266
- return unwrap30(data);
5448
+ return unwrap31(data);
5267
5449
  }
5268
5450
  async promote(versionId, opts = {}) {
5269
5451
  const body5 = stripUndefined16({ environment: opts.environment });
@@ -5275,14 +5457,14 @@ var DeploymentVersions = class {
5275
5457
  headers: { "Idempotency-Key": idempotencyKey4(opts.idempotencyKey) }
5276
5458
  }
5277
5459
  );
5278
- return unwrap30(data);
5460
+ return unwrap31(data);
5279
5461
  }
5280
5462
  async prepareMigrationBackup(versionId) {
5281
5463
  const data = await this.http.request(
5282
5464
  `/deployments/${this.deploymentId}/versions/${versionId}/migration-backup`,
5283
5465
  { method: "POST", body: {} }
5284
5466
  );
5285
- return unwrap30(data);
5467
+ return unwrap31(data);
5286
5468
  }
5287
5469
  };
5288
5470
  var DeploymentReleases = class {
@@ -5302,7 +5484,7 @@ var DeploymentReleases = class {
5302
5484
  const data = await this.http.get(
5303
5485
  `/deployments/${this.deploymentId}/releases/${releaseId}`
5304
5486
  );
5305
- return unwrap30(data);
5487
+ return unwrap31(data);
5306
5488
  }
5307
5489
  async promote(releaseId, idempotencyKey11) {
5308
5490
  const key = idempotencyKey11 ?? `promote:${this.deploymentId}:${releaseId}`;
@@ -5314,7 +5496,7 @@ var DeploymentReleases = class {
5314
5496
  headers: { "Idempotency-Key": key }
5315
5497
  }
5316
5498
  );
5317
- return unwrap30(data);
5499
+ return unwrap31(data);
5318
5500
  }
5319
5501
  };
5320
5502
  var DeploymentRuntimeInstances = class {
@@ -5334,14 +5516,14 @@ var DeploymentRuntimeInstances = class {
5334
5516
  const data = await this.http.get(
5335
5517
  `/deployments/${this.deploymentId}/runtime-instances/${instanceId}`
5336
5518
  );
5337
- return unwrap30(data);
5519
+ return unwrap31(data);
5338
5520
  }
5339
5521
  async logs(instanceId, lines = 100) {
5340
5522
  const data = await this.http.get(
5341
5523
  `/deployments/${this.deploymentId}/runtime-instances/${instanceId}/logs`,
5342
5524
  { lines }
5343
5525
  );
5344
- const unwrapped = unwrap30(data);
5526
+ const unwrapped = unwrap31(data);
5345
5527
  const result = { logs: String(unwrapped.logs ?? "") };
5346
5528
  if (typeof unwrapped.runtime_instance_id === "string") {
5347
5529
  result.runtime_instance_id = unwrapped.runtime_instance_id;
@@ -5376,7 +5558,7 @@ var DeploymentDomains = class {
5376
5558
  headers: { "Idempotency-Key": idempotencyKey4(params.idempotencyKey) }
5377
5559
  }
5378
5560
  );
5379
- return unwrap30(data);
5561
+ return unwrap31(data);
5380
5562
  }
5381
5563
  async list(filters = {}) {
5382
5564
  const data = await this.http.get(
@@ -5389,7 +5571,7 @@ var DeploymentDomains = class {
5389
5571
  const data = await this.http.post(
5390
5572
  `/deployments/${this.deploymentId}/domains/${domainId}/verify`
5391
5573
  );
5392
- return unwrap30(data);
5574
+ return unwrap31(data);
5393
5575
  }
5394
5576
  async delete(domainId) {
5395
5577
  await this.http.delete(
@@ -5419,7 +5601,7 @@ var Deployments = class {
5419
5601
  }
5420
5602
  async get(deploymentId) {
5421
5603
  const data = await this.http.get(`/deployments/${deploymentId}`);
5422
- return unwrap30(data);
5604
+ return unwrap31(data);
5423
5605
  }
5424
5606
  async create(params) {
5425
5607
  const body5 = stripUndefined16({
@@ -5438,7 +5620,7 @@ var Deployments = class {
5438
5620
  body: body5,
5439
5621
  headers: { "Idempotency-Key": idempotencyKey4(params.idempotencyKey) }
5440
5622
  });
5441
- return unwrap30(data);
5623
+ return unwrap31(data);
5442
5624
  }
5443
5625
  /**
5444
5626
  * Create a deployment that runs on the workspace's dedicated App Engine
@@ -5482,7 +5664,7 @@ var Deployments = class {
5482
5664
  const rawHost = await this.http.get(
5483
5665
  `/docker-deploy/hosts/${hostId}`
5484
5666
  );
5485
- host = unwrap30(
5667
+ host = unwrap31(
5486
5668
  rawHost
5487
5669
  );
5488
5670
  addDoctorCheck(
@@ -5633,7 +5815,7 @@ var Deployments = class {
5633
5815
  const rawHost = await this.http.get(
5634
5816
  `/docker-deploy/hosts/${hostId}`
5635
5817
  );
5636
- const host = unwrap30(
5818
+ const host = unwrap31(
5637
5819
  rawHost
5638
5820
  );
5639
5821
  addProofCheck(
@@ -5740,7 +5922,7 @@ var Deployments = class {
5740
5922
  `/deployments/${deploymentId}`,
5741
5923
  body5
5742
5924
  );
5743
- return unwrap30(data);
5925
+ return unwrap31(data);
5744
5926
  }
5745
5927
  async delete(deploymentId) {
5746
5928
  await this.http.delete(`/deployments/${deploymentId}`);
@@ -5760,7 +5942,7 @@ var Deployments = class {
5760
5942
  headers: { "Idempotency-Key": idempotencyKey4(params.idempotencyKey) }
5761
5943
  }
5762
5944
  );
5763
- return unwrap30(data);
5945
+ return unwrap31(data);
5764
5946
  }
5765
5947
  /**
5766
5948
  * Backward-compatible bridge: POST /sandboxes/:id/deploy. Works today;
@@ -5785,7 +5967,7 @@ var Deployments = class {
5785
5967
  headers: { "Idempotency-Key": idempotencyKey4(params.idempotencyKey) }
5786
5968
  }
5787
5969
  );
5788
- return unwrap30(data);
5970
+ return unwrap31(data);
5789
5971
  }
5790
5972
  async rollback(deploymentId, params = {}) {
5791
5973
  const body5 = stripUndefined16({
@@ -5799,7 +5981,7 @@ var Deployments = class {
5799
5981
  headers: { "Idempotency-Key": idempotencyKey4(params.idempotencyKey) }
5800
5982
  }
5801
5983
  );
5802
- return unwrap30(data);
5984
+ return unwrap31(data);
5803
5985
  }
5804
5986
  async listBuilds(deploymentId) {
5805
5987
  const data = await this.http.get(
@@ -5811,7 +5993,7 @@ var Deployments = class {
5811
5993
  const data = await this.http.get(
5812
5994
  `/deployments/${deploymentId}/builds/${buildId}`
5813
5995
  );
5814
- return unwrap30(data);
5996
+ return unwrap31(data);
5815
5997
  }
5816
5998
  async listEnv(deploymentId) {
5817
5999
  const data = await this.http.get(
@@ -5857,7 +6039,7 @@ var RUNTIME_BINARIES = {
5857
6039
  pi: ["pi"],
5858
6040
  custom: []
5859
6041
  };
5860
- function unwrap31(payload, keys = ["data"]) {
6042
+ function unwrap32(payload, keys = ["data"]) {
5861
6043
  if (payload && typeof payload === "object") {
5862
6044
  const p = payload;
5863
6045
  for (const key of keys) {
@@ -5916,7 +6098,7 @@ var Devices = class {
5916
6098
  /** Show one unified device by id. */
5917
6099
  async get(id) {
5918
6100
  const data = await this.http.get(`/devices/${devicePath(id)}`);
5919
- return unwrap31(data);
6101
+ return unwrap32(data);
5920
6102
  }
5921
6103
  show(id) {
5922
6104
  return this.get(id);
@@ -5926,7 +6108,7 @@ var Devices = class {
5926
6108
  const data = await this.http.get(
5927
6109
  `/devices/${devicePath(id)}/capabilities`
5928
6110
  );
5929
- return unwrap31(data);
6111
+ return unwrap32(data);
5930
6112
  }
5931
6113
  /** Execute a command inside the device. */
5932
6114
  async exec(id, params) {
@@ -5939,7 +6121,7 @@ var Devices = class {
5939
6121
  env: params.env
5940
6122
  })
5941
6123
  );
5942
- return unwrap31(data);
6124
+ return unwrap32(data);
5943
6125
  }
5944
6126
  /** List files inside the device filesystem. */
5945
6127
  async listFiles(id, params = {}) {
@@ -5955,7 +6137,7 @@ var Devices = class {
5955
6137
  `/devices/${devicePath(id)}/files/read`,
5956
6138
  queryFromFileParams(params)
5957
6139
  );
5958
- return unwrap31(data);
6140
+ return unwrap32(data);
5959
6141
  }
5960
6142
  /** Write a text or base64 payload into the device filesystem. */
5961
6143
  async writeFile(id, params) {
@@ -5967,7 +6149,7 @@ var Devices = class {
5967
6149
  content_base64: pickFirst5(params.contentBase64, params.content_base64)
5968
6150
  })
5969
6151
  );
5970
- return unwrap31(data);
6152
+ return unwrap32(data);
5971
6153
  }
5972
6154
  /** Expose a device port through MIOSA routing. */
5973
6155
  async expose(id, params) {
@@ -5975,44 +6157,44 @@ var Devices = class {
5975
6157
  `/devices/${devicePath(id)}/expose`,
5976
6158
  { port: params.port }
5977
6159
  );
5978
- return unwrap31(data);
6160
+ return unwrap32(data);
5979
6161
  }
5980
6162
  /** Return browser/desktop connection details for a computer-backed device. */
5981
6163
  async browser(id) {
5982
6164
  const data = await this.http.get(`/devices/${devicePath(id)}/browser`);
5983
- return unwrap31(data);
6165
+ return unwrap32(data);
5984
6166
  }
5985
6167
  async pause(id) {
5986
6168
  const data = await this.http.post(
5987
6169
  `/devices/${devicePath(id)}/pause`,
5988
6170
  {}
5989
6171
  );
5990
- return unwrap31(data);
6172
+ return unwrap32(data);
5991
6173
  }
5992
6174
  async stop(id) {
5993
6175
  const data = await this.http.post(
5994
6176
  `/devices/${devicePath(id)}/stop`,
5995
6177
  {}
5996
6178
  );
5997
- return unwrap31(data);
6179
+ return unwrap32(data);
5998
6180
  }
5999
6181
  async resume(id) {
6000
6182
  const data = await this.http.post(
6001
6183
  `/devices/${devicePath(id)}/resume`,
6002
6184
  {}
6003
6185
  );
6004
- return unwrap31(data);
6186
+ return unwrap32(data);
6005
6187
  }
6006
6188
  async extend(id, params) {
6007
6189
  const data = await this.http.post(
6008
6190
  `/devices/${devicePath(id)}/extend`,
6009
6191
  { timeout_sec: pickFirst5(params.timeoutSec, params.timeout_sec) }
6010
6192
  );
6011
- return unwrap31(data);
6193
+ return unwrap32(data);
6012
6194
  }
6013
6195
  async destroy(id) {
6014
6196
  const data = await this.http.delete(`/devices/${devicePath(id)}`);
6015
- return unwrap31(data);
6197
+ return unwrap32(data);
6016
6198
  }
6017
6199
  /**
6018
6200
  * Write a MIOSA runtime bootstrap manifest and optionally install/probe
@@ -6182,7 +6364,7 @@ var DockerDeploy = class {
6182
6364
  };
6183
6365
 
6184
6366
  // src/resources/email.ts
6185
- function unwrap32(data) {
6367
+ function unwrap33(data) {
6186
6368
  if (data && typeof data === "object") {
6187
6369
  const d = data;
6188
6370
  for (const k of [
@@ -6234,12 +6416,12 @@ var EmailCampaigns = class {
6234
6416
  );
6235
6417
  }
6236
6418
  async create(attrs) {
6237
- return unwrap32(
6419
+ return unwrap33(
6238
6420
  await this.http.post("/admin/email-campaigns", strip(attrs))
6239
6421
  );
6240
6422
  }
6241
6423
  async recipientCount(filters = {}) {
6242
- return unwrap32(
6424
+ return unwrap33(
6243
6425
  await this.http.get(
6244
6426
  "/admin/email-campaigns/recipient-count",
6245
6427
  filters
@@ -6247,7 +6429,7 @@ var EmailCampaigns = class {
6247
6429
  );
6248
6430
  }
6249
6431
  async send(campaignId, opts = {}) {
6250
- return unwrap32(
6432
+ return unwrap33(
6251
6433
  await this.http.post(
6252
6434
  `/admin/email-campaigns/${campaignId}/send`,
6253
6435
  strip(opts)
@@ -6255,7 +6437,7 @@ var EmailCampaigns = class {
6255
6437
  );
6256
6438
  }
6257
6439
  async cancel(campaignId) {
6258
- return unwrap32(
6440
+ return unwrap33(
6259
6441
  await this.http.post(
6260
6442
  `/admin/email-campaigns/${campaignId}/cancel`
6261
6443
  )
@@ -6281,7 +6463,7 @@ var EmailTemplates = class {
6281
6463
  );
6282
6464
  }
6283
6465
  async create(key, attrs = {}) {
6284
- return unwrap32(
6466
+ return unwrap33(
6285
6467
  await this.http.post("/admin/email-templates", {
6286
6468
  key,
6287
6469
  ...strip(attrs)
@@ -6289,7 +6471,7 @@ var EmailTemplates = class {
6289
6471
  );
6290
6472
  }
6291
6473
  async update(key, attrs) {
6292
- return unwrap32(
6474
+ return unwrap33(
6293
6475
  await this.http.put(
6294
6476
  `/admin/email-templates/${key}`,
6295
6477
  strip(attrs)
@@ -6297,7 +6479,7 @@ var EmailTemplates = class {
6297
6479
  );
6298
6480
  }
6299
6481
  async reset(key) {
6300
- return unwrap32(
6482
+ return unwrap33(
6301
6483
  await this.http.post(`/admin/email-templates/${key}/reset`)
6302
6484
  );
6303
6485
  }
@@ -6313,17 +6495,17 @@ var EmailInbox = class {
6313
6495
  );
6314
6496
  }
6315
6497
  async send(attrs) {
6316
- return unwrap32(
6498
+ return unwrap33(
6317
6499
  await this.http.post("/admin/email-inbox/send", strip(attrs))
6318
6500
  );
6319
6501
  }
6320
6502
  async markRead(messageId) {
6321
- return unwrap32(
6503
+ return unwrap33(
6322
6504
  await this.http.post(`/admin/email-inbox/${messageId}/read`)
6323
6505
  );
6324
6506
  }
6325
6507
  async archive(messageId) {
6326
- return unwrap32(
6508
+ return unwrap33(
6327
6509
  await this.http.post(`/admin/email-inbox/${messageId}/archive`)
6328
6510
  );
6329
6511
  }
@@ -6363,7 +6545,7 @@ var Embeddings = class {
6363
6545
  };
6364
6546
 
6365
6547
  // src/resources/external-keys.ts
6366
- function unwrap33(payload) {
6548
+ function unwrap34(payload) {
6367
6549
  if (payload && typeof payload === "object") {
6368
6550
  const p = payload;
6369
6551
  for (const k of ["data", "external_keys", "items"]) {
@@ -6385,7 +6567,7 @@ var ExternalKeys = class {
6385
6567
  /** List configured external keys. */
6386
6568
  async list() {
6387
6569
  const data = await this.http.get("/external-keys");
6388
- const result = unwrap33(data);
6570
+ const result = unwrap34(data);
6389
6571
  if (Array.isArray(result)) return result;
6390
6572
  return [];
6391
6573
  }
@@ -6393,14 +6575,14 @@ var ExternalKeys = class {
6393
6575
  async create(params) {
6394
6576
  const body5 = stripUndefined18(params);
6395
6577
  const data = await this.http.post("/external-keys", body5);
6396
- return unwrap33(data);
6578
+ return unwrap34(data);
6397
6579
  }
6398
6580
  /** Resolve (preview) the stored key for a provider. */
6399
6581
  async resolve(provider) {
6400
6582
  const data = await this.http.get(
6401
6583
  `/external-keys/${provider}/resolve`
6402
6584
  );
6403
- return unwrap33(data);
6585
+ return unwrap34(data);
6404
6586
  }
6405
6587
  /**
6406
6588
  * Delete the stored key for a provider.
@@ -6410,7 +6592,7 @@ var ExternalKeys = class {
6410
6592
  await this.http.delete(`/external-keys/${provider}`);
6411
6593
  }
6412
6594
  };
6413
- function unwrap34(payload) {
6595
+ function unwrap35(payload) {
6414
6596
  if (payload && typeof payload === "object" && "data" in payload) {
6415
6597
  return payload.data;
6416
6598
  }
@@ -6463,13 +6645,13 @@ var FlatCustomDomains = class {
6463
6645
  body: body5,
6464
6646
  headers: { "Idempotency-Key": idempotencyKey5(ikey) }
6465
6647
  });
6466
- return unwrap34(data);
6648
+ return unwrap35(data);
6467
6649
  }
6468
6650
  async delete(domainId) {
6469
6651
  await this.http.delete(`/custom-domains/${domainId}`);
6470
6652
  }
6471
6653
  };
6472
- function unwrap35(payload) {
6654
+ function unwrap36(payload) {
6473
6655
  if (payload && typeof payload === "object" && "data" in payload) {
6474
6656
  return payload.data;
6475
6657
  }
@@ -6505,7 +6687,7 @@ var Functions = class {
6505
6687
  }
6506
6688
  async get(functionId) {
6507
6689
  const data = await this.http.get(`/functions/${functionId}`);
6508
- return unwrap35(data);
6690
+ return unwrap36(data);
6509
6691
  }
6510
6692
  async create(params) {
6511
6693
  const { idempotencyKey: ikey, memoryMb, timeoutSec, ...rest } = params;
@@ -6519,7 +6701,7 @@ var Functions = class {
6519
6701
  body: body5,
6520
6702
  headers: { "Idempotency-Key": idempotencyKey6(ikey) }
6521
6703
  });
6522
- return unwrap35(data);
6704
+ return unwrap36(data);
6523
6705
  }
6524
6706
  async update(functionId, params) {
6525
6707
  const { memoryMb, timeoutSec, ...rest } = params;
@@ -6532,7 +6714,7 @@ var Functions = class {
6532
6714
  `/functions/${functionId}`,
6533
6715
  body5
6534
6716
  );
6535
- return unwrap35(data);
6717
+ return unwrap36(data);
6536
6718
  }
6537
6719
  async delete(functionId) {
6538
6720
  await this.http.delete(`/functions/${functionId}`);
@@ -6553,7 +6735,7 @@ var Functions = class {
6553
6735
  return data ?? {};
6554
6736
  }
6555
6737
  };
6556
- function unwrap36(payload) {
6738
+ function unwrap37(payload) {
6557
6739
  if (payload && typeof payload === "object" && "data" in payload) {
6558
6740
  return payload.data;
6559
6741
  }
@@ -6589,7 +6771,7 @@ var HealthChecks = class {
6589
6771
  }
6590
6772
  async get(checkId) {
6591
6773
  const data = await this.http.get(`/health-checks/${checkId}`);
6592
- return unwrap36(data);
6774
+ return unwrap37(data);
6593
6775
  }
6594
6776
  async create(params) {
6595
6777
  const {
@@ -6610,7 +6792,7 @@ var HealthChecks = class {
6610
6792
  body: body5,
6611
6793
  headers: { "Idempotency-Key": idempotencyKey7(ikey) }
6612
6794
  });
6613
- return unwrap36(data);
6795
+ return unwrap37(data);
6614
6796
  }
6615
6797
  async update(checkId, params) {
6616
6798
  const { intervalSec, timeoutSec, expectedStatus, ...rest } = params;
@@ -6624,7 +6806,7 @@ var HealthChecks = class {
6624
6806
  `/health-checks/${checkId}`,
6625
6807
  body5
6626
6808
  );
6627
- return unwrap36(data);
6809
+ return unwrap37(data);
6628
6810
  }
6629
6811
  async delete(checkId) {
6630
6812
  await this.http.delete(`/health-checks/${checkId}`);
@@ -6632,7 +6814,7 @@ var HealthChecks = class {
6632
6814
  };
6633
6815
 
6634
6816
  // src/resources/integrations.ts
6635
- function unwrap37(payload) {
6817
+ function unwrap38(payload) {
6636
6818
  if (payload && typeof payload === "object") {
6637
6819
  const p = payload;
6638
6820
  for (const k of ["data", "integrations", "catalog", "items"]) {
@@ -6642,7 +6824,7 @@ function unwrap37(payload) {
6642
6824
  return payload;
6643
6825
  }
6644
6826
  function listItems8(payload) {
6645
- const result = unwrap37(payload);
6827
+ const result = unwrap38(payload);
6646
6828
  if (Array.isArray(result)) return result;
6647
6829
  return [];
6648
6830
  }
@@ -6671,14 +6853,14 @@ var Integrations = class {
6671
6853
  const data = await this.http.get(
6672
6854
  `/integrations/${provider}/start`
6673
6855
  );
6674
- return unwrap37(data);
6856
+ return unwrap38(data);
6675
6857
  }
6676
6858
  /** Force-refresh the access token for a provider. */
6677
6859
  async refresh(provider) {
6678
6860
  const data = await this.http.post(
6679
6861
  `/integrations/${provider}/refresh`
6680
6862
  );
6681
- return unwrap37(data);
6863
+ return unwrap38(data);
6682
6864
  }
6683
6865
  /** Disconnect (revoke) an integration. */
6684
6866
  async disconnect(provider) {
@@ -6703,7 +6885,7 @@ var Integrations = class {
6703
6885
  "/integrations/slack/send-test",
6704
6886
  body5
6705
6887
  );
6706
- return unwrap37(data);
6888
+ return unwrap38(data);
6707
6889
  }
6708
6890
  /** Send a test message to the connected Discord channel. */
6709
6891
  async discordSendTest(params = {}) {
@@ -6712,13 +6894,13 @@ var Integrations = class {
6712
6894
  "/integrations/discord/send-test",
6713
6895
  body5
6714
6896
  );
6715
- return unwrap37(data);
6897
+ return unwrap38(data);
6716
6898
  }
6717
6899
  // ── Linear dedicated controller ────────────────────────────────────────────
6718
6900
  /** Begin Linear OAuth — Linear has provider-specific error shapes. */
6719
6901
  async linearStart() {
6720
6902
  const data = await this.http.get("/integrations/linear/start");
6721
- return unwrap37(data);
6903
+ return unwrap38(data);
6722
6904
  }
6723
6905
  /** Create a Linear issue via the connected workspace. */
6724
6906
  async linearCreateIssue(params = {}) {
@@ -6727,12 +6909,12 @@ var Integrations = class {
6727
6909
  "/integrations/linear/create-issue",
6728
6910
  body5
6729
6911
  );
6730
- return unwrap37(data);
6912
+ return unwrap38(data);
6731
6913
  }
6732
6914
  };
6733
6915
 
6734
6916
  // src/resources/mcp.ts
6735
- function unwrap38(payload) {
6917
+ function unwrap39(payload) {
6736
6918
  if (payload && typeof payload === "object") {
6737
6919
  const p = payload;
6738
6920
  for (const k of ["data", "mcp", "result", "items"]) {
@@ -6758,7 +6940,7 @@ var Mcp = class {
6758
6940
  "/mcp",
6759
6941
  Object.keys(body5).length > 0 ? body5 : void 0
6760
6942
  );
6761
- return unwrap38(data);
6943
+ return unwrap39(data);
6762
6944
  }
6763
6945
  /**
6764
6946
  * Open the MCP listen channel (GET).
@@ -6768,7 +6950,7 @@ var Mcp = class {
6768
6950
  */
6769
6951
  async listen() {
6770
6952
  const data = await this.http.get("/mcp");
6771
- return unwrap38(data);
6953
+ return unwrap39(data);
6772
6954
  }
6773
6955
  /** Close (terminate) the MCP session. */
6774
6956
  async close() {
@@ -6777,7 +6959,7 @@ var Mcp = class {
6777
6959
  };
6778
6960
 
6779
6961
  // src/resources/models.ts
6780
- function unwrap39(data) {
6962
+ function unwrap40(data) {
6781
6963
  if (Array.isArray(data)) return data;
6782
6964
  if (data && typeof data === "object") {
6783
6965
  const d = data;
@@ -6798,7 +6980,7 @@ var Models = class {
6798
6980
  Object.entries(filters).filter(([, v]) => v !== void 0)
6799
6981
  );
6800
6982
  const data = await this.http.get("/intelligence/models", query3);
6801
- return unwrap39(data);
6983
+ return unwrap40(data);
6802
6984
  }
6803
6985
  /**
6804
6986
  * Get a single model by id.
@@ -7454,7 +7636,7 @@ function requestBody(params) {
7454
7636
  config: authConfig(params)
7455
7637
  });
7456
7638
  }
7457
- function unwrap40(payload) {
7639
+ function unwrap41(payload) {
7458
7640
  if (payload && typeof payload === "object") {
7459
7641
  const p = payload;
7460
7642
  for (const k of ["data", "project_auth", "config", "items"]) {
@@ -7479,13 +7661,13 @@ var ProjectAuth = class {
7479
7661
  "/project-auth/status",
7480
7662
  resourcePayload(params)
7481
7663
  );
7482
- return unwrap40(data);
7664
+ return unwrap41(data);
7483
7665
  }
7484
7666
  /** Enable project auth. */
7485
7667
  async enable(params) {
7486
7668
  const body5 = requestBody(params);
7487
7669
  const data = await this.http.post("/project-auth/enable", body5);
7488
- return unwrap40(data);
7670
+ return unwrap41(data);
7489
7671
  }
7490
7672
  /** Disable project auth. */
7491
7673
  async disable(params) {
@@ -7493,18 +7675,18 @@ var ProjectAuth = class {
7493
7675
  "/project-auth/disable",
7494
7676
  resourcePayload(params)
7495
7677
  );
7496
- return unwrap40(data);
7678
+ return unwrap41(data);
7497
7679
  }
7498
7680
  /** Update project-auth configuration. */
7499
7681
  async update(params) {
7500
7682
  const body5 = requestBody(params);
7501
7683
  const data = await this.http.patch("/project-auth/config", body5);
7502
- return unwrap40(data);
7684
+ return unwrap41(data);
7503
7685
  }
7504
7686
  };
7505
7687
 
7506
7688
  // src/resources/project-integrations.ts
7507
- function unwrap41(payload) {
7689
+ function unwrap42(payload) {
7508
7690
  if (payload && typeof payload === "object") {
7509
7691
  const p = payload;
7510
7692
  for (const k of ["data", "project_integrations", "catalog", "items"]) {
@@ -7514,7 +7696,7 @@ function unwrap41(payload) {
7514
7696
  return payload;
7515
7697
  }
7516
7698
  function listItems9(payload) {
7517
- const result = unwrap41(payload);
7699
+ const result = unwrap42(payload);
7518
7700
  if (Array.isArray(result)) return result;
7519
7701
  return [];
7520
7702
  }
@@ -7549,13 +7731,13 @@ var ProjectIntegrations = class {
7549
7731
  const data = await this.http.get(
7550
7732
  `/project-integrations/${integrationId}`
7551
7733
  );
7552
- return unwrap41(data);
7734
+ return unwrap42(data);
7553
7735
  }
7554
7736
  /** Create a project integration. */
7555
7737
  async create(params) {
7556
7738
  const body5 = stripUndefObj2(params);
7557
7739
  const data = await this.http.post("/project-integrations", body5);
7558
- return unwrap41(data);
7740
+ return unwrap42(data);
7559
7741
  }
7560
7742
  /** Update a project integration. */
7561
7743
  async update(integrationId, params) {
@@ -7564,7 +7746,7 @@ var ProjectIntegrations = class {
7564
7746
  `/project-integrations/${integrationId}`,
7565
7747
  body5
7566
7748
  );
7567
- return unwrap41(data);
7749
+ return unwrap42(data);
7568
7750
  }
7569
7751
  /** Delete a project integration. */
7570
7752
  async delete(integrationId) {
@@ -7573,7 +7755,7 @@ var ProjectIntegrations = class {
7573
7755
  };
7574
7756
 
7575
7757
  // src/resources/provider-defaults.ts
7576
- function unwrap42(data) {
7758
+ function unwrap43(data) {
7577
7759
  if (data && typeof data === "object") {
7578
7760
  const d = data;
7579
7761
  for (const k of ["data", "defaults", "provider_defaults", "config"]) {
@@ -7589,7 +7771,7 @@ var ProviderDefaults = class {
7589
7771
  http;
7590
7772
  /** Get the current fleet-wide provider defaults. */
7591
7773
  async list() {
7592
- return unwrap42(await this.http.get("/admin/provider-defaults"));
7774
+ return unwrap43(await this.http.get("/admin/provider-defaults"));
7593
7775
  }
7594
7776
  /** Return the defaults entry for a single provider, or {} if missing. */
7595
7777
  async get(provider) {
@@ -7605,13 +7787,13 @@ var ProviderDefaults = class {
7605
7787
  const body5 = Object.fromEntries(
7606
7788
  Object.entries(opts).filter(([, v]) => v !== void 0)
7607
7789
  );
7608
- return unwrap42(
7790
+ return unwrap43(
7609
7791
  await this.http.put("/admin/provider-defaults", body5)
7610
7792
  );
7611
7793
  }
7612
7794
  // ── Per-tenant overrides ────────────────────────────────────────────────
7613
7795
  async getTenant(tenantId) {
7614
- return unwrap42(
7796
+ return unwrap43(
7615
7797
  await this.http.get(
7616
7798
  `/admin/tenants/${tenantId}/provider-config`
7617
7799
  )
@@ -7621,7 +7803,7 @@ var ProviderDefaults = class {
7621
7803
  const body5 = Object.fromEntries(
7622
7804
  Object.entries(opts).filter(([, v]) => v !== void 0)
7623
7805
  );
7624
- return unwrap42(
7806
+ return unwrap43(
7625
7807
  await this.http.put(
7626
7808
  `/admin/tenants/${tenantId}/provider-config`,
7627
7809
  body5
@@ -7634,7 +7816,7 @@ var ProviderDefaults = class {
7634
7816
  };
7635
7817
 
7636
7818
  // src/resources/regions.ts
7637
- function unwrap43(payload) {
7819
+ function unwrap44(payload) {
7638
7820
  if (payload && typeof payload === "object") {
7639
7821
  const p = payload;
7640
7822
  for (const k of [
@@ -7651,7 +7833,7 @@ function unwrap43(payload) {
7651
7833
  return payload;
7652
7834
  }
7653
7835
  function listItems10(payload) {
7654
- const result = unwrap43(payload);
7836
+ const result = unwrap44(payload);
7655
7837
  if (Array.isArray(result)) return result;
7656
7838
  return [];
7657
7839
  }
@@ -7668,7 +7850,7 @@ var Regions = class {
7668
7850
  /** Get canonical compute catalog, including product templates and readiness. */
7669
7851
  async catalog() {
7670
7852
  const data = await this.http.get("/compute/catalog");
7671
- return unwrap43(data);
7853
+ return unwrap44(data);
7672
7854
  }
7673
7855
  /** List available compute sizes. */
7674
7856
  async listSizes() {
@@ -7678,7 +7860,7 @@ var Regions = class {
7678
7860
  /** Get static compute pricing data. */
7679
7861
  async pricing() {
7680
7862
  const data = await this.http.get("/compute/pricing");
7681
- return unwrap43(data);
7863
+ return unwrap44(data);
7682
7864
  }
7683
7865
  /** List community computer templates. */
7684
7866
  async listTemplates() {
@@ -7690,12 +7872,12 @@ var Regions = class {
7690
7872
  const data = await this.http.get(
7691
7873
  `/compute/templates/${templateId}`
7692
7874
  );
7693
- return unwrap43(data);
7875
+ return unwrap44(data);
7694
7876
  }
7695
7877
  };
7696
7878
 
7697
7879
  // src/resources/runtime-env.ts
7698
- function unwrap44(payload) {
7880
+ function unwrap45(payload) {
7699
7881
  if (payload !== null && typeof payload === "object" && "data" in payload && payload.data !== void 0) {
7700
7882
  return payload.data;
7701
7883
  }
@@ -7748,11 +7930,11 @@ var RuntimeEnv = class {
7748
7930
  "/runtime-env",
7749
7931
  query2(params)
7750
7932
  );
7751
- return unwrap44(response).map(normalize2);
7933
+ return unwrap45(response).map(normalize2);
7752
7934
  }
7753
7935
  async get(id) {
7754
7936
  return normalize2(
7755
- unwrap44(
7937
+ unwrap45(
7756
7938
  await this.http.get(
7757
7939
  `/runtime-env/${encodeURIComponent(id)}`
7758
7940
  )
@@ -7761,7 +7943,7 @@ var RuntimeEnv = class {
7761
7943
  }
7762
7944
  async set(params) {
7763
7945
  return normalize2(
7764
- unwrap44(
7946
+ unwrap45(
7765
7947
  await this.http.post(
7766
7948
  "/runtime-env",
7767
7949
  body4(params)
@@ -7775,7 +7957,7 @@ var RuntimeEnv = class {
7775
7957
  };
7776
7958
 
7777
7959
  // src/resources/runtime-capabilities.ts
7778
- function unwrap45(payload) {
7960
+ function unwrap46(payload) {
7779
7961
  if (payload && typeof payload === "object" && "data" in payload) {
7780
7962
  return payload.data;
7781
7963
  }
@@ -7787,7 +7969,7 @@ var RuntimeCapabilitiesResource = class {
7787
7969
  }
7788
7970
  http;
7789
7971
  async get() {
7790
- return unwrap45(
7972
+ return unwrap46(
7791
7973
  await this.http.get("/runtime-capabilities")
7792
7974
  );
7793
7975
  }
@@ -7817,7 +7999,7 @@ var AGENT_WORKSPACE_KEEP_LAST_SNAPSHOTS = 1;
7817
7999
  function isLegacyForkParams(opts) {
7818
8000
  return "name" in opts || "metadata" in opts;
7819
8001
  }
7820
- function unwrap46(payload) {
8002
+ function unwrap47(payload) {
7821
8003
  if (payload !== null && typeof payload === "object" && "data" in payload && payload.data !== void 0) {
7822
8004
  return payload.data;
7823
8005
  }
@@ -7920,6 +8102,12 @@ function createBody(params = {}) {
7920
8102
  slug: params.slug,
7921
8103
  agent_runtime_profile_id: params.agentRuntimeProfileId ?? params.agent_runtime_profile_id ?? params.agentProfileId ?? params.agent_profile_id,
7922
8104
  skip_agent_runtime_profile: params.skipRuntimeProfile ?? params.skip_agent_runtime_profile,
8105
+ workspace_id: params.workspaceId ?? params.workspace_id,
8106
+ workspace_slug: params.workspaceSlug ?? params.workspace_slug,
8107
+ workspace_name: params.workspaceName ?? params.workspace_name,
8108
+ project_id: params.projectId ?? params.project_id,
8109
+ project_slug: params.projectSlug ?? params.project_slug,
8110
+ project_name: params.projectName ?? params.project_name,
7923
8111
  external_workspace_id: params.externalWorkspaceId ?? params.external_workspace_id,
7924
8112
  external_user_id: params.externalUserId ?? params.external_user_id,
7925
8113
  external_project_id: params.externalProjectId ?? params.external_project_id
@@ -8078,7 +8266,7 @@ var SandboxTerminal = class {
8078
8266
  const body5 = Object.fromEntries(
8079
8267
  Object.entries(params).filter(([, v]) => v !== void 0)
8080
8268
  );
8081
- const response = unwrap46(
8269
+ const response = unwrap47(
8082
8270
  await this.sandbox.http.post(`/sandboxes/${this.sandbox.id}/terminal`, body5)
8083
8271
  );
8084
8272
  return response;
@@ -8136,7 +8324,7 @@ var SandboxPreviews = class {
8136
8324
  Object.entries(opts).filter(([, v]) => v !== void 0)
8137
8325
  )
8138
8326
  };
8139
- return unwrap46(
8327
+ return unwrap47(
8140
8328
  await this.http.post(
8141
8329
  `/sandboxes/${this.sandbox.id}/previews`,
8142
8330
  body5
@@ -8144,7 +8332,7 @@ var SandboxPreviews = class {
8144
8332
  );
8145
8333
  }
8146
8334
  async get(previewId) {
8147
- return unwrap46(
8335
+ return unwrap47(
8148
8336
  await this.http.get(
8149
8337
  `/sandboxes/${this.sandbox.id}/previews/${previewId}`
8150
8338
  )
@@ -8157,7 +8345,7 @@ var SandboxPreviews = class {
8157
8345
  }
8158
8346
  /** Mint a share token for previewId. */
8159
8347
  async share(previewId, opts = {}) {
8160
- return unwrap46(
8348
+ return unwrap47(
8161
8349
  await this.http.post(
8162
8350
  `/sandboxes/${this.sandbox.id}/previews/${previewId}/share`,
8163
8351
  { ttl_seconds: opts.ttl_seconds ?? opts.expires_in_sec ?? 3600 }
@@ -8226,7 +8414,7 @@ var SandboxTags = class {
8226
8414
  sandbox;
8227
8415
  /** Replace the full tag list with tags. */
8228
8416
  async set(tags) {
8229
- return unwrap46(
8417
+ return unwrap47(
8230
8418
  await this.sandbox.http.patch(`/sandboxes/${this.sandbox.id}/tags`, { tags })
8231
8419
  );
8232
8420
  }
@@ -8300,7 +8488,7 @@ var Sandbox = class _Sandbox {
8300
8488
  return this.data.template_id ?? this.data.image_id ?? "";
8301
8489
  }
8302
8490
  async refresh() {
8303
- this.data = unwrap46(
8491
+ this.data = unwrap47(
8304
8492
  await this.http.get(`/sandboxes/${this.id}`)
8305
8493
  );
8306
8494
  return this;
@@ -8342,7 +8530,7 @@ var Sandbox = class _Sandbox {
8342
8530
  }
8343
8531
  async runExec(command, options) {
8344
8532
  this.assertRunning("exec");
8345
- const response = unwrap46(
8533
+ const response = unwrap47(
8346
8534
  await this.http.post(
8347
8535
  `/sandboxes/${this.id}/exec`,
8348
8536
  execBody(command, options)
@@ -8387,7 +8575,7 @@ var Sandbox = class _Sandbox {
8387
8575
  }
8388
8576
  async createExport(params) {
8389
8577
  const body5 = typeof params === "string" ? { path: params } : Array.isArray(params) ? { paths: params } : params;
8390
- const response = unwrap46(
8578
+ const response = unwrap47(
8391
8579
  await this.http.post(
8392
8580
  `/sandboxes/${this.id}/exports`,
8393
8581
  body5
@@ -8412,7 +8600,7 @@ var Sandbox = class _Sandbox {
8412
8600
  }
8413
8601
  async listFiles(path = "/workspace") {
8414
8602
  this.assertRunning("files.list");
8415
- const response = unwrap46(
8603
+ const response = unwrap47(
8416
8604
  await this.http.get(
8417
8605
  `/sandboxes/${this.id}/files`,
8418
8606
  { path }
@@ -8422,7 +8610,7 @@ var Sandbox = class _Sandbox {
8422
8610
  }
8423
8611
  async statFile(path) {
8424
8612
  this.assertRunning("files.stat");
8425
- return unwrap46(
8613
+ return unwrap47(
8426
8614
  await this.http.post(
8427
8615
  `/sandboxes/${this.id}/files/stat`,
8428
8616
  { path }
@@ -8442,7 +8630,7 @@ var Sandbox = class _Sandbox {
8442
8630
  }
8443
8631
  async exposeInfo(port) {
8444
8632
  this.assertRunning("expose");
8445
- const response = unwrap46(
8633
+ const response = unwrap47(
8446
8634
  await this.http.post(
8447
8635
  `/sandboxes/${this.id}/expose`,
8448
8636
  port === void 0 ? {} : { port }
@@ -8452,7 +8640,7 @@ var Sandbox = class _Sandbox {
8452
8640
  }
8453
8641
  async startTemplate(options = {}) {
8454
8642
  this.assertRunning("startTemplate");
8455
- return unwrap46(
8643
+ return unwrap47(
8456
8644
  await this.http.post(
8457
8645
  `/sandboxes/${this.id}/template/start`,
8458
8646
  options
@@ -8460,7 +8648,7 @@ var Sandbox = class _Sandbox {
8460
8648
  );
8461
8649
  }
8462
8650
  async getArtifacts() {
8463
- return unwrap46(
8651
+ return unwrap47(
8464
8652
  await this.http.get(
8465
8653
  `/sandboxes/${this.id}/artifacts`
8466
8654
  )
@@ -8471,7 +8659,7 @@ var Sandbox = class _Sandbox {
8471
8659
  `/sandboxes/${this.id}/logs`,
8472
8660
  { lines }
8473
8661
  );
8474
- return unwrap46(response);
8662
+ return unwrap47(response);
8475
8663
  }
8476
8664
  streamLogs() {
8477
8665
  return this.http.stream(
@@ -8479,7 +8667,7 @@ var Sandbox = class _Sandbox {
8479
8667
  );
8480
8668
  }
8481
8669
  async metrics(window2 = "1h") {
8482
- return unwrap46(
8670
+ return unwrap47(
8483
8671
  await this.http.get(
8484
8672
  `/sandboxes/${this.id}/metrics`,
8485
8673
  { window: window2 }
@@ -8491,7 +8679,7 @@ var Sandbox = class _Sandbox {
8491
8679
  }
8492
8680
  async createSnapshot(comment) {
8493
8681
  this.assertRunning("snapshots.create");
8494
- return unwrap46(
8682
+ return unwrap47(
8495
8683
  await this.http.post(
8496
8684
  `/sandboxes/${this.id}/snapshots`,
8497
8685
  comment ? { comment } : {}
@@ -8499,14 +8687,14 @@ var Sandbox = class _Sandbox {
8499
8687
  );
8500
8688
  }
8501
8689
  async listSnapshots() {
8502
- return unwrap46(
8690
+ return unwrap47(
8503
8691
  await this.http.get(
8504
8692
  `/sandboxes/${this.id}/snapshots`
8505
8693
  )
8506
8694
  );
8507
8695
  }
8508
8696
  async restoreSnapshot(snapshotId) {
8509
- const data = unwrap46(
8697
+ const data = unwrap47(
8510
8698
  await this.http.post(
8511
8699
  `/sandboxes/${this.id}/restore/${snapshotId}`,
8512
8700
  {}
@@ -8527,7 +8715,7 @@ var Sandbox = class _Sandbox {
8527
8715
  template_id: opts.templateId ?? opts.template_id
8528
8716
  });
8529
8717
  const idempotencyKey11 = opts.idempotencyKey ?? opts.idempotency_key;
8530
- const data = unwrap46(
8718
+ const data = unwrap47(
8531
8719
  await this.http.request(
8532
8720
  `/sandboxes/${this.id}/fork`,
8533
8721
  {
@@ -8549,7 +8737,7 @@ var Sandbox = class _Sandbox {
8549
8737
  metadata: opts.metadata
8550
8738
  });
8551
8739
  const idempotencyKey11 = opts.idempotencyKey ?? opts.idempotency_key;
8552
- const data = unwrap46(
8740
+ const data = unwrap47(
8553
8741
  await this.http.request(
8554
8742
  `/sandboxes/${this.id}/fork`,
8555
8743
  {
@@ -8585,7 +8773,7 @@ var Sandbox = class _Sandbox {
8585
8773
  timeout_sec: params.timeout_sec ?? params.timeoutSec,
8586
8774
  idle_timeout_sec: params.idle_timeout_sec ?? params.idleTimeoutSec
8587
8775
  });
8588
- const data = unwrap46(
8776
+ const data = unwrap47(
8589
8777
  await this.http.patch(
8590
8778
  `/sandboxes/${this.id}`,
8591
8779
  body5
@@ -8595,7 +8783,7 @@ var Sandbox = class _Sandbox {
8595
8783
  return this;
8596
8784
  }
8597
8785
  async extend(timeoutSec) {
8598
- const data = unwrap46(
8786
+ const data = unwrap47(
8599
8787
  await this.http.post(
8600
8788
  `/sandboxes/${this.id}/extend`,
8601
8789
  timeoutSec === void 0 ? {} : { timeout_sec: timeoutSec }
@@ -8605,7 +8793,7 @@ var Sandbox = class _Sandbox {
8605
8793
  return this;
8606
8794
  }
8607
8795
  async usage() {
8608
- return unwrap46(
8796
+ return unwrap47(
8609
8797
  await this.http.get(
8610
8798
  `/sandboxes/${this.id}/usage`
8611
8799
  )
@@ -8625,7 +8813,7 @@ var Sandbox = class _Sandbox {
8625
8813
  return raw;
8626
8814
  }
8627
8815
  async pause() {
8628
- const data = unwrap46(
8816
+ const data = unwrap47(
8629
8817
  await this.http.post(
8630
8818
  `/sandboxes/${this.id}/pause`,
8631
8819
  {}
@@ -8646,7 +8834,7 @@ var Sandbox = class _Sandbox {
8646
8834
  `/sandboxes/${this.id}/resume`,
8647
8835
  {}
8648
8836
  );
8649
- const data = unwrap46(response);
8837
+ const data = unwrap47(response);
8650
8838
  this.data = { ...this.data, ...data };
8651
8839
  return this;
8652
8840
  }
@@ -8677,7 +8865,7 @@ var Sandbox = class _Sandbox {
8677
8865
  if (idempotencyKey11) {
8678
8866
  requestOptions.headers = { "Idempotency-Key": idempotencyKey11 };
8679
8867
  }
8680
- return unwrap46(
8868
+ return unwrap47(
8681
8869
  await this.http.request(
8682
8870
  `/sandboxes/${this.id}/deploy`,
8683
8871
  requestOptions
@@ -8689,7 +8877,7 @@ var Sandbox = class _Sandbox {
8689
8877
  }
8690
8878
  /** Check readiness of the sandbox (GET /sandboxes/:id/readiness). */
8691
8879
  async readiness() {
8692
- return unwrap46(
8880
+ return unwrap47(
8693
8881
  await this.http.get(
8694
8882
  `/sandboxes/${this.id}/readiness`
8695
8883
  )
@@ -8857,7 +9045,7 @@ var Sandboxes = class {
8857
9045
  if (idempotencyKey11) {
8858
9046
  requestOptions.headers = { "Idempotency-Key": idempotencyKey11 };
8859
9047
  }
8860
- const data = unwrap46(
9048
+ const data = unwrap47(
8861
9049
  await this.http.request(
8862
9050
  "/sandboxes",
8863
9051
  requestOptions
@@ -8876,7 +9064,7 @@ var Sandboxes = class {
8876
9064
  return listItems11(data).map((item) => new Sandbox(this.http, item));
8877
9065
  }
8878
9066
  async get(id) {
8879
- const data = unwrap46(
9067
+ const data = unwrap47(
8880
9068
  await this.http.get(`/sandboxes/${id}`)
8881
9069
  );
8882
9070
  return new Sandbox(this.http, data);
@@ -8904,7 +9092,7 @@ var Sandboxes = class {
8904
9092
  return this.get(id);
8905
9093
  }
8906
9094
  async getByName(name) {
8907
- const data = unwrap46(
9095
+ const data = unwrap47(
8908
9096
  await this.http.get(
8909
9097
  `/sandboxes/by-name/${encodeURIComponent(name)}`
8910
9098
  )
@@ -8951,7 +9139,7 @@ var Sandboxes = class {
8951
9139
  );
8952
9140
  }
8953
9141
  async validateBuildSpec(buildSpec) {
8954
- return unwrap46(
9142
+ return unwrap47(
8955
9143
  await this.http.post(
8956
9144
  "/sandbox-templates/validate",
8957
9145
  {
@@ -8971,7 +9159,7 @@ var Sandboxes = class {
8971
9159
  metadata: params.metadata
8972
9160
  })
8973
9161
  );
8974
- return unwrap46(response);
9162
+ return unwrap47(response);
8975
9163
  }
8976
9164
  async createTemplateBuild(templateId, params = {}) {
8977
9165
  const response = await this.http.post(
@@ -8981,19 +9169,19 @@ var Sandboxes = class {
8981
9169
  metadata: params.metadata
8982
9170
  })
8983
9171
  );
8984
- return unwrap46(response);
9172
+ return unwrap47(response);
8985
9173
  }
8986
9174
  async listTemplateBuilds(templateId) {
8987
9175
  const response = await this.http.get(
8988
9176
  `/sandbox-templates/${templateId}/builds`
8989
9177
  );
8990
- return unwrap46(response);
9178
+ return unwrap47(response);
8991
9179
  }
8992
9180
  async getTemplateBuild(buildId) {
8993
9181
  const response = await this.http.get(
8994
9182
  `/sandbox-template-builds/${buildId}`
8995
9183
  );
8996
- return unwrap46(response);
9184
+ return unwrap47(response);
8997
9185
  }
8998
9186
  };
8999
9187
  function toBase642(bytes) {
@@ -9025,7 +9213,7 @@ function previewInfoFromResponse(response) {
9025
9213
  )
9026
9214
  };
9027
9215
  }
9028
- function unwrap47(payload) {
9216
+ function unwrap48(payload) {
9029
9217
  if (payload && typeof payload === "object" && "data" in payload) {
9030
9218
  return payload.data;
9031
9219
  }
@@ -9068,7 +9256,7 @@ var SandboxTemplates = class {
9068
9256
  const data = await this.http.get(
9069
9257
  `/sandbox-templates/${templateId}`
9070
9258
  );
9071
- return unwrap47(data);
9259
+ return unwrap48(data);
9072
9260
  }
9073
9261
  async create(params) {
9074
9262
  const {
@@ -9088,7 +9276,7 @@ var SandboxTemplates = class {
9088
9276
  body: body5,
9089
9277
  headers: { "Idempotency-Key": idempotencyKey8(ikey) }
9090
9278
  });
9091
- return unwrap47(data);
9279
+ return unwrap48(data);
9092
9280
  }
9093
9281
  async buildSpecSchema() {
9094
9282
  const data = await this.http.get("/sandbox-templates/build-spec");
@@ -9121,12 +9309,12 @@ var SandboxTemplates = class {
9121
9309
  headers: { "Idempotency-Key": idempotencyKey8(ikey) }
9122
9310
  }
9123
9311
  );
9124
- return unwrap47(data);
9312
+ return unwrap48(data);
9125
9313
  }
9126
9314
  };
9127
9315
 
9128
9316
  // src/resources/settings.ts
9129
- function unwrap48(payload) {
9317
+ function unwrap49(payload) {
9130
9318
  if (payload && typeof payload === "object") {
9131
9319
  const p = payload;
9132
9320
  for (const k of [
@@ -9142,7 +9330,7 @@ function unwrap48(payload) {
9142
9330
  return payload;
9143
9331
  }
9144
9332
  function listItems13(payload) {
9145
- const result = unwrap48(payload);
9333
+ const result = unwrap49(payload);
9146
9334
  if (Array.isArray(result)) return result;
9147
9335
  return [];
9148
9336
  }
@@ -9159,46 +9347,46 @@ var Settings = class {
9159
9347
  /** Get the current tenant settings. */
9160
9348
  async get() {
9161
9349
  const data = await this.http.get("/settings");
9162
- return unwrap48(data);
9350
+ return unwrap49(data);
9163
9351
  }
9164
9352
  /** Update tenant settings. */
9165
9353
  async update(params) {
9166
9354
  const body5 = stripUndefined28(params);
9167
9355
  const data = await this.http.put("/settings", body5);
9168
- return unwrap48(data);
9356
+ return unwrap49(data);
9169
9357
  }
9170
9358
  // ── Branding ──────────────────────────────────────────────────────────────
9171
9359
  /** Get tenant branding (logo, colors, custom wordmark). */
9172
9360
  async getBranding() {
9173
9361
  const data = await this.http.get("/settings/branding");
9174
- return unwrap48(data);
9362
+ return unwrap49(data);
9175
9363
  }
9176
9364
  /** Update tenant branding. */
9177
9365
  async updateBranding(params) {
9178
9366
  const body5 = stripUndefined28(params);
9179
9367
  const data = await this.http.put("/settings/branding", body5);
9180
- return unwrap48(data);
9368
+ return unwrap49(data);
9181
9369
  }
9182
9370
  // ── Read-only reference data ───────────────────────────────────────────────
9183
9371
  /** Get tenant-scoped compute pricing. */
9184
9372
  async computePricing() {
9185
9373
  const data = await this.http.get("/settings/compute-pricing");
9186
- return unwrap48(data);
9374
+ return unwrap49(data);
9187
9375
  }
9188
9376
  /** Get tenant-scoped GPU pricing. */
9189
9377
  async gpuPricing() {
9190
9378
  const data = await this.http.get("/settings/gpu-pricing");
9191
- return unwrap48(data);
9379
+ return unwrap49(data);
9192
9380
  }
9193
9381
  /** List models available to this tenant. */
9194
9382
  async availableModels() {
9195
9383
  const data = await this.http.get("/settings/available-models");
9196
- return unwrap48(data);
9384
+ return unwrap49(data);
9197
9385
  }
9198
9386
  /** List regions enabled for this tenant. */
9199
9387
  async regions() {
9200
9388
  const data = await this.http.get("/settings/regions");
9201
- return unwrap48(data);
9389
+ return unwrap49(data);
9202
9390
  }
9203
9391
  // ── BYOK provider keys ────────────────────────────────────────────────────
9204
9392
  /** List tenant-level BYOK provider keys (Anthropic, OpenAI, etc.). */
@@ -9213,7 +9401,7 @@ var Settings = class {
9213
9401
  `/settings/provider-keys/${provider}`,
9214
9402
  body5
9215
9403
  );
9216
- return unwrap48(data);
9404
+ return unwrap49(data);
9217
9405
  }
9218
9406
  /** Delete a BYOK provider key. */
9219
9407
  async deleteProviderKey(provider) {
@@ -9222,7 +9410,7 @@ var Settings = class {
9222
9410
  };
9223
9411
 
9224
9412
  // src/resources/snapshots-standalone.ts
9225
- function unwrap49(data) {
9413
+ function unwrap50(data) {
9226
9414
  if (data && typeof data === "object") {
9227
9415
  const d = data;
9228
9416
  for (const k of ["data", "snapshots", "items"]) {
@@ -9253,14 +9441,14 @@ var SnapshotsStandalone = class {
9253
9441
  return unwrapList14(await this.http.get("/admin/snapshots", query3));
9254
9442
  }
9255
9443
  async get(snapshotId) {
9256
- return unwrap49(
9444
+ return unwrap50(
9257
9445
  await this.http.get(`/admin/snapshots/${snapshotId}`)
9258
9446
  );
9259
9447
  }
9260
9448
  };
9261
9449
 
9262
9450
  // src/resources/storage.ts
9263
- function unwrap50(payload) {
9451
+ function unwrap51(payload) {
9264
9452
  if (payload && typeof payload === "object" && "data" in payload) {
9265
9453
  return payload.data;
9266
9454
  }
@@ -9299,11 +9487,11 @@ var Storage = class {
9299
9487
  ...rest
9300
9488
  });
9301
9489
  const data = await this.http.post("/storage/buckets", body5);
9302
- return unwrap50(data);
9490
+ return unwrap51(data);
9303
9491
  }
9304
9492
  async getBucket(bucketId) {
9305
9493
  const data = await this.http.get(`/storage/buckets/${bucketId}`);
9306
- return unwrap50(data);
9494
+ return unwrap51(data);
9307
9495
  }
9308
9496
  async deleteBucket(bucketId) {
9309
9497
  await this.http.delete(`/storage/buckets/${bucketId}`);
@@ -9353,7 +9541,7 @@ var Storage = class {
9353
9541
  `/storage/buckets/${bucketId}/presign`,
9354
9542
  body5
9355
9543
  );
9356
- return unwrap50(data);
9544
+ return unwrap51(data);
9357
9545
  }
9358
9546
  };
9359
9547
 
@@ -9493,7 +9681,7 @@ var Organizations = class {
9493
9681
  };
9494
9682
 
9495
9683
  // src/resources/tenant.ts
9496
- function unwrap51(payload) {
9684
+ function unwrap52(payload) {
9497
9685
  if (payload && typeof payload === "object") {
9498
9686
  const p = payload;
9499
9687
  for (const k of ["data", "tenant", "branding", "items"]) {
@@ -9515,14 +9703,14 @@ var PreviewDomain = class {
9515
9703
  /** Get the tenant's white-label preview domain settings. */
9516
9704
  async get() {
9517
9705
  const data = await this.http.get("/tenant/preview-domain");
9518
- return unwrap51(data);
9706
+ return unwrap52(data);
9519
9707
  }
9520
9708
  /** Set the tenant's white-label preview domain. */
9521
9709
  async set(domain) {
9522
9710
  const data = await this.http.put("/tenant/preview-domain", {
9523
9711
  preview_domain: domain
9524
9712
  });
9525
- return unwrap51(data);
9713
+ return unwrap52(data);
9526
9714
  }
9527
9715
  /** Re-run DNS verification for the configured preview domain. */
9528
9716
  async verify() {
@@ -9530,7 +9718,7 @@ var PreviewDomain = class {
9530
9718
  "/tenant/preview-domain/verify",
9531
9719
  {}
9532
9720
  );
9533
- return unwrap51(data);
9721
+ return unwrap52(data);
9534
9722
  }
9535
9723
  /** Remove the tenant's custom preview domain. */
9536
9724
  async delete() {
@@ -9545,14 +9733,14 @@ var Branding = class {
9545
9733
  /** Get tenant branding used by white-label hosted surfaces. */
9546
9734
  async get() {
9547
9735
  const data = await this.http.get("/tenant/branding");
9548
- return unwrap51(data);
9736
+ return unwrap52(data);
9549
9737
  }
9550
9738
  /** Update tenant branding used by white-label hosted surfaces. */
9551
9739
  async set(params) {
9552
9740
  const data = await this.http.put("/tenant/branding", {
9553
9741
  branding: stripUndefined30(params)
9554
9742
  });
9555
- return unwrap51(data);
9743
+ return unwrap52(data);
9556
9744
  }
9557
9745
  /** Reset tenant branding to platform defaults. */
9558
9746
  async delete() {
@@ -9574,7 +9762,7 @@ var Tenant = class {
9574
9762
  /** Get the current tenant's plan, limits, and live usage counters. */
9575
9763
  async current() {
9576
9764
  const data = await this.http.get("/tenant/plan");
9577
- return unwrap51(data);
9765
+ return unwrap52(data);
9578
9766
  }
9579
9767
  /** Convenience alias for `tenant.branding.get()`. */
9580
9768
  async getBranding() {
@@ -9635,7 +9823,7 @@ var Templates = class {
9635
9823
  };
9636
9824
 
9637
9825
  // src/resources/usage.ts
9638
- function unwrap52(payload) {
9826
+ function unwrap53(payload) {
9639
9827
  if (payload && typeof payload === "object") {
9640
9828
  const p = payload;
9641
9829
  for (const k of ["data", "usage", "sessions", "summary", "items"]) {
@@ -9657,13 +9845,13 @@ var Usage = class {
9657
9845
  /** Get the current period usage summary. */
9658
9846
  async current() {
9659
9847
  const data = await this.http.get("/usage/summary");
9660
- return unwrap52(data);
9848
+ return unwrap53(data);
9661
9849
  }
9662
9850
  /** List per-session metering events. */
9663
9851
  async sessions(params = {}) {
9664
9852
  const query3 = stripUndefined31(params);
9665
9853
  const data = await this.http.get("/usage/sessions", query3);
9666
- const result = unwrap52(data);
9854
+ const result = unwrap53(data);
9667
9855
  if (Array.isArray(result)) return result;
9668
9856
  return [];
9669
9857
  }
@@ -9671,10 +9859,10 @@ var Usage = class {
9671
9859
  async report(params = {}) {
9672
9860
  const query3 = stripUndefined31(params);
9673
9861
  const data = await this.http.get("/usage/summary", query3);
9674
- return unwrap52(data);
9862
+ return unwrap53(data);
9675
9863
  }
9676
9864
  };
9677
- function unwrap53(payload) {
9865
+ function unwrap54(payload) {
9678
9866
  if (payload && typeof payload === "object" && "data" in payload) {
9679
9867
  return payload.data;
9680
9868
  }
@@ -9710,7 +9898,7 @@ var Volumes = class {
9710
9898
  }
9711
9899
  async get(volumeId) {
9712
9900
  const data = await this.http.get(`/volumes/${volumeId}`);
9713
- return unwrap53(data);
9901
+ return unwrap54(data);
9714
9902
  }
9715
9903
  async create(params) {
9716
9904
  const { idempotencyKey: ikey, sizeGb, ...rest } = params;
@@ -9723,7 +9911,7 @@ var Volumes = class {
9723
9911
  body: body5,
9724
9912
  headers: { "Idempotency-Key": idempotencyKey9(ikey) }
9725
9913
  });
9726
- return unwrap53(data);
9914
+ return unwrap54(data);
9727
9915
  }
9728
9916
  async delete(volumeId) {
9729
9917
  await this.http.delete(`/volumes/${volumeId}`);
@@ -9754,7 +9942,7 @@ var Volumes = class {
9754
9942
  `/computers/${computerId}/volumes`,
9755
9943
  body5
9756
9944
  );
9757
- return unwrap53(data);
9945
+ return unwrap54(data);
9758
9946
  }
9759
9947
  async detach(computerId, attachmentId) {
9760
9948
  await this.http.delete(
@@ -9762,7 +9950,7 @@ var Volumes = class {
9762
9950
  );
9763
9951
  }
9764
9952
  };
9765
- function unwrap54(payload) {
9953
+ function unwrap55(payload) {
9766
9954
  if (payload && typeof payload === "object" && "data" in payload) {
9767
9955
  return payload.data;
9768
9956
  }
@@ -9829,7 +10017,7 @@ var Webhooks = class {
9829
10017
  }
9830
10018
  async get(webhookId) {
9831
10019
  const data = await this.http.get(`/webhooks/${webhookId}`);
9832
- return unwrap54(data);
10020
+ return unwrap55(data);
9833
10021
  }
9834
10022
  async create(params) {
9835
10023
  const { idempotencyKey: ikey, ...rest } = params;
@@ -9839,12 +10027,12 @@ var Webhooks = class {
9839
10027
  body: body5,
9840
10028
  headers: { "Idempotency-Key": idempotencyKey10(ikey) }
9841
10029
  });
9842
- return unwrap54(data);
10030
+ return unwrap55(data);
9843
10031
  }
9844
10032
  async update(webhookId, params) {
9845
10033
  const body5 = stripUndefined33(params);
9846
10034
  const data = await this.http.patch(`/webhooks/${webhookId}`, body5);
9847
- return unwrap54(data);
10035
+ return unwrap55(data);
9848
10036
  }
9849
10037
  async delete(webhookId) {
9850
10038
  await this.http.delete(`/webhooks/${webhookId}`);
@@ -9857,7 +10045,7 @@ var Webhooks = class {
9857
10045
  headers: { "Idempotency-Key": idempotencyKey10(opts.idempotencyKey) }
9858
10046
  }
9859
10047
  );
9860
- return unwrap54(data);
10048
+ return unwrap55(data);
9861
10049
  }
9862
10050
  async deliveries(webhookId) {
9863
10051
  const data = await this.http.get(
@@ -10064,6 +10252,8 @@ var Miosa = class {
10064
10252
  projectIntegrations;
10065
10253
  /** Built-in auth for generated apps inside sandboxes/deployments. */
10066
10254
  projectAuth;
10255
+ /** Durable generated App Documents, exact-version reviews, and publication bindings. */
10256
+ appDocuments;
10067
10257
  /** BYOK encrypted per-user provider keys. */
10068
10258
  externalKeys;
10069
10259
  /** Model Context Protocol — JSON-RPC dispatch + streaming channel. */
@@ -10195,6 +10385,7 @@ var Miosa = class {
10195
10385
  this.integrations = new Integrations(this.http);
10196
10386
  this.projectIntegrations = new ProjectIntegrations(this.http);
10197
10387
  this.projectAuth = new ProjectAuth(this.http);
10388
+ this.appDocuments = new AppDocuments(this.http);
10198
10389
  this.externalKeys = new ExternalKeys(this.http);
10199
10390
  this.mcp = new Mcp(this.http);
10200
10391
  this.runs = new Runs(this.http);
@@ -10728,6 +10919,6 @@ var AppAuth = class {
10728
10919
  }
10729
10920
  };
10730
10921
 
10731
- export { AGENT_BUILD_KIND_SPECS, Admin, AgentRuntimeProfiles, Analytics, ApiKeys, AppAuth, AuditLog, AuthError, Benchmarks, BuilderSessions, Channels, Checkpoints, Cloud, CommandCenter, Community, Completions, Computer, ComputerAudit, ComputerAutoStop, ComputerConnectors, ComputerEnv, ComputerInbox, ComputerLogs, ComputerNetwork, ComputerOsa, ComputerPorts, ComputerSecrets, ComputerTerminal, ComputerVolumes, Computers, Connectors, Credits, CronJobs, DEFAULT_AGENT_BUILD_OUTPUT_ROOT, DEFAULT_AGENT_BUILD_PACKET_VERSION, Dashboard, Databases, DeploymentConnectors, DeploymentDomains, DeploymentReleases, DeploymentRuntimeInstances, DeploymentVersions, Deployments, Desktop, Devices, DockerDeploy, EgressAudit, EgressHostNotAllowedError, EgressNetwork, EgressSecrets, Email, EmailCampaigns, EmailInbox, EmailTemplates, Embeddings, Exec, ExternalKeys, Files, FlatCustomDomains, Functions, HealthChecks, InstallationRequiredError, InsufficientCreditsError, Integrations, ManagedProviderBindingOnlyError, Mcp, Miosa, MiosaError, Models, NetworkError, NetworkPolicy, NotFoundError, OAuthFlow, OpenComputers, OrgInvites, OrganizationMembers, Organizations, ProjectAuth, ProjectIntegrations, ProjectNotLinkedError, ProviderDefaults, RateLimitError, Regions, RunGroups, Runs, RuntimeCapabilitiesResource, RuntimeEnv, SANDBOX_TEMPLATE, Sandbox, SandboxAudit, SandboxCommands, SandboxConnectors, SandboxEnv, SandboxEvents, SandboxFiles, SandboxNetwork, SandboxPreview, SandboxPreviews, SandboxSecrets, SandboxTags, SandboxTemplates, SandboxTerminal, Sandboxes, ScopeNotAllowedError, ScopedFs, Settings, SnapshotsStandalone, Storage, SubjectNotAllowedError, Templates, Tenant, TimeoutError, TokenRefreshFailedError, Usage, UserAuthorizationRequiredError, ValidationError, Volumes, Webhooks, WorkspaceInvites, WorkspaceMembers, createAgentBuildExecutionPacket, createAgentBuildExpectedOutputs, createAgentBuildPrompt, createBuildRunParams, getAgentBuildKindSpec, resolveAgentBuildKind, verifySignature };
10922
+ export { AGENT_BUILD_KIND_SPECS, Admin, AgentRuntimeProfiles, Analytics, ApiKeys, AppAuth, AppDocuments, AuditLog, AuthError, Benchmarks, BuilderSessions, Channels, Checkpoints, Cloud, CommandCenter, Community, Completions, Computer, ComputerAudit, ComputerAutoStop, ComputerConnectors, ComputerEnv, ComputerInbox, ComputerLogs, ComputerNetwork, ComputerOsa, ComputerPorts, ComputerSecrets, ComputerTerminal, ComputerVolumes, Computers, Connectors, Credits, CronJobs, DEFAULT_AGENT_BUILD_OUTPUT_ROOT, DEFAULT_AGENT_BUILD_PACKET_VERSION, Dashboard, Databases, DeploymentConnectors, DeploymentDomains, DeploymentReleases, DeploymentRuntimeInstances, DeploymentVersions, Deployments, Desktop, Devices, DockerDeploy, EgressAudit, EgressHostNotAllowedError, EgressNetwork, EgressSecrets, Email, EmailCampaigns, EmailInbox, EmailTemplates, Embeddings, Exec, ExternalKeys, Files, FlatCustomDomains, Functions, HealthChecks, InstallationRequiredError, InsufficientCreditsError, Integrations, ManagedProviderBindingOnlyError, Mcp, Miosa, MiosaError, Models, NetworkError, NetworkPolicy, NotFoundError, OAuthFlow, OpenComputers, OrgInvites, OrganizationMembers, Organizations, ProjectAuth, ProjectIntegrations, ProjectNotLinkedError, ProviderDefaults, RateLimitError, Regions, RunGroups, Runs, RuntimeCapabilitiesResource, RuntimeEnv, SANDBOX_TEMPLATE, Sandbox, SandboxAudit, SandboxCommands, SandboxConnectors, SandboxEnv, SandboxEvents, SandboxFiles, SandboxNetwork, SandboxPreview, SandboxPreviews, SandboxSecrets, SandboxTags, SandboxTemplates, SandboxTerminal, Sandboxes, ScopeNotAllowedError, ScopedFs, Settings, SnapshotsStandalone, Storage, SubjectNotAllowedError, Templates, Tenant, TimeoutError, TokenRefreshFailedError, Usage, UserAuthorizationRequiredError, ValidationError, Volumes, Webhooks, WorkspaceInvites, WorkspaceMembers, createAgentBuildExecutionPacket, createAgentBuildExpectedOutputs, createAgentBuildPrompt, createBuildRunParams, getAgentBuildKindSpec, resolveAgentBuildKind, verifySignature };
10732
10923
  //# sourceMappingURL=index.js.map
10733
10924
  //# sourceMappingURL=index.js.map