@miosa/sdk 1.2.9 → 1.2.11

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
@@ -22,10 +22,10 @@ var MiosaError = class _MiosaError extends Error {
22
22
  this.details = details;
23
23
  this.requestId = requestId;
24
24
  }
25
- static fromResponse(status, body2, requestId) {
26
- const message = body2.error?.message ?? body2.message ?? `HTTP ${status}`;
27
- const code = body2.error?.code ?? body2.code ?? "UNKNOWN_ERROR";
28
- const details = body2.error?.details;
25
+ static fromResponse(status, body3, requestId) {
26
+ const message = body3.error?.message ?? body3.message ?? `HTTP ${status}`;
27
+ const code = body3.error?.code ?? body3.code ?? "UNKNOWN_ERROR";
28
+ const details = body3.error?.details;
29
29
  if (status === 401 || status === 403) {
30
30
  return new AuthError(message, status, code, details, requestId);
31
31
  }
@@ -145,10 +145,10 @@ var HttpClient = class {
145
145
  this.timeout = config.timeout ?? DEFAULT_TIMEOUT;
146
146
  this.maxRetries = config.maxRetries ?? DEFAULT_MAX_RETRIES;
147
147
  }
148
- buildUrl(path, query) {
148
+ buildUrl(path, query2) {
149
149
  const url = new URL(`${this.baseUrl}${path}`);
150
- if (query) {
151
- for (const [key, value] of Object.entries(query)) {
150
+ if (query2) {
151
+ for (const [key, value] of Object.entries(query2)) {
152
152
  if (value !== void 0) {
153
153
  url.searchParams.set(key, String(value));
154
154
  }
@@ -167,7 +167,7 @@ var HttpClient = class {
167
167
  async request(path, options = {}) {
168
168
  const {
169
169
  method = "GET",
170
- body: body2,
170
+ body: body3,
171
171
  formData,
172
172
  binary = false,
173
173
  timeout = this.timeout
@@ -176,9 +176,9 @@ var HttpClient = class {
176
176
  let fetchBody;
177
177
  if (formData) {
178
178
  fetchBody = formData;
179
- } else if (body2 !== void 0) {
179
+ } else if (body3 !== void 0) {
180
180
  headers = { ...headers, "Content-Type": "application/json" };
181
- fetchBody = JSON.stringify(body2);
181
+ fetchBody = JSON.stringify(body3);
182
182
  }
183
183
  let lastError;
184
184
  for (let attempt = 0; attempt <= this.maxRetries; attempt++) {
@@ -248,11 +248,11 @@ var HttpClient = class {
248
248
  }
249
249
  throw lastError ?? new MiosaError("Max retries exceeded", 0, "MAX_RETRIES_EXCEEDED");
250
250
  }
251
- async get(path, query) {
251
+ async get(path, query2) {
252
252
  let fullPath = path;
253
- if (query) {
253
+ if (query2) {
254
254
  const params = new URLSearchParams();
255
- for (const [k, v] of Object.entries(query)) {
255
+ for (const [k, v] of Object.entries(query2)) {
256
256
  if (v !== void 0 && v !== null) params.set(k, String(v));
257
257
  }
258
258
  const qs = params.toString();
@@ -260,17 +260,17 @@ var HttpClient = class {
260
260
  }
261
261
  return this.request(fullPath, { method: "GET" });
262
262
  }
263
- async post(path, body2) {
264
- return this.request(path, { method: "POST", body: body2 });
263
+ async post(path, body3) {
264
+ return this.request(path, { method: "POST", body: body3 });
265
265
  }
266
- async patch(path, body2) {
267
- return this.request(path, { method: "PATCH", body: body2 });
266
+ async patch(path, body3) {
267
+ return this.request(path, { method: "PATCH", body: body3 });
268
268
  }
269
- async put(path, body2) {
270
- return this.request(path, { method: "PUT", body: body2 });
269
+ async put(path, body3) {
270
+ return this.request(path, { method: "PUT", body: body3 });
271
271
  }
272
- async delete(path, body2) {
273
- return this.request(path, { method: "DELETE", body: body2 });
272
+ async delete(path, body3) {
273
+ return this.request(path, { method: "DELETE", body: body3 });
274
274
  }
275
275
  async getBinary(path) {
276
276
  return this.request(path, { method: "GET", binary: true });
@@ -288,10 +288,10 @@ var HttpClient = class {
288
288
  Accept: "text/event-stream",
289
289
  ...options.headers
290
290
  });
291
- let body2 = null;
291
+ let body3 = null;
292
292
  if (options.body !== void 0) {
293
293
  headers = { ...headers, "Content-Type": "application/json" };
294
- body2 = JSON.stringify(options.body);
294
+ body3 = JSON.stringify(options.body);
295
295
  }
296
296
  const controller = new AbortController();
297
297
  let response;
@@ -299,7 +299,7 @@ var HttpClient = class {
299
299
  response = await fetch(`${this.baseUrl}${path}`, {
300
300
  method,
301
301
  headers,
302
- body: body2,
302
+ body: body3,
303
303
  signal: controller.signal
304
304
  });
305
305
  } catch (err) {
@@ -368,10 +368,10 @@ var Admin = class {
368
368
  this.http = http;
369
369
  }
370
370
  /** Escape hatch — call any admin endpoint by method + path. */
371
- async request(method, path, body2, query) {
372
- const fullPath = query ? (() => {
371
+ async request(method, path, body3, query2) {
372
+ const fullPath = query2 ? (() => {
373
373
  const qs = new URLSearchParams();
374
- for (const [k, v] of Object.entries(query)) {
374
+ for (const [k, v] of Object.entries(query2)) {
375
375
  if (v !== void 0) qs.set(k, String(v));
376
376
  }
377
377
  const s = qs.toString();
@@ -381,13 +381,13 @@ var Admin = class {
381
381
  case "GET":
382
382
  return this.http.get(fullPath);
383
383
  case "POST":
384
- return this.http.post(fullPath, body2);
384
+ return this.http.post(fullPath, body3);
385
385
  case "PUT":
386
- return this.http.put(fullPath, body2);
386
+ return this.http.put(fullPath, body3);
387
387
  case "PATCH":
388
- return this.http.patch(fullPath, body2);
388
+ return this.http.patch(fullPath, body3);
389
389
  case "DELETE":
390
- return this.http.delete(fullPath, body2);
390
+ return this.http.delete(fullPath, body3);
391
391
  }
392
392
  }
393
393
  // ── Overview ────────────────────────────────────────────────
@@ -736,8 +736,25 @@ var AgentRuns = class {
736
736
  await this.http.get(`/agent-runs/${encodeURIComponent(id)}`)
737
737
  );
738
738
  }
739
+ async artifacts(id) {
740
+ const data = unwrap2(
741
+ await this.http.get(
742
+ `/agent-runs/${encodeURIComponent(id)}/artifacts`
743
+ )
744
+ );
745
+ if (Array.isArray(data)) return data;
746
+ return data.artifacts ?? data.items ?? [];
747
+ }
748
+ async downloadArtifact(id, artifactId, options = {}) {
749
+ const query2 = options.inline ? "?disposition=inline" : "";
750
+ return this.http.getBinary(
751
+ `/agent-runs/${encodeURIComponent(id)}/artifacts/${encodeURIComponent(
752
+ artifactId
753
+ )}/download${query2}`
754
+ );
755
+ }
739
756
  async run(params) {
740
- const body2 = stripUndefined({
757
+ const body3 = stripUndefined({
741
758
  prompt: params.prompt,
742
759
  target_kind: params.targetKind,
743
760
  target_id: params.targetId,
@@ -755,7 +772,7 @@ var AgentRuns = class {
755
772
  skip_agent_runtime_profile: params.skipAgentRuntimeProfile,
756
773
  metadata: params.metadata
757
774
  });
758
- return unwrap2(await this.http.post("/agent-runs", body2));
775
+ return unwrap2(await this.http.post("/agent-runs", body3));
759
776
  }
760
777
  async cancel(id) {
761
778
  return unwrap2(
@@ -789,14 +806,14 @@ var Analytics = class {
789
806
  http;
790
807
  /** Get the platform analytics overview. */
791
808
  async overview(filters = {}) {
792
- const query = stripUndefined2(filters);
793
- const data = await this.http.get("/analytics/overview", query);
809
+ const query2 = stripUndefined2(filters);
810
+ const data = await this.http.get("/analytics/overview", query2);
794
811
  return unwrap3(data);
795
812
  }
796
813
  /** Get a timeseries for a metric over a period. */
797
814
  async timeseries(params = {}) {
798
- const query = stripUndefined2(params);
799
- const data = await this.http.get("/analytics/timeseries", query);
815
+ const query2 = stripUndefined2(params);
816
+ const data = await this.http.get("/analytics/timeseries", query2);
800
817
  return unwrap3(data);
801
818
  }
802
819
  };
@@ -830,32 +847,32 @@ var ApiKeys = class {
830
847
  }
831
848
  http;
832
849
  async list(params = {}) {
833
- const query = stripUndefined3({ ...params });
834
- const data = await this.http.get("/api-keys", query);
850
+ const query2 = stripUndefined3({ ...params });
851
+ const data = await this.http.get("/api-keys", query2);
835
852
  return listItems(data);
836
853
  }
837
854
  async create(params) {
838
855
  const { idempotencyKey: ikey, expiresAt, ...rest } = params;
839
- const body2 = stripUndefined3({
856
+ const body3 = stripUndefined3({
840
857
  ...rest,
841
858
  expires_at: expiresAt ?? rest.expires_at
842
859
  });
843
860
  const data = await this.http.request("/api-keys", {
844
861
  method: "POST",
845
- body: body2,
862
+ body: body3,
846
863
  headers: { "Idempotency-Key": idempotencyKey(ikey) }
847
864
  });
848
865
  return unwrap4(data);
849
866
  }
850
867
  /** POST /api/v1/api-keys/scoped — L2 delegation token bound to one external user. */
851
868
  async createScoped(params) {
852
- const body2 = stripUndefined3({
869
+ const body3 = stripUndefined3({
853
870
  external_user_id: params.externalUserId,
854
871
  scopes: params.scopes,
855
872
  expires_at: params.expiresAt
856
873
  });
857
874
  return unwrap4(
858
- await this.http.post("/api-keys/scoped", body2)
875
+ await this.http.post("/api-keys/scoped", body3)
859
876
  );
860
877
  }
861
878
  async delete(keyId) {
@@ -885,8 +902,8 @@ var AuditLog = class {
885
902
  http;
886
903
  /** List audit-log events with optional filters. */
887
904
  async list(params = {}) {
888
- const query = stripUndefined4(params);
889
- const data = await this.http.get("/audit-log", query);
905
+ const query2 = stripUndefined4(params);
906
+ const data = await this.http.get("/audit-log", query2);
890
907
  const result = unwrap5(data);
891
908
  if (Array.isArray(result)) return result;
892
909
  return [];
@@ -919,10 +936,10 @@ var Benchmarks = class {
919
936
  }
920
937
  http;
921
938
  async list(filters = {}) {
922
- const query = Object.fromEntries(
939
+ const query2 = Object.fromEntries(
923
940
  Object.entries(filters).filter(([, v]) => v !== void 0)
924
941
  );
925
- const data = await this.http.get("/admin/benchmarks", query);
942
+ const data = await this.http.get("/admin/benchmarks", query2);
926
943
  return unwrapList(data);
927
944
  }
928
945
  async get(benchmarkId) {
@@ -932,10 +949,10 @@ var Benchmarks = class {
932
949
  }
933
950
  /** Start a new benchmark run — pass kind and run-specific options. */
934
951
  async create(params) {
935
- const body2 = Object.fromEntries(
952
+ const body3 = Object.fromEntries(
936
953
  Object.entries(params).filter(([, v]) => v !== void 0)
937
954
  );
938
- return unwrap6(await this.http.post("/admin/benchmarks", body2));
955
+ return unwrap6(await this.http.post("/admin/benchmarks", body3));
939
956
  }
940
957
  async cancel(benchmarkId) {
941
958
  return unwrap6(
@@ -944,22 +961,22 @@ var Benchmarks = class {
944
961
  }
945
962
  /** Return per-iteration timing samples for a benchmark run. */
946
963
  async samples(benchmarkId, filters = {}) {
947
- const query = Object.fromEntries(
964
+ const query2 = Object.fromEntries(
948
965
  Object.entries(filters).filter(([, v]) => v !== void 0)
949
966
  );
950
967
  const data = await this.http.get(
951
968
  `/admin/benchmarks/${benchmarkId}/samples`,
952
- query
969
+ query2
953
970
  );
954
971
  return unwrapList(data);
955
972
  }
956
973
  /** Compare two benchmark runs. */
957
974
  async compare(params) {
958
- const body2 = Object.fromEntries(
975
+ const body3 = Object.fromEntries(
959
976
  Object.entries(params).filter(([, v]) => v !== void 0)
960
977
  );
961
978
  return unwrap6(
962
- await this.http.post("/admin/benchmarks/compare", body2)
979
+ await this.http.post("/admin/benchmarks/compare", body3)
963
980
  );
964
981
  }
965
982
  };
@@ -990,8 +1007,8 @@ var BuilderSessions = class {
990
1007
  }
991
1008
  http;
992
1009
  async list(params = {}) {
993
- const query = { limit: 50, ...params };
994
- return unwrapList2(await this.http.get("/builder/sessions", query));
1010
+ const query2 = { limit: 50, ...params };
1011
+ return unwrapList2(await this.http.get("/builder/sessions", query2));
995
1012
  }
996
1013
  /**
997
1014
  * Get a single session. The platform router only exposes index +
@@ -1040,8 +1057,8 @@ var Channels = class {
1040
1057
  http;
1041
1058
  /** List all channels for the tenant. */
1042
1059
  async list(params = {}) {
1043
- const query = stripUndefined5(params);
1044
- const data = await this.http.get("/channels", query);
1060
+ const query2 = stripUndefined5(params);
1061
+ const data = await this.http.get("/channels", query2);
1045
1062
  const result = unwrap8(data);
1046
1063
  if (Array.isArray(result)) return result;
1047
1064
  return [];
@@ -1053,14 +1070,14 @@ var Channels = class {
1053
1070
  }
1054
1071
  /** Create a new channel. */
1055
1072
  async create(params) {
1056
- const body2 = stripUndefObj(params);
1057
- const data = await this.http.post("/channels", body2);
1073
+ const body3 = stripUndefObj(params);
1074
+ const data = await this.http.post("/channels", body3);
1058
1075
  return unwrap8(data);
1059
1076
  }
1060
1077
  /** Update a channel. */
1061
1078
  async update(channelId, params) {
1062
- const body2 = stripUndefObj(params);
1063
- const data = await this.http.patch(`/channels/${channelId}`, body2);
1079
+ const body3 = stripUndefObj(params);
1080
+ const data = await this.http.patch(`/channels/${channelId}`, body3);
1064
1081
  return unwrap8(data);
1065
1082
  }
1066
1083
  /** Delete a channel. */
@@ -1075,8 +1092,8 @@ var Channels = class {
1075
1092
  }
1076
1093
  /** Update notification preferences. */
1077
1094
  async updateNotifications(params) {
1078
- const body2 = stripUndefObj(params);
1079
- const data = await this.http.put("/channels/notifications", body2);
1095
+ const body3 = stripUndefObj(params);
1096
+ const data = await this.http.put("/channels/notifications", body3);
1080
1097
  return unwrap8(data);
1081
1098
  }
1082
1099
  /** Enable a channel. */
@@ -1180,21 +1197,21 @@ var Community = class {
1180
1197
  http;
1181
1198
  // ── Agents ────────────────────────────────────────────────────────────
1182
1199
  async listAgents(filters = {}) {
1183
- const query = Object.fromEntries(
1200
+ const query2 = Object.fromEntries(
1184
1201
  Object.entries(filters).filter(([, v]) => v !== void 0)
1185
1202
  );
1186
- return unwrapList4(await this.http.get("/community/agents", query));
1203
+ return unwrapList4(await this.http.get("/community/agents", query2));
1187
1204
  }
1188
1205
  async getAgent(agentId) {
1189
1206
  return unwrap10(await this.http.get(`/community/agents/${agentId}`));
1190
1207
  }
1191
1208
  // ── Templates ─────────────────────────────────────────────────────────
1192
1209
  async listTemplates(filters = {}) {
1193
- const query = Object.fromEntries(
1210
+ const query2 = Object.fromEntries(
1194
1211
  Object.entries(filters).filter(([, v]) => v !== void 0)
1195
1212
  );
1196
1213
  return unwrapList4(
1197
- await this.http.get("/community/templates", query)
1214
+ await this.http.get("/community/templates", query2)
1198
1215
  );
1199
1216
  }
1200
1217
  async getTemplate(templateId) {
@@ -1204,19 +1221,19 @@ var Community = class {
1204
1221
  }
1205
1222
  /** Install a community template into the caller's tenant. */
1206
1223
  async installTemplate(templateId, opts = {}) {
1207
- const body2 = Object.fromEntries(
1224
+ const body3 = Object.fromEntries(
1208
1225
  Object.entries(opts).filter(([, v]) => v !== void 0)
1209
1226
  );
1210
1227
  return unwrap10(
1211
1228
  await this.http.post(
1212
1229
  `/community/templates/${templateId}/install`,
1213
- body2
1230
+ body3
1214
1231
  )
1215
1232
  );
1216
1233
  }
1217
1234
  /** Rate a community template (1–5). */
1218
1235
  async rateTemplate(templateId, rating, opts = {}) {
1219
- const body2 = {
1236
+ const body3 = {
1220
1237
  rating,
1221
1238
  ...Object.fromEntries(
1222
1239
  Object.entries(opts).filter(([, v]) => v !== void 0)
@@ -1225,7 +1242,7 @@ var Community = class {
1225
1242
  return unwrap10(
1226
1243
  await this.http.post(
1227
1244
  `/community/templates/${templateId}/rate`,
1228
- body2
1245
+ body3
1229
1246
  )
1230
1247
  );
1231
1248
  }
@@ -1251,24 +1268,24 @@ var Completions = class {
1251
1268
  }
1252
1269
  http;
1253
1270
  create(params) {
1254
- const body2 = buildBody(params);
1271
+ const body3 = buildBody(params);
1255
1272
  if (params.stream === true) {
1256
1273
  return this.http.stream(
1257
1274
  "/intelligence/completions",
1258
- { method: "POST", body: body2 }
1275
+ { method: "POST", body: body3 }
1259
1276
  );
1260
1277
  }
1261
- return this.http.post("/intelligence/completions", body2).then(unwrap11);
1278
+ return this.http.post("/intelligence/completions", body3).then(unwrap11);
1262
1279
  }
1263
1280
  chat(params) {
1264
- const body2 = buildBody(params);
1281
+ const body3 = buildBody(params);
1265
1282
  if (params.stream === true) {
1266
1283
  return this.http.stream(
1267
1284
  "/intelligence/chat/completions",
1268
- { method: "POST", body: body2 }
1285
+ { method: "POST", body: body3 }
1269
1286
  );
1270
1287
  }
1271
- return this.http.post("/intelligence/chat/completions", body2).then(unwrap11);
1288
+ return this.http.post("/intelligence/chat/completions", body3).then(unwrap11);
1272
1289
  }
1273
1290
  };
1274
1291
 
@@ -1499,11 +1516,11 @@ var ComputerLogs = class {
1499
1516
  computerId;
1500
1517
  /** Fetch the most recent log snapshot. */
1501
1518
  async get(params = {}) {
1502
- const query = Object.fromEntries(
1519
+ const query2 = Object.fromEntries(
1503
1520
  Object.entries(params).filter(([, v]) => v !== void 0)
1504
1521
  );
1505
1522
  return unwrap14(
1506
- await this.http.get(`/computers/${this.computerId}/logs`, query)
1523
+ await this.http.get(`/computers/${this.computerId}/logs`, query2)
1507
1524
  );
1508
1525
  }
1509
1526
  /** Stream live log events as SSE dicts `{type, data, id}`. */
@@ -1533,7 +1550,7 @@ var ComputerOsa = class {
1533
1550
  computerId;
1534
1551
  /** Submit a free-form task to the in-VM OSA agent. */
1535
1552
  async submitTask(task, params = {}) {
1536
- const body2 = {
1553
+ const body3 = {
1537
1554
  task,
1538
1555
  ...Object.fromEntries(
1539
1556
  Object.entries(params).filter(([, v]) => v !== void 0)
@@ -1542,7 +1559,7 @@ var ComputerOsa = class {
1542
1559
  return unwrap15(
1543
1560
  await this.http.post(
1544
1561
  `/computers/${this.computerId}/osa/task`,
1545
- body2
1562
+ body3
1546
1563
  )
1547
1564
  );
1548
1565
  }
@@ -1560,13 +1577,13 @@ var ComputerOsa = class {
1560
1577
  }
1561
1578
  /** Update OSA runtime configuration (model, tools, secrets, etc.). */
1562
1579
  async configure(config) {
1563
- const body2 = Object.fromEntries(
1580
+ const body3 = Object.fromEntries(
1564
1581
  Object.entries(config).filter(([, v]) => v !== void 0)
1565
1582
  );
1566
1583
  return unwrap15(
1567
1584
  await this.http.post(
1568
1585
  `/computers/${this.computerId}/osa/configure`,
1569
- body2
1586
+ body3
1570
1587
  )
1571
1588
  );
1572
1589
  }
@@ -1612,21 +1629,21 @@ var ComputerPorts = class {
1612
1629
  }
1613
1630
  /** Expose port with the given visibility options. */
1614
1631
  async create(port, opts = {}) {
1615
- const body2 = {
1632
+ const body3 = {
1616
1633
  port,
1617
1634
  ...Object.fromEntries(
1618
1635
  Object.entries(opts).filter(([, v]) => v !== void 0)
1619
1636
  )
1620
1637
  };
1621
- return unwrap16(await this.http.post(this.base(), body2));
1638
+ return unwrap16(await this.http.post(this.base(), body3));
1622
1639
  }
1623
1640
  /** Patch visibility / auth options for port. */
1624
1641
  async update(port, opts) {
1625
- const body2 = Object.fromEntries(
1642
+ const body3 = Object.fromEntries(
1626
1643
  Object.entries(opts).filter(([, v]) => v !== void 0)
1627
1644
  );
1628
1645
  return unwrap16(
1629
- await this.http.patch(`${this.base()}/${port}`, body2)
1646
+ await this.http.patch(`${this.base()}/${port}`, body3)
1630
1647
  );
1631
1648
  }
1632
1649
  /** Stop exposing port. */
@@ -1645,12 +1662,12 @@ var ComputerTerminal = class {
1645
1662
  computerId;
1646
1663
  /** Open a new PTY session. Returns the server payload (session id, etc.). */
1647
1664
  async create(params = {}) {
1648
- const body2 = Object.fromEntries(
1665
+ const body3 = Object.fromEntries(
1649
1666
  Object.entries(params).filter(([, v]) => v !== void 0)
1650
1667
  );
1651
1668
  const raw = await this.http.post(
1652
1669
  `/computers/${this.computerId}/terminal`,
1653
- body2
1670
+ body3
1654
1671
  );
1655
1672
  return unwrap17(raw);
1656
1673
  }
@@ -2094,12 +2111,12 @@ var EgressNetwork = class {
2094
2111
  }
2095
2112
  /** List allowlist rules. */
2096
2113
  async rules(params = {}) {
2097
- const query = stripUndefined7({
2114
+ const query2 = stripUndefined7({
2098
2115
  policy_id: pickFirst2(params.policyId, params.policy_id),
2099
2116
  resource_id: pickFirst2(params.resourceId, params.resource_id),
2100
2117
  resource_type: pickFirst2(params.resourceType, params.resource_type)
2101
2118
  });
2102
- const data = await this.http.get("/egress/allowlist", query);
2119
+ const data = await this.http.get("/egress/allowlist", query2);
2103
2120
  return unwrapList9(data);
2104
2121
  }
2105
2122
  /** Delete an allowlist rule by id. */
@@ -2109,16 +2126,16 @@ var EgressNetwork = class {
2109
2126
  // ── policies ──────────────────────────────────────────────────────────────
2110
2127
  /** List egress policies. */
2111
2128
  async policies(params = {}) {
2112
- const query = stripUndefined7({
2129
+ const query2 = stripUndefined7({
2113
2130
  resource_id: pickFirst2(params.resourceId, params.resource_id),
2114
2131
  resource_type: pickFirst2(params.resourceType, params.resource_type)
2115
2132
  });
2116
- const data = await this.http.get("/egress/policies", query);
2133
+ const data = await this.http.get("/egress/policies", query2);
2117
2134
  return unwrapList9(data);
2118
2135
  }
2119
2136
  /** Create an egress policy. */
2120
2137
  async createPolicy(params) {
2121
- const body2 = stripUndefined7({
2138
+ const body3 = stripUndefined7({
2122
2139
  name: params.name,
2123
2140
  mode: params.mode ?? "enforce",
2124
2141
  default_effect: pickFirst2(
@@ -2132,13 +2149,13 @@ var EgressNetwork = class {
2132
2149
  });
2133
2150
  const data = await this.http.post(
2134
2151
  "/egress/policies",
2135
- body2
2152
+ body3
2136
2153
  );
2137
2154
  return unwrap20(data);
2138
2155
  }
2139
2156
  /** Update an egress policy by id. */
2140
2157
  async updatePolicy(policyId, params) {
2141
- const body2 = stripUndefined7({
2158
+ const body3 = stripUndefined7({
2142
2159
  mode: params.mode,
2143
2160
  default_effect: pickFirst2(params.defaultEffect, params.default_effect),
2144
2161
  name: params.name,
@@ -2146,7 +2163,7 @@ var EgressNetwork = class {
2146
2163
  });
2147
2164
  const data = await this.http.patch(
2148
2165
  `/egress/policies/${policyId}`,
2149
- body2
2166
+ body3
2150
2167
  );
2151
2168
  return unwrap20(data);
2152
2169
  }
@@ -2166,28 +2183,28 @@ var EgressNetwork = class {
2166
2183
  if (policyId) {
2167
2184
  return this.updatePolicy(policyId, { mode });
2168
2185
  }
2169
- const body2 = resourceId !== void 0 && resourceType !== void 0 ? stripUndefined7({
2186
+ const body3 = resourceId !== void 0 && resourceType !== void 0 ? stripUndefined7({
2170
2187
  mode,
2171
2188
  resource_id: resourceId,
2172
2189
  resource_type: resourceType
2173
2190
  }) : { mode };
2174
2191
  const data = await this.http.patch(
2175
2192
  "/egress/policies",
2176
- body2
2193
+ body3
2177
2194
  );
2178
2195
  return unwrap20(data);
2179
2196
  }
2180
2197
  // ── suggestions ───────────────────────────────────────────────────────────
2181
2198
  /** AI-generated allowlist suggestions from recent denied egress. */
2182
2199
  async suggestions(params = {}) {
2183
- const query = stripUndefined7({
2200
+ const query2 = stripUndefined7({
2184
2201
  resource_id: pickFirst2(params.resourceId, params.resource_id),
2185
2202
  resource_type: pickFirst2(params.resourceType, params.resource_type),
2186
2203
  since: params.since ?? "7d"
2187
2204
  });
2188
2205
  const data = await this.http.get(
2189
2206
  "/egress/audit/suggestions",
2190
- query
2207
+ query2
2191
2208
  );
2192
2209
  return unwrapList9(data);
2193
2210
  }
@@ -2231,28 +2248,28 @@ var SandboxNetwork = class {
2231
2248
  return this.delegate.removeRule(ruleId);
2232
2249
  }
2233
2250
  lockdown(params = {}) {
2234
- const body2 = {
2251
+ const body3 = {
2235
2252
  resource_id: this.resourceId,
2236
2253
  resource_type: this.resourceType
2237
2254
  };
2238
- if (params.policyId !== void 0) body2.policyId = params.policyId;
2239
- return this.delegate.lockdown(body2);
2255
+ if (params.policyId !== void 0) body3.policyId = params.policyId;
2256
+ return this.delegate.lockdown(body3);
2240
2257
  }
2241
2258
  observe(params = {}) {
2242
- const body2 = {
2259
+ const body3 = {
2243
2260
  resource_id: this.resourceId,
2244
2261
  resource_type: this.resourceType
2245
2262
  };
2246
- if (params.policyId !== void 0) body2.policyId = params.policyId;
2247
- return this.delegate.observe(body2);
2263
+ if (params.policyId !== void 0) body3.policyId = params.policyId;
2264
+ return this.delegate.observe(body3);
2248
2265
  }
2249
2266
  suggestions(params = {}) {
2250
- const body2 = {
2267
+ const body3 = {
2251
2268
  resource_id: this.resourceId,
2252
2269
  resource_type: this.resourceType
2253
2270
  };
2254
- if (params.since !== void 0) body2.since = params.since;
2255
- return this.delegate.suggestions(body2);
2271
+ if (params.since !== void 0) body3.since = params.since;
2272
+ return this.delegate.suggestions(body3);
2256
2273
  }
2257
2274
  policies() {
2258
2275
  return this.delegate.policies({
@@ -2453,10 +2470,10 @@ var EgressSecrets = class {
2453
2470
  }
2454
2471
  /** Rotate the secret's value. */
2455
2472
  async rotate(id, params) {
2456
- const body2 = typeof params === "string" ? rotateBody({ newValue: params }) : rotateBody(params);
2473
+ const body3 = typeof params === "string" ? rotateBody({ newValue: params }) : rotateBody(params);
2457
2474
  const data = await this.http.patch(
2458
2475
  `/egress/secrets/${id}`,
2459
- body2
2476
+ body3
2460
2477
  );
2461
2478
  return unwrap21(data);
2462
2479
  }
@@ -3068,12 +3085,12 @@ var ComputerInbox = class {
3068
3085
  return unwrapData(raw);
3069
3086
  }
3070
3087
  async update(fields) {
3071
- const body2 = Object.fromEntries(
3088
+ const body3 = Object.fromEntries(
3072
3089
  Object.entries(fields).filter(([, v]) => v !== void 0)
3073
3090
  );
3074
3091
  const raw = await this.http.patch(
3075
3092
  `/computers/${this.computerId}/inbox`,
3076
- body2
3093
+ body3
3077
3094
  );
3078
3095
  return unwrapData(raw);
3079
3096
  }
@@ -3372,12 +3389,12 @@ var Computer = class _Computer {
3372
3389
  }
3373
3390
  /** Clone this computer into a new one. */
3374
3391
  async clone(opts = {}) {
3375
- const body2 = Object.fromEntries(
3392
+ const body3 = Object.fromEntries(
3376
3393
  Object.entries(opts).filter(([, v]) => v !== void 0)
3377
3394
  );
3378
3395
  const raw = await this.http.post(
3379
3396
  `/computers/${this.id}/clone`,
3380
- body2
3397
+ body3
3381
3398
  );
3382
3399
  const data = unwrapData(raw);
3383
3400
  return new _Computer(this.http, data);
@@ -3393,12 +3410,12 @@ var Computer = class _Computer {
3393
3410
  }
3394
3411
  /** Move the computer to a different region or host. */
3395
3412
  async move(opts) {
3396
- const body2 = Object.fromEntries(
3413
+ const body3 = Object.fromEntries(
3397
3414
  Object.entries(opts).filter(([, v]) => v !== void 0)
3398
3415
  );
3399
3416
  const updated = await this.http.post(
3400
3417
  `/computers/${this.id}/move`,
3401
- body2
3418
+ body3
3402
3419
  );
3403
3420
  this.data = updated;
3404
3421
  return this;
@@ -3480,12 +3497,12 @@ var Computers = class {
3480
3497
  agentRuntimeProfileId,
3481
3498
  agentProfileId,
3482
3499
  skipAgentRuntimeProfile,
3483
- ...body2
3500
+ ...body3
3484
3501
  } = params;
3485
3502
  const data = await this.http.post("/computers", {
3486
3503
  template_type: "miosa-desktop",
3487
3504
  size: "small",
3488
- ...body2,
3505
+ ...body3,
3489
3506
  agent_runtime_profile_id: agentRuntimeProfileId ?? params.agent_runtime_profile_id ?? agentProfileId ?? params.agent_profile_id,
3490
3507
  skip_agent_runtime_profile: skipAgentRuntimeProfile ?? params.skip_agent_runtime_profile
3491
3508
  });
@@ -3495,14 +3512,14 @@ var Computers = class {
3495
3512
  * List all computers for the authenticated tenant.
3496
3513
  */
3497
3514
  async list(params) {
3498
- const query = {
3515
+ const query2 = {
3499
3516
  page: params?.page,
3500
3517
  per_page: params?.per_page,
3501
3518
  status: params?.status
3502
3519
  };
3503
3520
  const response = await this.http.get(
3504
3521
  "/computers",
3505
- query
3522
+ query2
3506
3523
  );
3507
3524
  return response.data.map((d) => new Computer(this.http, d));
3508
3525
  }
@@ -3543,13 +3560,13 @@ var Credits = class {
3543
3560
  }
3544
3561
  /** List credit transactions (purchases, deductions). */
3545
3562
  async transactions(params) {
3546
- const query = {
3563
+ const query2 = {
3547
3564
  page: params?.page,
3548
3565
  per_page: params?.per_page
3549
3566
  };
3550
3567
  return this.http.get(
3551
3568
  "/credits/transactions",
3552
- query
3569
+ query2
3553
3570
  );
3554
3571
  }
3555
3572
  /** Get aggregated credit usage for the current billing period. */
@@ -3587,8 +3604,8 @@ var CronJobs = class {
3587
3604
  }
3588
3605
  http;
3589
3606
  async list(params = {}) {
3590
- const query = stripUndefined9({ ...params });
3591
- const data = await this.http.get("/cron-jobs", query);
3607
+ const query2 = stripUndefined9({ ...params });
3608
+ const data = await this.http.get("/cron-jobs", query2);
3592
3609
  return listItems2(data);
3593
3610
  }
3594
3611
  async get(jobId) {
@@ -3597,17 +3614,17 @@ var CronJobs = class {
3597
3614
  }
3598
3615
  async create(params) {
3599
3616
  const { idempotencyKey: ikey, ...rest } = params;
3600
- const body2 = stripUndefined9(rest);
3617
+ const body3 = stripUndefined9(rest);
3601
3618
  const data = await this.http.request("/cron-jobs", {
3602
3619
  method: "POST",
3603
- body: body2,
3620
+ body: body3,
3604
3621
  headers: { "Idempotency-Key": idempotencyKey2(ikey) }
3605
3622
  });
3606
3623
  return unwrap22(data);
3607
3624
  }
3608
3625
  async update(jobId, params) {
3609
- const body2 = stripUndefined9(params);
3610
- const data = await this.http.patch(`/cron-jobs/${jobId}`, body2);
3626
+ const body3 = stripUndefined9(params);
3627
+ const data = await this.http.patch(`/cron-jobs/${jobId}`, body3);
3611
3628
  return unwrap22(data);
3612
3629
  }
3613
3630
  async delete(jobId) {
@@ -3705,8 +3722,8 @@ var Databases = class {
3705
3722
  }
3706
3723
  http;
3707
3724
  async list(params = {}) {
3708
- const query = stripUndefined10({ ...params });
3709
- const data = await this.http.get("/databases", query);
3725
+ const query2 = stripUndefined10({ ...params });
3726
+ const data = await this.http.get("/databases", query2);
3710
3727
  return listItems3(data);
3711
3728
  }
3712
3729
  async get(databaseId) {
@@ -3722,13 +3739,13 @@ var Databases = class {
3722
3739
  size: _deprecatedSize,
3723
3740
  ...rest
3724
3741
  } = params;
3725
- const body2 = stripUndefined10({
3742
+ const body3 = stripUndefined10({
3726
3743
  ...rest,
3727
3744
  engine_version: engine_version ?? version
3728
3745
  });
3729
3746
  const data = await this.http.request("/databases", {
3730
3747
  method: "POST",
3731
- body: body2,
3748
+ body: body3,
3732
3749
  headers: {
3733
3750
  "Idempotency-Key": idempotencyKey3(
3734
3751
  camelIdempotencyKey ?? snakeIdempotencyKey
@@ -3765,13 +3782,13 @@ var Databases = class {
3765
3782
  return unwrap24(data);
3766
3783
  }
3767
3784
  async logs(databaseId, params = {}) {
3768
- const query = stripUndefined10({
3785
+ const query2 = stripUndefined10({
3769
3786
  lines: params.lines,
3770
3787
  since: params.since
3771
3788
  });
3772
3789
  const data = await this.http.get(
3773
3790
  `/databases/${databaseId}/logs`,
3774
- query
3791
+ query2
3775
3792
  );
3776
3793
  return data;
3777
3794
  }
@@ -3863,7 +3880,7 @@ var DeploymentVersions = class {
3863
3880
  http;
3864
3881
  deploymentId;
3865
3882
  async list(params = {}) {
3866
- const query = stripUndefined11({
3883
+ const query2 = stripUndefined11({
3867
3884
  state: params.state,
3868
3885
  limit: params.limit,
3869
3886
  cursor: params.cursor,
@@ -3871,7 +3888,7 @@ var DeploymentVersions = class {
3871
3888
  });
3872
3889
  const data = await this.http.get(
3873
3890
  `/deployments/${this.deploymentId}/versions`,
3874
- query
3891
+ query2
3875
3892
  );
3876
3893
  return listItems4(data);
3877
3894
  }
@@ -3882,12 +3899,12 @@ var DeploymentVersions = class {
3882
3899
  return unwrap25(data);
3883
3900
  }
3884
3901
  async promote(versionId, opts = {}) {
3885
- const body2 = stripUndefined11({ environment: opts.environment });
3902
+ const body3 = stripUndefined11({ environment: opts.environment });
3886
3903
  const data = await this.http.request(
3887
3904
  `/deployments/${this.deploymentId}/versions/${versionId}/promote`,
3888
3905
  {
3889
3906
  method: "POST",
3890
- body: body2,
3907
+ body: body3,
3891
3908
  headers: { "Idempotency-Key": idempotencyKey4(opts.idempotencyKey) }
3892
3909
  }
3893
3910
  );
@@ -3960,7 +3977,7 @@ var DeploymentDomains = class {
3960
3977
  http;
3961
3978
  deploymentId;
3962
3979
  async add(domain, params = {}) {
3963
- const body2 = {
3980
+ const body3 = {
3964
3981
  domain,
3965
3982
  redirect_policy: params.redirectPolicy ?? params.redirect_policy,
3966
3983
  ...attributionBody(params)
@@ -3969,7 +3986,7 @@ var DeploymentDomains = class {
3969
3986
  `/deployments/${this.deploymentId}/domains`,
3970
3987
  {
3971
3988
  method: "POST",
3972
- body: stripUndefined11(body2),
3989
+ body: stripUndefined11(body3),
3973
3990
  headers: { "Idempotency-Key": idempotencyKey4(params.idempotencyKey) }
3974
3991
  }
3975
3992
  );
@@ -4001,7 +4018,7 @@ var Deployments = class {
4001
4018
  http;
4002
4019
  async list(params = {}) {
4003
4020
  const projectId = params.projectId ?? params.project_id;
4004
- const query = stripUndefined11({
4021
+ const query2 = stripUndefined11({
4005
4022
  project_id: projectId,
4006
4023
  state: params.state,
4007
4024
  limit: params.limit,
@@ -4010,7 +4027,7 @@ var Deployments = class {
4010
4027
  });
4011
4028
  const data = await this.http.get(
4012
4029
  "/deployments",
4013
- query
4030
+ query2
4014
4031
  );
4015
4032
  return listItems4(data);
4016
4033
  }
@@ -4019,7 +4036,7 @@ var Deployments = class {
4019
4036
  return unwrap25(data);
4020
4037
  }
4021
4038
  async create(params) {
4022
- const body2 = stripUndefined11({
4039
+ const body3 = stripUndefined11({
4023
4040
  name: params.name,
4024
4041
  repo_url: params.repoUrl ?? params.repo_url,
4025
4042
  branch: params.branch,
@@ -4032,7 +4049,7 @@ var Deployments = class {
4032
4049
  });
4033
4050
  const data = await this.http.request("/deployments", {
4034
4051
  method: "POST",
4035
- body: body2,
4052
+ body: body3,
4036
4053
  headers: { "Idempotency-Key": idempotencyKey4(params.idempotencyKey) }
4037
4054
  });
4038
4055
  return unwrap25(data);
@@ -4182,7 +4199,7 @@ var Deployments = class {
4182
4199
  };
4183
4200
  }
4184
4201
  async update(deploymentId, params) {
4185
- const body2 = stripUndefined11({
4202
+ const body3 = stripUndefined11({
4186
4203
  name: params.name,
4187
4204
  branch: params.branch,
4188
4205
  build_command: params.buildCommand ?? params.build_command,
@@ -4191,7 +4208,7 @@ var Deployments = class {
4191
4208
  });
4192
4209
  const data = await this.http.patch(
4193
4210
  `/deployments/${deploymentId}`,
4194
- body2
4211
+ body3
4195
4212
  );
4196
4213
  return unwrap25(data);
4197
4214
  }
@@ -4199,7 +4216,7 @@ var Deployments = class {
4199
4216
  await this.http.delete(`/deployments/${deploymentId}`);
4200
4217
  }
4201
4218
  async publish(deploymentId, params) {
4202
- const body2 = stripUndefined11({
4219
+ const body3 = stripUndefined11({
4203
4220
  source_sandbox_id: params.sourceSandboxId ?? params.source_sandbox_id,
4204
4221
  output_path: params.outputPath ?? params.output_path,
4205
4222
  entrypoint: params.entrypoint,
@@ -4209,7 +4226,7 @@ var Deployments = class {
4209
4226
  `/deployments/${deploymentId}/publish`,
4210
4227
  {
4211
4228
  method: "POST",
4212
- body: body2,
4229
+ body: body3,
4213
4230
  headers: { "Idempotency-Key": idempotencyKey4(params.idempotencyKey) }
4214
4231
  }
4215
4232
  );
@@ -4221,7 +4238,7 @@ var Deployments = class {
4221
4238
  * phase. Prefer `publish()` once Phase 2B/3 lands.
4222
4239
  */
4223
4240
  async publishFromSandbox(sandboxId, params = {}) {
4224
- const body2 = stripUndefined11({
4241
+ const body3 = stripUndefined11({
4225
4242
  name: params.name,
4226
4243
  deployment_id: params.deploymentId ?? params.deployment_id,
4227
4244
  output_path: params.outputPath ?? params.output_path,
@@ -4234,21 +4251,21 @@ var Deployments = class {
4234
4251
  `/sandboxes/${sandboxId}/deploy`,
4235
4252
  {
4236
4253
  method: "POST",
4237
- body: body2,
4254
+ body: body3,
4238
4255
  headers: { "Idempotency-Key": idempotencyKey4(params.idempotencyKey) }
4239
4256
  }
4240
4257
  );
4241
4258
  return unwrap25(data);
4242
4259
  }
4243
4260
  async rollback(deploymentId, params = {}) {
4244
- const body2 = stripUndefined11({
4261
+ const body3 = stripUndefined11({
4245
4262
  version_id: params.versionId ?? params.version_id
4246
4263
  });
4247
4264
  const data = await this.http.request(
4248
4265
  `/deployments/${deploymentId}/rollback`,
4249
4266
  {
4250
4267
  method: "POST",
4251
- body: body2,
4268
+ body: body3,
4252
4269
  headers: { "Idempotency-Key": idempotencyKey4(params.idempotencyKey) }
4253
4270
  }
4254
4271
  );
@@ -4273,10 +4290,10 @@ var Deployments = class {
4273
4290
  return listItems4(data);
4274
4291
  }
4275
4292
  async setEnv(deploymentId, vars, opts = {}) {
4276
- const body2 = stripUndefined11({ env: vars, environment: opts.environment });
4293
+ const body3 = stripUndefined11({ env: vars, environment: opts.environment });
4277
4294
  const data = await this.http.post(
4278
4295
  `/deployments/${deploymentId}/env`,
4279
- body2
4296
+ body3
4280
4297
  );
4281
4298
  return listItems4(data);
4282
4299
  }
@@ -4302,12 +4319,12 @@ function workspaceId(params) {
4302
4319
  return params?.workspace_id ?? params?.workspaceId;
4303
4320
  }
4304
4321
  function ensureBody(params) {
4305
- const body2 = {};
4322
+ const body3 = {};
4306
4323
  const id = params.workspace_id ?? params.workspaceId;
4307
4324
  const externalId = params.external_workspace_id ?? params.externalWorkspaceId;
4308
- if (id) body2.workspace_id = id;
4309
- if (externalId) body2.external_workspace_id = externalId;
4310
- return body2;
4325
+ if (id) body3.workspace_id = id;
4326
+ if (externalId) body3.external_workspace_id = externalId;
4327
+ return body3;
4311
4328
  }
4312
4329
  function unwrapHost(response) {
4313
4330
  const host = response.data ?? response.host;
@@ -4552,12 +4569,12 @@ var Embeddings = class {
4552
4569
  * `{ object: "list", data: [...], model, usage }`.
4553
4570
  */
4554
4571
  async create(params) {
4555
- const body2 = Object.fromEntries(
4572
+ const body3 = Object.fromEntries(
4556
4573
  Object.entries(params).filter(([, v]) => v !== void 0)
4557
4574
  );
4558
4575
  return this.http.post(
4559
4576
  "/intelligence/embeddings",
4560
- body2
4577
+ body3
4561
4578
  );
4562
4579
  }
4563
4580
  };
@@ -4591,8 +4608,8 @@ var ExternalKeys = class {
4591
4608
  }
4592
4609
  /** Create / register an external provider key. */
4593
4610
  async create(params) {
4594
- const body2 = stripUndefined12(params);
4595
- const data = await this.http.post("/external-keys", body2);
4611
+ const body3 = stripUndefined12(params);
4612
+ const data = await this.http.post("/external-keys", body3);
4596
4613
  return unwrap27(data);
4597
4614
  }
4598
4615
  /** Resolve (preview) the stored key for a provider. */
@@ -4640,8 +4657,8 @@ var FlatCustomDomains = class {
4640
4657
  }
4641
4658
  http;
4642
4659
  async list(params = {}) {
4643
- const query = stripUndefined13({ ...params });
4644
- const data = await this.http.get("/custom-domains", query);
4660
+ const query2 = stripUndefined13({ ...params });
4661
+ const data = await this.http.get("/custom-domains", query2);
4645
4662
  return listItems5(data);
4646
4663
  }
4647
4664
  async create(params) {
@@ -4652,7 +4669,7 @@ var FlatCustomDomains = class {
4652
4669
  redirectPolicy,
4653
4670
  ...rest
4654
4671
  } = params;
4655
- const body2 = stripUndefined13({
4672
+ const body3 = stripUndefined13({
4656
4673
  ...rest,
4657
4674
  resource_type: resourceType ?? rest.resource_type,
4658
4675
  resource_id: resourceId ?? rest.resource_id,
@@ -4660,7 +4677,7 @@ var FlatCustomDomains = class {
4660
4677
  });
4661
4678
  const data = await this.http.request("/custom-domains", {
4662
4679
  method: "POST",
4663
- body: body2,
4680
+ body: body3,
4664
4681
  headers: { "Idempotency-Key": idempotencyKey5(ikey) }
4665
4682
  });
4666
4683
  return unwrap28(data);
@@ -4699,8 +4716,8 @@ var Functions = class {
4699
4716
  }
4700
4717
  http;
4701
4718
  async list(params = {}) {
4702
- const query = stripUndefined14({ ...params });
4703
- const data = await this.http.get("/functions", query);
4719
+ const query2 = stripUndefined14({ ...params });
4720
+ const data = await this.http.get("/functions", query2);
4704
4721
  return listItems6(data);
4705
4722
  }
4706
4723
  async get(functionId) {
@@ -4709,28 +4726,28 @@ var Functions = class {
4709
4726
  }
4710
4727
  async create(params) {
4711
4728
  const { idempotencyKey: ikey, memoryMb, timeoutSec, ...rest } = params;
4712
- const body2 = stripUndefined14({
4729
+ const body3 = stripUndefined14({
4713
4730
  ...rest,
4714
4731
  memory_mb: memoryMb ?? rest.memory_mb,
4715
4732
  timeout_sec: timeoutSec ?? rest.timeout_sec
4716
4733
  });
4717
4734
  const data = await this.http.request("/functions", {
4718
4735
  method: "POST",
4719
- body: body2,
4736
+ body: body3,
4720
4737
  headers: { "Idempotency-Key": idempotencyKey6(ikey) }
4721
4738
  });
4722
4739
  return unwrap29(data);
4723
4740
  }
4724
4741
  async update(functionId, params) {
4725
4742
  const { memoryMb, timeoutSec, ...rest } = params;
4726
- const body2 = stripUndefined14({
4743
+ const body3 = stripUndefined14({
4727
4744
  ...rest,
4728
4745
  memory_mb: memoryMb ?? rest.memory_mb,
4729
4746
  timeout_sec: timeoutSec ?? rest.timeout_sec
4730
4747
  });
4731
4748
  const data = await this.http.patch(
4732
4749
  `/functions/${functionId}`,
4733
- body2
4750
+ body3
4734
4751
  );
4735
4752
  return unwrap29(data);
4736
4753
  }
@@ -4783,8 +4800,8 @@ var HealthChecks = class {
4783
4800
  }
4784
4801
  http;
4785
4802
  async list(params = {}) {
4786
- const query = stripUndefined15({ ...params });
4787
- const data = await this.http.get("/health-checks", query);
4803
+ const query2 = stripUndefined15({ ...params });
4804
+ const data = await this.http.get("/health-checks", query2);
4788
4805
  return listItems7(data);
4789
4806
  }
4790
4807
  async get(checkId) {
@@ -4799,7 +4816,7 @@ var HealthChecks = class {
4799
4816
  expectedStatus,
4800
4817
  ...rest
4801
4818
  } = params;
4802
- const body2 = stripUndefined15({
4819
+ const body3 = stripUndefined15({
4803
4820
  ...rest,
4804
4821
  interval_sec: intervalSec ?? rest.interval_sec,
4805
4822
  timeout_sec: timeoutSec ?? rest.timeout_sec,
@@ -4807,14 +4824,14 @@ var HealthChecks = class {
4807
4824
  });
4808
4825
  const data = await this.http.request("/health-checks", {
4809
4826
  method: "POST",
4810
- body: body2,
4827
+ body: body3,
4811
4828
  headers: { "Idempotency-Key": idempotencyKey7(ikey) }
4812
4829
  });
4813
4830
  return unwrap30(data);
4814
4831
  }
4815
4832
  async update(checkId, params) {
4816
4833
  const { intervalSec, timeoutSec, expectedStatus, ...rest } = params;
4817
- const body2 = stripUndefined15({
4834
+ const body3 = stripUndefined15({
4818
4835
  ...rest,
4819
4836
  interval_sec: intervalSec ?? rest.interval_sec,
4820
4837
  timeout_sec: timeoutSec ?? rest.timeout_sec,
@@ -4822,7 +4839,7 @@ var HealthChecks = class {
4822
4839
  });
4823
4840
  const data = await this.http.patch(
4824
4841
  `/health-checks/${checkId}`,
4825
- body2
4842
+ body3
4826
4843
  );
4827
4844
  return unwrap30(data);
4828
4845
  }
@@ -4898,19 +4915,19 @@ var Integrations = class {
4898
4915
  // ── Test hooks ─────────────────────────────────────────────────────────────
4899
4916
  /** Send a test message to the connected Slack channel. */
4900
4917
  async slackSendTest(params = {}) {
4901
- const body2 = stripUndefined16(params);
4918
+ const body3 = stripUndefined16(params);
4902
4919
  const data = await this.http.post(
4903
4920
  "/integrations/slack/send-test",
4904
- body2
4921
+ body3
4905
4922
  );
4906
4923
  return unwrap31(data);
4907
4924
  }
4908
4925
  /** Send a test message to the connected Discord channel. */
4909
4926
  async discordSendTest(params = {}) {
4910
- const body2 = stripUndefined16(params);
4927
+ const body3 = stripUndefined16(params);
4911
4928
  const data = await this.http.post(
4912
4929
  "/integrations/discord/send-test",
4913
- body2
4930
+ body3
4914
4931
  );
4915
4932
  return unwrap31(data);
4916
4933
  }
@@ -4922,10 +4939,10 @@ var Integrations = class {
4922
4939
  }
4923
4940
  /** Create a Linear issue via the connected workspace. */
4924
4941
  async linearCreateIssue(params = {}) {
4925
- const body2 = stripUndefined16(params);
4942
+ const body3 = stripUndefined16(params);
4926
4943
  const data = await this.http.post(
4927
4944
  "/integrations/linear/create-issue",
4928
- body2
4945
+ body3
4929
4946
  );
4930
4947
  return unwrap31(data);
4931
4948
  }
@@ -4953,10 +4970,10 @@ var Mcp = class {
4953
4970
  http;
4954
4971
  /** Send a JSON-RPC request to the MCP endpoint. */
4955
4972
  async dispatch(params = {}) {
4956
- const body2 = stripUndefined17(params);
4973
+ const body3 = stripUndefined17(params);
4957
4974
  const data = await this.http.post(
4958
4975
  "/mcp",
4959
- Object.keys(body2).length > 0 ? body2 : void 0
4976
+ Object.keys(body3).length > 0 ? body3 : void 0
4960
4977
  );
4961
4978
  return unwrap32(data);
4962
4979
  }
@@ -4994,10 +5011,10 @@ var Models = class {
4994
5011
  http;
4995
5012
  /** List all models available to the calling tenant (OpenAI-compatible shape). */
4996
5013
  async list(filters = {}) {
4997
- const query = Object.fromEntries(
5014
+ const query2 = Object.fromEntries(
4998
5015
  Object.entries(filters).filter(([, v]) => v !== void 0)
4999
5016
  );
5000
- const data = await this.http.get("/intelligence/models", query);
5017
+ const data = await this.http.get("/intelligence/models", query2);
5001
5018
  return unwrap33(data);
5002
5019
  }
5003
5020
  /**
@@ -5683,8 +5700,8 @@ var ProjectAuth = class {
5683
5700
  }
5684
5701
  /** Enable project auth. */
5685
5702
  async enable(params) {
5686
- const body2 = requestBody(params);
5687
- const data = await this.http.post("/project-auth/enable", body2);
5703
+ const body3 = requestBody(params);
5704
+ const data = await this.http.post("/project-auth/enable", body3);
5688
5705
  return unwrap34(data);
5689
5706
  }
5690
5707
  /** Disable project auth. */
@@ -5697,8 +5714,8 @@ var ProjectAuth = class {
5697
5714
  }
5698
5715
  /** Update project-auth configuration. */
5699
5716
  async update(params) {
5700
- const body2 = requestBody(params);
5701
- const data = await this.http.patch("/project-auth/config", body2);
5717
+ const body3 = requestBody(params);
5718
+ const data = await this.http.patch("/project-auth/config", body3);
5702
5719
  return unwrap34(data);
5703
5720
  }
5704
5721
  };
@@ -5735,8 +5752,8 @@ var ProjectIntegrations = class {
5735
5752
  http;
5736
5753
  /** List project integrations. */
5737
5754
  async list(params = {}) {
5738
- const query = stripUndefined19(params);
5739
- const data = await this.http.get("/project-integrations", query);
5755
+ const query2 = stripUndefined19(params);
5756
+ const data = await this.http.get("/project-integrations", query2);
5740
5757
  return listItems9(data);
5741
5758
  }
5742
5759
  /** List supported providers and their schemas. */
@@ -5753,16 +5770,16 @@ var ProjectIntegrations = class {
5753
5770
  }
5754
5771
  /** Create a project integration. */
5755
5772
  async create(params) {
5756
- const body2 = stripUndefObj2(params);
5757
- const data = await this.http.post("/project-integrations", body2);
5773
+ const body3 = stripUndefObj2(params);
5774
+ const data = await this.http.post("/project-integrations", body3);
5758
5775
  return unwrap35(data);
5759
5776
  }
5760
5777
  /** Update a project integration. */
5761
5778
  async update(integrationId, params) {
5762
- const body2 = stripUndefObj2(params);
5779
+ const body3 = stripUndefObj2(params);
5763
5780
  const data = await this.http.patch(
5764
5781
  `/project-integrations/${integrationId}`,
5765
- body2
5782
+ body3
5766
5783
  );
5767
5784
  return unwrap35(data);
5768
5785
  }
@@ -5802,11 +5819,11 @@ var ProviderDefaults = class {
5802
5819
  }
5803
5820
  /** Replace the fleet-wide defaults (PUT /admin/provider-defaults). */
5804
5821
  async update(opts) {
5805
- const body2 = Object.fromEntries(
5822
+ const body3 = Object.fromEntries(
5806
5823
  Object.entries(opts).filter(([, v]) => v !== void 0)
5807
5824
  );
5808
5825
  return unwrap36(
5809
- await this.http.put("/admin/provider-defaults", body2)
5826
+ await this.http.put("/admin/provider-defaults", body3)
5810
5827
  );
5811
5828
  }
5812
5829
  // ── Per-tenant overrides ────────────────────────────────────────────────
@@ -5818,13 +5835,13 @@ var ProviderDefaults = class {
5818
5835
  );
5819
5836
  }
5820
5837
  async setTenant(tenantId, opts) {
5821
- const body2 = Object.fromEntries(
5838
+ const body3 = Object.fromEntries(
5822
5839
  Object.entries(opts).filter(([, v]) => v !== void 0)
5823
5840
  );
5824
5841
  return unwrap36(
5825
5842
  await this.http.put(
5826
5843
  `/admin/tenants/${tenantId}/provider-config`,
5827
- body2
5844
+ body3
5828
5845
  )
5829
5846
  );
5830
5847
  }
@@ -5889,6 +5906,86 @@ var Regions = class {
5889
5906
  }
5890
5907
  };
5891
5908
 
5909
+ // src/resources/runtime-env.ts
5910
+ function unwrap38(payload) {
5911
+ if (payload !== null && typeof payload === "object" && "data" in payload && payload.data !== void 0) {
5912
+ return payload.data;
5913
+ }
5914
+ return payload;
5915
+ }
5916
+ function body2(params) {
5917
+ return Object.fromEntries(
5918
+ Object.entries({
5919
+ scope: params.scope,
5920
+ workspace_id: params.workspaceId ?? params.workspace_id,
5921
+ project_id: params.projectId ?? params.project_id,
5922
+ target: params.target,
5923
+ name: params.name,
5924
+ value: params.value,
5925
+ enabled: params.enabled,
5926
+ metadata: params.metadata
5927
+ }).filter(([, value]) => value !== void 0)
5928
+ );
5929
+ }
5930
+ function query(params) {
5931
+ return {
5932
+ scope: params.scope,
5933
+ workspace_id: params.workspaceId ?? params.workspace_id,
5934
+ project_id: params.projectId ?? params.project_id,
5935
+ target: params.target
5936
+ };
5937
+ }
5938
+ function normalize2(row) {
5939
+ const tenantId = row.tenantId ?? row.tenant_id;
5940
+ const workspaceId2 = row.workspaceId ?? row.workspace_id;
5941
+ const projectId = row.projectId ?? row.project_id;
5942
+ const createdAt = row.createdAt ?? row.created_at;
5943
+ const updatedAt = row.updatedAt ?? row.updated_at;
5944
+ return {
5945
+ ...row,
5946
+ ...tenantId !== void 0 ? { tenantId } : {},
5947
+ ...workspaceId2 !== void 0 ? { workspaceId: workspaceId2 } : {},
5948
+ ...projectId !== void 0 ? { projectId } : {},
5949
+ ...createdAt !== void 0 ? { createdAt } : {},
5950
+ ...updatedAt !== void 0 ? { updatedAt } : {}
5951
+ };
5952
+ }
5953
+ var RuntimeEnv = class {
5954
+ constructor(http) {
5955
+ this.http = http;
5956
+ }
5957
+ http;
5958
+ async list(params = {}) {
5959
+ const response = await this.http.get(
5960
+ "/runtime-env",
5961
+ query(params)
5962
+ );
5963
+ return unwrap38(response).map(normalize2);
5964
+ }
5965
+ async get(id) {
5966
+ return normalize2(
5967
+ unwrap38(
5968
+ await this.http.get(
5969
+ `/runtime-env/${encodeURIComponent(id)}`
5970
+ )
5971
+ )
5972
+ );
5973
+ }
5974
+ async set(params) {
5975
+ return normalize2(
5976
+ unwrap38(
5977
+ await this.http.post(
5978
+ "/runtime-env",
5979
+ body2(params)
5980
+ )
5981
+ )
5982
+ );
5983
+ }
5984
+ async delete(id) {
5985
+ await this.http.delete(`/runtime-env/${encodeURIComponent(id)}`);
5986
+ }
5987
+ };
5988
+
5892
5989
  // src/resources/sandboxes.ts
5893
5990
  function encodeContent(content) {
5894
5991
  const bytes = typeof content === "string" ? new TextEncoder().encode(content) : content;
@@ -5903,7 +6000,7 @@ var AGENT_WORKSPACE_TIMEOUT_SEC = 86400;
5903
6000
  var AGENT_WORKSPACE_IDLE_TIMEOUT_SEC = 1800;
5904
6001
  var AGENT_WORKSPACE_SNAPSHOT_EXPIRATION_DAYS = 30;
5905
6002
  var AGENT_WORKSPACE_KEEP_LAST_SNAPSHOTS = 1;
5906
- function unwrap38(payload) {
6003
+ function unwrap39(payload) {
5907
6004
  if (payload !== null && typeof payload === "object" && "data" in payload && payload.data !== void 0) {
5908
6005
  return payload.data;
5909
6006
  }
@@ -6126,11 +6223,11 @@ var SandboxTerminal = class {
6126
6223
  }
6127
6224
  sandbox;
6128
6225
  async create(params = {}) {
6129
- const body2 = Object.fromEntries(
6226
+ const body3 = Object.fromEntries(
6130
6227
  Object.entries(params).filter(([, v]) => v !== void 0)
6131
6228
  );
6132
- const response = unwrap38(
6133
- await this.sandbox.http.post(`/sandboxes/${this.sandbox.id}/terminal`, body2)
6229
+ const response = unwrap39(
6230
+ await this.sandbox.http.post(`/sandboxes/${this.sandbox.id}/terminal`, body3)
6134
6231
  );
6135
6232
  return response;
6136
6233
  }
@@ -6172,21 +6269,21 @@ var SandboxPreviews = class {
6172
6269
  return [];
6173
6270
  }
6174
6271
  async create(port, opts = {}) {
6175
- const body2 = {
6272
+ const body3 = {
6176
6273
  port,
6177
6274
  ...Object.fromEntries(
6178
6275
  Object.entries(opts).filter(([, v]) => v !== void 0)
6179
6276
  )
6180
6277
  };
6181
- return unwrap38(
6278
+ return unwrap39(
6182
6279
  await this.http.post(
6183
6280
  `/sandboxes/${this.sandbox.id}/previews`,
6184
- body2
6281
+ body3
6185
6282
  )
6186
6283
  );
6187
6284
  }
6188
6285
  async get(previewId) {
6189
- return unwrap38(
6286
+ return unwrap39(
6190
6287
  await this.http.get(
6191
6288
  `/sandboxes/${this.sandbox.id}/previews/${previewId}`
6192
6289
  )
@@ -6199,7 +6296,7 @@ var SandboxPreviews = class {
6199
6296
  }
6200
6297
  /** Mint a share token for previewId. */
6201
6298
  async share(previewId, opts = {}) {
6202
- return unwrap38(
6299
+ return unwrap39(
6203
6300
  await this.http.post(
6204
6301
  `/sandboxes/${this.sandbox.id}/previews/${previewId}/share`,
6205
6302
  { ttl_seconds: opts.ttl_seconds ?? opts.expires_in_sec ?? 3600 }
@@ -6268,7 +6365,7 @@ var SandboxTags = class {
6268
6365
  sandbox;
6269
6366
  /** Replace the full tag list with tags. */
6270
6367
  async set(tags) {
6271
- return unwrap38(
6368
+ return unwrap39(
6272
6369
  await this.sandbox.http.patch(`/sandboxes/${this.sandbox.id}/tags`, { tags })
6273
6370
  );
6274
6371
  }
@@ -6336,14 +6433,14 @@ var Sandbox = class _Sandbox {
6336
6433
  return this.data.template_id ?? this.data.image_id ?? "";
6337
6434
  }
6338
6435
  async refresh() {
6339
- this.data = unwrap38(
6436
+ this.data = unwrap39(
6340
6437
  await this.http.get(`/sandboxes/${this.id}`)
6341
6438
  );
6342
6439
  return this;
6343
6440
  }
6344
6441
  async runExec(command, options) {
6345
6442
  this.assertRunning("exec");
6346
- const response = unwrap38(
6443
+ const response = unwrap39(
6347
6444
  await this.http.post(
6348
6445
  `/sandboxes/${this.id}/exec`,
6349
6446
  execBody(command, options)
@@ -6387,25 +6484,25 @@ var Sandbox = class _Sandbox {
6387
6484
  );
6388
6485
  }
6389
6486
  async createExport(params) {
6390
- const body2 = typeof params === "string" ? { path: params } : Array.isArray(params) ? { paths: params } : params;
6391
- const response = unwrap38(
6487
+ const body3 = typeof params === "string" ? { path: params } : Array.isArray(params) ? { paths: params } : params;
6488
+ const response = unwrap39(
6392
6489
  await this.http.post(
6393
6490
  `/sandboxes/${this.id}/exports`,
6394
- body2
6491
+ body3
6395
6492
  )
6396
6493
  );
6397
6494
  return normalizeExport(response);
6398
6495
  }
6399
6496
  async downloadExport(paths, options = {}) {
6400
- const query = new URLSearchParams();
6497
+ const query2 = new URLSearchParams();
6401
6498
  if (Array.isArray(paths)) {
6402
- for (const path of paths) query.append("paths[]", path);
6499
+ for (const path of paths) query2.append("paths[]", path);
6403
6500
  } else {
6404
- query.set("path", paths);
6501
+ query2.set("path", paths);
6405
6502
  }
6406
- if (options.filename) query.set("filename", options.filename);
6503
+ if (options.filename) query2.set("filename", options.filename);
6407
6504
  return this.http.getBinary(
6408
- `/sandboxes/${this.id}/exports/download?${query.toString()}`
6505
+ `/sandboxes/${this.id}/exports/download?${query2.toString()}`
6409
6506
  );
6410
6507
  }
6411
6508
  async readFile(path) {
@@ -6413,7 +6510,7 @@ var Sandbox = class _Sandbox {
6413
6510
  }
6414
6511
  async listFiles(path = "/workspace") {
6415
6512
  this.assertRunning("files.list");
6416
- const response = unwrap38(
6513
+ const response = unwrap39(
6417
6514
  await this.http.get(
6418
6515
  `/sandboxes/${this.id}/files`,
6419
6516
  { path }
@@ -6423,7 +6520,7 @@ var Sandbox = class _Sandbox {
6423
6520
  }
6424
6521
  async statFile(path) {
6425
6522
  this.assertRunning("files.stat");
6426
- return unwrap38(
6523
+ return unwrap39(
6427
6524
  await this.http.post(
6428
6525
  `/sandboxes/${this.id}/files/stat`,
6429
6526
  { path }
@@ -6432,7 +6529,7 @@ var Sandbox = class _Sandbox {
6432
6529
  }
6433
6530
  async expose(port) {
6434
6531
  this.assertRunning("expose");
6435
- const response = unwrap38(
6532
+ const response = unwrap39(
6436
6533
  await this.http.post(
6437
6534
  `/sandboxes/${this.id}/expose`,
6438
6535
  port === void 0 ? {} : { port }
@@ -6442,7 +6539,7 @@ var Sandbox = class _Sandbox {
6442
6539
  }
6443
6540
  async startTemplate(options = {}) {
6444
6541
  this.assertRunning("startTemplate");
6445
- return unwrap38(
6542
+ return unwrap39(
6446
6543
  await this.http.post(
6447
6544
  `/sandboxes/${this.id}/template/start`,
6448
6545
  options
@@ -6450,7 +6547,7 @@ var Sandbox = class _Sandbox {
6450
6547
  );
6451
6548
  }
6452
6549
  async getArtifacts() {
6453
- return unwrap38(
6550
+ return unwrap39(
6454
6551
  await this.http.get(
6455
6552
  `/sandboxes/${this.id}/artifacts`
6456
6553
  )
@@ -6461,7 +6558,7 @@ var Sandbox = class _Sandbox {
6461
6558
  `/sandboxes/${this.id}/logs`,
6462
6559
  { lines }
6463
6560
  );
6464
- return unwrap38(response);
6561
+ return unwrap39(response);
6465
6562
  }
6466
6563
  streamLogs() {
6467
6564
  return this.http.stream(
@@ -6470,7 +6567,7 @@ var Sandbox = class _Sandbox {
6470
6567
  }
6471
6568
  async createSnapshot(comment) {
6472
6569
  this.assertRunning("snapshots.create");
6473
- return unwrap38(
6570
+ return unwrap39(
6474
6571
  await this.http.post(
6475
6572
  `/sandboxes/${this.id}/snapshots`,
6476
6573
  comment ? { comment } : {}
@@ -6478,14 +6575,14 @@ var Sandbox = class _Sandbox {
6478
6575
  );
6479
6576
  }
6480
6577
  async listSnapshots() {
6481
- return unwrap38(
6578
+ return unwrap39(
6482
6579
  await this.http.get(
6483
6580
  `/sandboxes/${this.id}/snapshots`
6484
6581
  )
6485
6582
  );
6486
6583
  }
6487
6584
  async restoreSnapshot(snapshotId) {
6488
- const data = unwrap38(
6585
+ const data = unwrap39(
6489
6586
  await this.http.post(
6490
6587
  `/sandboxes/${this.id}/restore/${snapshotId}`,
6491
6588
  {}
@@ -6502,13 +6599,13 @@ var Sandbox = class _Sandbox {
6502
6599
  */
6503
6600
  async fork(opts = {}) {
6504
6601
  this.assertRunning("fork");
6505
- const body2 = {};
6506
- if (opts.name !== void 0) body2.name = opts.name;
6507
- if (opts.metadata !== void 0) body2.metadata = opts.metadata;
6508
- const data = unwrap38(
6602
+ const body3 = {};
6603
+ if (opts.name !== void 0) body3.name = opts.name;
6604
+ if (opts.metadata !== void 0) body3.metadata = opts.metadata;
6605
+ const data = unwrap39(
6509
6606
  await this.http.post(
6510
6607
  `/sandboxes/${this.id}/fork`,
6511
- body2
6608
+ body3
6512
6609
  )
6513
6610
  );
6514
6611
  return new _Sandbox(this.http, data);
@@ -6527,7 +6624,7 @@ var Sandbox = class _Sandbox {
6527
6624
  if (keepLastSnapshots !== void 0) {
6528
6625
  metadata.keep_last_snapshots = keepLastSnapshots;
6529
6626
  }
6530
- const body2 = stripUndefined20({
6627
+ const body3 = stripUndefined20({
6531
6628
  name: params.name,
6532
6629
  slug: params.slug,
6533
6630
  tags: params.tags,
@@ -6536,17 +6633,17 @@ var Sandbox = class _Sandbox {
6536
6633
  timeout_sec: params.timeout_sec ?? params.timeoutSec,
6537
6634
  idle_timeout_sec: params.idle_timeout_sec ?? params.idleTimeoutSec
6538
6635
  });
6539
- const data = unwrap38(
6636
+ const data = unwrap39(
6540
6637
  await this.http.patch(
6541
6638
  `/sandboxes/${this.id}`,
6542
- body2
6639
+ body3
6543
6640
  )
6544
6641
  );
6545
6642
  this.data = data;
6546
6643
  return this;
6547
6644
  }
6548
6645
  async extend(timeoutSec) {
6549
- const data = unwrap38(
6646
+ const data = unwrap39(
6550
6647
  await this.http.post(
6551
6648
  `/sandboxes/${this.id}/extend`,
6552
6649
  { timeout_sec: timeoutSec }
@@ -6569,7 +6666,7 @@ var Sandbox = class _Sandbox {
6569
6666
  return raw;
6570
6667
  }
6571
6668
  async pause() {
6572
- const data = unwrap38(
6669
+ const data = unwrap39(
6573
6670
  await this.http.post(
6574
6671
  `/sandboxes/${this.id}/pause`,
6575
6672
  {}
@@ -6579,7 +6676,7 @@ var Sandbox = class _Sandbox {
6579
6676
  return this;
6580
6677
  }
6581
6678
  async resume() {
6582
- const data = unwrap38(
6679
+ const data = unwrap39(
6583
6680
  await this.http.post(
6584
6681
  `/sandboxes/${this.id}/resume`,
6585
6682
  {}
@@ -6615,7 +6712,7 @@ var Sandbox = class _Sandbox {
6615
6712
  if (idempotencyKey11) {
6616
6713
  requestOptions.headers = { "Idempotency-Key": idempotencyKey11 };
6617
6714
  }
6618
- return unwrap38(
6715
+ return unwrap39(
6619
6716
  await this.http.request(
6620
6717
  `/sandboxes/${this.id}/deploy`,
6621
6718
  requestOptions
@@ -6627,7 +6724,7 @@ var Sandbox = class _Sandbox {
6627
6724
  }
6628
6725
  /** Check readiness of the sandbox (GET /sandboxes/:id/readiness). */
6629
6726
  async readiness() {
6630
- return unwrap38(
6727
+ return unwrap39(
6631
6728
  await this.http.get(
6632
6729
  `/sandboxes/${this.id}/readiness`
6633
6730
  )
@@ -6795,7 +6892,7 @@ var Sandboxes = class {
6795
6892
  if (idempotencyKey11) {
6796
6893
  requestOptions.headers = { "Idempotency-Key": idempotencyKey11 };
6797
6894
  }
6798
- const data = unwrap38(
6895
+ const data = unwrap39(
6799
6896
  await this.http.request(
6800
6897
  "/sandboxes",
6801
6898
  requestOptions
@@ -6814,7 +6911,7 @@ var Sandboxes = class {
6814
6911
  return listItems11(data).map((item) => new Sandbox(this.http, item));
6815
6912
  }
6816
6913
  async get(id) {
6817
- const data = unwrap38(
6914
+ const data = unwrap39(
6818
6915
  await this.http.get(`/sandboxes/${id}`)
6819
6916
  );
6820
6917
  return new Sandbox(this.http, data);
@@ -6823,7 +6920,7 @@ var Sandboxes = class {
6823
6920
  return this.get(id);
6824
6921
  }
6825
6922
  async getByName(name) {
6826
- const data = unwrap38(
6923
+ const data = unwrap39(
6827
6924
  await this.http.get(
6828
6925
  `/sandboxes/by-name/${encodeURIComponent(name)}`
6829
6926
  )
@@ -6888,7 +6985,7 @@ var Sandboxes = class {
6888
6985
  metadata: params.metadata
6889
6986
  })
6890
6987
  );
6891
- return unwrap38(response);
6988
+ return unwrap39(response);
6892
6989
  }
6893
6990
  async createTemplateBuild(templateId, params = {}) {
6894
6991
  const response = await this.http.post(
@@ -6898,19 +6995,19 @@ var Sandboxes = class {
6898
6995
  metadata: params.metadata
6899
6996
  })
6900
6997
  );
6901
- return unwrap38(response);
6998
+ return unwrap39(response);
6902
6999
  }
6903
7000
  async listTemplateBuilds(templateId) {
6904
7001
  const response = await this.http.get(
6905
7002
  `/sandbox-templates/${templateId}/builds`
6906
7003
  );
6907
- return unwrap38(response);
7004
+ return unwrap39(response);
6908
7005
  }
6909
7006
  async getTemplateBuild(buildId) {
6910
7007
  const response = await this.http.get(
6911
7008
  `/sandbox-template-builds/${buildId}`
6912
7009
  );
6913
- return unwrap38(response);
7010
+ return unwrap39(response);
6914
7011
  }
6915
7012
  };
6916
7013
  function toBase642(bytes) {
@@ -6922,7 +7019,7 @@ function toBase642(bytes) {
6922
7019
  }
6923
7020
  return btoa(binary);
6924
7021
  }
6925
- function unwrap39(payload) {
7022
+ function unwrap40(payload) {
6926
7023
  if (payload && typeof payload === "object" && "data" in payload) {
6927
7024
  return payload.data;
6928
7025
  }
@@ -6953,8 +7050,8 @@ var SandboxTemplates = class {
6953
7050
  http;
6954
7051
  async list(params = {}) {
6955
7052
  const includeAliases = params.includeAliases ?? params.include_aliases ?? false;
6956
- const query = includeAliases ? { include_aliases: true } : void 0;
6957
- const data = await this.http.get("/sandbox-templates", query);
7053
+ const query2 = includeAliases ? { include_aliases: true } : void 0;
7054
+ const data = await this.http.get("/sandbox-templates", query2);
6958
7055
  return listItems12(data, [
6959
7056
  "data",
6960
7057
  "templates",
@@ -6965,7 +7062,7 @@ var SandboxTemplates = class {
6965
7062
  const data = await this.http.get(
6966
7063
  `/sandbox-templates/${templateId}`
6967
7064
  );
6968
- return unwrap39(data);
7065
+ return unwrap40(data);
6969
7066
  }
6970
7067
  async create(params) {
6971
7068
  const {
@@ -6975,17 +7072,17 @@ var SandboxTemplates = class {
6975
7072
  name,
6976
7073
  ...rest
6977
7074
  } = params;
6978
- const body2 = stripUndefined21({
7075
+ const body3 = stripUndefined21({
6979
7076
  name,
6980
7077
  build_spec: buildSpec ?? build_spec,
6981
7078
  ...rest
6982
7079
  });
6983
7080
  const data = await this.http.request("/sandbox-templates", {
6984
7081
  method: "POST",
6985
- body: body2,
7082
+ body: body3,
6986
7083
  headers: { "Idempotency-Key": idempotencyKey8(ikey) }
6987
7084
  });
6988
- return unwrap39(data);
7085
+ return unwrap40(data);
6989
7086
  }
6990
7087
  async buildSpecSchema() {
6991
7088
  const data = await this.http.get("/sandbox-templates/build-spec");
@@ -7009,21 +7106,21 @@ var SandboxTemplates = class {
7009
7106
  }
7010
7107
  async createBuild(templateId, params = {}) {
7011
7108
  const { idempotencyKey: ikey, ...rest } = params;
7012
- const body2 = stripUndefined21(rest);
7109
+ const body3 = stripUndefined21(rest);
7013
7110
  const data = await this.http.request(
7014
7111
  `/sandbox-templates/${templateId}/builds`,
7015
7112
  {
7016
7113
  method: "POST",
7017
- body: body2,
7114
+ body: body3,
7018
7115
  headers: { "Idempotency-Key": idempotencyKey8(ikey) }
7019
7116
  }
7020
7117
  );
7021
- return unwrap39(data);
7118
+ return unwrap40(data);
7022
7119
  }
7023
7120
  };
7024
7121
 
7025
7122
  // src/resources/settings.ts
7026
- function unwrap40(payload) {
7123
+ function unwrap41(payload) {
7027
7124
  if (payload && typeof payload === "object") {
7028
7125
  const p = payload;
7029
7126
  for (const k of [
@@ -7039,7 +7136,7 @@ function unwrap40(payload) {
7039
7136
  return payload;
7040
7137
  }
7041
7138
  function listItems13(payload) {
7042
- const result = unwrap40(payload);
7139
+ const result = unwrap41(payload);
7043
7140
  if (Array.isArray(result)) return result;
7044
7141
  return [];
7045
7142
  }
@@ -7056,46 +7153,46 @@ var Settings = class {
7056
7153
  /** Get the current tenant settings. */
7057
7154
  async get() {
7058
7155
  const data = await this.http.get("/settings");
7059
- return unwrap40(data);
7156
+ return unwrap41(data);
7060
7157
  }
7061
7158
  /** Update tenant settings. */
7062
7159
  async update(params) {
7063
- const body2 = stripUndefined22(params);
7064
- const data = await this.http.put("/settings", body2);
7065
- return unwrap40(data);
7160
+ const body3 = stripUndefined22(params);
7161
+ const data = await this.http.put("/settings", body3);
7162
+ return unwrap41(data);
7066
7163
  }
7067
7164
  // ── Branding ──────────────────────────────────────────────────────────────
7068
7165
  /** Get tenant branding (logo, colors, custom wordmark). */
7069
7166
  async getBranding() {
7070
7167
  const data = await this.http.get("/settings/branding");
7071
- return unwrap40(data);
7168
+ return unwrap41(data);
7072
7169
  }
7073
7170
  /** Update tenant branding. */
7074
7171
  async updateBranding(params) {
7075
- const body2 = stripUndefined22(params);
7076
- const data = await this.http.put("/settings/branding", body2);
7077
- return unwrap40(data);
7172
+ const body3 = stripUndefined22(params);
7173
+ const data = await this.http.put("/settings/branding", body3);
7174
+ return unwrap41(data);
7078
7175
  }
7079
7176
  // ── Read-only reference data ───────────────────────────────────────────────
7080
7177
  /** Get tenant-scoped compute pricing. */
7081
7178
  async computePricing() {
7082
7179
  const data = await this.http.get("/settings/compute-pricing");
7083
- return unwrap40(data);
7180
+ return unwrap41(data);
7084
7181
  }
7085
7182
  /** Get tenant-scoped GPU pricing. */
7086
7183
  async gpuPricing() {
7087
7184
  const data = await this.http.get("/settings/gpu-pricing");
7088
- return unwrap40(data);
7185
+ return unwrap41(data);
7089
7186
  }
7090
7187
  /** List models available to this tenant. */
7091
7188
  async availableModels() {
7092
7189
  const data = await this.http.get("/settings/available-models");
7093
- return unwrap40(data);
7190
+ return unwrap41(data);
7094
7191
  }
7095
7192
  /** List regions enabled for this tenant. */
7096
7193
  async regions() {
7097
7194
  const data = await this.http.get("/settings/regions");
7098
- return unwrap40(data);
7195
+ return unwrap41(data);
7099
7196
  }
7100
7197
  // ── BYOK provider keys ────────────────────────────────────────────────────
7101
7198
  /** List tenant-level BYOK provider keys (Anthropic, OpenAI, etc.). */
@@ -7105,12 +7202,12 @@ var Settings = class {
7105
7202
  }
7106
7203
  /** Create or update a BYOK provider key. */
7107
7204
  async upsertProviderKey(provider, params) {
7108
- const body2 = stripUndefined22(params);
7205
+ const body3 = stripUndefined22(params);
7109
7206
  const data = await this.http.put(
7110
7207
  `/settings/provider-keys/${provider}`,
7111
- body2
7208
+ body3
7112
7209
  );
7113
- return unwrap40(data);
7210
+ return unwrap41(data);
7114
7211
  }
7115
7212
  /** Delete a BYOK provider key. */
7116
7213
  async deleteProviderKey(provider) {
@@ -7119,7 +7216,7 @@ var Settings = class {
7119
7216
  };
7120
7217
 
7121
7218
  // src/resources/snapshots-standalone.ts
7122
- function unwrap41(data) {
7219
+ function unwrap42(data) {
7123
7220
  if (data && typeof data === "object") {
7124
7221
  const d = data;
7125
7222
  for (const k of ["data", "snapshots", "items"]) {
@@ -7144,20 +7241,20 @@ var SnapshotsStandalone = class {
7144
7241
  }
7145
7242
  http;
7146
7243
  async list(filters = {}) {
7147
- const query = Object.fromEntries(
7244
+ const query2 = Object.fromEntries(
7148
7245
  Object.entries(filters).filter(([, v]) => v !== void 0)
7149
7246
  );
7150
- return unwrapList12(await this.http.get("/admin/snapshots", query));
7247
+ return unwrapList12(await this.http.get("/admin/snapshots", query2));
7151
7248
  }
7152
7249
  async get(snapshotId) {
7153
- return unwrap41(
7250
+ return unwrap42(
7154
7251
  await this.http.get(`/admin/snapshots/${snapshotId}`)
7155
7252
  );
7156
7253
  }
7157
7254
  };
7158
7255
 
7159
7256
  // src/resources/storage.ts
7160
- function unwrap42(payload) {
7257
+ function unwrap43(payload) {
7161
7258
  if (payload && typeof payload === "object" && "data" in payload) {
7162
7259
  return payload.data;
7163
7260
  }
@@ -7190,31 +7287,31 @@ var Storage = class {
7190
7287
  }
7191
7288
  async createBucket(params) {
7192
7289
  const { name, public: isPublic, visibility, ...rest } = params;
7193
- const body2 = stripUndefined23({
7290
+ const body3 = stripUndefined23({
7194
7291
  name,
7195
7292
  visibility: visibility ?? (isPublic === void 0 ? void 0 : isPublic ? "public" : "private"),
7196
7293
  ...rest
7197
7294
  });
7198
- const data = await this.http.post("/storage/buckets", body2);
7199
- return unwrap42(data);
7295
+ const data = await this.http.post("/storage/buckets", body3);
7296
+ return unwrap43(data);
7200
7297
  }
7201
7298
  async getBucket(bucketId) {
7202
7299
  const data = await this.http.get(`/storage/buckets/${bucketId}`);
7203
- return unwrap42(data);
7300
+ return unwrap43(data);
7204
7301
  }
7205
7302
  async deleteBucket(bucketId) {
7206
7303
  await this.http.delete(`/storage/buckets/${bucketId}`);
7207
7304
  }
7208
7305
  // ── Objects ────────────────────────────────────────────────────────────────
7209
7306
  async listObjects(bucketId, params = {}) {
7210
- const query = stripUndefined23({
7307
+ const query2 = stripUndefined23({
7211
7308
  prefix: params.prefix,
7212
7309
  max_keys: params.max_keys ?? params.maxKeys ?? params.limit,
7213
7310
  marker: params.marker ?? params.cursor
7214
7311
  });
7215
7312
  const data = await this.http.get(
7216
7313
  `/storage/buckets/${bucketId}/objects`,
7217
- query
7314
+ query2
7218
7315
  );
7219
7316
  return listItems14(data, ["data", "objects", "items"]);
7220
7317
  }
@@ -7241,16 +7338,16 @@ var Storage = class {
7241
7338
  // ── Presigned URLs ─────────────────────────────────────────────────────────
7242
7339
  async presign(bucketId, params) {
7243
7340
  const operationMethod = params.operation === "put" ? "PUT" : params.operation === "get" ? "GET" : void 0;
7244
- const body2 = stripUndefined23({
7341
+ const body3 = stripUndefined23({
7245
7342
  key: params.key,
7246
7343
  method: params.method ?? operationMethod ?? "GET",
7247
7344
  expires_in: params.expiresIn ?? params.expires_in ?? params.expiresInSec ?? params.expires_in_sec ?? 3600
7248
7345
  });
7249
7346
  const data = await this.http.post(
7250
7347
  `/storage/buckets/${bucketId}/presign`,
7251
- body2
7348
+ body3
7252
7349
  );
7253
- return unwrap42(data);
7350
+ return unwrap43(data);
7254
7351
  }
7255
7352
  };
7256
7353
 
@@ -7340,7 +7437,7 @@ var OrgInvites = class {
7340
7437
  };
7341
7438
 
7342
7439
  // src/resources/tenant.ts
7343
- function unwrap43(payload) {
7440
+ function unwrap44(payload) {
7344
7441
  if (payload && typeof payload === "object") {
7345
7442
  const p = payload;
7346
7443
  for (const k of ["data", "tenant", "branding", "items"]) {
@@ -7362,14 +7459,14 @@ var PreviewDomain = class {
7362
7459
  /** Get the tenant's white-label preview domain settings. */
7363
7460
  async get() {
7364
7461
  const data = await this.http.get("/tenant/preview-domain");
7365
- return unwrap43(data);
7462
+ return unwrap44(data);
7366
7463
  }
7367
7464
  /** Set the tenant's white-label preview domain. */
7368
7465
  async set(domain) {
7369
7466
  const data = await this.http.put("/tenant/preview-domain", {
7370
7467
  preview_domain: domain
7371
7468
  });
7372
- return unwrap43(data);
7469
+ return unwrap44(data);
7373
7470
  }
7374
7471
  /** Re-run DNS verification for the configured preview domain. */
7375
7472
  async verify() {
@@ -7377,7 +7474,7 @@ var PreviewDomain = class {
7377
7474
  "/tenant/preview-domain/verify",
7378
7475
  {}
7379
7476
  );
7380
- return unwrap43(data);
7477
+ return unwrap44(data);
7381
7478
  }
7382
7479
  /** Remove the tenant's custom preview domain. */
7383
7480
  async delete() {
@@ -7392,14 +7489,14 @@ var Branding = class {
7392
7489
  /** Get tenant branding used by white-label hosted surfaces. */
7393
7490
  async get() {
7394
7491
  const data = await this.http.get("/tenant/branding");
7395
- return unwrap43(data);
7492
+ return unwrap44(data);
7396
7493
  }
7397
7494
  /** Update tenant branding used by white-label hosted surfaces. */
7398
7495
  async set(params) {
7399
7496
  const data = await this.http.put("/tenant/branding", {
7400
7497
  branding: stripUndefined24(params)
7401
7498
  });
7402
- return unwrap43(data);
7499
+ return unwrap44(data);
7403
7500
  }
7404
7501
  /** Reset tenant branding to platform defaults. */
7405
7502
  async delete() {
@@ -7421,7 +7518,7 @@ var Tenant = class {
7421
7518
  /** Get the current tenant's plan, limits, and live usage counters. */
7422
7519
  async current() {
7423
7520
  const data = await this.http.get("/tenant/plan");
7424
- return unwrap43(data);
7521
+ return unwrap44(data);
7425
7522
  }
7426
7523
  /** Convenience alias for `tenant.branding.get()`. */
7427
7524
  async getBranding() {
@@ -7438,7 +7535,7 @@ var Tenant = class {
7438
7535
  };
7439
7536
 
7440
7537
  // src/resources/usage.ts
7441
- function unwrap44(payload) {
7538
+ function unwrap45(payload) {
7442
7539
  if (payload && typeof payload === "object") {
7443
7540
  const p = payload;
7444
7541
  for (const k of ["data", "usage", "sessions", "summary", "items"]) {
@@ -7460,24 +7557,24 @@ var Usage = class {
7460
7557
  /** Get the current period usage summary. */
7461
7558
  async current() {
7462
7559
  const data = await this.http.get("/usage/summary");
7463
- return unwrap44(data);
7560
+ return unwrap45(data);
7464
7561
  }
7465
7562
  /** List per-session metering events. */
7466
7563
  async sessions(params = {}) {
7467
- const query = stripUndefined25(params);
7468
- const data = await this.http.get("/usage/sessions", query);
7469
- const result = unwrap44(data);
7564
+ const query2 = stripUndefined25(params);
7565
+ const data = await this.http.get("/usage/sessions", query2);
7566
+ const result = unwrap45(data);
7470
7567
  if (Array.isArray(result)) return result;
7471
7568
  return [];
7472
7569
  }
7473
7570
  /** Get a usage report for a period. */
7474
7571
  async report(params = {}) {
7475
- const query = stripUndefined25(params);
7476
- const data = await this.http.get("/usage/summary", query);
7477
- return unwrap44(data);
7572
+ const query2 = stripUndefined25(params);
7573
+ const data = await this.http.get("/usage/summary", query2);
7574
+ return unwrap45(data);
7478
7575
  }
7479
7576
  };
7480
- function unwrap45(payload) {
7577
+ function unwrap46(payload) {
7481
7578
  if (payload && typeof payload === "object" && "data" in payload) {
7482
7579
  return payload.data;
7483
7580
  }
@@ -7507,32 +7604,32 @@ var Volumes = class {
7507
7604
  }
7508
7605
  http;
7509
7606
  async list(params = {}) {
7510
- const query = stripUndefined26({ ...params });
7511
- const data = await this.http.get("/volumes", query);
7607
+ const query2 = stripUndefined26({ ...params });
7608
+ const data = await this.http.get("/volumes", query2);
7512
7609
  return listItems15(data);
7513
7610
  }
7514
7611
  async get(volumeId) {
7515
7612
  const data = await this.http.get(`/volumes/${volumeId}`);
7516
- return unwrap45(data);
7613
+ return unwrap46(data);
7517
7614
  }
7518
7615
  async create(params) {
7519
7616
  const { idempotencyKey: ikey, sizeGb, ...rest } = params;
7520
- const body2 = stripUndefined26({
7617
+ const body3 = stripUndefined26({
7521
7618
  ...rest,
7522
7619
  size_gb: sizeGb ?? rest.size_gb
7523
7620
  });
7524
7621
  const data = await this.http.request("/volumes", {
7525
7622
  method: "POST",
7526
- body: body2,
7623
+ body: body3,
7527
7624
  headers: { "Idempotency-Key": idempotencyKey9(ikey) }
7528
7625
  });
7529
- return unwrap45(data);
7626
+ return unwrap46(data);
7530
7627
  }
7531
7628
  async delete(volumeId) {
7532
7629
  await this.http.delete(`/volumes/${volumeId}`);
7533
7630
  }
7534
7631
  };
7535
- function unwrap46(payload) {
7632
+ function unwrap47(payload) {
7536
7633
  if (payload && typeof payload === "object" && "data" in payload) {
7537
7634
  return payload.data;
7538
7635
  }
@@ -7556,12 +7653,12 @@ function stripUndefined27(input) {
7556
7653
  function idempotencyKey10(key) {
7557
7654
  return key ?? randomUUID();
7558
7655
  }
7559
- function bodyBuffer(body2) {
7560
- if (Buffer.isBuffer(body2)) return body2;
7561
- if (typeof body2 === "string") return Buffer.from(body2, "utf8");
7562
- return Buffer.from(body2);
7656
+ function bodyBuffer(body3) {
7657
+ if (Buffer.isBuffer(body3)) return body3;
7658
+ if (typeof body3 === "string") return Buffer.from(body3, "utf8");
7659
+ return Buffer.from(body3);
7563
7660
  }
7564
- function verifySignature(body2, header, secret, toleranceSec = 300) {
7661
+ function verifySignature(body3, header, secret, toleranceSec = 300) {
7565
7662
  const parts = Object.fromEntries(
7566
7663
  header.split(",").map((chunk) => chunk.split("=", 2)).filter(([key, value]) => key && value)
7567
7664
  );
@@ -7574,7 +7671,7 @@ function verifySignature(body2, header, secret, toleranceSec = 300) {
7574
7671
  if (ageSec > toleranceSec) {
7575
7672
  throw new Error("webhook timestamp too old");
7576
7673
  }
7577
- const rawBody = bodyBuffer(body2);
7674
+ const rawBody = bodyBuffer(body3);
7578
7675
  const signed = Buffer.concat([Buffer.from(`${timestamp}.`), rawBody]);
7579
7676
  const expected = createHmac("sha256", secret).update(signed).digest("hex");
7580
7677
  try {
@@ -7593,28 +7690,28 @@ var Webhooks = class {
7593
7690
  http;
7594
7691
  static verifySignature = verifySignature;
7595
7692
  async list(params = {}) {
7596
- const query = stripUndefined27({ ...params });
7597
- const data = await this.http.get("/webhooks", query);
7693
+ const query2 = stripUndefined27({ ...params });
7694
+ const data = await this.http.get("/webhooks", query2);
7598
7695
  return listItems16(data);
7599
7696
  }
7600
7697
  async get(webhookId) {
7601
7698
  const data = await this.http.get(`/webhooks/${webhookId}`);
7602
- return unwrap46(data);
7699
+ return unwrap47(data);
7603
7700
  }
7604
7701
  async create(params) {
7605
7702
  const { idempotencyKey: ikey, ...rest } = params;
7606
- const body2 = stripUndefined27(rest);
7703
+ const body3 = stripUndefined27(rest);
7607
7704
  const data = await this.http.request("/webhooks", {
7608
7705
  method: "POST",
7609
- body: body2,
7706
+ body: body3,
7610
7707
  headers: { "Idempotency-Key": idempotencyKey10(ikey) }
7611
7708
  });
7612
- return unwrap46(data);
7709
+ return unwrap47(data);
7613
7710
  }
7614
7711
  async update(webhookId, params) {
7615
- const body2 = stripUndefined27(params);
7616
- const data = await this.http.patch(`/webhooks/${webhookId}`, body2);
7617
- return unwrap46(data);
7712
+ const body3 = stripUndefined27(params);
7713
+ const data = await this.http.patch(`/webhooks/${webhookId}`, body3);
7714
+ return unwrap47(data);
7618
7715
  }
7619
7716
  async delete(webhookId) {
7620
7717
  await this.http.delete(`/webhooks/${webhookId}`);
@@ -7627,7 +7724,7 @@ var Webhooks = class {
7627
7724
  headers: { "Idempotency-Key": idempotencyKey10(opts.idempotencyKey) }
7628
7725
  }
7629
7726
  );
7630
- return unwrap46(data);
7727
+ return unwrap47(data);
7631
7728
  }
7632
7729
  async deliveries(webhookId) {
7633
7730
  const data = await this.http.get(
@@ -7838,6 +7935,8 @@ var Miosa = class {
7838
7935
  agentRuns;
7839
7936
  /** Agent runtime profiles — tenant/workspace defaults for sandbox/computer agents. */
7840
7937
  agentRuntimeProfiles;
7938
+ /** Inherited runtime env — tenant/workspace/project defaults for agent runtimes. */
7939
+ runtimeEnv;
7841
7940
  /** Computer management — create, list, get, delete. */
7842
7941
  computers;
7843
7942
  /** Sandboxes — native code-execution environments under `/sandboxes`. */
@@ -7942,6 +8041,7 @@ var Miosa = class {
7942
8041
  this.mcp = new Mcp(this.http);
7943
8042
  this.agentRuns = new AgentRuns(this.http);
7944
8043
  this.agentRuntimeProfiles = new AgentRuntimeProfiles(this.http);
8044
+ this.runtimeEnv = new RuntimeEnv(this.http);
7945
8045
  this.computers = new Computers(this.http);
7946
8046
  this.sandboxes = new Sandboxes(this.http);
7947
8047
  this.deployments = new Deployments(this.http);
@@ -8063,8 +8163,8 @@ var AppAuth = class {
8063
8163
  }
8064
8164
  });
8065
8165
  if (!resp.ok) {
8066
- const body2 = await resp.text();
8067
- throw new Error(`AppAuth me failed (${resp.status}): ${body2}`);
8166
+ const body3 = await resp.text();
8167
+ throw new Error(`AppAuth me failed (${resp.status}): ${body3}`);
8068
8168
  }
8069
8169
  return unwrapSession(await resp.json());
8070
8170
  }
@@ -8116,12 +8216,12 @@ var AppAuth = class {
8116
8216
  return payload;
8117
8217
  }
8118
8218
  // ── Private ──────────────────────────────────────────────────────────────────
8119
- async _post(action, body2) {
8219
+ async _post(action, body3) {
8120
8220
  const url = `${this.baseUrl}/app-auth/${this.resourceType}/${this.resourceId}/${action}`;
8121
8221
  const resp = await fetch(url, {
8122
8222
  method: "POST",
8123
8223
  headers: { "Content-Type": "application/json" },
8124
- body: JSON.stringify(body2)
8224
+ body: JSON.stringify(body3)
8125
8225
  });
8126
8226
  if (!resp.ok) {
8127
8227
  const text = await resp.text();
@@ -8131,6 +8231,6 @@ var AppAuth = class {
8131
8231
  }
8132
8232
  };
8133
8233
 
8134
- export { Admin, AgentRuns, AgentRuntimeProfiles, Analytics, ApiKeys, AppAuth, AuditLog, AuthError, Benchmarks, BuilderSessions, Channels, Checkpoints, CommandCenter, Community, Completions, Computer, ComputerAudit, ComputerAutoStop, ComputerEnv, ComputerInbox, ComputerLogs, ComputerNetwork, ComputerOsa, ComputerPorts, ComputerSecrets, ComputerTerminal, ComputerVolumes, Computers, Credits, CronJobs, Dashboard, Databases, DeploymentDomains, DeploymentReleases, DeploymentRuntimeInstances, DeploymentVersions, Deployments, Desktop, DockerDeploy, EgressAudit, EgressNetwork, EgressSecrets, Email, EmailCampaigns, EmailInbox, EmailTemplates, Embeddings, Exec, ExternalKeys, Files, FlatCustomDomains, Functions, HealthChecks, InsufficientCreditsError, Integrations, Mcp, Miosa, MiosaError, Models, NetworkError, NetworkPolicy, NotFoundError, OAuthFlow, OpenComputers, OrgInvites, ProjectAuth, ProjectIntegrations, ProviderDefaults, RateLimitError, Regions, SANDBOX_TEMPLATE, Sandbox, SandboxArtifacts, SandboxAudit, SandboxCommands, SandboxEnv, SandboxEvents, SandboxFiles, SandboxNetwork, SandboxPreview, SandboxPreviews, SandboxSecrets, SandboxTags, SandboxTemplates, SandboxTerminal, Sandboxes, ScopedFs, Settings, SnapshotsStandalone, Storage, Tenant, TimeoutError, Usage, ValidationError, Volumes, Webhooks, WorkspaceInvites, WorkspaceMembers, verifySignature };
8234
+ export { Admin, AgentRuns, AgentRuntimeProfiles, Analytics, ApiKeys, AppAuth, AuditLog, AuthError, Benchmarks, BuilderSessions, Channels, Checkpoints, CommandCenter, Community, Completions, Computer, ComputerAudit, ComputerAutoStop, ComputerEnv, ComputerInbox, ComputerLogs, ComputerNetwork, ComputerOsa, ComputerPorts, ComputerSecrets, ComputerTerminal, ComputerVolumes, Computers, Credits, CronJobs, Dashboard, Databases, DeploymentDomains, DeploymentReleases, DeploymentRuntimeInstances, DeploymentVersions, Deployments, Desktop, DockerDeploy, EgressAudit, EgressNetwork, EgressSecrets, Email, EmailCampaigns, EmailInbox, EmailTemplates, Embeddings, Exec, ExternalKeys, Files, FlatCustomDomains, Functions, HealthChecks, InsufficientCreditsError, Integrations, Mcp, Miosa, MiosaError, Models, NetworkError, NetworkPolicy, NotFoundError, OAuthFlow, OpenComputers, OrgInvites, ProjectAuth, ProjectIntegrations, ProviderDefaults, RateLimitError, Regions, RuntimeEnv, SANDBOX_TEMPLATE, Sandbox, SandboxArtifacts, SandboxAudit, SandboxCommands, SandboxEnv, SandboxEvents, SandboxFiles, SandboxNetwork, SandboxPreview, SandboxPreviews, SandboxSecrets, SandboxTags, SandboxTemplates, SandboxTerminal, Sandboxes, ScopedFs, Settings, SnapshotsStandalone, Storage, Tenant, TimeoutError, Usage, ValidationError, Volumes, Webhooks, WorkspaceInvites, WorkspaceMembers, verifySignature };
8135
8235
  //# sourceMappingURL=index.js.map
8136
8236
  //# sourceMappingURL=index.js.map