@miosa/sdk 1.2.11 → 1.2.13

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, 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;
25
+ static fromResponse(status, body4, requestId) {
26
+ const message = body4.error?.message ?? body4.message ?? `HTTP ${status}`;
27
+ const code = body4.error?.code ?? body4.code ?? "UNKNOWN_ERROR";
28
+ const details = body4.error?.details;
29
29
  if (status === 401 || status === 403) {
30
30
  return new AuthError(message, status, code, details, requestId);
31
31
  }
@@ -167,7 +167,7 @@ var HttpClient = class {
167
167
  async request(path, options = {}) {
168
168
  const {
169
169
  method = "GET",
170
- body: body3,
170
+ body: body4,
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 (body3 !== void 0) {
179
+ } else if (body4 !== void 0) {
180
180
  headers = { ...headers, "Content-Type": "application/json" };
181
- fetchBody = JSON.stringify(body3);
181
+ fetchBody = JSON.stringify(body4);
182
182
  }
183
183
  let lastError;
184
184
  for (let attempt = 0; attempt <= this.maxRetries; attempt++) {
@@ -260,17 +260,17 @@ var HttpClient = class {
260
260
  }
261
261
  return this.request(fullPath, { method: "GET" });
262
262
  }
263
- async post(path, body3) {
264
- return this.request(path, { method: "POST", body: body3 });
263
+ async post(path, body4) {
264
+ return this.request(path, { method: "POST", body: body4 });
265
265
  }
266
- async patch(path, body3) {
267
- return this.request(path, { method: "PATCH", body: body3 });
266
+ async patch(path, body4) {
267
+ return this.request(path, { method: "PATCH", body: body4 });
268
268
  }
269
- async put(path, body3) {
270
- return this.request(path, { method: "PUT", body: body3 });
269
+ async put(path, body4) {
270
+ return this.request(path, { method: "PUT", body: body4 });
271
271
  }
272
- async delete(path, body3) {
273
- return this.request(path, { method: "DELETE", body: body3 });
272
+ async delete(path, body4) {
273
+ return this.request(path, { method: "DELETE", body: body4 });
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 body3 = null;
291
+ let body4 = null;
292
292
  if (options.body !== void 0) {
293
293
  headers = { ...headers, "Content-Type": "application/json" };
294
- body3 = JSON.stringify(options.body);
294
+ body4 = 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: body3,
302
+ body: body4,
303
303
  signal: controller.signal
304
304
  });
305
305
  } catch (err) {
@@ -368,7 +368,7 @@ 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, body3, query2) {
371
+ async request(method, path, body4, query2) {
372
372
  const fullPath = query2 ? (() => {
373
373
  const qs = new URLSearchParams();
374
374
  for (const [k, v] of Object.entries(query2)) {
@@ -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, body3);
384
+ return this.http.post(fullPath, body4);
385
385
  case "PUT":
386
- return this.http.put(fullPath, body3);
386
+ return this.http.put(fullPath, body4);
387
387
  case "PATCH":
388
- return this.http.patch(fullPath, body3);
388
+ return this.http.patch(fullPath, body4);
389
389
  case "DELETE":
390
- return this.http.delete(fullPath, body3);
390
+ return this.http.delete(fullPath, body4);
391
391
  }
392
392
  }
393
393
  // ── Overview ────────────────────────────────────────────────
@@ -601,14 +601,123 @@ var Admin = class {
601
601
  }
602
602
  };
603
603
 
604
- // src/resources/agent-runtime-profiles.ts
604
+ // src/resources/agent-run-groups.ts
605
605
  function unwrap(payload) {
606
- if (payload !== null && typeof payload === "object" && "data" in payload && payload.data !== void 0) {
606
+ if (payload && typeof payload === "object" && "data" in payload) {
607
607
  return payload.data;
608
608
  }
609
609
  return payload;
610
610
  }
611
+ function stripUndefined(input) {
612
+ return Object.fromEntries(
613
+ Object.entries(input).filter(([, value]) => value !== void 0)
614
+ );
615
+ }
611
616
  function body(params) {
617
+ return stripUndefined({
618
+ name: params.name,
619
+ description: params.description,
620
+ workspace_id: params.workspaceId,
621
+ project_id: params.projectId,
622
+ concurrency_limit: params.concurrencyLimit,
623
+ expected_runs: params.expectedRuns,
624
+ metadata: params.metadata
625
+ });
626
+ }
627
+ function runBody(entry) {
628
+ return stripUndefined({
629
+ prompt: entry.prompt,
630
+ target_kind: entry.targetKind,
631
+ target_id: entry.targetId,
632
+ sandbox_id: entry.sandboxId,
633
+ computer_id: entry.computerId,
634
+ provider: entry.provider,
635
+ model: entry.model,
636
+ command: entry.command,
637
+ runtime_command: entry.runtimeCommand,
638
+ cwd: entry.cwd,
639
+ timeout: entry.timeout,
640
+ env: entry.env,
641
+ agent_runtime_profile_id: entry.agentRuntimeProfileId,
642
+ agent_profile_id: entry.agentProfileId,
643
+ parent_agent_run_id: entry.parentAgentRunId,
644
+ orchestration_role: entry.orchestrationRole,
645
+ skip_agent_runtime_profile: entry.skipAgentRuntimeProfile,
646
+ metadata: entry.metadata
647
+ });
648
+ }
649
+ var AgentRunGroups = class {
650
+ constructor(http) {
651
+ this.http = http;
652
+ }
653
+ http;
654
+ async list(params = {}) {
655
+ const response = await this.http.get(
656
+ "/agent-run-groups",
657
+ stripUndefined({
658
+ workspace_id: params.workspaceId,
659
+ project_id: params.projectId,
660
+ status: params.status,
661
+ limit: params.limit
662
+ })
663
+ );
664
+ const data = unwrap(
665
+ response
666
+ );
667
+ if (Array.isArray(data)) return data;
668
+ return data.groups ?? data.items ?? [];
669
+ }
670
+ async create(params) {
671
+ return unwrap(
672
+ await this.http.post("/agent-run-groups", body(params))
673
+ );
674
+ }
675
+ async get(id, options = {}) {
676
+ const query2 = options.includeRuns ? "?include=runs" : "";
677
+ return unwrap(
678
+ await this.http.get(`/agent-run-groups/${encodeURIComponent(id)}${query2}`)
679
+ );
680
+ }
681
+ async dispatch(id, runs, options = {}) {
682
+ return unwrap(
683
+ await this.http.post(
684
+ `/agent-run-groups/${encodeURIComponent(id)}/dispatch`,
685
+ stripUndefined({ runs: runs.map(runBody), async: options.async })
686
+ )
687
+ );
688
+ }
689
+ async cancel(id) {
690
+ return unwrap(
691
+ await this.http.post(
692
+ `/agent-run-groups/${encodeURIComponent(id)}/cancel`,
693
+ {}
694
+ )
695
+ );
696
+ }
697
+ async events(id) {
698
+ const data = unwrap(
699
+ await this.http.get(
700
+ `/agent-run-groups/${encodeURIComponent(id)}/events`
701
+ )
702
+ );
703
+ if (Array.isArray(data)) return data;
704
+ return data.events ?? data.items ?? [];
705
+ }
706
+ streamEvents(id) {
707
+ return this.http.stream(
708
+ `/agent-run-groups/${encodeURIComponent(id)}/events`
709
+ );
710
+ }
711
+ };
712
+
713
+ // src/resources/agent-runtime-profiles.ts
714
+ function unwrap2(payload) {
715
+ if (payload !== null && typeof payload === "object" && "data" in payload && payload.data !== void 0) {
716
+ return payload.data;
717
+ }
718
+ return payload;
719
+ }
720
+ function body2(params) {
612
721
  return Object.fromEntries(
613
722
  Object.entries({
614
723
  workspace_id: params.workspaceId ?? params.workspace_id,
@@ -659,11 +768,11 @@ var AgentRuntimeProfiles = class {
659
768
  project_id: params.projectId ?? params.project_id
660
769
  }
661
770
  );
662
- return unwrap(response).map(normalize);
771
+ return unwrap2(response).map(normalize);
663
772
  }
664
773
  async get(id) {
665
774
  return normalize(
666
- unwrap(
775
+ unwrap2(
667
776
  await this.http.get(
668
777
  `/agent-runtime-profiles/${encodeURIComponent(id)}`
669
778
  )
@@ -672,20 +781,20 @@ var AgentRuntimeProfiles = class {
672
781
  }
673
782
  async create(params) {
674
783
  return normalize(
675
- unwrap(
784
+ unwrap2(
676
785
  await this.http.post(
677
786
  "/agent-runtime-profiles",
678
- body(params)
787
+ body2(params)
679
788
  )
680
789
  )
681
790
  );
682
791
  }
683
792
  async update(id, params) {
684
793
  return normalize(
685
- unwrap(
794
+ unwrap2(
686
795
  await this.http.put(
687
796
  `/agent-runtime-profiles/${encodeURIComponent(id)}`,
688
- body(params)
797
+ body2(params)
689
798
  )
690
799
  )
691
800
  );
@@ -698,13 +807,13 @@ var AgentRuntimeProfiles = class {
698
807
  };
699
808
 
700
809
  // src/resources/agent-runs.ts
701
- function unwrap2(payload) {
810
+ function unwrap3(payload) {
702
811
  if (payload && typeof payload === "object" && "data" in payload) {
703
812
  return payload.data;
704
813
  }
705
814
  return payload;
706
815
  }
707
- function stripUndefined(input) {
816
+ function stripUndefined2(input) {
708
817
  return Object.fromEntries(
709
818
  Object.entries(input).filter(([, value]) => value !== void 0)
710
819
  );
@@ -717,27 +826,28 @@ var AgentRuns = class {
717
826
  async list(params = {}) {
718
827
  const response = await this.http.get(
719
828
  "/agent-runs",
720
- stripUndefined({
829
+ stripUndefined2({
721
830
  target_kind: params.targetKind,
722
831
  target_id: params.targetId,
723
832
  sandbox_id: params.sandboxId,
724
833
  computer_id: params.computerId,
834
+ agent_run_group_id: params.agentRunGroupId,
725
835
  status: params.status
726
836
  })
727
837
  );
728
- const data = unwrap2(
838
+ const data = unwrap3(
729
839
  response
730
840
  );
731
841
  if (Array.isArray(data)) return data;
732
842
  return data.runs ?? data.items ?? [];
733
843
  }
734
844
  async get(id) {
735
- return unwrap2(
845
+ return unwrap3(
736
846
  await this.http.get(`/agent-runs/${encodeURIComponent(id)}`)
737
847
  );
738
848
  }
739
849
  async artifacts(id) {
740
- const data = unwrap2(
850
+ const data = unwrap3(
741
851
  await this.http.get(
742
852
  `/agent-runs/${encodeURIComponent(id)}/artifacts`
743
853
  )
@@ -754,7 +864,7 @@ var AgentRuns = class {
754
864
  );
755
865
  }
756
866
  async run(params) {
757
- const body3 = stripUndefined({
867
+ const body4 = stripUndefined2({
758
868
  prompt: params.prompt,
759
869
  target_kind: params.targetKind,
760
870
  target_id: params.targetId,
@@ -769,13 +879,16 @@ var AgentRuns = class {
769
879
  env: params.env,
770
880
  agent_runtime_profile_id: params.agentRuntimeProfileId,
771
881
  agent_profile_id: params.agentProfileId,
882
+ agent_run_group_id: params.agentRunGroupId,
883
+ parent_agent_run_id: params.parentAgentRunId,
884
+ orchestration_role: params.orchestrationRole,
772
885
  skip_agent_runtime_profile: params.skipAgentRuntimeProfile,
773
886
  metadata: params.metadata
774
887
  });
775
- return unwrap2(await this.http.post("/agent-runs", body3));
888
+ return unwrap3(await this.http.post("/agent-runs", body4));
776
889
  }
777
890
  async cancel(id) {
778
- return unwrap2(
891
+ return unwrap3(
779
892
  await this.http.post(
780
893
  `/agent-runs/${encodeURIComponent(id)}/cancel`,
781
894
  {}
@@ -785,7 +898,7 @@ var AgentRuns = class {
785
898
  };
786
899
 
787
900
  // src/resources/analytics.ts
788
- function unwrap3(payload) {
901
+ function unwrap4(payload) {
789
902
  if (payload && typeof payload === "object") {
790
903
  const p = payload;
791
904
  for (const k of ["data", "analytics", "series", "items"]) {
@@ -794,7 +907,7 @@ function unwrap3(payload) {
794
907
  }
795
908
  return payload;
796
909
  }
797
- function stripUndefined2(input) {
910
+ function stripUndefined3(input) {
798
911
  return Object.fromEntries(
799
912
  Object.entries(input).filter(([, v]) => v !== void 0)
800
913
  );
@@ -806,18 +919,18 @@ var Analytics = class {
806
919
  http;
807
920
  /** Get the platform analytics overview. */
808
921
  async overview(filters = {}) {
809
- const query2 = stripUndefined2(filters);
922
+ const query2 = stripUndefined3(filters);
810
923
  const data = await this.http.get("/analytics/overview", query2);
811
- return unwrap3(data);
924
+ return unwrap4(data);
812
925
  }
813
926
  /** Get a timeseries for a metric over a period. */
814
927
  async timeseries(params = {}) {
815
- const query2 = stripUndefined2(params);
928
+ const query2 = stripUndefined3(params);
816
929
  const data = await this.http.get("/analytics/timeseries", query2);
817
- return unwrap3(data);
930
+ return unwrap4(data);
818
931
  }
819
932
  };
820
- function unwrap4(payload) {
933
+ function unwrap5(payload) {
821
934
  if (payload && typeof payload === "object" && "data" in payload) {
822
935
  return payload.data;
823
936
  }
@@ -833,7 +946,7 @@ function listItems(payload, candidateKeys = ["data", "keys", "api_keys", "items"
833
946
  }
834
947
  return [];
835
948
  }
836
- function stripUndefined3(input) {
949
+ function stripUndefined4(input) {
837
950
  return Object.fromEntries(
838
951
  Object.entries(input).filter(([, v]) => v !== void 0)
839
952
  );
@@ -847,32 +960,32 @@ var ApiKeys = class {
847
960
  }
848
961
  http;
849
962
  async list(params = {}) {
850
- const query2 = stripUndefined3({ ...params });
963
+ const query2 = stripUndefined4({ ...params });
851
964
  const data = await this.http.get("/api-keys", query2);
852
965
  return listItems(data);
853
966
  }
854
967
  async create(params) {
855
968
  const { idempotencyKey: ikey, expiresAt, ...rest } = params;
856
- const body3 = stripUndefined3({
969
+ const body4 = stripUndefined4({
857
970
  ...rest,
858
971
  expires_at: expiresAt ?? rest.expires_at
859
972
  });
860
973
  const data = await this.http.request("/api-keys", {
861
974
  method: "POST",
862
- body: body3,
975
+ body: body4,
863
976
  headers: { "Idempotency-Key": idempotencyKey(ikey) }
864
977
  });
865
- return unwrap4(data);
978
+ return unwrap5(data);
866
979
  }
867
980
  /** POST /api/v1/api-keys/scoped — L2 delegation token bound to one external user. */
868
981
  async createScoped(params) {
869
- const body3 = stripUndefined3({
982
+ const body4 = stripUndefined4({
870
983
  external_user_id: params.externalUserId,
871
984
  scopes: params.scopes,
872
985
  expires_at: params.expiresAt
873
986
  });
874
- return unwrap4(
875
- await this.http.post("/api-keys/scoped", body3)
987
+ return unwrap5(
988
+ await this.http.post("/api-keys/scoped", body4)
876
989
  );
877
990
  }
878
991
  async delete(keyId) {
@@ -881,7 +994,7 @@ var ApiKeys = class {
881
994
  };
882
995
 
883
996
  // src/resources/audit-log.ts
884
- function unwrap5(payload) {
997
+ function unwrap6(payload) {
885
998
  if (payload && typeof payload === "object") {
886
999
  const p = payload;
887
1000
  for (const k of ["data", "audit_log", "events", "items"]) {
@@ -890,7 +1003,7 @@ function unwrap5(payload) {
890
1003
  }
891
1004
  return payload;
892
1005
  }
893
- function stripUndefined4(input) {
1006
+ function stripUndefined5(input) {
894
1007
  return Object.fromEntries(
895
1008
  Object.entries(input).filter(([, v]) => v !== void 0)
896
1009
  );
@@ -902,16 +1015,16 @@ var AuditLog = class {
902
1015
  http;
903
1016
  /** List audit-log events with optional filters. */
904
1017
  async list(params = {}) {
905
- const query2 = stripUndefined4(params);
1018
+ const query2 = stripUndefined5(params);
906
1019
  const data = await this.http.get("/audit-log", query2);
907
- const result = unwrap5(data);
1020
+ const result = unwrap6(data);
908
1021
  if (Array.isArray(result)) return result;
909
1022
  return [];
910
1023
  }
911
1024
  };
912
1025
 
913
1026
  // src/resources/benchmarks.ts
914
- function unwrap6(data) {
1027
+ function unwrap7(data) {
915
1028
  if (data && typeof data === "object") {
916
1029
  const d = data;
917
1030
  for (const k of ["data", "benchmarks", "samples", "items"]) {
@@ -943,19 +1056,19 @@ var Benchmarks = class {
943
1056
  return unwrapList(data);
944
1057
  }
945
1058
  async get(benchmarkId) {
946
- return unwrap6(
1059
+ return unwrap7(
947
1060
  await this.http.get(`/admin/benchmarks/${benchmarkId}`)
948
1061
  );
949
1062
  }
950
1063
  /** Start a new benchmark run — pass kind and run-specific options. */
951
1064
  async create(params) {
952
- const body3 = Object.fromEntries(
1065
+ const body4 = Object.fromEntries(
953
1066
  Object.entries(params).filter(([, v]) => v !== void 0)
954
1067
  );
955
- return unwrap6(await this.http.post("/admin/benchmarks", body3));
1068
+ return unwrap7(await this.http.post("/admin/benchmarks", body4));
956
1069
  }
957
1070
  async cancel(benchmarkId) {
958
- return unwrap6(
1071
+ return unwrap7(
959
1072
  await this.http.post(`/admin/benchmarks/${benchmarkId}/cancel`)
960
1073
  );
961
1074
  }
@@ -972,17 +1085,17 @@ var Benchmarks = class {
972
1085
  }
973
1086
  /** Compare two benchmark runs. */
974
1087
  async compare(params) {
975
- const body3 = Object.fromEntries(
1088
+ const body4 = Object.fromEntries(
976
1089
  Object.entries(params).filter(([, v]) => v !== void 0)
977
1090
  );
978
- return unwrap6(
979
- await this.http.post("/admin/benchmarks/compare", body3)
1091
+ return unwrap7(
1092
+ await this.http.post("/admin/benchmarks/compare", body4)
980
1093
  );
981
1094
  }
982
1095
  };
983
1096
 
984
1097
  // src/resources/builder-sessions.ts
985
- function unwrap7(data) {
1098
+ function unwrap8(data) {
986
1099
  if (data && typeof data === "object") {
987
1100
  const d = data;
988
1101
  for (const k of ["data", "sessions", "items"]) {
@@ -1019,7 +1132,7 @@ var BuilderSessions = class {
1019
1132
  return all.find((s) => s.id === sessionId) ?? {};
1020
1133
  }
1021
1134
  async updateTitle(sessionId, title) {
1022
- return unwrap7(
1135
+ return unwrap8(
1023
1136
  await this.http.patch(`/builder/sessions/${sessionId}/title`, {
1024
1137
  title
1025
1138
  })
@@ -1031,7 +1144,7 @@ var BuilderSessions = class {
1031
1144
  };
1032
1145
 
1033
1146
  // src/resources/channels.ts
1034
- function unwrap8(payload) {
1147
+ function unwrap9(payload) {
1035
1148
  if (payload && typeof payload === "object") {
1036
1149
  const p = payload;
1037
1150
  for (const k of ["data", "channels", "notifications", "items"]) {
@@ -1040,7 +1153,7 @@ function unwrap8(payload) {
1040
1153
  }
1041
1154
  return payload;
1042
1155
  }
1043
- function stripUndefined5(input) {
1156
+ function stripUndefined6(input) {
1044
1157
  return Object.fromEntries(
1045
1158
  Object.entries(input).filter(([, v]) => v !== void 0)
1046
1159
  );
@@ -1057,28 +1170,28 @@ var Channels = class {
1057
1170
  http;
1058
1171
  /** List all channels for the tenant. */
1059
1172
  async list(params = {}) {
1060
- const query2 = stripUndefined5(params);
1173
+ const query2 = stripUndefined6(params);
1061
1174
  const data = await this.http.get("/channels", query2);
1062
- const result = unwrap8(data);
1175
+ const result = unwrap9(data);
1063
1176
  if (Array.isArray(result)) return result;
1064
1177
  return [];
1065
1178
  }
1066
1179
  /** Get a single channel. */
1067
1180
  async get(channelId) {
1068
1181
  const data = await this.http.get(`/channels/${channelId}`);
1069
- return unwrap8(data);
1182
+ return unwrap9(data);
1070
1183
  }
1071
1184
  /** Create a new channel. */
1072
1185
  async create(params) {
1073
- const body3 = stripUndefObj(params);
1074
- const data = await this.http.post("/channels", body3);
1075
- return unwrap8(data);
1186
+ const body4 = stripUndefObj(params);
1187
+ const data = await this.http.post("/channels", body4);
1188
+ return unwrap9(data);
1076
1189
  }
1077
1190
  /** Update a channel. */
1078
1191
  async update(channelId, params) {
1079
- const body3 = stripUndefObj(params);
1080
- const data = await this.http.patch(`/channels/${channelId}`, body3);
1081
- return unwrap8(data);
1192
+ const body4 = stripUndefObj(params);
1193
+ const data = await this.http.patch(`/channels/${channelId}`, body4);
1194
+ return unwrap9(data);
1082
1195
  }
1083
1196
  /** Delete a channel. */
1084
1197
  async delete(channelId) {
@@ -1088,30 +1201,30 @@ var Channels = class {
1088
1201
  /** Get notification preferences across all channels. */
1089
1202
  async listNotifications() {
1090
1203
  const data = await this.http.get("/channels/notifications");
1091
- return unwrap8(data);
1204
+ return unwrap9(data);
1092
1205
  }
1093
1206
  /** Update notification preferences. */
1094
1207
  async updateNotifications(params) {
1095
- const body3 = stripUndefObj(params);
1096
- const data = await this.http.put("/channels/notifications", body3);
1097
- return unwrap8(data);
1208
+ const body4 = stripUndefObj(params);
1209
+ const data = await this.http.put("/channels/notifications", body4);
1210
+ return unwrap9(data);
1098
1211
  }
1099
1212
  /** Enable a channel. */
1100
1213
  async enable(channelId) {
1101
1214
  const data = await this.http.post(`/channels/${channelId}/enable`);
1102
- return unwrap8(data);
1215
+ return unwrap9(data);
1103
1216
  }
1104
1217
  /** Disable a channel. */
1105
1218
  async disable(channelId) {
1106
1219
  const data = await this.http.post(
1107
1220
  `/channels/${channelId}/disable`
1108
1221
  );
1109
- return unwrap8(data);
1222
+ return unwrap9(data);
1110
1223
  }
1111
1224
  };
1112
1225
 
1113
1226
  // src/resources/command-center.ts
1114
- function unwrap9(data) {
1227
+ function unwrap10(data) {
1115
1228
  if (data && typeof data === "object") {
1116
1229
  const d = data;
1117
1230
  for (const k of [
@@ -1145,7 +1258,7 @@ var CommandCenter = class {
1145
1258
  http;
1146
1259
  /** Top-level snapshot (GET /command-center). */
1147
1260
  async overview() {
1148
- return unwrap9(await this.http.get("/command-center"));
1261
+ return unwrap10(await this.http.get("/command-center"));
1149
1262
  }
1150
1263
  async agents() {
1151
1264
  return unwrapList3(await this.http.get("/command-center/agents"));
@@ -1156,13 +1269,13 @@ var CommandCenter = class {
1156
1269
  );
1157
1270
  }
1158
1271
  async metrics() {
1159
- return unwrap9(await this.http.get("/command-center/metrics"));
1272
+ return unwrap10(await this.http.get("/command-center/metrics"));
1160
1273
  }
1161
1274
  async presets() {
1162
1275
  return unwrapList3(await this.http.get("/command-center/presets"));
1163
1276
  }
1164
1277
  async tiers() {
1165
- return unwrap9(await this.http.get("/command-center/tiers"));
1278
+ return unwrap10(await this.http.get("/command-center/tiers"));
1166
1279
  }
1167
1280
  /** Stream live command-center events via SSE. */
1168
1281
  events() {
@@ -1171,7 +1284,7 @@ var CommandCenter = class {
1171
1284
  };
1172
1285
 
1173
1286
  // src/resources/community.ts
1174
- function unwrap10(data) {
1287
+ function unwrap11(data) {
1175
1288
  if (data && typeof data === "object") {
1176
1289
  const d = data;
1177
1290
  for (const k of ["data", "templates", "agents", "items"]) {
@@ -1203,7 +1316,7 @@ var Community = class {
1203
1316
  return unwrapList4(await this.http.get("/community/agents", query2));
1204
1317
  }
1205
1318
  async getAgent(agentId) {
1206
- return unwrap10(await this.http.get(`/community/agents/${agentId}`));
1319
+ return unwrap11(await this.http.get(`/community/agents/${agentId}`));
1207
1320
  }
1208
1321
  // ── Templates ─────────────────────────────────────────────────────────
1209
1322
  async listTemplates(filters = {}) {
@@ -1215,41 +1328,41 @@ var Community = class {
1215
1328
  );
1216
1329
  }
1217
1330
  async getTemplate(templateId) {
1218
- return unwrap10(
1331
+ return unwrap11(
1219
1332
  await this.http.get(`/community/templates/${templateId}`)
1220
1333
  );
1221
1334
  }
1222
1335
  /** Install a community template into the caller's tenant. */
1223
1336
  async installTemplate(templateId, opts = {}) {
1224
- const body3 = Object.fromEntries(
1337
+ const body4 = Object.fromEntries(
1225
1338
  Object.entries(opts).filter(([, v]) => v !== void 0)
1226
1339
  );
1227
- return unwrap10(
1340
+ return unwrap11(
1228
1341
  await this.http.post(
1229
1342
  `/community/templates/${templateId}/install`,
1230
- body3
1343
+ body4
1231
1344
  )
1232
1345
  );
1233
1346
  }
1234
1347
  /** Rate a community template (1–5). */
1235
1348
  async rateTemplate(templateId, rating, opts = {}) {
1236
- const body3 = {
1349
+ const body4 = {
1237
1350
  rating,
1238
1351
  ...Object.fromEntries(
1239
1352
  Object.entries(opts).filter(([, v]) => v !== void 0)
1240
1353
  )
1241
1354
  };
1242
- return unwrap10(
1355
+ return unwrap11(
1243
1356
  await this.http.post(
1244
1357
  `/community/templates/${templateId}/rate`,
1245
- body3
1358
+ body4
1246
1359
  )
1247
1360
  );
1248
1361
  }
1249
1362
  };
1250
1363
 
1251
1364
  // src/resources/completions.ts
1252
- function unwrap11(data) {
1365
+ function unwrap12(data) {
1253
1366
  if (data && typeof data === "object") {
1254
1367
  const d = data;
1255
1368
  if (Array.isArray(d.choices)) return d;
@@ -1268,24 +1381,24 @@ var Completions = class {
1268
1381
  }
1269
1382
  http;
1270
1383
  create(params) {
1271
- const body3 = buildBody(params);
1384
+ const body4 = buildBody(params);
1272
1385
  if (params.stream === true) {
1273
1386
  return this.http.stream(
1274
1387
  "/intelligence/completions",
1275
- { method: "POST", body: body3 }
1388
+ { method: "POST", body: body4 }
1276
1389
  );
1277
1390
  }
1278
- return this.http.post("/intelligence/completions", body3).then(unwrap11);
1391
+ return this.http.post("/intelligence/completions", body4).then(unwrap12);
1279
1392
  }
1280
1393
  chat(params) {
1281
- const body3 = buildBody(params);
1394
+ const body4 = buildBody(params);
1282
1395
  if (params.stream === true) {
1283
1396
  return this.http.stream(
1284
1397
  "/intelligence/chat/completions",
1285
- { method: "POST", body: body3 }
1398
+ { method: "POST", body: body4 }
1286
1399
  );
1287
1400
  }
1288
- return this.http.post("/intelligence/chat/completions", body3).then(unwrap11);
1401
+ return this.http.post("/intelligence/chat/completions", body4).then(unwrap12);
1289
1402
  }
1290
1403
  };
1291
1404
 
@@ -1408,7 +1521,7 @@ var Checkpoints = class {
1408
1521
  };
1409
1522
 
1410
1523
  // src/resources/computer-auto-stop.ts
1411
- function unwrap12(data) {
1524
+ function unwrap13(data) {
1412
1525
  if (data && typeof data === "object") {
1413
1526
  const d = data;
1414
1527
  if ("data" in d && Object.keys(d).length <= 2) {
@@ -1426,13 +1539,13 @@ var ComputerAutoStop = class {
1426
1539
  computerId;
1427
1540
  /** Return the current auto-stop configuration. */
1428
1541
  async get() {
1429
- return unwrap12(
1542
+ return unwrap13(
1430
1543
  await this.http.get(`/computers/${this.computerId}/auto-stop`)
1431
1544
  );
1432
1545
  }
1433
1546
  /** Set the idle timeout in seconds (0 disables auto-stop). */
1434
1547
  async update(seconds) {
1435
- return unwrap12(
1548
+ return unwrap13(
1436
1549
  await this.http.patch(
1437
1550
  `/computers/${this.computerId}/auto-stop`,
1438
1551
  { seconds }
@@ -1442,7 +1555,7 @@ var ComputerAutoStop = class {
1442
1555
  };
1443
1556
 
1444
1557
  // src/resources/computer-env.ts
1445
- function unwrap13(data) {
1558
+ function unwrap14(data) {
1446
1559
  if (data && typeof data === "object") {
1447
1560
  const d = data;
1448
1561
  if ("data" in d && Object.keys(d).length <= 2) {
@@ -1477,11 +1590,11 @@ var ComputerEnv = class {
1477
1590
  }
1478
1591
  /** Create a new env var. Use update() to change an existing one. */
1479
1592
  async set(name, value) {
1480
- return unwrap13(await this.http.post(this.base(), { name, value }));
1593
+ return unwrap14(await this.http.post(this.base(), { name, value }));
1481
1594
  }
1482
1595
  /** Patch the value of an existing env var by name. */
1483
1596
  async update(name, value) {
1484
- return unwrap13(
1597
+ return unwrap14(
1485
1598
  await this.http.patch(`${this.base()}/${name}`, { value })
1486
1599
  );
1487
1600
  }
@@ -1498,7 +1611,7 @@ var ComputerEnv = class {
1498
1611
  };
1499
1612
 
1500
1613
  // src/resources/computer-logs.ts
1501
- function unwrap14(data) {
1614
+ function unwrap15(data) {
1502
1615
  if (data && typeof data === "object") {
1503
1616
  const d = data;
1504
1617
  if ("data" in d && Object.keys(d).length <= 2) {
@@ -1519,7 +1632,7 @@ var ComputerLogs = class {
1519
1632
  const query2 = Object.fromEntries(
1520
1633
  Object.entries(params).filter(([, v]) => v !== void 0)
1521
1634
  );
1522
- return unwrap14(
1635
+ return unwrap15(
1523
1636
  await this.http.get(`/computers/${this.computerId}/logs`, query2)
1524
1637
  );
1525
1638
  }
@@ -1532,7 +1645,7 @@ var ComputerLogs = class {
1532
1645
  };
1533
1646
 
1534
1647
  // src/resources/computer-osa.ts
1535
- function unwrap15(data) {
1648
+ function unwrap16(data) {
1536
1649
  if (data && typeof data === "object") {
1537
1650
  const d = data;
1538
1651
  if ("data" in d && Object.keys(d).length <= 2) {
@@ -1550,47 +1663,47 @@ var ComputerOsa = class {
1550
1663
  computerId;
1551
1664
  /** Submit a free-form task to the in-VM OSA agent. */
1552
1665
  async submitTask(task, params = {}) {
1553
- const body3 = {
1666
+ const body4 = {
1554
1667
  task,
1555
1668
  ...Object.fromEntries(
1556
1669
  Object.entries(params).filter(([, v]) => v !== void 0)
1557
1670
  )
1558
1671
  };
1559
- return unwrap15(
1672
+ return unwrap16(
1560
1673
  await this.http.post(
1561
1674
  `/computers/${this.computerId}/osa/task`,
1562
- body3
1675
+ body4
1563
1676
  )
1564
1677
  );
1565
1678
  }
1566
1679
  /** Cancel the currently-running OSA task, if any. */
1567
1680
  async cancelTask() {
1568
- return unwrap15(
1681
+ return unwrap16(
1569
1682
  await this.http.delete(`/computers/${this.computerId}/osa/task`)
1570
1683
  );
1571
1684
  }
1572
1685
  /** Return OSA's current task / configuration / health snapshot. */
1573
1686
  async status() {
1574
- return unwrap15(
1687
+ return unwrap16(
1575
1688
  await this.http.get(`/computers/${this.computerId}/osa/status`)
1576
1689
  );
1577
1690
  }
1578
1691
  /** Update OSA runtime configuration (model, tools, secrets, etc.). */
1579
1692
  async configure(config) {
1580
- const body3 = Object.fromEntries(
1693
+ const body4 = Object.fromEntries(
1581
1694
  Object.entries(config).filter(([, v]) => v !== void 0)
1582
1695
  );
1583
- return unwrap15(
1696
+ return unwrap16(
1584
1697
  await this.http.post(
1585
1698
  `/computers/${this.computerId}/osa/configure`,
1586
- body3
1699
+ body4
1587
1700
  )
1588
1701
  );
1589
1702
  }
1590
1703
  };
1591
1704
 
1592
1705
  // src/resources/computer-ports.ts
1593
- function unwrap16(data) {
1706
+ function unwrap17(data) {
1594
1707
  if (data && typeof data === "object") {
1595
1708
  const d = data;
1596
1709
  if ("data" in d && Object.keys(d).length <= 2) {
@@ -1629,21 +1742,21 @@ var ComputerPorts = class {
1629
1742
  }
1630
1743
  /** Expose port with the given visibility options. */
1631
1744
  async create(port, opts = {}) {
1632
- const body3 = {
1745
+ const body4 = {
1633
1746
  port,
1634
1747
  ...Object.fromEntries(
1635
1748
  Object.entries(opts).filter(([, v]) => v !== void 0)
1636
1749
  )
1637
1750
  };
1638
- return unwrap16(await this.http.post(this.base(), body3));
1751
+ return unwrap17(await this.http.post(this.base(), body4));
1639
1752
  }
1640
1753
  /** Patch visibility / auth options for port. */
1641
1754
  async update(port, opts) {
1642
- const body3 = Object.fromEntries(
1755
+ const body4 = Object.fromEntries(
1643
1756
  Object.entries(opts).filter(([, v]) => v !== void 0)
1644
1757
  );
1645
- return unwrap16(
1646
- await this.http.patch(`${this.base()}/${port}`, body3)
1758
+ return unwrap17(
1759
+ await this.http.patch(`${this.base()}/${port}`, body4)
1647
1760
  );
1648
1761
  }
1649
1762
  /** Stop exposing port. */
@@ -1662,14 +1775,14 @@ var ComputerTerminal = class {
1662
1775
  computerId;
1663
1776
  /** Open a new PTY session. Returns the server payload (session id, etc.). */
1664
1777
  async create(params = {}) {
1665
- const body3 = Object.fromEntries(
1778
+ const body4 = Object.fromEntries(
1666
1779
  Object.entries(params).filter(([, v]) => v !== void 0)
1667
1780
  );
1668
1781
  const raw = await this.http.post(
1669
1782
  `/computers/${this.computerId}/terminal`,
1670
- body3
1783
+ body4
1671
1784
  );
1672
- return unwrap17(raw);
1785
+ return unwrap18(raw);
1673
1786
  }
1674
1787
  /** Resize an existing PTY session. */
1675
1788
  async resize(sessionId, cols, rows) {
@@ -1677,10 +1790,10 @@ var ComputerTerminal = class {
1677
1790
  `/computers/${this.computerId}/pty/${sessionId}/resize`,
1678
1791
  { cols, rows }
1679
1792
  );
1680
- return unwrap17(raw);
1793
+ return unwrap18(raw);
1681
1794
  }
1682
1795
  };
1683
- function unwrap17(data) {
1796
+ function unwrap18(data) {
1684
1797
  if (data && typeof data === "object") {
1685
1798
  const d = data;
1686
1799
  if ("data" in d && Object.keys(d).length <= 2) {
@@ -1691,7 +1804,7 @@ function unwrap17(data) {
1691
1804
  }
1692
1805
 
1693
1806
  // src/resources/computer-volumes.ts
1694
- function unwrap18(data) {
1807
+ function unwrap19(data) {
1695
1808
  if (data && typeof data === "object") {
1696
1809
  const d = data;
1697
1810
  if ("data" in d && Object.keys(d).length <= 2) {
@@ -1725,7 +1838,7 @@ var ComputerVolumes = class {
1725
1838
  }
1726
1839
  /** Attach volumeId at mountPath inside the VM. */
1727
1840
  async attach(volumeId, mountPath) {
1728
- return unwrap18(
1841
+ return unwrap19(
1729
1842
  await this.http.post(this.base(), {
1730
1843
  volume_id: volumeId,
1731
1844
  mount_path: mountPath
@@ -1898,7 +2011,7 @@ var Desktop = class {
1898
2011
  };
1899
2012
 
1900
2013
  // src/resources/egressAudit.ts
1901
- function unwrap19(payload) {
2014
+ function unwrap20(payload) {
1902
2015
  if (payload && typeof payload === "object") {
1903
2016
  const p = payload;
1904
2017
  for (const k of ["data", "event", "items"]) {
@@ -1917,7 +2030,7 @@ function unwrapList8(payload) {
1917
2030
  }
1918
2031
  return [];
1919
2032
  }
1920
- function stripUndefined6(input) {
2033
+ function stripUndefined7(input) {
1921
2034
  return Object.fromEntries(
1922
2035
  Object.entries(input).filter(([, v]) => v !== void 0)
1923
2036
  );
@@ -1927,7 +2040,7 @@ function pickFirst(...values) {
1927
2040
  return void 0;
1928
2041
  }
1929
2042
  function listQuery(params) {
1930
- return stripUndefined6({
2043
+ return stripUndefined7({
1931
2044
  resource_id: pickFirst(params.resourceId, params.resource_id),
1932
2045
  resource_type: pickFirst(params.resourceType, params.resource_type),
1933
2046
  host: params.host,
@@ -1964,7 +2077,7 @@ var EgressAudit = class {
1964
2077
  const data = await this.http.get(
1965
2078
  `/egress/audit/${id}`
1966
2079
  );
1967
- return unwrap19(data);
2080
+ return unwrap20(data);
1968
2081
  }
1969
2082
  /**
1970
2083
  * Long-poll the audit endpoint and yield new events as they appear.
@@ -2040,7 +2153,7 @@ var ComputerAudit = class extends SandboxAudit {
2040
2153
  };
2041
2154
 
2042
2155
  // src/resources/egressNetwork.ts
2043
- function unwrap20(payload) {
2156
+ function unwrap21(payload) {
2044
2157
  if (payload && typeof payload === "object") {
2045
2158
  const p = payload;
2046
2159
  for (const k of ["data", "policy", "rule", "items"]) {
@@ -2066,7 +2179,7 @@ function unwrapList9(payload) {
2066
2179
  }
2067
2180
  return [];
2068
2181
  }
2069
- function stripUndefined7(input) {
2182
+ function stripUndefined8(input) {
2070
2183
  return Object.fromEntries(
2071
2184
  Object.entries(input).filter(([, v]) => v !== void 0)
2072
2185
  );
@@ -2076,7 +2189,7 @@ function pickFirst2(...values) {
2076
2189
  return void 0;
2077
2190
  }
2078
2191
  function ruleBody(host, params, effect) {
2079
- return stripUndefined7({
2192
+ return stripUndefined8({
2080
2193
  host,
2081
2194
  effect,
2082
2195
  methods: params.methods,
@@ -2099,7 +2212,7 @@ var EgressNetwork = class {
2099
2212
  "/egress/allowlist",
2100
2213
  ruleBody(host, params, "allow")
2101
2214
  );
2102
- return unwrap20(data);
2215
+ return unwrap21(data);
2103
2216
  }
2104
2217
  /** Add a `deny` rule for `host` to the allowlist. */
2105
2218
  async deny(host, params = {}) {
@@ -2107,11 +2220,11 @@ var EgressNetwork = class {
2107
2220
  "/egress/allowlist",
2108
2221
  ruleBody(host, params, "deny")
2109
2222
  );
2110
- return unwrap20(data);
2223
+ return unwrap21(data);
2111
2224
  }
2112
2225
  /** List allowlist rules. */
2113
2226
  async rules(params = {}) {
2114
- const query2 = stripUndefined7({
2227
+ const query2 = stripUndefined8({
2115
2228
  policy_id: pickFirst2(params.policyId, params.policy_id),
2116
2229
  resource_id: pickFirst2(params.resourceId, params.resource_id),
2117
2230
  resource_type: pickFirst2(params.resourceType, params.resource_type)
@@ -2126,7 +2239,7 @@ var EgressNetwork = class {
2126
2239
  // ── policies ──────────────────────────────────────────────────────────────
2127
2240
  /** List egress policies. */
2128
2241
  async policies(params = {}) {
2129
- const query2 = stripUndefined7({
2242
+ const query2 = stripUndefined8({
2130
2243
  resource_id: pickFirst2(params.resourceId, params.resource_id),
2131
2244
  resource_type: pickFirst2(params.resourceType, params.resource_type)
2132
2245
  });
@@ -2135,7 +2248,7 @@ var EgressNetwork = class {
2135
2248
  }
2136
2249
  /** Create an egress policy. */
2137
2250
  async createPolicy(params) {
2138
- const body3 = stripUndefined7({
2251
+ const body4 = stripUndefined8({
2139
2252
  name: params.name,
2140
2253
  mode: params.mode ?? "enforce",
2141
2254
  default_effect: pickFirst2(
@@ -2149,13 +2262,13 @@ var EgressNetwork = class {
2149
2262
  });
2150
2263
  const data = await this.http.post(
2151
2264
  "/egress/policies",
2152
- body3
2265
+ body4
2153
2266
  );
2154
- return unwrap20(data);
2267
+ return unwrap21(data);
2155
2268
  }
2156
2269
  /** Update an egress policy by id. */
2157
2270
  async updatePolicy(policyId, params) {
2158
- const body3 = stripUndefined7({
2271
+ const body4 = stripUndefined8({
2159
2272
  mode: params.mode,
2160
2273
  default_effect: pickFirst2(params.defaultEffect, params.default_effect),
2161
2274
  name: params.name,
@@ -2163,9 +2276,9 @@ var EgressNetwork = class {
2163
2276
  });
2164
2277
  const data = await this.http.patch(
2165
2278
  `/egress/policies/${policyId}`,
2166
- body3
2279
+ body4
2167
2280
  );
2168
- return unwrap20(data);
2281
+ return unwrap21(data);
2169
2282
  }
2170
2283
  // ── mode helpers ──────────────────────────────────────────────────────────
2171
2284
  /** Set the policy to `mode="enforce"` — denied egress is blocked. */
@@ -2183,21 +2296,21 @@ var EgressNetwork = class {
2183
2296
  if (policyId) {
2184
2297
  return this.updatePolicy(policyId, { mode });
2185
2298
  }
2186
- const body3 = resourceId !== void 0 && resourceType !== void 0 ? stripUndefined7({
2299
+ const body4 = resourceId !== void 0 && resourceType !== void 0 ? stripUndefined8({
2187
2300
  mode,
2188
2301
  resource_id: resourceId,
2189
2302
  resource_type: resourceType
2190
2303
  }) : { mode };
2191
2304
  const data = await this.http.patch(
2192
2305
  "/egress/policies",
2193
- body3
2306
+ body4
2194
2307
  );
2195
- return unwrap20(data);
2308
+ return unwrap21(data);
2196
2309
  }
2197
2310
  // ── suggestions ───────────────────────────────────────────────────────────
2198
2311
  /** AI-generated allowlist suggestions from recent denied egress. */
2199
2312
  async suggestions(params = {}) {
2200
- const query2 = stripUndefined7({
2313
+ const query2 = stripUndefined8({
2201
2314
  resource_id: pickFirst2(params.resourceId, params.resource_id),
2202
2315
  resource_type: pickFirst2(params.resourceType, params.resource_type),
2203
2316
  since: params.since ?? "7d"
@@ -2248,28 +2361,28 @@ var SandboxNetwork = class {
2248
2361
  return this.delegate.removeRule(ruleId);
2249
2362
  }
2250
2363
  lockdown(params = {}) {
2251
- const body3 = {
2364
+ const body4 = {
2252
2365
  resource_id: this.resourceId,
2253
2366
  resource_type: this.resourceType
2254
2367
  };
2255
- if (params.policyId !== void 0) body3.policyId = params.policyId;
2256
- return this.delegate.lockdown(body3);
2368
+ if (params.policyId !== void 0) body4.policyId = params.policyId;
2369
+ return this.delegate.lockdown(body4);
2257
2370
  }
2258
2371
  observe(params = {}) {
2259
- const body3 = {
2372
+ const body4 = {
2260
2373
  resource_id: this.resourceId,
2261
2374
  resource_type: this.resourceType
2262
2375
  };
2263
- if (params.policyId !== void 0) body3.policyId = params.policyId;
2264
- return this.delegate.observe(body3);
2376
+ if (params.policyId !== void 0) body4.policyId = params.policyId;
2377
+ return this.delegate.observe(body4);
2265
2378
  }
2266
2379
  suggestions(params = {}) {
2267
- const body3 = {
2380
+ const body4 = {
2268
2381
  resource_id: this.resourceId,
2269
2382
  resource_type: this.resourceType
2270
2383
  };
2271
- if (params.since !== void 0) body3.since = params.since;
2272
- return this.delegate.suggestions(body3);
2384
+ if (params.since !== void 0) body4.since = params.since;
2385
+ return this.delegate.suggestions(body4);
2273
2386
  }
2274
2387
  policies() {
2275
2388
  return this.delegate.policies({
@@ -2283,7 +2396,7 @@ var ComputerNetwork = class extends SandboxNetwork {
2283
2396
  };
2284
2397
 
2285
2398
  // src/resources/egressSecrets.ts
2286
- function unwrap21(payload) {
2399
+ function unwrap22(payload) {
2287
2400
  if (payload && typeof payload === "object") {
2288
2401
  const p = payload;
2289
2402
  for (const k of ["data", "secret", "binding", "items"]) {
@@ -2302,7 +2415,7 @@ function unwrapList10(payload) {
2302
2415
  }
2303
2416
  return [];
2304
2417
  }
2305
- function stripUndefined8(input) {
2418
+ function stripUndefined9(input) {
2306
2419
  return Object.fromEntries(
2307
2420
  Object.entries(input).filter(([, v]) => v !== void 0)
2308
2421
  );
@@ -2312,7 +2425,7 @@ function pickFirst3(...values) {
2312
2425
  return void 0;
2313
2426
  }
2314
2427
  function setBody(params) {
2315
- return stripUndefined8({
2428
+ return stripUndefined9({
2316
2429
  name: params.name,
2317
2430
  value: params.value,
2318
2431
  type: params.type ?? "api_key",
@@ -2333,7 +2446,7 @@ function setBody(params) {
2333
2446
  });
2334
2447
  }
2335
2448
  function listQuery2(params) {
2336
- return stripUndefined8({
2449
+ return stripUndefined9({
2337
2450
  scope: params.scope,
2338
2451
  type: params.type,
2339
2452
  workspace_id: pickFirst3(params.workspaceId, params.workspace_id),
@@ -2348,14 +2461,14 @@ function listQuery2(params) {
2348
2461
  });
2349
2462
  }
2350
2463
  function rotateBody(params) {
2351
- return stripUndefined8({
2464
+ return stripUndefined9({
2352
2465
  value: pickFirst3(params.newValue, params.new_value, params.value),
2353
2466
  refresh_token: pickFirst3(params.refreshToken, params.refresh_token),
2354
2467
  expires_at: pickFirst3(params.expiresAt, params.expires_at)
2355
2468
  });
2356
2469
  }
2357
2470
  function bindingBody(params) {
2358
- return stripUndefined8({
2471
+ return stripUndefined9({
2359
2472
  secret_id: pickFirst3(params.secretId, params.secret_id),
2360
2473
  resource_id: pickFirst3(params.resourceId, params.resource_id),
2361
2474
  resource_type: pickFirst3(params.resourceType, params.resource_type),
@@ -2363,14 +2476,14 @@ function bindingBody(params) {
2363
2476
  });
2364
2477
  }
2365
2478
  function bindingQuery(params) {
2366
- return stripUndefined8({
2479
+ return stripUndefined9({
2367
2480
  resource_id: pickFirst3(params.resourceId, params.resource_id),
2368
2481
  resource_type: pickFirst3(params.resourceType, params.resource_type),
2369
2482
  secret_id: pickFirst3(params.secretId, params.secret_id)
2370
2483
  });
2371
2484
  }
2372
2485
  function oauthBody(params) {
2373
- return stripUndefined8({
2486
+ return stripUndefined9({
2374
2487
  provider: params.provider,
2375
2488
  expose_as_env: pickFirst3(params.exposeAsEnv, params.expose_as_env),
2376
2489
  scope: params.scope,
@@ -2419,7 +2532,7 @@ var OAuthFlow = class {
2419
2532
  const data = await this.http.get("/egress/oauth/status", {
2420
2533
  state: this.state
2421
2534
  });
2422
- const payload = unwrap21(data) ?? {};
2535
+ const payload = unwrap22(data) ?? {};
2423
2536
  const status = payload.status;
2424
2537
  if (status === "completed" || status === "ready" || status === "succeeded") {
2425
2538
  return payload;
@@ -2451,7 +2564,7 @@ var EgressSecrets = class {
2451
2564
  "/egress/secrets",
2452
2565
  setBody(params)
2453
2566
  );
2454
- return unwrap21(data);
2567
+ return unwrap22(data);
2455
2568
  }
2456
2569
  /** List secrets. */
2457
2570
  async list(params = {}) {
@@ -2466,16 +2579,16 @@ var EgressSecrets = class {
2466
2579
  const data = await this.http.get(
2467
2580
  `/egress/secrets/${id}`
2468
2581
  );
2469
- return unwrap21(data);
2582
+ return unwrap22(data);
2470
2583
  }
2471
2584
  /** Rotate the secret's value. */
2472
2585
  async rotate(id, params) {
2473
- const body3 = typeof params === "string" ? rotateBody({ newValue: params }) : rotateBody(params);
2586
+ const body4 = typeof params === "string" ? rotateBody({ newValue: params }) : rotateBody(params);
2474
2587
  const data = await this.http.patch(
2475
2588
  `/egress/secrets/${id}`,
2476
- body3
2589
+ body4
2477
2590
  );
2478
- return unwrap21(data);
2591
+ return unwrap22(data);
2479
2592
  }
2480
2593
  /** Delete a secret. */
2481
2594
  async delete(id) {
@@ -2488,7 +2601,7 @@ var EgressSecrets = class {
2488
2601
  "/egress/bindings",
2489
2602
  bindingBody(params)
2490
2603
  );
2491
- return unwrap21(data);
2604
+ return unwrap22(data);
2492
2605
  }
2493
2606
  /** List secret bindings. */
2494
2607
  async listBindings(params = {}) {
@@ -2521,7 +2634,7 @@ var EgressSecrets = class {
2521
2634
  "/egress/oauth/start",
2522
2635
  oauthBody(params)
2523
2636
  );
2524
- const payload = unwrap21(data) ?? {};
2637
+ const payload = unwrap22(data) ?? {};
2525
2638
  return new OAuthFlow(this.http, payload, params.provider);
2526
2639
  }
2527
2640
  };
@@ -3085,12 +3198,12 @@ var ComputerInbox = class {
3085
3198
  return unwrapData(raw);
3086
3199
  }
3087
3200
  async update(fields) {
3088
- const body3 = Object.fromEntries(
3201
+ const body4 = Object.fromEntries(
3089
3202
  Object.entries(fields).filter(([, v]) => v !== void 0)
3090
3203
  );
3091
3204
  const raw = await this.http.patch(
3092
3205
  `/computers/${this.computerId}/inbox`,
3093
- body3
3206
+ body4
3094
3207
  );
3095
3208
  return unwrapData(raw);
3096
3209
  }
@@ -3389,12 +3502,12 @@ var Computer = class _Computer {
3389
3502
  }
3390
3503
  /** Clone this computer into a new one. */
3391
3504
  async clone(opts = {}) {
3392
- const body3 = Object.fromEntries(
3505
+ const body4 = Object.fromEntries(
3393
3506
  Object.entries(opts).filter(([, v]) => v !== void 0)
3394
3507
  );
3395
3508
  const raw = await this.http.post(
3396
3509
  `/computers/${this.id}/clone`,
3397
- body3
3510
+ body4
3398
3511
  );
3399
3512
  const data = unwrapData(raw);
3400
3513
  return new _Computer(this.http, data);
@@ -3410,12 +3523,12 @@ var Computer = class _Computer {
3410
3523
  }
3411
3524
  /** Move the computer to a different region or host. */
3412
3525
  async move(opts) {
3413
- const body3 = Object.fromEntries(
3526
+ const body4 = Object.fromEntries(
3414
3527
  Object.entries(opts).filter(([, v]) => v !== void 0)
3415
3528
  );
3416
3529
  const updated = await this.http.post(
3417
3530
  `/computers/${this.id}/move`,
3418
- body3
3531
+ body4
3419
3532
  );
3420
3533
  this.data = updated;
3421
3534
  return this;
@@ -3497,12 +3610,12 @@ var Computers = class {
3497
3610
  agentRuntimeProfileId,
3498
3611
  agentProfileId,
3499
3612
  skipAgentRuntimeProfile,
3500
- ...body3
3613
+ ...body4
3501
3614
  } = params;
3502
3615
  const data = await this.http.post("/computers", {
3503
3616
  template_type: "miosa-desktop",
3504
3617
  size: "small",
3505
- ...body3,
3618
+ ...body4,
3506
3619
  agent_runtime_profile_id: agentRuntimeProfileId ?? params.agent_runtime_profile_id ?? agentProfileId ?? params.agent_profile_id,
3507
3620
  skip_agent_runtime_profile: skipAgentRuntimeProfile ?? params.skip_agent_runtime_profile
3508
3621
  });
@@ -3574,7 +3687,7 @@ var Credits = class {
3574
3687
  return this.http.get("/credits/usage");
3575
3688
  }
3576
3689
  };
3577
- function unwrap22(payload) {
3690
+ function unwrap23(payload) {
3578
3691
  if (payload && typeof payload === "object" && "data" in payload) {
3579
3692
  return payload.data;
3580
3693
  }
@@ -3590,7 +3703,7 @@ function listItems2(payload, candidateKeys = ["data", "cron_jobs", "executions",
3590
3703
  }
3591
3704
  return [];
3592
3705
  }
3593
- function stripUndefined9(input) {
3706
+ function stripUndefined10(input) {
3594
3707
  return Object.fromEntries(
3595
3708
  Object.entries(input).filter(([, v]) => v !== void 0)
3596
3709
  );
@@ -3604,28 +3717,28 @@ var CronJobs = class {
3604
3717
  }
3605
3718
  http;
3606
3719
  async list(params = {}) {
3607
- const query2 = stripUndefined9({ ...params });
3720
+ const query2 = stripUndefined10({ ...params });
3608
3721
  const data = await this.http.get("/cron-jobs", query2);
3609
3722
  return listItems2(data);
3610
3723
  }
3611
3724
  async get(jobId) {
3612
3725
  const data = await this.http.get(`/cron-jobs/${jobId}`);
3613
- return unwrap22(data);
3726
+ return unwrap23(data);
3614
3727
  }
3615
3728
  async create(params) {
3616
3729
  const { idempotencyKey: ikey, ...rest } = params;
3617
- const body3 = stripUndefined9(rest);
3730
+ const body4 = stripUndefined10(rest);
3618
3731
  const data = await this.http.request("/cron-jobs", {
3619
3732
  method: "POST",
3620
- body: body3,
3733
+ body: body4,
3621
3734
  headers: { "Idempotency-Key": idempotencyKey2(ikey) }
3622
3735
  });
3623
- return unwrap22(data);
3736
+ return unwrap23(data);
3624
3737
  }
3625
3738
  async update(jobId, params) {
3626
- const body3 = stripUndefined9(params);
3627
- const data = await this.http.patch(`/cron-jobs/${jobId}`, body3);
3628
- return unwrap22(data);
3739
+ const body4 = stripUndefined10(params);
3740
+ const data = await this.http.patch(`/cron-jobs/${jobId}`, body4);
3741
+ return unwrap23(data);
3629
3742
  }
3630
3743
  async delete(jobId) {
3631
3744
  await this.http.delete(`/cron-jobs/${jobId}`);
@@ -3633,11 +3746,11 @@ var CronJobs = class {
3633
3746
  // ── Control ────────────────────────────────────────────────────────────────
3634
3747
  async pause(jobId) {
3635
3748
  const data = await this.http.post(`/cron-jobs/${jobId}/pause`);
3636
- return unwrap22(data);
3749
+ return unwrap23(data);
3637
3750
  }
3638
3751
  async resume(jobId) {
3639
3752
  const data = await this.http.post(`/cron-jobs/${jobId}/resume`);
3640
- return unwrap22(data);
3753
+ return unwrap23(data);
3641
3754
  }
3642
3755
  async runNow(jobId, opts = {}) {
3643
3756
  const data = await this.http.request(
@@ -3647,7 +3760,7 @@ var CronJobs = class {
3647
3760
  headers: { "Idempotency-Key": idempotencyKey2(opts.idempotencyKey) }
3648
3761
  }
3649
3762
  );
3650
- return unwrap22(data);
3763
+ return unwrap23(data);
3651
3764
  }
3652
3765
  // ── Execution history ──────────────────────────────────────────────────────
3653
3766
  async listExecutions(jobId) {
@@ -3662,12 +3775,12 @@ var CronJobs = class {
3662
3775
  const data = await this.http.get(
3663
3776
  `/cron-jobs/${jobId}/executions/${executionId}`
3664
3777
  );
3665
- return unwrap22(data);
3778
+ return unwrap23(data);
3666
3779
  }
3667
3780
  };
3668
3781
 
3669
3782
  // src/resources/dashboard.ts
3670
- function unwrap23(payload) {
3783
+ function unwrap24(payload) {
3671
3784
  if (payload && typeof payload === "object") {
3672
3785
  const p = payload;
3673
3786
  for (const k of ["data", "dashboard", "overview", "items"]) {
@@ -3684,15 +3797,15 @@ var Dashboard = class {
3684
3797
  /** Aggregated user dashboard payload. */
3685
3798
  async summary() {
3686
3799
  const data = await this.http.get("/dashboard");
3687
- return unwrap23(data);
3800
+ return unwrap24(data);
3688
3801
  }
3689
3802
  /** Status / health overview (public endpoint). */
3690
3803
  async overview() {
3691
3804
  const data = await this.http.get("/overview");
3692
- return unwrap23(data);
3805
+ return unwrap24(data);
3693
3806
  }
3694
3807
  };
3695
- function unwrap24(payload) {
3808
+ function unwrap25(payload) {
3696
3809
  if (payload && typeof payload === "object" && "data" in payload) {
3697
3810
  return payload.data;
3698
3811
  }
@@ -3708,7 +3821,7 @@ function listItems3(payload, candidateKeys = ["data", "databases", "items"]) {
3708
3821
  }
3709
3822
  return [];
3710
3823
  }
3711
- function stripUndefined10(input) {
3824
+ function stripUndefined11(input) {
3712
3825
  return Object.fromEntries(
3713
3826
  Object.entries(input).filter(([, v]) => v !== void 0)
3714
3827
  );
@@ -3722,13 +3835,13 @@ var Databases = class {
3722
3835
  }
3723
3836
  http;
3724
3837
  async list(params = {}) {
3725
- const query2 = stripUndefined10({ ...params });
3838
+ const query2 = stripUndefined11({ ...params });
3726
3839
  const data = await this.http.get("/databases", query2);
3727
3840
  return listItems3(data);
3728
3841
  }
3729
3842
  async get(databaseId) {
3730
3843
  const data = await this.http.get(`/databases/${databaseId}`);
3731
- return unwrap24(data);
3844
+ return unwrap25(data);
3732
3845
  }
3733
3846
  async create(params) {
3734
3847
  const {
@@ -3739,20 +3852,20 @@ var Databases = class {
3739
3852
  size: _deprecatedSize,
3740
3853
  ...rest
3741
3854
  } = params;
3742
- const body3 = stripUndefined10({
3855
+ const body4 = stripUndefined11({
3743
3856
  ...rest,
3744
3857
  engine_version: engine_version ?? version
3745
3858
  });
3746
3859
  const data = await this.http.request("/databases", {
3747
3860
  method: "POST",
3748
- body: body3,
3861
+ body: body4,
3749
3862
  headers: {
3750
3863
  "Idempotency-Key": idempotencyKey3(
3751
3864
  camelIdempotencyKey ?? snakeIdempotencyKey
3752
3865
  )
3753
3866
  }
3754
3867
  });
3755
- return unwrap24(data);
3868
+ return unwrap25(data);
3756
3869
  }
3757
3870
  async delete(databaseId) {
3758
3871
  await this.http.delete(`/databases/${databaseId}`);
@@ -3762,27 +3875,27 @@ var Databases = class {
3762
3875
  const data = await this.http.post(
3763
3876
  `/databases/${databaseId}/start`
3764
3877
  );
3765
- return unwrap24(data);
3878
+ return unwrap25(data);
3766
3879
  }
3767
3880
  async stop(databaseId) {
3768
3881
  const data = await this.http.post(`/databases/${databaseId}/stop`);
3769
- return unwrap24(data);
3882
+ return unwrap25(data);
3770
3883
  }
3771
3884
  async restart(databaseId) {
3772
3885
  const data = await this.http.post(
3773
3886
  `/databases/${databaseId}/restart`
3774
3887
  );
3775
- return unwrap24(data);
3888
+ return unwrap25(data);
3776
3889
  }
3777
3890
  // ── Credentials + logs ────────────────────────────────────────────────────
3778
3891
  async credentials(databaseId) {
3779
3892
  const data = await this.http.get(
3780
3893
  `/databases/${databaseId}/credentials`
3781
3894
  );
3782
- return unwrap24(data);
3895
+ return unwrap25(data);
3783
3896
  }
3784
3897
  async logs(databaseId, params = {}) {
3785
- const query2 = stripUndefined10({
3898
+ const query2 = stripUndefined11({
3786
3899
  lines: params.lines,
3787
3900
  since: params.since
3788
3901
  });
@@ -3809,7 +3922,7 @@ function attributionBody(p) {
3809
3922
  function idempotencyKey4(key) {
3810
3923
  return key ?? randomUUID();
3811
3924
  }
3812
- function unwrap25(payload) {
3925
+ function unwrap26(payload) {
3813
3926
  if (payload && typeof payload === "object" && "data" in payload) {
3814
3927
  return payload.data;
3815
3928
  }
@@ -3825,7 +3938,7 @@ function listItems4(payload, candidateKeys = ["items", "deployments", "versions"
3825
3938
  }
3826
3939
  return [];
3827
3940
  }
3828
- function stripUndefined11(input) {
3941
+ function stripUndefined12(input) {
3829
3942
  return Object.fromEntries(
3830
3943
  Object.entries(input).filter(([, v]) => v !== void 0)
3831
3944
  );
@@ -3880,7 +3993,7 @@ var DeploymentVersions = class {
3880
3993
  http;
3881
3994
  deploymentId;
3882
3995
  async list(params = {}) {
3883
- const query2 = stripUndefined11({
3996
+ const query2 = stripUndefined12({
3884
3997
  state: params.state,
3885
3998
  limit: params.limit,
3886
3999
  cursor: params.cursor,
@@ -3896,19 +4009,19 @@ var DeploymentVersions = class {
3896
4009
  const data = await this.http.get(
3897
4010
  `/deployments/${this.deploymentId}/versions/${versionId}`
3898
4011
  );
3899
- return unwrap25(data);
4012
+ return unwrap26(data);
3900
4013
  }
3901
4014
  async promote(versionId, opts = {}) {
3902
- const body3 = stripUndefined11({ environment: opts.environment });
4015
+ const body4 = stripUndefined12({ environment: opts.environment });
3903
4016
  const data = await this.http.request(
3904
4017
  `/deployments/${this.deploymentId}/versions/${versionId}/promote`,
3905
4018
  {
3906
4019
  method: "POST",
3907
- body: body3,
4020
+ body: body4,
3908
4021
  headers: { "Idempotency-Key": idempotencyKey4(opts.idempotencyKey) }
3909
4022
  }
3910
4023
  );
3911
- return unwrap25(data);
4024
+ return unwrap26(data);
3912
4025
  }
3913
4026
  };
3914
4027
  var DeploymentReleases = class {
@@ -3928,7 +4041,7 @@ var DeploymentReleases = class {
3928
4041
  const data = await this.http.get(
3929
4042
  `/deployments/${this.deploymentId}/releases/${releaseId}`
3930
4043
  );
3931
- return unwrap25(data);
4044
+ return unwrap26(data);
3932
4045
  }
3933
4046
  };
3934
4047
  var DeploymentRuntimeInstances = class {
@@ -3948,14 +4061,14 @@ var DeploymentRuntimeInstances = class {
3948
4061
  const data = await this.http.get(
3949
4062
  `/deployments/${this.deploymentId}/runtime-instances/${instanceId}`
3950
4063
  );
3951
- return unwrap25(data);
4064
+ return unwrap26(data);
3952
4065
  }
3953
4066
  async logs(instanceId, lines = 100) {
3954
4067
  const data = await this.http.get(
3955
4068
  `/deployments/${this.deploymentId}/runtime-instances/${instanceId}/logs`,
3956
4069
  { lines }
3957
4070
  );
3958
- const unwrapped = unwrap25(data);
4071
+ const unwrapped = unwrap26(data);
3959
4072
  const result = { logs: String(unwrapped.logs ?? "") };
3960
4073
  if (typeof unwrapped.runtime_instance_id === "string") {
3961
4074
  result.runtime_instance_id = unwrapped.runtime_instance_id;
@@ -3977,7 +4090,7 @@ var DeploymentDomains = class {
3977
4090
  http;
3978
4091
  deploymentId;
3979
4092
  async add(domain, params = {}) {
3980
- const body3 = {
4093
+ const body4 = {
3981
4094
  domain,
3982
4095
  redirect_policy: params.redirectPolicy ?? params.redirect_policy,
3983
4096
  ...attributionBody(params)
@@ -3986,11 +4099,11 @@ var DeploymentDomains = class {
3986
4099
  `/deployments/${this.deploymentId}/domains`,
3987
4100
  {
3988
4101
  method: "POST",
3989
- body: stripUndefined11(body3),
4102
+ body: stripUndefined12(body4),
3990
4103
  headers: { "Idempotency-Key": idempotencyKey4(params.idempotencyKey) }
3991
4104
  }
3992
4105
  );
3993
- return unwrap25(data);
4106
+ return unwrap26(data);
3994
4107
  }
3995
4108
  async list(filters = {}) {
3996
4109
  const data = await this.http.get(
@@ -4003,7 +4116,7 @@ var DeploymentDomains = class {
4003
4116
  const data = await this.http.post(
4004
4117
  `/deployments/${this.deploymentId}/domains/${domainId}/verify`
4005
4118
  );
4006
- return unwrap25(data);
4119
+ return unwrap26(data);
4007
4120
  }
4008
4121
  async delete(domainId) {
4009
4122
  await this.http.delete(
@@ -4018,7 +4131,7 @@ var Deployments = class {
4018
4131
  http;
4019
4132
  async list(params = {}) {
4020
4133
  const projectId = params.projectId ?? params.project_id;
4021
- const query2 = stripUndefined11({
4134
+ const query2 = stripUndefined12({
4022
4135
  project_id: projectId,
4023
4136
  state: params.state,
4024
4137
  limit: params.limit,
@@ -4033,10 +4146,10 @@ var Deployments = class {
4033
4146
  }
4034
4147
  async get(deploymentId) {
4035
4148
  const data = await this.http.get(`/deployments/${deploymentId}`);
4036
- return unwrap25(data);
4149
+ return unwrap26(data);
4037
4150
  }
4038
4151
  async create(params) {
4039
- const body3 = stripUndefined11({
4152
+ const body4 = stripUndefined12({
4040
4153
  name: params.name,
4041
4154
  repo_url: params.repoUrl ?? params.repo_url,
4042
4155
  branch: params.branch,
@@ -4049,10 +4162,10 @@ var Deployments = class {
4049
4162
  });
4050
4163
  const data = await this.http.request("/deployments", {
4051
4164
  method: "POST",
4052
- body: body3,
4165
+ body: body4,
4053
4166
  headers: { "Idempotency-Key": idempotencyKey4(params.idempotencyKey) }
4054
4167
  });
4055
- return unwrap25(data);
4168
+ return unwrap26(data);
4056
4169
  }
4057
4170
  /**
4058
4171
  * Create a deployment that runs on the workspace's dedicated Docker Deploy
@@ -4096,7 +4209,7 @@ var Deployments = class {
4096
4209
  const rawHost = await this.http.get(
4097
4210
  `/docker-deploy/hosts/${hostId}`
4098
4211
  );
4099
- host = unwrap25(
4212
+ host = unwrap26(
4100
4213
  rawHost
4101
4214
  );
4102
4215
  addDoctorCheck(
@@ -4199,7 +4312,7 @@ var Deployments = class {
4199
4312
  };
4200
4313
  }
4201
4314
  async update(deploymentId, params) {
4202
- const body3 = stripUndefined11({
4315
+ const body4 = stripUndefined12({
4203
4316
  name: params.name,
4204
4317
  branch: params.branch,
4205
4318
  build_command: params.buildCommand ?? params.build_command,
@@ -4208,15 +4321,15 @@ var Deployments = class {
4208
4321
  });
4209
4322
  const data = await this.http.patch(
4210
4323
  `/deployments/${deploymentId}`,
4211
- body3
4324
+ body4
4212
4325
  );
4213
- return unwrap25(data);
4326
+ return unwrap26(data);
4214
4327
  }
4215
4328
  async delete(deploymentId) {
4216
4329
  await this.http.delete(`/deployments/${deploymentId}`);
4217
4330
  }
4218
4331
  async publish(deploymentId, params) {
4219
- const body3 = stripUndefined11({
4332
+ const body4 = stripUndefined12({
4220
4333
  source_sandbox_id: params.sourceSandboxId ?? params.source_sandbox_id,
4221
4334
  output_path: params.outputPath ?? params.output_path,
4222
4335
  entrypoint: params.entrypoint,
@@ -4226,11 +4339,11 @@ var Deployments = class {
4226
4339
  `/deployments/${deploymentId}/publish`,
4227
4340
  {
4228
4341
  method: "POST",
4229
- body: body3,
4342
+ body: body4,
4230
4343
  headers: { "Idempotency-Key": idempotencyKey4(params.idempotencyKey) }
4231
4344
  }
4232
4345
  );
4233
- return unwrap25(data);
4346
+ return unwrap26(data);
4234
4347
  }
4235
4348
  /**
4236
4349
  * Backward-compatible bridge: POST /sandboxes/:id/deploy. Works today;
@@ -4238,7 +4351,7 @@ var Deployments = class {
4238
4351
  * phase. Prefer `publish()` once Phase 2B/3 lands.
4239
4352
  */
4240
4353
  async publishFromSandbox(sandboxId, params = {}) {
4241
- const body3 = stripUndefined11({
4354
+ const body4 = stripUndefined12({
4242
4355
  name: params.name,
4243
4356
  deployment_id: params.deploymentId ?? params.deployment_id,
4244
4357
  output_path: params.outputPath ?? params.output_path,
@@ -4251,25 +4364,25 @@ var Deployments = class {
4251
4364
  `/sandboxes/${sandboxId}/deploy`,
4252
4365
  {
4253
4366
  method: "POST",
4254
- body: body3,
4367
+ body: body4,
4255
4368
  headers: { "Idempotency-Key": idempotencyKey4(params.idempotencyKey) }
4256
4369
  }
4257
4370
  );
4258
- return unwrap25(data);
4371
+ return unwrap26(data);
4259
4372
  }
4260
4373
  async rollback(deploymentId, params = {}) {
4261
- const body3 = stripUndefined11({
4374
+ const body4 = stripUndefined12({
4262
4375
  version_id: params.versionId ?? params.version_id
4263
4376
  });
4264
4377
  const data = await this.http.request(
4265
4378
  `/deployments/${deploymentId}/rollback`,
4266
4379
  {
4267
4380
  method: "POST",
4268
- body: body3,
4381
+ body: body4,
4269
4382
  headers: { "Idempotency-Key": idempotencyKey4(params.idempotencyKey) }
4270
4383
  }
4271
4384
  );
4272
- return unwrap25(data);
4385
+ return unwrap26(data);
4273
4386
  }
4274
4387
  async listBuilds(deploymentId) {
4275
4388
  const data = await this.http.get(
@@ -4281,7 +4394,7 @@ var Deployments = class {
4281
4394
  const data = await this.http.get(
4282
4395
  `/deployments/${deploymentId}/builds/${buildId}`
4283
4396
  );
4284
- return unwrap25(data);
4397
+ return unwrap26(data);
4285
4398
  }
4286
4399
  async listEnv(deploymentId) {
4287
4400
  const data = await this.http.get(
@@ -4290,10 +4403,10 @@ var Deployments = class {
4290
4403
  return listItems4(data);
4291
4404
  }
4292
4405
  async setEnv(deploymentId, vars, opts = {}) {
4293
- const body3 = stripUndefined11({ env: vars, environment: opts.environment });
4406
+ const body4 = stripUndefined12({ env: vars, environment: opts.environment });
4294
4407
  const data = await this.http.post(
4295
4408
  `/deployments/${deploymentId}/env`,
4296
- body3
4409
+ body4
4297
4410
  );
4298
4411
  return listItems4(data);
4299
4412
  }
@@ -4319,12 +4432,12 @@ function workspaceId(params) {
4319
4432
  return params?.workspace_id ?? params?.workspaceId;
4320
4433
  }
4321
4434
  function ensureBody(params) {
4322
- const body3 = {};
4435
+ const body4 = {};
4323
4436
  const id = params.workspace_id ?? params.workspaceId;
4324
4437
  const externalId = params.external_workspace_id ?? params.externalWorkspaceId;
4325
- if (id) body3.workspace_id = id;
4326
- if (externalId) body3.external_workspace_id = externalId;
4327
- return body3;
4438
+ if (id) body4.workspace_id = id;
4439
+ if (externalId) body4.external_workspace_id = externalId;
4440
+ return body4;
4328
4441
  }
4329
4442
  function unwrapHost(response) {
4330
4443
  const host = response.data ?? response.host;
@@ -4399,7 +4512,7 @@ var DockerDeploy = class {
4399
4512
  };
4400
4513
 
4401
4514
  // src/resources/email.ts
4402
- function unwrap26(data) {
4515
+ function unwrap27(data) {
4403
4516
  if (data && typeof data === "object") {
4404
4517
  const d = data;
4405
4518
  for (const k of [
@@ -4451,12 +4564,12 @@ var EmailCampaigns = class {
4451
4564
  );
4452
4565
  }
4453
4566
  async create(attrs) {
4454
- return unwrap26(
4567
+ return unwrap27(
4455
4568
  await this.http.post("/admin/email-campaigns", strip(attrs))
4456
4569
  );
4457
4570
  }
4458
4571
  async recipientCount(filters = {}) {
4459
- return unwrap26(
4572
+ return unwrap27(
4460
4573
  await this.http.get(
4461
4574
  "/admin/email-campaigns/recipient-count",
4462
4575
  filters
@@ -4464,7 +4577,7 @@ var EmailCampaigns = class {
4464
4577
  );
4465
4578
  }
4466
4579
  async send(campaignId, opts = {}) {
4467
- return unwrap26(
4580
+ return unwrap27(
4468
4581
  await this.http.post(
4469
4582
  `/admin/email-campaigns/${campaignId}/send`,
4470
4583
  strip(opts)
@@ -4472,7 +4585,7 @@ var EmailCampaigns = class {
4472
4585
  );
4473
4586
  }
4474
4587
  async cancel(campaignId) {
4475
- return unwrap26(
4588
+ return unwrap27(
4476
4589
  await this.http.post(
4477
4590
  `/admin/email-campaigns/${campaignId}/cancel`
4478
4591
  )
@@ -4498,7 +4611,7 @@ var EmailTemplates = class {
4498
4611
  );
4499
4612
  }
4500
4613
  async create(key, attrs = {}) {
4501
- return unwrap26(
4614
+ return unwrap27(
4502
4615
  await this.http.post("/admin/email-templates", {
4503
4616
  key,
4504
4617
  ...strip(attrs)
@@ -4506,7 +4619,7 @@ var EmailTemplates = class {
4506
4619
  );
4507
4620
  }
4508
4621
  async update(key, attrs) {
4509
- return unwrap26(
4622
+ return unwrap27(
4510
4623
  await this.http.put(
4511
4624
  `/admin/email-templates/${key}`,
4512
4625
  strip(attrs)
@@ -4514,7 +4627,7 @@ var EmailTemplates = class {
4514
4627
  );
4515
4628
  }
4516
4629
  async reset(key) {
4517
- return unwrap26(
4630
+ return unwrap27(
4518
4631
  await this.http.post(`/admin/email-templates/${key}/reset`)
4519
4632
  );
4520
4633
  }
@@ -4530,17 +4643,17 @@ var EmailInbox = class {
4530
4643
  );
4531
4644
  }
4532
4645
  async send(attrs) {
4533
- return unwrap26(
4646
+ return unwrap27(
4534
4647
  await this.http.post("/admin/email-inbox/send", strip(attrs))
4535
4648
  );
4536
4649
  }
4537
4650
  async markRead(messageId) {
4538
- return unwrap26(
4651
+ return unwrap27(
4539
4652
  await this.http.post(`/admin/email-inbox/${messageId}/read`)
4540
4653
  );
4541
4654
  }
4542
4655
  async archive(messageId) {
4543
- return unwrap26(
4656
+ return unwrap27(
4544
4657
  await this.http.post(`/admin/email-inbox/${messageId}/archive`)
4545
4658
  );
4546
4659
  }
@@ -4569,18 +4682,18 @@ var Embeddings = class {
4569
4682
  * `{ object: "list", data: [...], model, usage }`.
4570
4683
  */
4571
4684
  async create(params) {
4572
- const body3 = Object.fromEntries(
4685
+ const body4 = Object.fromEntries(
4573
4686
  Object.entries(params).filter(([, v]) => v !== void 0)
4574
4687
  );
4575
4688
  return this.http.post(
4576
4689
  "/intelligence/embeddings",
4577
- body3
4690
+ body4
4578
4691
  );
4579
4692
  }
4580
4693
  };
4581
4694
 
4582
4695
  // src/resources/external-keys.ts
4583
- function unwrap27(payload) {
4696
+ function unwrap28(payload) {
4584
4697
  if (payload && typeof payload === "object") {
4585
4698
  const p = payload;
4586
4699
  for (const k of ["data", "external_keys", "items"]) {
@@ -4589,7 +4702,7 @@ function unwrap27(payload) {
4589
4702
  }
4590
4703
  return payload;
4591
4704
  }
4592
- function stripUndefined12(input) {
4705
+ function stripUndefined13(input) {
4593
4706
  return Object.fromEntries(
4594
4707
  Object.entries(input).filter(([, v]) => v !== void 0)
4595
4708
  );
@@ -4602,22 +4715,22 @@ var ExternalKeys = class {
4602
4715
  /** List configured external keys. */
4603
4716
  async list() {
4604
4717
  const data = await this.http.get("/external-keys");
4605
- const result = unwrap27(data);
4718
+ const result = unwrap28(data);
4606
4719
  if (Array.isArray(result)) return result;
4607
4720
  return [];
4608
4721
  }
4609
4722
  /** Create / register an external provider key. */
4610
4723
  async create(params) {
4611
- const body3 = stripUndefined12(params);
4612
- const data = await this.http.post("/external-keys", body3);
4613
- return unwrap27(data);
4724
+ const body4 = stripUndefined13(params);
4725
+ const data = await this.http.post("/external-keys", body4);
4726
+ return unwrap28(data);
4614
4727
  }
4615
4728
  /** Resolve (preview) the stored key for a provider. */
4616
4729
  async resolve(provider) {
4617
4730
  const data = await this.http.get(
4618
4731
  `/external-keys/${provider}/resolve`
4619
4732
  );
4620
- return unwrap27(data);
4733
+ return unwrap28(data);
4621
4734
  }
4622
4735
  /**
4623
4736
  * Delete the stored key for a provider.
@@ -4627,7 +4740,7 @@ var ExternalKeys = class {
4627
4740
  await this.http.delete(`/external-keys/${provider}`);
4628
4741
  }
4629
4742
  };
4630
- function unwrap28(payload) {
4743
+ function unwrap29(payload) {
4631
4744
  if (payload && typeof payload === "object" && "data" in payload) {
4632
4745
  return payload.data;
4633
4746
  }
@@ -4643,7 +4756,7 @@ function listItems5(payload, candidateKeys = ["data", "domains", "items"]) {
4643
4756
  }
4644
4757
  return [];
4645
4758
  }
4646
- function stripUndefined13(input) {
4759
+ function stripUndefined14(input) {
4647
4760
  return Object.fromEntries(
4648
4761
  Object.entries(input).filter(([, v]) => v !== void 0)
4649
4762
  );
@@ -4657,7 +4770,7 @@ var FlatCustomDomains = class {
4657
4770
  }
4658
4771
  http;
4659
4772
  async list(params = {}) {
4660
- const query2 = stripUndefined13({ ...params });
4773
+ const query2 = stripUndefined14({ ...params });
4661
4774
  const data = await this.http.get("/custom-domains", query2);
4662
4775
  return listItems5(data);
4663
4776
  }
@@ -4669,7 +4782,7 @@ var FlatCustomDomains = class {
4669
4782
  redirectPolicy,
4670
4783
  ...rest
4671
4784
  } = params;
4672
- const body3 = stripUndefined13({
4785
+ const body4 = stripUndefined14({
4673
4786
  ...rest,
4674
4787
  resource_type: resourceType ?? rest.resource_type,
4675
4788
  resource_id: resourceId ?? rest.resource_id,
@@ -4677,16 +4790,16 @@ var FlatCustomDomains = class {
4677
4790
  });
4678
4791
  const data = await this.http.request("/custom-domains", {
4679
4792
  method: "POST",
4680
- body: body3,
4793
+ body: body4,
4681
4794
  headers: { "Idempotency-Key": idempotencyKey5(ikey) }
4682
4795
  });
4683
- return unwrap28(data);
4796
+ return unwrap29(data);
4684
4797
  }
4685
4798
  async delete(domainId) {
4686
4799
  await this.http.delete(`/custom-domains/${domainId}`);
4687
4800
  }
4688
4801
  };
4689
- function unwrap29(payload) {
4802
+ function unwrap30(payload) {
4690
4803
  if (payload && typeof payload === "object" && "data" in payload) {
4691
4804
  return payload.data;
4692
4805
  }
@@ -4702,7 +4815,7 @@ function listItems6(payload, candidateKeys = ["data", "functions", "items"]) {
4702
4815
  }
4703
4816
  return [];
4704
4817
  }
4705
- function stripUndefined14(input) {
4818
+ function stripUndefined15(input) {
4706
4819
  return Object.fromEntries(
4707
4820
  Object.entries(input).filter(([, v]) => v !== void 0)
4708
4821
  );
@@ -4716,40 +4829,40 @@ var Functions = class {
4716
4829
  }
4717
4830
  http;
4718
4831
  async list(params = {}) {
4719
- const query2 = stripUndefined14({ ...params });
4832
+ const query2 = stripUndefined15({ ...params });
4720
4833
  const data = await this.http.get("/functions", query2);
4721
4834
  return listItems6(data);
4722
4835
  }
4723
4836
  async get(functionId) {
4724
4837
  const data = await this.http.get(`/functions/${functionId}`);
4725
- return unwrap29(data);
4838
+ return unwrap30(data);
4726
4839
  }
4727
4840
  async create(params) {
4728
4841
  const { idempotencyKey: ikey, memoryMb, timeoutSec, ...rest } = params;
4729
- const body3 = stripUndefined14({
4842
+ const body4 = stripUndefined15({
4730
4843
  ...rest,
4731
4844
  memory_mb: memoryMb ?? rest.memory_mb,
4732
4845
  timeout_sec: timeoutSec ?? rest.timeout_sec
4733
4846
  });
4734
4847
  const data = await this.http.request("/functions", {
4735
4848
  method: "POST",
4736
- body: body3,
4849
+ body: body4,
4737
4850
  headers: { "Idempotency-Key": idempotencyKey6(ikey) }
4738
4851
  });
4739
- return unwrap29(data);
4852
+ return unwrap30(data);
4740
4853
  }
4741
4854
  async update(functionId, params) {
4742
4855
  const { memoryMb, timeoutSec, ...rest } = params;
4743
- const body3 = stripUndefined14({
4856
+ const body4 = stripUndefined15({
4744
4857
  ...rest,
4745
4858
  memory_mb: memoryMb ?? rest.memory_mb,
4746
4859
  timeout_sec: timeoutSec ?? rest.timeout_sec
4747
4860
  });
4748
4861
  const data = await this.http.patch(
4749
4862
  `/functions/${functionId}`,
4750
- body3
4863
+ body4
4751
4864
  );
4752
- return unwrap29(data);
4865
+ return unwrap30(data);
4753
4866
  }
4754
4867
  async delete(functionId) {
4755
4868
  await this.http.delete(`/functions/${functionId}`);
@@ -4770,7 +4883,7 @@ var Functions = class {
4770
4883
  return data ?? {};
4771
4884
  }
4772
4885
  };
4773
- function unwrap30(payload) {
4886
+ function unwrap31(payload) {
4774
4887
  if (payload && typeof payload === "object" && "data" in payload) {
4775
4888
  return payload.data;
4776
4889
  }
@@ -4786,7 +4899,7 @@ function listItems7(payload, candidateKeys = ["data", "health_checks", "items"])
4786
4899
  }
4787
4900
  return [];
4788
4901
  }
4789
- function stripUndefined15(input) {
4902
+ function stripUndefined16(input) {
4790
4903
  return Object.fromEntries(
4791
4904
  Object.entries(input).filter(([, v]) => v !== void 0)
4792
4905
  );
@@ -4800,13 +4913,13 @@ var HealthChecks = class {
4800
4913
  }
4801
4914
  http;
4802
4915
  async list(params = {}) {
4803
- const query2 = stripUndefined15({ ...params });
4916
+ const query2 = stripUndefined16({ ...params });
4804
4917
  const data = await this.http.get("/health-checks", query2);
4805
4918
  return listItems7(data);
4806
4919
  }
4807
4920
  async get(checkId) {
4808
4921
  const data = await this.http.get(`/health-checks/${checkId}`);
4809
- return unwrap30(data);
4922
+ return unwrap31(data);
4810
4923
  }
4811
4924
  async create(params) {
4812
4925
  const {
@@ -4816,7 +4929,7 @@ var HealthChecks = class {
4816
4929
  expectedStatus,
4817
4930
  ...rest
4818
4931
  } = params;
4819
- const body3 = stripUndefined15({
4932
+ const body4 = stripUndefined16({
4820
4933
  ...rest,
4821
4934
  interval_sec: intervalSec ?? rest.interval_sec,
4822
4935
  timeout_sec: timeoutSec ?? rest.timeout_sec,
@@ -4824,14 +4937,14 @@ var HealthChecks = class {
4824
4937
  });
4825
4938
  const data = await this.http.request("/health-checks", {
4826
4939
  method: "POST",
4827
- body: body3,
4940
+ body: body4,
4828
4941
  headers: { "Idempotency-Key": idempotencyKey7(ikey) }
4829
4942
  });
4830
- return unwrap30(data);
4943
+ return unwrap31(data);
4831
4944
  }
4832
4945
  async update(checkId, params) {
4833
4946
  const { intervalSec, timeoutSec, expectedStatus, ...rest } = params;
4834
- const body3 = stripUndefined15({
4947
+ const body4 = stripUndefined16({
4835
4948
  ...rest,
4836
4949
  interval_sec: intervalSec ?? rest.interval_sec,
4837
4950
  timeout_sec: timeoutSec ?? rest.timeout_sec,
@@ -4839,9 +4952,9 @@ var HealthChecks = class {
4839
4952
  });
4840
4953
  const data = await this.http.patch(
4841
4954
  `/health-checks/${checkId}`,
4842
- body3
4955
+ body4
4843
4956
  );
4844
- return unwrap30(data);
4957
+ return unwrap31(data);
4845
4958
  }
4846
4959
  async delete(checkId) {
4847
4960
  await this.http.delete(`/health-checks/${checkId}`);
@@ -4849,7 +4962,7 @@ var HealthChecks = class {
4849
4962
  };
4850
4963
 
4851
4964
  // src/resources/integrations.ts
4852
- function unwrap31(payload) {
4965
+ function unwrap32(payload) {
4853
4966
  if (payload && typeof payload === "object") {
4854
4967
  const p = payload;
4855
4968
  for (const k of ["data", "integrations", "catalog", "items"]) {
@@ -4859,11 +4972,11 @@ function unwrap31(payload) {
4859
4972
  return payload;
4860
4973
  }
4861
4974
  function listItems8(payload) {
4862
- const result = unwrap31(payload);
4975
+ const result = unwrap32(payload);
4863
4976
  if (Array.isArray(result)) return result;
4864
4977
  return [];
4865
4978
  }
4866
- function stripUndefined16(input) {
4979
+ function stripUndefined17(input) {
4867
4980
  return Object.fromEntries(
4868
4981
  Object.entries(input).filter(([, v]) => v !== void 0)
4869
4982
  );
@@ -4888,14 +5001,14 @@ var Integrations = class {
4888
5001
  const data = await this.http.get(
4889
5002
  `/integrations/${provider}/start`
4890
5003
  );
4891
- return unwrap31(data);
5004
+ return unwrap32(data);
4892
5005
  }
4893
5006
  /** Force-refresh the access token for a provider. */
4894
5007
  async refresh(provider) {
4895
5008
  const data = await this.http.post(
4896
5009
  `/integrations/${provider}/refresh`
4897
5010
  );
4898
- return unwrap31(data);
5011
+ return unwrap32(data);
4899
5012
  }
4900
5013
  /** Disconnect (revoke) an integration. */
4901
5014
  async disconnect(provider) {
@@ -4915,41 +5028,41 @@ var Integrations = class {
4915
5028
  // ── Test hooks ─────────────────────────────────────────────────────────────
4916
5029
  /** Send a test message to the connected Slack channel. */
4917
5030
  async slackSendTest(params = {}) {
4918
- const body3 = stripUndefined16(params);
5031
+ const body4 = stripUndefined17(params);
4919
5032
  const data = await this.http.post(
4920
5033
  "/integrations/slack/send-test",
4921
- body3
5034
+ body4
4922
5035
  );
4923
- return unwrap31(data);
5036
+ return unwrap32(data);
4924
5037
  }
4925
5038
  /** Send a test message to the connected Discord channel. */
4926
5039
  async discordSendTest(params = {}) {
4927
- const body3 = stripUndefined16(params);
5040
+ const body4 = stripUndefined17(params);
4928
5041
  const data = await this.http.post(
4929
5042
  "/integrations/discord/send-test",
4930
- body3
5043
+ body4
4931
5044
  );
4932
- return unwrap31(data);
5045
+ return unwrap32(data);
4933
5046
  }
4934
5047
  // ── Linear dedicated controller ────────────────────────────────────────────
4935
5048
  /** Begin Linear OAuth — Linear has provider-specific error shapes. */
4936
5049
  async linearStart() {
4937
5050
  const data = await this.http.get("/integrations/linear/start");
4938
- return unwrap31(data);
5051
+ return unwrap32(data);
4939
5052
  }
4940
5053
  /** Create a Linear issue via the connected workspace. */
4941
5054
  async linearCreateIssue(params = {}) {
4942
- const body3 = stripUndefined16(params);
5055
+ const body4 = stripUndefined17(params);
4943
5056
  const data = await this.http.post(
4944
5057
  "/integrations/linear/create-issue",
4945
- body3
5058
+ body4
4946
5059
  );
4947
- return unwrap31(data);
5060
+ return unwrap32(data);
4948
5061
  }
4949
5062
  };
4950
5063
 
4951
5064
  // src/resources/mcp.ts
4952
- function unwrap32(payload) {
5065
+ function unwrap33(payload) {
4953
5066
  if (payload && typeof payload === "object") {
4954
5067
  const p = payload;
4955
5068
  for (const k of ["data", "mcp", "result", "items"]) {
@@ -4958,7 +5071,7 @@ function unwrap32(payload) {
4958
5071
  }
4959
5072
  return payload;
4960
5073
  }
4961
- function stripUndefined17(input) {
5074
+ function stripUndefined18(input) {
4962
5075
  return Object.fromEntries(
4963
5076
  Object.entries(input).filter(([, v]) => v !== void 0)
4964
5077
  );
@@ -4970,12 +5083,12 @@ var Mcp = class {
4970
5083
  http;
4971
5084
  /** Send a JSON-RPC request to the MCP endpoint. */
4972
5085
  async dispatch(params = {}) {
4973
- const body3 = stripUndefined17(params);
5086
+ const body4 = stripUndefined18(params);
4974
5087
  const data = await this.http.post(
4975
5088
  "/mcp",
4976
- Object.keys(body3).length > 0 ? body3 : void 0
5089
+ Object.keys(body4).length > 0 ? body4 : void 0
4977
5090
  );
4978
- return unwrap32(data);
5091
+ return unwrap33(data);
4979
5092
  }
4980
5093
  /**
4981
5094
  * Open the MCP listen channel (GET).
@@ -4985,7 +5098,7 @@ var Mcp = class {
4985
5098
  */
4986
5099
  async listen() {
4987
5100
  const data = await this.http.get("/mcp");
4988
- return unwrap32(data);
5101
+ return unwrap33(data);
4989
5102
  }
4990
5103
  /** Close (terminate) the MCP session. */
4991
5104
  async close() {
@@ -4994,7 +5107,7 @@ var Mcp = class {
4994
5107
  };
4995
5108
 
4996
5109
  // src/resources/models.ts
4997
- function unwrap33(data) {
5110
+ function unwrap34(data) {
4998
5111
  if (Array.isArray(data)) return data;
4999
5112
  if (data && typeof data === "object") {
5000
5113
  const d = data;
@@ -5015,7 +5128,7 @@ var Models = class {
5015
5128
  Object.entries(filters).filter(([, v]) => v !== void 0)
5016
5129
  );
5017
5130
  const data = await this.http.get("/intelligence/models", query2);
5018
- return unwrap33(data);
5131
+ return unwrap34(data);
5019
5132
  }
5020
5133
  /**
5021
5134
  * Get a single model by id.
@@ -5658,7 +5771,7 @@ function resourcePayload(params) {
5658
5771
  return { resource_type, resource_id };
5659
5772
  }
5660
5773
  function authConfig(params) {
5661
- return stripUndefined18({
5774
+ return stripUndefined19({
5662
5775
  ...params.config ?? {},
5663
5776
  signup_enabled: params.signup_enabled ?? params.signupEnabled,
5664
5777
  email_confirm_required: params.email_confirm_required ?? params.emailConfirmRequired,
@@ -5666,12 +5779,12 @@ function authConfig(params) {
5666
5779
  });
5667
5780
  }
5668
5781
  function requestBody(params) {
5669
- return stripUndefined18({
5782
+ return stripUndefined19({
5670
5783
  ...resourcePayload(params),
5671
5784
  config: authConfig(params)
5672
5785
  });
5673
5786
  }
5674
- function unwrap34(payload) {
5787
+ function unwrap35(payload) {
5675
5788
  if (payload && typeof payload === "object") {
5676
5789
  const p = payload;
5677
5790
  for (const k of ["data", "project_auth", "config", "items"]) {
@@ -5680,7 +5793,7 @@ function unwrap34(payload) {
5680
5793
  }
5681
5794
  return payload;
5682
5795
  }
5683
- function stripUndefined18(input) {
5796
+ function stripUndefined19(input) {
5684
5797
  return Object.fromEntries(
5685
5798
  Object.entries(input).filter(([, v]) => v !== void 0)
5686
5799
  );
@@ -5696,13 +5809,13 @@ var ProjectAuth = class {
5696
5809
  "/project-auth/status",
5697
5810
  resourcePayload(params)
5698
5811
  );
5699
- return unwrap34(data);
5812
+ return unwrap35(data);
5700
5813
  }
5701
5814
  /** Enable project auth. */
5702
5815
  async enable(params) {
5703
- const body3 = requestBody(params);
5704
- const data = await this.http.post("/project-auth/enable", body3);
5705
- return unwrap34(data);
5816
+ const body4 = requestBody(params);
5817
+ const data = await this.http.post("/project-auth/enable", body4);
5818
+ return unwrap35(data);
5706
5819
  }
5707
5820
  /** Disable project auth. */
5708
5821
  async disable(params) {
@@ -5710,18 +5823,18 @@ var ProjectAuth = class {
5710
5823
  "/project-auth/disable",
5711
5824
  resourcePayload(params)
5712
5825
  );
5713
- return unwrap34(data);
5826
+ return unwrap35(data);
5714
5827
  }
5715
5828
  /** Update project-auth configuration. */
5716
5829
  async update(params) {
5717
- const body3 = requestBody(params);
5718
- const data = await this.http.patch("/project-auth/config", body3);
5719
- return unwrap34(data);
5830
+ const body4 = requestBody(params);
5831
+ const data = await this.http.patch("/project-auth/config", body4);
5832
+ return unwrap35(data);
5720
5833
  }
5721
5834
  };
5722
5835
 
5723
5836
  // src/resources/project-integrations.ts
5724
- function unwrap35(payload) {
5837
+ function unwrap36(payload) {
5725
5838
  if (payload && typeof payload === "object") {
5726
5839
  const p = payload;
5727
5840
  for (const k of ["data", "project_integrations", "catalog", "items"]) {
@@ -5731,11 +5844,11 @@ function unwrap35(payload) {
5731
5844
  return payload;
5732
5845
  }
5733
5846
  function listItems9(payload) {
5734
- const result = unwrap35(payload);
5847
+ const result = unwrap36(payload);
5735
5848
  if (Array.isArray(result)) return result;
5736
5849
  return [];
5737
5850
  }
5738
- function stripUndefined19(input) {
5851
+ function stripUndefined20(input) {
5739
5852
  return Object.fromEntries(
5740
5853
  Object.entries(input).filter(([, v]) => v !== void 0)
5741
5854
  );
@@ -5752,7 +5865,7 @@ var ProjectIntegrations = class {
5752
5865
  http;
5753
5866
  /** List project integrations. */
5754
5867
  async list(params = {}) {
5755
- const query2 = stripUndefined19(params);
5868
+ const query2 = stripUndefined20(params);
5756
5869
  const data = await this.http.get("/project-integrations", query2);
5757
5870
  return listItems9(data);
5758
5871
  }
@@ -5766,22 +5879,22 @@ var ProjectIntegrations = class {
5766
5879
  const data = await this.http.get(
5767
5880
  `/project-integrations/${integrationId}`
5768
5881
  );
5769
- return unwrap35(data);
5882
+ return unwrap36(data);
5770
5883
  }
5771
5884
  /** Create a project integration. */
5772
5885
  async create(params) {
5773
- const body3 = stripUndefObj2(params);
5774
- const data = await this.http.post("/project-integrations", body3);
5775
- return unwrap35(data);
5886
+ const body4 = stripUndefObj2(params);
5887
+ const data = await this.http.post("/project-integrations", body4);
5888
+ return unwrap36(data);
5776
5889
  }
5777
5890
  /** Update a project integration. */
5778
5891
  async update(integrationId, params) {
5779
- const body3 = stripUndefObj2(params);
5892
+ const body4 = stripUndefObj2(params);
5780
5893
  const data = await this.http.patch(
5781
5894
  `/project-integrations/${integrationId}`,
5782
- body3
5895
+ body4
5783
5896
  );
5784
- return unwrap35(data);
5897
+ return unwrap36(data);
5785
5898
  }
5786
5899
  /** Delete a project integration. */
5787
5900
  async delete(integrationId) {
@@ -5790,7 +5903,7 @@ var ProjectIntegrations = class {
5790
5903
  };
5791
5904
 
5792
5905
  // src/resources/provider-defaults.ts
5793
- function unwrap36(data) {
5906
+ function unwrap37(data) {
5794
5907
  if (data && typeof data === "object") {
5795
5908
  const d = data;
5796
5909
  for (const k of ["data", "defaults", "provider_defaults", "config"]) {
@@ -5806,7 +5919,7 @@ var ProviderDefaults = class {
5806
5919
  http;
5807
5920
  /** Get the current fleet-wide provider defaults. */
5808
5921
  async list() {
5809
- return unwrap36(await this.http.get("/admin/provider-defaults"));
5922
+ return unwrap37(await this.http.get("/admin/provider-defaults"));
5810
5923
  }
5811
5924
  /** Return the defaults entry for a single provider, or {} if missing. */
5812
5925
  async get(provider) {
@@ -5819,29 +5932,29 @@ var ProviderDefaults = class {
5819
5932
  }
5820
5933
  /** Replace the fleet-wide defaults (PUT /admin/provider-defaults). */
5821
5934
  async update(opts) {
5822
- const body3 = Object.fromEntries(
5935
+ const body4 = Object.fromEntries(
5823
5936
  Object.entries(opts).filter(([, v]) => v !== void 0)
5824
5937
  );
5825
- return unwrap36(
5826
- await this.http.put("/admin/provider-defaults", body3)
5938
+ return unwrap37(
5939
+ await this.http.put("/admin/provider-defaults", body4)
5827
5940
  );
5828
5941
  }
5829
5942
  // ── Per-tenant overrides ────────────────────────────────────────────────
5830
5943
  async getTenant(tenantId) {
5831
- return unwrap36(
5944
+ return unwrap37(
5832
5945
  await this.http.get(
5833
5946
  `/admin/tenants/${tenantId}/provider-config`
5834
5947
  )
5835
5948
  );
5836
5949
  }
5837
5950
  async setTenant(tenantId, opts) {
5838
- const body3 = Object.fromEntries(
5951
+ const body4 = Object.fromEntries(
5839
5952
  Object.entries(opts).filter(([, v]) => v !== void 0)
5840
5953
  );
5841
- return unwrap36(
5954
+ return unwrap37(
5842
5955
  await this.http.put(
5843
5956
  `/admin/tenants/${tenantId}/provider-config`,
5844
- body3
5957
+ body4
5845
5958
  )
5846
5959
  );
5847
5960
  }
@@ -5851,7 +5964,7 @@ var ProviderDefaults = class {
5851
5964
  };
5852
5965
 
5853
5966
  // src/resources/regions.ts
5854
- function unwrap37(payload) {
5967
+ function unwrap38(payload) {
5855
5968
  if (payload && typeof payload === "object") {
5856
5969
  const p = payload;
5857
5970
  for (const k of [
@@ -5868,7 +5981,7 @@ function unwrap37(payload) {
5868
5981
  return payload;
5869
5982
  }
5870
5983
  function listItems10(payload) {
5871
- const result = unwrap37(payload);
5984
+ const result = unwrap38(payload);
5872
5985
  if (Array.isArray(result)) return result;
5873
5986
  return [];
5874
5987
  }
@@ -5890,7 +6003,7 @@ var Regions = class {
5890
6003
  /** Get static compute pricing data. */
5891
6004
  async pricing() {
5892
6005
  const data = await this.http.get("/compute/pricing");
5893
- return unwrap37(data);
6006
+ return unwrap38(data);
5894
6007
  }
5895
6008
  /** List community computer templates. */
5896
6009
  async listTemplates() {
@@ -5902,18 +6015,18 @@ var Regions = class {
5902
6015
  const data = await this.http.get(
5903
6016
  `/compute/templates/${templateId}`
5904
6017
  );
5905
- return unwrap37(data);
6018
+ return unwrap38(data);
5906
6019
  }
5907
6020
  };
5908
6021
 
5909
6022
  // src/resources/runtime-env.ts
5910
- function unwrap38(payload) {
6023
+ function unwrap39(payload) {
5911
6024
  if (payload !== null && typeof payload === "object" && "data" in payload && payload.data !== void 0) {
5912
6025
  return payload.data;
5913
6026
  }
5914
6027
  return payload;
5915
6028
  }
5916
- function body2(params) {
6029
+ function body3(params) {
5917
6030
  return Object.fromEntries(
5918
6031
  Object.entries({
5919
6032
  scope: params.scope,
@@ -5960,11 +6073,11 @@ var RuntimeEnv = class {
5960
6073
  "/runtime-env",
5961
6074
  query(params)
5962
6075
  );
5963
- return unwrap38(response).map(normalize2);
6076
+ return unwrap39(response).map(normalize2);
5964
6077
  }
5965
6078
  async get(id) {
5966
6079
  return normalize2(
5967
- unwrap38(
6080
+ unwrap39(
5968
6081
  await this.http.get(
5969
6082
  `/runtime-env/${encodeURIComponent(id)}`
5970
6083
  )
@@ -5973,10 +6086,10 @@ var RuntimeEnv = class {
5973
6086
  }
5974
6087
  async set(params) {
5975
6088
  return normalize2(
5976
- unwrap38(
6089
+ unwrap39(
5977
6090
  await this.http.post(
5978
6091
  "/runtime-env",
5979
- body2(params)
6092
+ body3(params)
5980
6093
  )
5981
6094
  )
5982
6095
  );
@@ -6000,7 +6113,7 @@ var AGENT_WORKSPACE_TIMEOUT_SEC = 86400;
6000
6113
  var AGENT_WORKSPACE_IDLE_TIMEOUT_SEC = 1800;
6001
6114
  var AGENT_WORKSPACE_SNAPSHOT_EXPIRATION_DAYS = 30;
6002
6115
  var AGENT_WORKSPACE_KEEP_LAST_SNAPSHOTS = 1;
6003
- function unwrap39(payload) {
6116
+ function unwrap40(payload) {
6004
6117
  if (payload !== null && typeof payload === "object" && "data" in payload && payload.data !== void 0) {
6005
6118
  return payload.data;
6006
6119
  }
@@ -6047,7 +6160,7 @@ function createBody(params = {}) {
6047
6160
  if (keepLastSnapshots !== void 0) {
6048
6161
  metadata.keep_last_snapshots = keepLastSnapshots;
6049
6162
  }
6050
- return stripUndefined20({
6163
+ return stripUndefined21({
6051
6164
  template_id: templateId,
6052
6165
  cpu_count: params.cpuCount ?? params.cpu_count,
6053
6166
  memory_mb: params.memoryMb ?? params.memory_mb,
@@ -6077,14 +6190,14 @@ function createBody(params = {}) {
6077
6190
  });
6078
6191
  }
6079
6192
  function execBody(command, options = {}) {
6080
- return stripUndefined20({
6193
+ return stripUndefined21({
6081
6194
  command,
6082
6195
  cwd: options.cwd ?? options.workingDir ?? options.working_dir,
6083
6196
  env: options.env,
6084
6197
  timeout: options.timeout ?? options.timeoutSec ?? options.timeout_sec
6085
6198
  });
6086
6199
  }
6087
- function stripUndefined20(input) {
6200
+ function stripUndefined21(input) {
6088
6201
  return Object.fromEntries(
6089
6202
  Object.entries(input).filter(([, value]) => value !== void 0)
6090
6203
  );
@@ -6223,11 +6336,11 @@ var SandboxTerminal = class {
6223
6336
  }
6224
6337
  sandbox;
6225
6338
  async create(params = {}) {
6226
- const body3 = Object.fromEntries(
6339
+ const body4 = Object.fromEntries(
6227
6340
  Object.entries(params).filter(([, v]) => v !== void 0)
6228
6341
  );
6229
- const response = unwrap39(
6230
- await this.sandbox.http.post(`/sandboxes/${this.sandbox.id}/terminal`, body3)
6342
+ const response = unwrap40(
6343
+ await this.sandbox.http.post(`/sandboxes/${this.sandbox.id}/terminal`, body4)
6231
6344
  );
6232
6345
  return response;
6233
6346
  }
@@ -6269,21 +6382,21 @@ var SandboxPreviews = class {
6269
6382
  return [];
6270
6383
  }
6271
6384
  async create(port, opts = {}) {
6272
- const body3 = {
6385
+ const body4 = {
6273
6386
  port,
6274
6387
  ...Object.fromEntries(
6275
6388
  Object.entries(opts).filter(([, v]) => v !== void 0)
6276
6389
  )
6277
6390
  };
6278
- return unwrap39(
6391
+ return unwrap40(
6279
6392
  await this.http.post(
6280
6393
  `/sandboxes/${this.sandbox.id}/previews`,
6281
- body3
6394
+ body4
6282
6395
  )
6283
6396
  );
6284
6397
  }
6285
6398
  async get(previewId) {
6286
- return unwrap39(
6399
+ return unwrap40(
6287
6400
  await this.http.get(
6288
6401
  `/sandboxes/${this.sandbox.id}/previews/${previewId}`
6289
6402
  )
@@ -6296,7 +6409,7 @@ var SandboxPreviews = class {
6296
6409
  }
6297
6410
  /** Mint a share token for previewId. */
6298
6411
  async share(previewId, opts = {}) {
6299
- return unwrap39(
6412
+ return unwrap40(
6300
6413
  await this.http.post(
6301
6414
  `/sandboxes/${this.sandbox.id}/previews/${previewId}/share`,
6302
6415
  { ttl_seconds: opts.ttl_seconds ?? opts.expires_in_sec ?? 3600 }
@@ -6365,7 +6478,7 @@ var SandboxTags = class {
6365
6478
  sandbox;
6366
6479
  /** Replace the full tag list with tags. */
6367
6480
  async set(tags) {
6368
- return unwrap39(
6481
+ return unwrap40(
6369
6482
  await this.sandbox.http.patch(`/sandboxes/${this.sandbox.id}/tags`, { tags })
6370
6483
  );
6371
6484
  }
@@ -6433,14 +6546,14 @@ var Sandbox = class _Sandbox {
6433
6546
  return this.data.template_id ?? this.data.image_id ?? "";
6434
6547
  }
6435
6548
  async refresh() {
6436
- this.data = unwrap39(
6549
+ this.data = unwrap40(
6437
6550
  await this.http.get(`/sandboxes/${this.id}`)
6438
6551
  );
6439
6552
  return this;
6440
6553
  }
6441
6554
  async runExec(command, options) {
6442
6555
  this.assertRunning("exec");
6443
- const response = unwrap39(
6556
+ const response = unwrap40(
6444
6557
  await this.http.post(
6445
6558
  `/sandboxes/${this.id}/exec`,
6446
6559
  execBody(command, options)
@@ -6484,11 +6597,11 @@ var Sandbox = class _Sandbox {
6484
6597
  );
6485
6598
  }
6486
6599
  async createExport(params) {
6487
- const body3 = typeof params === "string" ? { path: params } : Array.isArray(params) ? { paths: params } : params;
6488
- const response = unwrap39(
6600
+ const body4 = typeof params === "string" ? { path: params } : Array.isArray(params) ? { paths: params } : params;
6601
+ const response = unwrap40(
6489
6602
  await this.http.post(
6490
6603
  `/sandboxes/${this.id}/exports`,
6491
- body3
6604
+ body4
6492
6605
  )
6493
6606
  );
6494
6607
  return normalizeExport(response);
@@ -6510,7 +6623,7 @@ var Sandbox = class _Sandbox {
6510
6623
  }
6511
6624
  async listFiles(path = "/workspace") {
6512
6625
  this.assertRunning("files.list");
6513
- const response = unwrap39(
6626
+ const response = unwrap40(
6514
6627
  await this.http.get(
6515
6628
  `/sandboxes/${this.id}/files`,
6516
6629
  { path }
@@ -6520,7 +6633,7 @@ var Sandbox = class _Sandbox {
6520
6633
  }
6521
6634
  async statFile(path) {
6522
6635
  this.assertRunning("files.stat");
6523
- return unwrap39(
6636
+ return unwrap40(
6524
6637
  await this.http.post(
6525
6638
  `/sandboxes/${this.id}/files/stat`,
6526
6639
  { path }
@@ -6529,7 +6642,7 @@ var Sandbox = class _Sandbox {
6529
6642
  }
6530
6643
  async expose(port) {
6531
6644
  this.assertRunning("expose");
6532
- const response = unwrap39(
6645
+ const response = unwrap40(
6533
6646
  await this.http.post(
6534
6647
  `/sandboxes/${this.id}/expose`,
6535
6648
  port === void 0 ? {} : { port }
@@ -6539,7 +6652,7 @@ var Sandbox = class _Sandbox {
6539
6652
  }
6540
6653
  async startTemplate(options = {}) {
6541
6654
  this.assertRunning("startTemplate");
6542
- return unwrap39(
6655
+ return unwrap40(
6543
6656
  await this.http.post(
6544
6657
  `/sandboxes/${this.id}/template/start`,
6545
6658
  options
@@ -6547,7 +6660,7 @@ var Sandbox = class _Sandbox {
6547
6660
  );
6548
6661
  }
6549
6662
  async getArtifacts() {
6550
- return unwrap39(
6663
+ return unwrap40(
6551
6664
  await this.http.get(
6552
6665
  `/sandboxes/${this.id}/artifacts`
6553
6666
  )
@@ -6558,7 +6671,7 @@ var Sandbox = class _Sandbox {
6558
6671
  `/sandboxes/${this.id}/logs`,
6559
6672
  { lines }
6560
6673
  );
6561
- return unwrap39(response);
6674
+ return unwrap40(response);
6562
6675
  }
6563
6676
  streamLogs() {
6564
6677
  return this.http.stream(
@@ -6567,7 +6680,7 @@ var Sandbox = class _Sandbox {
6567
6680
  }
6568
6681
  async createSnapshot(comment) {
6569
6682
  this.assertRunning("snapshots.create");
6570
- return unwrap39(
6683
+ return unwrap40(
6571
6684
  await this.http.post(
6572
6685
  `/sandboxes/${this.id}/snapshots`,
6573
6686
  comment ? { comment } : {}
@@ -6575,14 +6688,14 @@ var Sandbox = class _Sandbox {
6575
6688
  );
6576
6689
  }
6577
6690
  async listSnapshots() {
6578
- return unwrap39(
6691
+ return unwrap40(
6579
6692
  await this.http.get(
6580
6693
  `/sandboxes/${this.id}/snapshots`
6581
6694
  )
6582
6695
  );
6583
6696
  }
6584
6697
  async restoreSnapshot(snapshotId) {
6585
- const data = unwrap39(
6698
+ const data = unwrap40(
6586
6699
  await this.http.post(
6587
6700
  `/sandboxes/${this.id}/restore/${snapshotId}`,
6588
6701
  {}
@@ -6599,13 +6712,13 @@ var Sandbox = class _Sandbox {
6599
6712
  */
6600
6713
  async fork(opts = {}) {
6601
6714
  this.assertRunning("fork");
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(
6715
+ const body4 = {};
6716
+ if (opts.name !== void 0) body4.name = opts.name;
6717
+ if (opts.metadata !== void 0) body4.metadata = opts.metadata;
6718
+ const data = unwrap40(
6606
6719
  await this.http.post(
6607
6720
  `/sandboxes/${this.id}/fork`,
6608
- body3
6721
+ body4
6609
6722
  )
6610
6723
  );
6611
6724
  return new _Sandbox(this.http, data);
@@ -6624,7 +6737,7 @@ var Sandbox = class _Sandbox {
6624
6737
  if (keepLastSnapshots !== void 0) {
6625
6738
  metadata.keep_last_snapshots = keepLastSnapshots;
6626
6739
  }
6627
- const body3 = stripUndefined20({
6740
+ const body4 = stripUndefined21({
6628
6741
  name: params.name,
6629
6742
  slug: params.slug,
6630
6743
  tags: params.tags,
@@ -6633,17 +6746,17 @@ var Sandbox = class _Sandbox {
6633
6746
  timeout_sec: params.timeout_sec ?? params.timeoutSec,
6634
6747
  idle_timeout_sec: params.idle_timeout_sec ?? params.idleTimeoutSec
6635
6748
  });
6636
- const data = unwrap39(
6749
+ const data = unwrap40(
6637
6750
  await this.http.patch(
6638
6751
  `/sandboxes/${this.id}`,
6639
- body3
6752
+ body4
6640
6753
  )
6641
6754
  );
6642
6755
  this.data = data;
6643
6756
  return this;
6644
6757
  }
6645
6758
  async extend(timeoutSec) {
6646
- const data = unwrap39(
6759
+ const data = unwrap40(
6647
6760
  await this.http.post(
6648
6761
  `/sandboxes/${this.id}/extend`,
6649
6762
  { timeout_sec: timeoutSec }
@@ -6666,7 +6779,7 @@ var Sandbox = class _Sandbox {
6666
6779
  return raw;
6667
6780
  }
6668
6781
  async pause() {
6669
- const data = unwrap39(
6782
+ const data = unwrap40(
6670
6783
  await this.http.post(
6671
6784
  `/sandboxes/${this.id}/pause`,
6672
6785
  {}
@@ -6676,7 +6789,7 @@ var Sandbox = class _Sandbox {
6676
6789
  return this;
6677
6790
  }
6678
6791
  async resume() {
6679
- const data = unwrap39(
6792
+ const data = unwrap40(
6680
6793
  await this.http.post(
6681
6794
  `/sandboxes/${this.id}/resume`,
6682
6795
  {}
@@ -6689,7 +6802,7 @@ var Sandbox = class _Sandbox {
6689
6802
  const idempotencyKey11 = params.idempotencyKey ?? params.idempotency_key;
6690
6803
  const requestOptions = {
6691
6804
  method: "POST",
6692
- body: stripUndefined20({
6805
+ body: stripUndefined21({
6693
6806
  name: params.name,
6694
6807
  deployment_id: params.deploymentId ?? params.deployment_id,
6695
6808
  output_path: params.outputPath ?? params.output_path ?? params.path ?? params.sourcePath ?? params.source_path,
@@ -6712,7 +6825,7 @@ var Sandbox = class _Sandbox {
6712
6825
  if (idempotencyKey11) {
6713
6826
  requestOptions.headers = { "Idempotency-Key": idempotencyKey11 };
6714
6827
  }
6715
- return unwrap39(
6828
+ return unwrap40(
6716
6829
  await this.http.request(
6717
6830
  `/sandboxes/${this.id}/deploy`,
6718
6831
  requestOptions
@@ -6724,7 +6837,7 @@ var Sandbox = class _Sandbox {
6724
6837
  }
6725
6838
  /** Check readiness of the sandbox (GET /sandboxes/:id/readiness). */
6726
6839
  async readiness() {
6727
- return unwrap39(
6840
+ return unwrap40(
6728
6841
  await this.http.get(
6729
6842
  `/sandboxes/${this.id}/readiness`
6730
6843
  )
@@ -6892,7 +7005,7 @@ var Sandboxes = class {
6892
7005
  if (idempotencyKey11) {
6893
7006
  requestOptions.headers = { "Idempotency-Key": idempotencyKey11 };
6894
7007
  }
6895
- const data = unwrap39(
7008
+ const data = unwrap40(
6896
7009
  await this.http.request(
6897
7010
  "/sandboxes",
6898
7011
  requestOptions
@@ -6911,7 +7024,7 @@ var Sandboxes = class {
6911
7024
  return listItems11(data).map((item) => new Sandbox(this.http, item));
6912
7025
  }
6913
7026
  async get(id) {
6914
- const data = unwrap39(
7027
+ const data = unwrap40(
6915
7028
  await this.http.get(`/sandboxes/${id}`)
6916
7029
  );
6917
7030
  return new Sandbox(this.http, data);
@@ -6920,7 +7033,7 @@ var Sandboxes = class {
6920
7033
  return this.get(id);
6921
7034
  }
6922
7035
  async getByName(name) {
6923
- const data = unwrap39(
7036
+ const data = unwrap40(
6924
7037
  await this.http.get(
6925
7038
  `/sandboxes/by-name/${encodeURIComponent(name)}`
6926
7039
  )
@@ -6977,7 +7090,7 @@ var Sandboxes = class {
6977
7090
  async createTemplate(params) {
6978
7091
  const response = await this.http.post(
6979
7092
  "/sandbox-templates",
6980
- stripUndefined20({
7093
+ stripUndefined21({
6981
7094
  name: params.name,
6982
7095
  slug: params.slug,
6983
7096
  description: params.description,
@@ -6985,29 +7098,29 @@ var Sandboxes = class {
6985
7098
  metadata: params.metadata
6986
7099
  })
6987
7100
  );
6988
- return unwrap39(response);
7101
+ return unwrap40(response);
6989
7102
  }
6990
7103
  async createTemplateBuild(templateId, params = {}) {
6991
7104
  const response = await this.http.post(
6992
7105
  `/sandbox-templates/${templateId}/builds`,
6993
- stripUndefined20({
7106
+ stripUndefined21({
6994
7107
  build_spec: params.buildSpec ?? params.build_spec,
6995
7108
  metadata: params.metadata
6996
7109
  })
6997
7110
  );
6998
- return unwrap39(response);
7111
+ return unwrap40(response);
6999
7112
  }
7000
7113
  async listTemplateBuilds(templateId) {
7001
7114
  const response = await this.http.get(
7002
7115
  `/sandbox-templates/${templateId}/builds`
7003
7116
  );
7004
- return unwrap39(response);
7117
+ return unwrap40(response);
7005
7118
  }
7006
7119
  async getTemplateBuild(buildId) {
7007
7120
  const response = await this.http.get(
7008
7121
  `/sandbox-template-builds/${buildId}`
7009
7122
  );
7010
- return unwrap39(response);
7123
+ return unwrap40(response);
7011
7124
  }
7012
7125
  };
7013
7126
  function toBase642(bytes) {
@@ -7019,7 +7132,7 @@ function toBase642(bytes) {
7019
7132
  }
7020
7133
  return btoa(binary);
7021
7134
  }
7022
- function unwrap40(payload) {
7135
+ function unwrap41(payload) {
7023
7136
  if (payload && typeof payload === "object" && "data" in payload) {
7024
7137
  return payload.data;
7025
7138
  }
@@ -7035,7 +7148,7 @@ function listItems12(payload, candidateKeys = ["data", "templates", "builds", "i
7035
7148
  }
7036
7149
  return [];
7037
7150
  }
7038
- function stripUndefined21(input) {
7151
+ function stripUndefined22(input) {
7039
7152
  return Object.fromEntries(
7040
7153
  Object.entries(input).filter(([, v]) => v !== void 0)
7041
7154
  );
@@ -7062,7 +7175,7 @@ var SandboxTemplates = class {
7062
7175
  const data = await this.http.get(
7063
7176
  `/sandbox-templates/${templateId}`
7064
7177
  );
7065
- return unwrap40(data);
7178
+ return unwrap41(data);
7066
7179
  }
7067
7180
  async create(params) {
7068
7181
  const {
@@ -7072,17 +7185,17 @@ var SandboxTemplates = class {
7072
7185
  name,
7073
7186
  ...rest
7074
7187
  } = params;
7075
- const body3 = stripUndefined21({
7188
+ const body4 = stripUndefined22({
7076
7189
  name,
7077
7190
  build_spec: buildSpec ?? build_spec,
7078
7191
  ...rest
7079
7192
  });
7080
7193
  const data = await this.http.request("/sandbox-templates", {
7081
7194
  method: "POST",
7082
- body: body3,
7195
+ body: body4,
7083
7196
  headers: { "Idempotency-Key": idempotencyKey8(ikey) }
7084
7197
  });
7085
- return unwrap40(data);
7198
+ return unwrap41(data);
7086
7199
  }
7087
7200
  async buildSpecSchema() {
7088
7201
  const data = await this.http.get("/sandbox-templates/build-spec");
@@ -7106,21 +7219,21 @@ var SandboxTemplates = class {
7106
7219
  }
7107
7220
  async createBuild(templateId, params = {}) {
7108
7221
  const { idempotencyKey: ikey, ...rest } = params;
7109
- const body3 = stripUndefined21(rest);
7222
+ const body4 = stripUndefined22(rest);
7110
7223
  const data = await this.http.request(
7111
7224
  `/sandbox-templates/${templateId}/builds`,
7112
7225
  {
7113
7226
  method: "POST",
7114
- body: body3,
7227
+ body: body4,
7115
7228
  headers: { "Idempotency-Key": idempotencyKey8(ikey) }
7116
7229
  }
7117
7230
  );
7118
- return unwrap40(data);
7231
+ return unwrap41(data);
7119
7232
  }
7120
7233
  };
7121
7234
 
7122
7235
  // src/resources/settings.ts
7123
- function unwrap41(payload) {
7236
+ function unwrap42(payload) {
7124
7237
  if (payload && typeof payload === "object") {
7125
7238
  const p = payload;
7126
7239
  for (const k of [
@@ -7136,11 +7249,11 @@ function unwrap41(payload) {
7136
7249
  return payload;
7137
7250
  }
7138
7251
  function listItems13(payload) {
7139
- const result = unwrap41(payload);
7252
+ const result = unwrap42(payload);
7140
7253
  if (Array.isArray(result)) return result;
7141
7254
  return [];
7142
7255
  }
7143
- function stripUndefined22(input) {
7256
+ function stripUndefined23(input) {
7144
7257
  return Object.fromEntries(
7145
7258
  Object.entries(input).filter(([, v]) => v !== void 0)
7146
7259
  );
@@ -7153,46 +7266,46 @@ var Settings = class {
7153
7266
  /** Get the current tenant settings. */
7154
7267
  async get() {
7155
7268
  const data = await this.http.get("/settings");
7156
- return unwrap41(data);
7269
+ return unwrap42(data);
7157
7270
  }
7158
7271
  /** Update tenant settings. */
7159
7272
  async update(params) {
7160
- const body3 = stripUndefined22(params);
7161
- const data = await this.http.put("/settings", body3);
7162
- return unwrap41(data);
7273
+ const body4 = stripUndefined23(params);
7274
+ const data = await this.http.put("/settings", body4);
7275
+ return unwrap42(data);
7163
7276
  }
7164
7277
  // ── Branding ──────────────────────────────────────────────────────────────
7165
7278
  /** Get tenant branding (logo, colors, custom wordmark). */
7166
7279
  async getBranding() {
7167
7280
  const data = await this.http.get("/settings/branding");
7168
- return unwrap41(data);
7281
+ return unwrap42(data);
7169
7282
  }
7170
7283
  /** Update tenant branding. */
7171
7284
  async updateBranding(params) {
7172
- const body3 = stripUndefined22(params);
7173
- const data = await this.http.put("/settings/branding", body3);
7174
- return unwrap41(data);
7285
+ const body4 = stripUndefined23(params);
7286
+ const data = await this.http.put("/settings/branding", body4);
7287
+ return unwrap42(data);
7175
7288
  }
7176
7289
  // ── Read-only reference data ───────────────────────────────────────────────
7177
7290
  /** Get tenant-scoped compute pricing. */
7178
7291
  async computePricing() {
7179
7292
  const data = await this.http.get("/settings/compute-pricing");
7180
- return unwrap41(data);
7293
+ return unwrap42(data);
7181
7294
  }
7182
7295
  /** Get tenant-scoped GPU pricing. */
7183
7296
  async gpuPricing() {
7184
7297
  const data = await this.http.get("/settings/gpu-pricing");
7185
- return unwrap41(data);
7298
+ return unwrap42(data);
7186
7299
  }
7187
7300
  /** List models available to this tenant. */
7188
7301
  async availableModels() {
7189
7302
  const data = await this.http.get("/settings/available-models");
7190
- return unwrap41(data);
7303
+ return unwrap42(data);
7191
7304
  }
7192
7305
  /** List regions enabled for this tenant. */
7193
7306
  async regions() {
7194
7307
  const data = await this.http.get("/settings/regions");
7195
- return unwrap41(data);
7308
+ return unwrap42(data);
7196
7309
  }
7197
7310
  // ── BYOK provider keys ────────────────────────────────────────────────────
7198
7311
  /** List tenant-level BYOK provider keys (Anthropic, OpenAI, etc.). */
@@ -7202,12 +7315,12 @@ var Settings = class {
7202
7315
  }
7203
7316
  /** Create or update a BYOK provider key. */
7204
7317
  async upsertProviderKey(provider, params) {
7205
- const body3 = stripUndefined22(params);
7318
+ const body4 = stripUndefined23(params);
7206
7319
  const data = await this.http.put(
7207
7320
  `/settings/provider-keys/${provider}`,
7208
- body3
7321
+ body4
7209
7322
  );
7210
- return unwrap41(data);
7323
+ return unwrap42(data);
7211
7324
  }
7212
7325
  /** Delete a BYOK provider key. */
7213
7326
  async deleteProviderKey(provider) {
@@ -7216,7 +7329,7 @@ var Settings = class {
7216
7329
  };
7217
7330
 
7218
7331
  // src/resources/snapshots-standalone.ts
7219
- function unwrap42(data) {
7332
+ function unwrap43(data) {
7220
7333
  if (data && typeof data === "object") {
7221
7334
  const d = data;
7222
7335
  for (const k of ["data", "snapshots", "items"]) {
@@ -7247,14 +7360,14 @@ var SnapshotsStandalone = class {
7247
7360
  return unwrapList12(await this.http.get("/admin/snapshots", query2));
7248
7361
  }
7249
7362
  async get(snapshotId) {
7250
- return unwrap42(
7363
+ return unwrap43(
7251
7364
  await this.http.get(`/admin/snapshots/${snapshotId}`)
7252
7365
  );
7253
7366
  }
7254
7367
  };
7255
7368
 
7256
7369
  // src/resources/storage.ts
7257
- function unwrap43(payload) {
7370
+ function unwrap44(payload) {
7258
7371
  if (payload && typeof payload === "object" && "data" in payload) {
7259
7372
  return payload.data;
7260
7373
  }
@@ -7270,7 +7383,7 @@ function listItems14(payload, candidateKeys = ["data", "buckets", "objects", "it
7270
7383
  }
7271
7384
  return [];
7272
7385
  }
7273
- function stripUndefined23(input) {
7386
+ function stripUndefined24(input) {
7274
7387
  return Object.fromEntries(
7275
7388
  Object.entries(input).filter(([, v]) => v !== void 0)
7276
7389
  );
@@ -7287,24 +7400,24 @@ var Storage = class {
7287
7400
  }
7288
7401
  async createBucket(params) {
7289
7402
  const { name, public: isPublic, visibility, ...rest } = params;
7290
- const body3 = stripUndefined23({
7403
+ const body4 = stripUndefined24({
7291
7404
  name,
7292
7405
  visibility: visibility ?? (isPublic === void 0 ? void 0 : isPublic ? "public" : "private"),
7293
7406
  ...rest
7294
7407
  });
7295
- const data = await this.http.post("/storage/buckets", body3);
7296
- return unwrap43(data);
7408
+ const data = await this.http.post("/storage/buckets", body4);
7409
+ return unwrap44(data);
7297
7410
  }
7298
7411
  async getBucket(bucketId) {
7299
7412
  const data = await this.http.get(`/storage/buckets/${bucketId}`);
7300
- return unwrap43(data);
7413
+ return unwrap44(data);
7301
7414
  }
7302
7415
  async deleteBucket(bucketId) {
7303
7416
  await this.http.delete(`/storage/buckets/${bucketId}`);
7304
7417
  }
7305
7418
  // ── Objects ────────────────────────────────────────────────────────────────
7306
7419
  async listObjects(bucketId, params = {}) {
7307
- const query2 = stripUndefined23({
7420
+ const query2 = stripUndefined24({
7308
7421
  prefix: params.prefix,
7309
7422
  max_keys: params.max_keys ?? params.maxKeys ?? params.limit,
7310
7423
  marker: params.marker ?? params.cursor
@@ -7338,16 +7451,16 @@ var Storage = class {
7338
7451
  // ── Presigned URLs ─────────────────────────────────────────────────────────
7339
7452
  async presign(bucketId, params) {
7340
7453
  const operationMethod = params.operation === "put" ? "PUT" : params.operation === "get" ? "GET" : void 0;
7341
- const body3 = stripUndefined23({
7454
+ const body4 = stripUndefined24({
7342
7455
  key: params.key,
7343
7456
  method: params.method ?? operationMethod ?? "GET",
7344
7457
  expires_in: params.expiresIn ?? params.expires_in ?? params.expiresInSec ?? params.expires_in_sec ?? 3600
7345
7458
  });
7346
7459
  const data = await this.http.post(
7347
7460
  `/storage/buckets/${bucketId}/presign`,
7348
- body3
7461
+ body4
7349
7462
  );
7350
- return unwrap43(data);
7463
+ return unwrap44(data);
7351
7464
  }
7352
7465
  };
7353
7466
 
@@ -7437,7 +7550,7 @@ var OrgInvites = class {
7437
7550
  };
7438
7551
 
7439
7552
  // src/resources/tenant.ts
7440
- function unwrap44(payload) {
7553
+ function unwrap45(payload) {
7441
7554
  if (payload && typeof payload === "object") {
7442
7555
  const p = payload;
7443
7556
  for (const k of ["data", "tenant", "branding", "items"]) {
@@ -7446,7 +7559,7 @@ function unwrap44(payload) {
7446
7559
  }
7447
7560
  return payload;
7448
7561
  }
7449
- function stripUndefined24(input) {
7562
+ function stripUndefined25(input) {
7450
7563
  return Object.fromEntries(
7451
7564
  Object.entries(input).filter(([, v]) => v !== void 0)
7452
7565
  );
@@ -7459,14 +7572,14 @@ var PreviewDomain = class {
7459
7572
  /** Get the tenant's white-label preview domain settings. */
7460
7573
  async get() {
7461
7574
  const data = await this.http.get("/tenant/preview-domain");
7462
- return unwrap44(data);
7575
+ return unwrap45(data);
7463
7576
  }
7464
7577
  /** Set the tenant's white-label preview domain. */
7465
7578
  async set(domain) {
7466
7579
  const data = await this.http.put("/tenant/preview-domain", {
7467
7580
  preview_domain: domain
7468
7581
  });
7469
- return unwrap44(data);
7582
+ return unwrap45(data);
7470
7583
  }
7471
7584
  /** Re-run DNS verification for the configured preview domain. */
7472
7585
  async verify() {
@@ -7474,7 +7587,7 @@ var PreviewDomain = class {
7474
7587
  "/tenant/preview-domain/verify",
7475
7588
  {}
7476
7589
  );
7477
- return unwrap44(data);
7590
+ return unwrap45(data);
7478
7591
  }
7479
7592
  /** Remove the tenant's custom preview domain. */
7480
7593
  async delete() {
@@ -7489,14 +7602,14 @@ var Branding = class {
7489
7602
  /** Get tenant branding used by white-label hosted surfaces. */
7490
7603
  async get() {
7491
7604
  const data = await this.http.get("/tenant/branding");
7492
- return unwrap44(data);
7605
+ return unwrap45(data);
7493
7606
  }
7494
7607
  /** Update tenant branding used by white-label hosted surfaces. */
7495
7608
  async set(params) {
7496
7609
  const data = await this.http.put("/tenant/branding", {
7497
- branding: stripUndefined24(params)
7610
+ branding: stripUndefined25(params)
7498
7611
  });
7499
- return unwrap44(data);
7612
+ return unwrap45(data);
7500
7613
  }
7501
7614
  /** Reset tenant branding to platform defaults. */
7502
7615
  async delete() {
@@ -7518,7 +7631,7 @@ var Tenant = class {
7518
7631
  /** Get the current tenant's plan, limits, and live usage counters. */
7519
7632
  async current() {
7520
7633
  const data = await this.http.get("/tenant/plan");
7521
- return unwrap44(data);
7634
+ return unwrap45(data);
7522
7635
  }
7523
7636
  /** Convenience alias for `tenant.branding.get()`. */
7524
7637
  async getBranding() {
@@ -7535,7 +7648,7 @@ var Tenant = class {
7535
7648
  };
7536
7649
 
7537
7650
  // src/resources/usage.ts
7538
- function unwrap45(payload) {
7651
+ function unwrap46(payload) {
7539
7652
  if (payload && typeof payload === "object") {
7540
7653
  const p = payload;
7541
7654
  for (const k of ["data", "usage", "sessions", "summary", "items"]) {
@@ -7544,7 +7657,7 @@ function unwrap45(payload) {
7544
7657
  }
7545
7658
  return payload;
7546
7659
  }
7547
- function stripUndefined25(input) {
7660
+ function stripUndefined26(input) {
7548
7661
  return Object.fromEntries(
7549
7662
  Object.entries(input).filter(([, v]) => v !== void 0)
7550
7663
  );
@@ -7557,24 +7670,24 @@ var Usage = class {
7557
7670
  /** Get the current period usage summary. */
7558
7671
  async current() {
7559
7672
  const data = await this.http.get("/usage/summary");
7560
- return unwrap45(data);
7673
+ return unwrap46(data);
7561
7674
  }
7562
7675
  /** List per-session metering events. */
7563
7676
  async sessions(params = {}) {
7564
- const query2 = stripUndefined25(params);
7677
+ const query2 = stripUndefined26(params);
7565
7678
  const data = await this.http.get("/usage/sessions", query2);
7566
- const result = unwrap45(data);
7679
+ const result = unwrap46(data);
7567
7680
  if (Array.isArray(result)) return result;
7568
7681
  return [];
7569
7682
  }
7570
7683
  /** Get a usage report for a period. */
7571
7684
  async report(params = {}) {
7572
- const query2 = stripUndefined25(params);
7685
+ const query2 = stripUndefined26(params);
7573
7686
  const data = await this.http.get("/usage/summary", query2);
7574
- return unwrap45(data);
7687
+ return unwrap46(data);
7575
7688
  }
7576
7689
  };
7577
- function unwrap46(payload) {
7690
+ function unwrap47(payload) {
7578
7691
  if (payload && typeof payload === "object" && "data" in payload) {
7579
7692
  return payload.data;
7580
7693
  }
@@ -7590,7 +7703,7 @@ function listItems15(payload, candidateKeys = ["data", "volumes", "items"]) {
7590
7703
  }
7591
7704
  return [];
7592
7705
  }
7593
- function stripUndefined26(input) {
7706
+ function stripUndefined27(input) {
7594
7707
  return Object.fromEntries(
7595
7708
  Object.entries(input).filter(([, v]) => v !== void 0)
7596
7709
  );
@@ -7604,32 +7717,32 @@ var Volumes = class {
7604
7717
  }
7605
7718
  http;
7606
7719
  async list(params = {}) {
7607
- const query2 = stripUndefined26({ ...params });
7720
+ const query2 = stripUndefined27({ ...params });
7608
7721
  const data = await this.http.get("/volumes", query2);
7609
7722
  return listItems15(data);
7610
7723
  }
7611
7724
  async get(volumeId) {
7612
7725
  const data = await this.http.get(`/volumes/${volumeId}`);
7613
- return unwrap46(data);
7726
+ return unwrap47(data);
7614
7727
  }
7615
7728
  async create(params) {
7616
7729
  const { idempotencyKey: ikey, sizeGb, ...rest } = params;
7617
- const body3 = stripUndefined26({
7730
+ const body4 = stripUndefined27({
7618
7731
  ...rest,
7619
7732
  size_gb: sizeGb ?? rest.size_gb
7620
7733
  });
7621
7734
  const data = await this.http.request("/volumes", {
7622
7735
  method: "POST",
7623
- body: body3,
7736
+ body: body4,
7624
7737
  headers: { "Idempotency-Key": idempotencyKey9(ikey) }
7625
7738
  });
7626
- return unwrap46(data);
7739
+ return unwrap47(data);
7627
7740
  }
7628
7741
  async delete(volumeId) {
7629
7742
  await this.http.delete(`/volumes/${volumeId}`);
7630
7743
  }
7631
7744
  };
7632
- function unwrap47(payload) {
7745
+ function unwrap48(payload) {
7633
7746
  if (payload && typeof payload === "object" && "data" in payload) {
7634
7747
  return payload.data;
7635
7748
  }
@@ -7645,7 +7758,7 @@ function listItems16(payload, candidateKeys = ["data", "webhooks", "deliveries",
7645
7758
  }
7646
7759
  return [];
7647
7760
  }
7648
- function stripUndefined27(input) {
7761
+ function stripUndefined28(input) {
7649
7762
  return Object.fromEntries(
7650
7763
  Object.entries(input).filter(([, v]) => v !== void 0)
7651
7764
  );
@@ -7653,12 +7766,12 @@ function stripUndefined27(input) {
7653
7766
  function idempotencyKey10(key) {
7654
7767
  return key ?? randomUUID();
7655
7768
  }
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);
7769
+ function bodyBuffer(body4) {
7770
+ if (Buffer.isBuffer(body4)) return body4;
7771
+ if (typeof body4 === "string") return Buffer.from(body4, "utf8");
7772
+ return Buffer.from(body4);
7660
7773
  }
7661
- function verifySignature(body3, header, secret, toleranceSec = 300) {
7774
+ function verifySignature(body4, header, secret, toleranceSec = 300) {
7662
7775
  const parts = Object.fromEntries(
7663
7776
  header.split(",").map((chunk) => chunk.split("=", 2)).filter(([key, value]) => key && value)
7664
7777
  );
@@ -7671,7 +7784,7 @@ function verifySignature(body3, header, secret, toleranceSec = 300) {
7671
7784
  if (ageSec > toleranceSec) {
7672
7785
  throw new Error("webhook timestamp too old");
7673
7786
  }
7674
- const rawBody = bodyBuffer(body3);
7787
+ const rawBody = bodyBuffer(body4);
7675
7788
  const signed = Buffer.concat([Buffer.from(`${timestamp}.`), rawBody]);
7676
7789
  const expected = createHmac("sha256", secret).update(signed).digest("hex");
7677
7790
  try {
@@ -7690,28 +7803,28 @@ var Webhooks = class {
7690
7803
  http;
7691
7804
  static verifySignature = verifySignature;
7692
7805
  async list(params = {}) {
7693
- const query2 = stripUndefined27({ ...params });
7806
+ const query2 = stripUndefined28({ ...params });
7694
7807
  const data = await this.http.get("/webhooks", query2);
7695
7808
  return listItems16(data);
7696
7809
  }
7697
7810
  async get(webhookId) {
7698
7811
  const data = await this.http.get(`/webhooks/${webhookId}`);
7699
- return unwrap47(data);
7812
+ return unwrap48(data);
7700
7813
  }
7701
7814
  async create(params) {
7702
7815
  const { idempotencyKey: ikey, ...rest } = params;
7703
- const body3 = stripUndefined27(rest);
7816
+ const body4 = stripUndefined28(rest);
7704
7817
  const data = await this.http.request("/webhooks", {
7705
7818
  method: "POST",
7706
- body: body3,
7819
+ body: body4,
7707
7820
  headers: { "Idempotency-Key": idempotencyKey10(ikey) }
7708
7821
  });
7709
- return unwrap47(data);
7822
+ return unwrap48(data);
7710
7823
  }
7711
7824
  async update(webhookId, params) {
7712
- const body3 = stripUndefined27(params);
7713
- const data = await this.http.patch(`/webhooks/${webhookId}`, body3);
7714
- return unwrap47(data);
7825
+ const body4 = stripUndefined28(params);
7826
+ const data = await this.http.patch(`/webhooks/${webhookId}`, body4);
7827
+ return unwrap48(data);
7715
7828
  }
7716
7829
  async delete(webhookId) {
7717
7830
  await this.http.delete(`/webhooks/${webhookId}`);
@@ -7724,7 +7837,7 @@ var Webhooks = class {
7724
7837
  headers: { "Idempotency-Key": idempotencyKey10(opts.idempotencyKey) }
7725
7838
  }
7726
7839
  );
7727
- return unwrap47(data);
7840
+ return unwrap48(data);
7728
7841
  }
7729
7842
  async deliveries(webhookId) {
7730
7843
  const data = await this.http.get(
@@ -7933,6 +8046,8 @@ var Miosa = class {
7933
8046
  mcp;
7934
8047
  /** Agent Runs — prompt dispatch into sandbox targets. */
7935
8048
  agentRuns;
8049
+ /** Agent Run Groups — durable multi-agent orchestration groups. */
8050
+ agentRunGroups;
7936
8051
  /** Agent runtime profiles — tenant/workspace defaults for sandbox/computer agents. */
7937
8052
  agentRuntimeProfiles;
7938
8053
  /** Inherited runtime env — tenant/workspace/project defaults for agent runtimes. */
@@ -8040,6 +8155,7 @@ var Miosa = class {
8040
8155
  this.externalKeys = new ExternalKeys(this.http);
8041
8156
  this.mcp = new Mcp(this.http);
8042
8157
  this.agentRuns = new AgentRuns(this.http);
8158
+ this.agentRunGroups = new AgentRunGroups(this.http);
8043
8159
  this.agentRuntimeProfiles = new AgentRuntimeProfiles(this.http);
8044
8160
  this.runtimeEnv = new RuntimeEnv(this.http);
8045
8161
  this.computers = new Computers(this.http);
@@ -8163,8 +8279,8 @@ var AppAuth = class {
8163
8279
  }
8164
8280
  });
8165
8281
  if (!resp.ok) {
8166
- const body3 = await resp.text();
8167
- throw new Error(`AppAuth me failed (${resp.status}): ${body3}`);
8282
+ const body4 = await resp.text();
8283
+ throw new Error(`AppAuth me failed (${resp.status}): ${body4}`);
8168
8284
  }
8169
8285
  return unwrapSession(await resp.json());
8170
8286
  }
@@ -8216,12 +8332,12 @@ var AppAuth = class {
8216
8332
  return payload;
8217
8333
  }
8218
8334
  // ── Private ──────────────────────────────────────────────────────────────────
8219
- async _post(action, body3) {
8335
+ async _post(action, body4) {
8220
8336
  const url = `${this.baseUrl}/app-auth/${this.resourceType}/${this.resourceId}/${action}`;
8221
8337
  const resp = await fetch(url, {
8222
8338
  method: "POST",
8223
8339
  headers: { "Content-Type": "application/json" },
8224
- body: JSON.stringify(body3)
8340
+ body: JSON.stringify(body4)
8225
8341
  });
8226
8342
  if (!resp.ok) {
8227
8343
  const text = await resp.text();
@@ -8231,6 +8347,6 @@ var AppAuth = class {
8231
8347
  }
8232
8348
  };
8233
8349
 
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 };
8350
+ export { Admin, AgentRunGroups, 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 };
8235
8351
  //# sourceMappingURL=index.js.map
8236
8352
  //# sourceMappingURL=index.js.map