@miosa/sdk 1.2.28 → 2.0.0

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,14 @@ var MiosaError = class _MiosaError extends Error {
22
22
  this.details = details;
23
23
  this.requestId = requestId;
24
24
  }
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;
25
+ static fromResponse(status, body5, requestId) {
26
+ const nested = typeof body5.error === "object" ? body5.error : void 0;
27
+ const flatError = typeof body5.error === "string" ? body5.error : void 0;
28
+ const flatErrorIsCode = !!flatError && /^[A-Z][A-Z0-9_]+$/.test(flatError);
29
+ const message = nested?.message ?? body5.message ?? body5.detail ?? body5.reason ?? flatError ?? `HTTP ${status}`;
30
+ const code = nested?.code ?? body5.code ?? (flatErrorIsCode ? flatError : "UNKNOWN_ERROR");
31
+ const details = nested?.details ?? body5.details ?? (body5.detail || body5.reason ? { detail: body5.detail, reason: body5.reason } : void 0);
32
+ requestId ??= body5.request_id;
29
33
  const connectError = connectErrorFromCode(code, message, status, details, requestId);
30
34
  if (connectError) return connectError;
31
35
  if (status === 401 || status === 403) {
@@ -163,6 +167,10 @@ var TokenRefreshFailedError = class extends MiosaError {
163
167
  }
164
168
  };
165
169
 
170
+ // src/version.ts
171
+ var SDK_VERSION = "2.0.0";
172
+ var SDK_USER_AGENT = `@miosa/sdk/${SDK_VERSION}`;
173
+
166
174
  // src/http.ts
167
175
  var _h2Configured = false;
168
176
  var _h2Available = false;
@@ -209,11 +217,13 @@ var HttpClient = class {
209
217
  baseUrl;
210
218
  /** Public for WebSocket clients that need to send the same auth. */
211
219
  apiKey;
220
+ tenant;
212
221
  timeout;
213
222
  maxRetries;
214
223
  constructor(config) {
215
224
  this.baseUrl = config.baseUrl.replace(/\/$/, "");
216
225
  this.apiKey = config.apiKey;
226
+ this.tenant = config.tenant;
217
227
  this.timeout = config.timeout ?? DEFAULT_TIMEOUT;
218
228
  this.maxRetries = config.maxRetries ?? DEFAULT_MAX_RETRIES;
219
229
  }
@@ -229,17 +239,19 @@ var HttpClient = class {
229
239
  return url.toString();
230
240
  }
231
241
  baseHeaders(extra) {
232
- return {
242
+ const headers = {
233
243
  Authorization: `Bearer ${this.apiKey}`,
234
244
  Accept: "application/json",
235
- "User-Agent": "@miosa/sdk/1.0.0",
245
+ "User-Agent": SDK_USER_AGENT,
236
246
  ...extra
237
247
  };
248
+ if (this.tenant) headers["X-MIOSA-Tenant"] = this.tenant;
249
+ return headers;
238
250
  }
239
251
  async request(path, options = {}) {
240
252
  const {
241
253
  method = "GET",
242
- body: body4,
254
+ body: body5,
243
255
  formData,
244
256
  binary = false,
245
257
  timeout = this.timeout
@@ -248,9 +260,9 @@ var HttpClient = class {
248
260
  let fetchBody;
249
261
  if (formData) {
250
262
  fetchBody = formData;
251
- } else if (body4 !== void 0) {
263
+ } else if (body5 !== void 0) {
252
264
  headers = { ...headers, "Content-Type": "application/json" };
253
- fetchBody = JSON.stringify(body4);
265
+ fetchBody = JSON.stringify(body5);
254
266
  }
255
267
  let lastError;
256
268
  for (let attempt = 0; attempt <= this.maxRetries; attempt++) {
@@ -332,17 +344,17 @@ var HttpClient = class {
332
344
  }
333
345
  return this.request(fullPath, { method: "GET" });
334
346
  }
335
- async post(path, body4) {
336
- return this.request(path, { method: "POST", body: body4 });
347
+ async post(path, body5) {
348
+ return this.request(path, { method: "POST", body: body5 });
337
349
  }
338
- async patch(path, body4) {
339
- return this.request(path, { method: "PATCH", body: body4 });
350
+ async patch(path, body5) {
351
+ return this.request(path, { method: "PATCH", body: body5 });
340
352
  }
341
- async put(path, body4) {
342
- return this.request(path, { method: "PUT", body: body4 });
353
+ async put(path, body5) {
354
+ return this.request(path, { method: "PUT", body: body5 });
343
355
  }
344
- async delete(path, body4) {
345
- return this.request(path, { method: "DELETE", body: body4 });
356
+ async delete(path, body5) {
357
+ return this.request(path, { method: "DELETE", body: body5 });
346
358
  }
347
359
  async getBinary(path) {
348
360
  return this.request(path, { method: "GET", binary: true });
@@ -360,10 +372,10 @@ var HttpClient = class {
360
372
  Accept: "text/event-stream",
361
373
  ...options.headers
362
374
  });
363
- let body4 = null;
375
+ let body5 = null;
364
376
  if (options.body !== void 0) {
365
377
  headers = { ...headers, "Content-Type": "application/json" };
366
- body4 = JSON.stringify(options.body);
378
+ body5 = JSON.stringify(options.body);
367
379
  }
368
380
  const controller = new AbortController();
369
381
  let response;
@@ -371,7 +383,7 @@ var HttpClient = class {
371
383
  response = await fetch(`${this.baseUrl}${path}`, {
372
384
  method,
373
385
  headers,
374
- body: body4,
386
+ body: body5,
375
387
  signal: controller.signal
376
388
  });
377
389
  } catch (err) {
@@ -440,7 +452,7 @@ var Admin = class {
440
452
  this.http = http;
441
453
  }
442
454
  /** Escape hatch — call any admin endpoint by method + path. */
443
- async request(method, path, body4, query3) {
455
+ async request(method, path, body5, query3) {
444
456
  const fullPath = query3 ? (() => {
445
457
  const qs = new URLSearchParams();
446
458
  for (const [k, v] of Object.entries(query3)) {
@@ -453,13 +465,13 @@ var Admin = class {
453
465
  case "GET":
454
466
  return this.http.get(fullPath);
455
467
  case "POST":
456
- return this.http.post(fullPath, body4);
468
+ return this.http.post(fullPath, body5);
457
469
  case "PUT":
458
- return this.http.put(fullPath, body4);
470
+ return this.http.put(fullPath, body5);
459
471
  case "PATCH":
460
- return this.http.patch(fullPath, body4);
472
+ return this.http.patch(fullPath, body5);
461
473
  case "DELETE":
462
- return this.http.delete(fullPath, body4);
474
+ return this.http.delete(fullPath, body5);
463
475
  }
464
476
  }
465
477
  // ── Overview ────────────────────────────────────────────────
@@ -673,17 +685,17 @@ var Admin = class {
673
685
  }
674
686
  };
675
687
 
676
- // src/resources/run-groups.ts
688
+ // src/resources/agent-run-groups.ts
677
689
  function unwrap(payload) {
678
690
  if (payload && typeof payload === "object" && "data" in payload) {
679
691
  return payload.data;
680
692
  }
681
693
  return payload;
682
694
  }
683
- function fileRows(raw) {
695
+ function artifactRows(raw) {
684
696
  const data = unwrap(raw);
685
697
  if (Array.isArray(data)) return data;
686
- return data.files ?? data.items ?? [];
698
+ return data.artifacts ?? data.items ?? [];
687
699
  }
688
700
  function stripUndefined(input) {
689
701
  return Object.fromEntries(
@@ -703,6 +715,316 @@ function body(params) {
703
715
  }
704
716
  function runBody(entry) {
705
717
  return stripUndefined({
718
+ prompt: entry.prompt,
719
+ target_kind: entry.targetKind,
720
+ target_id: entry.targetId,
721
+ sandbox_id: entry.sandboxId,
722
+ computer_id: entry.computerId,
723
+ provider: entry.provider,
724
+ model: entry.model,
725
+ command: entry.command,
726
+ runtime_command: entry.runtimeCommand,
727
+ cwd: entry.cwd,
728
+ timeout: entry.timeout,
729
+ env: entry.env,
730
+ agent_runtime_profile_id: entry.agentRuntimeProfileId,
731
+ agent_profile_id: entry.agentProfileId,
732
+ parent_agent_run_id: entry.parentAgentRunId,
733
+ orchestration_role: entry.orchestrationRole,
734
+ skip_agent_runtime_profile: entry.skipAgentRuntimeProfile,
735
+ execution_packet: entry.executionPacket,
736
+ output_contract: entry.outputContract,
737
+ approval_policy: entry.approvalPolicy,
738
+ capability_requirements: entry.capabilityRequirements,
739
+ metadata: entry.metadata
740
+ });
741
+ }
742
+ function isTerminalStatus(status, terminalStatuses) {
743
+ return typeof status === "string" && terminalStatuses.includes(status.toLowerCase());
744
+ }
745
+ function sleep2(ms) {
746
+ if (ms <= 0) return Promise.resolve();
747
+ return new Promise((resolve) => setTimeout(resolve, ms));
748
+ }
749
+ var AgentRunGroups = class {
750
+ constructor(http) {
751
+ this.http = http;
752
+ }
753
+ http;
754
+ async list(params = {}) {
755
+ const response = await this.http.get(
756
+ "/agent-run-groups",
757
+ stripUndefined({
758
+ workspace_id: params.workspaceId,
759
+ project_id: params.projectId,
760
+ status: params.status,
761
+ limit: params.limit
762
+ })
763
+ );
764
+ const data = unwrap(
765
+ response
766
+ );
767
+ if (Array.isArray(data)) return data;
768
+ return data.groups ?? data.items ?? [];
769
+ }
770
+ async create(params) {
771
+ return unwrap(
772
+ await this.http.post("/agent-run-groups", body(params))
773
+ );
774
+ }
775
+ async get(id, options = {}) {
776
+ const query3 = options.includeRuns ? "?include=runs" : "";
777
+ return unwrap(
778
+ await this.http.get(`/agent-run-groups/${encodeURIComponent(id)}${query3}`)
779
+ );
780
+ }
781
+ async dispatch(id, runs, options = {}) {
782
+ return unwrap(
783
+ await this.http.post(
784
+ `/agent-run-groups/${encodeURIComponent(id)}/dispatch`,
785
+ stripUndefined({ runs: runs.map(runBody), async: options.async })
786
+ )
787
+ );
788
+ }
789
+ async cancel(id) {
790
+ return unwrap(
791
+ await this.http.post(
792
+ `/agent-run-groups/${encodeURIComponent(id)}/cancel`,
793
+ {}
794
+ )
795
+ );
796
+ }
797
+ async events(id) {
798
+ const data = unwrap(
799
+ await this.http.get(
800
+ `/agent-run-groups/${encodeURIComponent(id)}/events`
801
+ )
802
+ );
803
+ if (Array.isArray(data)) return data;
804
+ return data.events ?? data.items ?? [];
805
+ }
806
+ streamEvents(id) {
807
+ return this.http.stream(
808
+ `/agent-run-groups/${encodeURIComponent(id)}/events`
809
+ );
810
+ }
811
+ async artifacts(id) {
812
+ const group = await this.get(id, { includeRuns: true });
813
+ const runs = (group.runs ?? []).filter((run) => Boolean(run.id));
814
+ const nested = await Promise.all(
815
+ runs.map(async (run) => {
816
+ const artifacts = artifactRows(
817
+ await this.http.get(
818
+ `/agent-runs/${encodeURIComponent(run.id)}/artifacts`
819
+ )
820
+ );
821
+ return artifacts.map((artifact) => ({
822
+ ...artifact,
823
+ agent_run_id: artifact.agent_run_id ?? run.id
824
+ }));
825
+ })
826
+ );
827
+ return nested.flat();
828
+ }
829
+ async waitForCompletion(id, options = {}) {
830
+ const timeoutMs = options.timeoutMs ?? 15 * 60 * 1e3;
831
+ const pollIntervalMs = options.pollIntervalMs ?? 2e3;
832
+ const terminalStatuses = options.terminalStatuses ?? [
833
+ "succeeded",
834
+ "failed",
835
+ "canceled",
836
+ "cancelled"
837
+ ];
838
+ const deadline = Date.now() + timeoutMs;
839
+ while (true) {
840
+ const group = await this.get(
841
+ id,
842
+ options.includeRuns === void 0 ? {} : { includeRuns: options.includeRuns }
843
+ );
844
+ if (isTerminalStatus(group.status, terminalStatuses)) return group;
845
+ if (Date.now() >= deadline) {
846
+ throw new Error(`Timed out waiting for agent run group ${id}`);
847
+ }
848
+ await sleep2(Math.min(pollIntervalMs, Math.max(0, deadline - Date.now())));
849
+ }
850
+ }
851
+ };
852
+
853
+ // src/resources/agent-runs.ts
854
+ function unwrap2(payload) {
855
+ if (payload && typeof payload === "object" && "data" in payload) {
856
+ return payload.data;
857
+ }
858
+ return payload;
859
+ }
860
+ function stripUndefined2(input) {
861
+ return Object.fromEntries(
862
+ Object.entries(input).filter(([, value]) => value !== void 0)
863
+ );
864
+ }
865
+ function isTerminalStatus2(status, terminalStatuses) {
866
+ return typeof status === "string" && terminalStatuses.includes(status.toLowerCase());
867
+ }
868
+ function sleep3(ms) {
869
+ if (ms <= 0) return Promise.resolve();
870
+ return new Promise((resolve) => setTimeout(resolve, ms));
871
+ }
872
+ var AgentRuns = class {
873
+ constructor(http) {
874
+ this.http = http;
875
+ }
876
+ http;
877
+ async list(params = {}) {
878
+ const response = await this.http.get(
879
+ "/agent-runs",
880
+ stripUndefined2({
881
+ target_kind: params.targetKind,
882
+ target_id: params.targetId,
883
+ sandbox_id: params.sandboxId,
884
+ computer_id: params.computerId,
885
+ agent_run_group_id: params.agentRunGroupId,
886
+ external_workspace_id: params.externalWorkspaceId ?? params.external_workspace_id,
887
+ external_user_id: params.externalUserId ?? params.external_user_id,
888
+ external_project_id: params.externalProjectId ?? params.external_project_id,
889
+ status: params.status
890
+ })
891
+ );
892
+ const data = unwrap2(
893
+ response
894
+ );
895
+ if (Array.isArray(data)) return data;
896
+ return data.runs ?? data.items ?? [];
897
+ }
898
+ async get(id) {
899
+ return unwrap2(
900
+ await this.http.get(`/agent-runs/${encodeURIComponent(id)}`)
901
+ );
902
+ }
903
+ async artifacts(id) {
904
+ const data = unwrap2(
905
+ await this.http.get(
906
+ `/agent-runs/${encodeURIComponent(id)}/artifacts`
907
+ )
908
+ );
909
+ if (Array.isArray(data)) return data;
910
+ return data.artifacts ?? data.items ?? [];
911
+ }
912
+ async downloadArtifact(id, artifactId, options = {}) {
913
+ const query3 = options.inline ? "?disposition=inline" : "";
914
+ return this.http.getBinary(
915
+ `/agent-runs/${encodeURIComponent(id)}/artifacts/${encodeURIComponent(
916
+ artifactId
917
+ )}/download${query3}`
918
+ );
919
+ }
920
+ async events(id) {
921
+ const data = unwrap2(
922
+ await this.http.get(`/agent-runs/${encodeURIComponent(id)}/events`)
923
+ );
924
+ if (Array.isArray(data)) return data;
925
+ return data.events ?? data.items ?? [];
926
+ }
927
+ streamEvents(id) {
928
+ return this.http.stream(
929
+ `/agent-runs/${encodeURIComponent(id)}/events`
930
+ );
931
+ }
932
+ async waitForCompletion(id, options = {}) {
933
+ const timeoutMs = options.timeoutMs ?? 15 * 60 * 1e3;
934
+ const pollIntervalMs = options.pollIntervalMs ?? 2e3;
935
+ const terminalStatuses = options.terminalStatuses ?? [
936
+ "succeeded",
937
+ "failed",
938
+ "canceled",
939
+ "cancelled"
940
+ ];
941
+ const deadline = Date.now() + timeoutMs;
942
+ while (true) {
943
+ const run = await this.get(id);
944
+ if (isTerminalStatus2(run.status, terminalStatuses)) return run;
945
+ if (Date.now() >= deadline) {
946
+ throw new Error(`Timed out waiting for agent run ${id}`);
947
+ }
948
+ await sleep3(Math.min(pollIntervalMs, Math.max(0, deadline - Date.now())));
949
+ }
950
+ }
951
+ async run(params) {
952
+ const body5 = stripUndefined2({
953
+ prompt: params.prompt,
954
+ target_kind: params.targetKind,
955
+ target_id: params.targetId,
956
+ sandbox_id: params.sandboxId,
957
+ computer_id: params.computerId,
958
+ provider: params.provider,
959
+ model: params.model,
960
+ command: params.command,
961
+ runtime_command: params.runtimeCommand,
962
+ cwd: params.cwd,
963
+ timeout: params.timeout,
964
+ wait: params.wait,
965
+ env: params.env,
966
+ output_format: params.outputFormat ?? params.output_format,
967
+ resume_session_id: params.resumeSessionId ?? params.resume_session_id,
968
+ json: params.json,
969
+ output_schema: params.outputSchema ?? params.output_schema,
970
+ image: params.image,
971
+ agent_runtime_profile_id: params.agentRuntimeProfileId,
972
+ agent_profile_id: params.agentProfileId,
973
+ agent_run_group_id: params.agentRunGroupId,
974
+ parent_agent_run_id: params.parentAgentRunId,
975
+ orchestration_role: params.orchestrationRole,
976
+ external_workspace_id: params.externalWorkspaceId ?? params.external_workspace_id,
977
+ external_user_id: params.externalUserId ?? params.external_user_id,
978
+ external_project_id: params.externalProjectId ?? params.external_project_id,
979
+ skip_agent_runtime_profile: params.skipAgentRuntimeProfile,
980
+ execution_packet: params.executionPacket,
981
+ output_contract: params.outputContract,
982
+ approval_policy: params.approvalPolicy,
983
+ capability_requirements: params.capabilityRequirements,
984
+ metadata: params.metadata
985
+ });
986
+ return unwrap2(await this.http.post("/agent-runs", body5));
987
+ }
988
+ async cancel(id) {
989
+ return unwrap2(
990
+ await this.http.post(
991
+ `/agent-runs/${encodeURIComponent(id)}/cancel`,
992
+ {}
993
+ )
994
+ );
995
+ }
996
+ };
997
+
998
+ // src/resources/run-groups.ts
999
+ function unwrap3(payload) {
1000
+ if (payload && typeof payload === "object" && "data" in payload) {
1001
+ return payload.data;
1002
+ }
1003
+ return payload;
1004
+ }
1005
+ function fileRows(raw) {
1006
+ const data = unwrap3(raw);
1007
+ if (Array.isArray(data)) return data;
1008
+ return data.files ?? data.items ?? [];
1009
+ }
1010
+ function stripUndefined3(input) {
1011
+ return Object.fromEntries(
1012
+ Object.entries(input).filter(([, value]) => value !== void 0)
1013
+ );
1014
+ }
1015
+ function body2(params) {
1016
+ return stripUndefined3({
1017
+ name: params.name,
1018
+ description: params.description,
1019
+ workspace_id: params.workspaceId,
1020
+ project_id: params.projectId,
1021
+ concurrency_limit: params.concurrencyLimit,
1022
+ expected_runs: params.expectedRuns,
1023
+ metadata: params.metadata
1024
+ });
1025
+ }
1026
+ function runBody2(entry) {
1027
+ return stripUndefined3({
706
1028
  instruction: entry.instruction,
707
1029
  target_kind: entry.targetKind,
708
1030
  target_id: entry.targetId,
@@ -729,10 +1051,10 @@ function runBody(entry) {
729
1051
  metadata: entry.metadata
730
1052
  });
731
1053
  }
732
- function isTerminalStatus(status, terminalStatuses) {
1054
+ function isTerminalStatus3(status, terminalStatuses) {
733
1055
  return typeof status === "string" && terminalStatuses.includes(status.toLowerCase());
734
1056
  }
735
- function sleep2(ms) {
1057
+ function sleep4(ms) {
736
1058
  if (ms <= 0) return Promise.resolve();
737
1059
  return new Promise((resolve) => setTimeout(resolve, ms));
738
1060
  }
@@ -744,40 +1066,40 @@ var RunGroups = class {
744
1066
  async list(params = {}) {
745
1067
  const response = await this.http.get(
746
1068
  "/run-groups",
747
- stripUndefined({
1069
+ stripUndefined3({
748
1070
  workspace_id: params.workspaceId,
749
1071
  project_id: params.projectId,
750
1072
  status: params.status,
751
1073
  limit: params.limit
752
1074
  })
753
1075
  );
754
- const data = unwrap(
1076
+ const data = unwrap3(
755
1077
  response
756
1078
  );
757
1079
  if (Array.isArray(data)) return data;
758
1080
  return data.groups ?? data.items ?? [];
759
1081
  }
760
1082
  async create(params) {
761
- return unwrap(
762
- await this.http.post("/run-groups", body(params))
1083
+ return unwrap3(
1084
+ await this.http.post("/run-groups", body2(params))
763
1085
  );
764
1086
  }
765
1087
  async get(id, options = {}) {
766
1088
  const query3 = options.includeRuns ? "?include=runs" : "";
767
- return unwrap(
1089
+ return unwrap3(
768
1090
  await this.http.get(`/run-groups/${encodeURIComponent(id)}${query3}`)
769
1091
  );
770
1092
  }
771
1093
  async dispatch(id, runs, options = {}) {
772
- return unwrap(
1094
+ return unwrap3(
773
1095
  await this.http.post(
774
1096
  `/run-groups/${encodeURIComponent(id)}/dispatch`,
775
- stripUndefined({ runs: runs.map(runBody), async: options.async })
1097
+ stripUndefined3({ runs: runs.map(runBody2), async: options.async })
776
1098
  )
777
1099
  );
778
1100
  }
779
1101
  async cancel(id) {
780
- return unwrap(
1102
+ return unwrap3(
781
1103
  await this.http.post(
782
1104
  `/run-groups/${encodeURIComponent(id)}/cancel`,
783
1105
  {}
@@ -785,7 +1107,7 @@ var RunGroups = class {
785
1107
  );
786
1108
  }
787
1109
  async activity(id) {
788
- const data = unwrap(
1110
+ const data = unwrap3(
789
1111
  await this.http.get(
790
1112
  `/run-groups/${encodeURIComponent(id)}/activity`
791
1113
  )
@@ -831,23 +1153,23 @@ var RunGroups = class {
831
1153
  id,
832
1154
  options.includeRuns === void 0 ? {} : { includeRuns: options.includeRuns }
833
1155
  );
834
- if (isTerminalStatus(group.status, terminalStatuses)) return group;
1156
+ if (isTerminalStatus3(group.status, terminalStatuses)) return group;
835
1157
  if (Date.now() >= deadline) {
836
1158
  throw new Error(`Timed out waiting for run group ${id}`);
837
1159
  }
838
- await sleep2(Math.min(pollIntervalMs, Math.max(0, deadline - Date.now())));
1160
+ await sleep4(Math.min(pollIntervalMs, Math.max(0, deadline - Date.now())));
839
1161
  }
840
1162
  }
841
1163
  };
842
1164
 
843
1165
  // src/resources/agent-runtime-profiles.ts
844
- function unwrap2(payload) {
1166
+ function unwrap4(payload) {
845
1167
  if (payload !== null && typeof payload === "object" && "data" in payload && payload.data !== void 0) {
846
1168
  return payload.data;
847
1169
  }
848
1170
  return payload;
849
1171
  }
850
- function body2(params) {
1172
+ function body3(params) {
851
1173
  return Object.fromEntries(
852
1174
  Object.entries({
853
1175
  workspace_id: params.workspaceId ?? params.workspace_id,
@@ -898,11 +1220,11 @@ var AgentRuntimeProfiles = class {
898
1220
  project_id: params.projectId ?? params.project_id
899
1221
  }
900
1222
  );
901
- return unwrap2(response).map(normalize);
1223
+ return unwrap4(response).map(normalize);
902
1224
  }
903
1225
  async get(id) {
904
1226
  return normalize(
905
- unwrap2(
1227
+ unwrap4(
906
1228
  await this.http.get(
907
1229
  `/agent-runtime-profiles/${encodeURIComponent(id)}`
908
1230
  )
@@ -911,20 +1233,20 @@ var AgentRuntimeProfiles = class {
911
1233
  }
912
1234
  async create(params) {
913
1235
  return normalize(
914
- unwrap2(
1236
+ unwrap4(
915
1237
  await this.http.post(
916
1238
  "/agent-runtime-profiles",
917
- body2(params)
1239
+ body3(params)
918
1240
  )
919
1241
  )
920
1242
  );
921
1243
  }
922
1244
  async update(id, params) {
923
1245
  return normalize(
924
- unwrap2(
1246
+ unwrap4(
925
1247
  await this.http.put(
926
1248
  `/agent-runtime-profiles/${encodeURIComponent(id)}`,
927
- body2(params)
1249
+ body3(params)
928
1250
  )
929
1251
  )
930
1252
  );
@@ -937,21 +1259,21 @@ var AgentRuntimeProfiles = class {
937
1259
  };
938
1260
 
939
1261
  // src/resources/runs.ts
940
- function unwrap3(payload) {
1262
+ function unwrap5(payload) {
941
1263
  if (payload && typeof payload === "object" && "data" in payload) {
942
1264
  return payload.data;
943
1265
  }
944
1266
  return payload;
945
1267
  }
946
- function stripUndefined2(input) {
1268
+ function stripUndefined4(input) {
947
1269
  return Object.fromEntries(
948
1270
  Object.entries(input).filter(([, value]) => value !== void 0)
949
1271
  );
950
1272
  }
951
- function isTerminalStatus2(status, terminalStatuses) {
1273
+ function isTerminalStatus4(status, terminalStatuses) {
952
1274
  return typeof status === "string" && terminalStatuses.includes(status.toLowerCase());
953
1275
  }
954
- function sleep3(ms) {
1276
+ function sleep5(ms) {
955
1277
  if (ms <= 0) return Promise.resolve();
956
1278
  return new Promise((resolve) => setTimeout(resolve, ms));
957
1279
  }
@@ -963,7 +1285,7 @@ var Runs = class {
963
1285
  async list(params = {}) {
964
1286
  const response = await this.http.get(
965
1287
  "/runs",
966
- stripUndefined2({
1288
+ stripUndefined4({
967
1289
  target_kind: params.targetKind,
968
1290
  target_id: params.targetId,
969
1291
  runtime_id: params.runtimeId,
@@ -976,24 +1298,24 @@ var Runs = class {
976
1298
  status: params.status
977
1299
  })
978
1300
  );
979
- const data = unwrap3(
1301
+ const data = unwrap5(
980
1302
  response
981
1303
  );
982
1304
  if (Array.isArray(data)) return data;
983
1305
  return data.runs ?? data.items ?? [];
984
1306
  }
985
1307
  async get(id) {
986
- return unwrap3(
1308
+ return unwrap5(
987
1309
  await this.http.get(`/runs/${encodeURIComponent(id)}`)
988
1310
  );
989
1311
  }
990
1312
  async outputs(id) {
991
- return unwrap3(
1313
+ return unwrap5(
992
1314
  await this.http.get(`/runs/${encodeURIComponent(id)}/outputs`)
993
1315
  );
994
1316
  }
995
1317
  async files(id) {
996
- const data = unwrap3(
1318
+ const data = unwrap5(
997
1319
  await this.http.get(`/runs/${encodeURIComponent(id)}/files`)
998
1320
  );
999
1321
  if (Array.isArray(data)) return data;
@@ -1008,33 +1330,33 @@ var Runs = class {
1008
1330
  );
1009
1331
  }
1010
1332
  async messages(id) {
1011
- const data = unwrap3(
1333
+ const data = unwrap5(
1012
1334
  await this.http.get(`/runs/${encodeURIComponent(id)}/messages`)
1013
1335
  );
1014
1336
  if (Array.isArray(data)) return data;
1015
1337
  return data.messages ?? data.items ?? [];
1016
1338
  }
1017
1339
  async commandOutput(id) {
1018
- return unwrap3(
1340
+ return unwrap5(
1019
1341
  await this.http.get(`/runs/${encodeURIComponent(id)}/command-output`)
1020
1342
  );
1021
1343
  }
1022
1344
  async activity(id) {
1023
- const data = unwrap3(
1345
+ const data = unwrap5(
1024
1346
  await this.http.get(`/runs/${encodeURIComponent(id)}/activity`)
1025
1347
  );
1026
1348
  if (Array.isArray(data)) return data;
1027
1349
  return data.activity ?? data.items ?? [];
1028
1350
  }
1029
1351
  async previews(id) {
1030
- const data = unwrap3(
1352
+ const data = unwrap5(
1031
1353
  await this.http.get(`/runs/${encodeURIComponent(id)}/previews`)
1032
1354
  );
1033
1355
  if (Array.isArray(data)) return data;
1034
1356
  return data.previews ?? data.items ?? [];
1035
1357
  }
1036
1358
  async diagnostics(id) {
1037
- const data = unwrap3(await this.http.get(`/runs/${encodeURIComponent(id)}/diagnostics`));
1359
+ const data = unwrap5(await this.http.get(`/runs/${encodeURIComponent(id)}/diagnostics`));
1038
1360
  if (Array.isArray(data)) return data;
1039
1361
  return data.diagnostics ?? data.items ?? [];
1040
1362
  }
@@ -1055,15 +1377,15 @@ var Runs = class {
1055
1377
  const deadline = Date.now() + timeoutMs;
1056
1378
  while (true) {
1057
1379
  const run = await this.get(id);
1058
- if (isTerminalStatus2(run.status, terminalStatuses)) return run;
1380
+ if (isTerminalStatus4(run.status, terminalStatuses)) return run;
1059
1381
  if (Date.now() >= deadline) {
1060
1382
  throw new Error(`Timed out waiting for run ${id}`);
1061
1383
  }
1062
- await sleep3(Math.min(pollIntervalMs, Math.max(0, deadline - Date.now())));
1384
+ await sleep5(Math.min(pollIntervalMs, Math.max(0, deadline - Date.now())));
1063
1385
  }
1064
1386
  }
1065
1387
  async run(params) {
1066
- const body4 = stripUndefined2({
1388
+ const body5 = stripUndefined4({
1067
1389
  instruction: params.instruction,
1068
1390
  target_kind: params.targetKind,
1069
1391
  target_id: params.targetId,
@@ -1094,10 +1416,10 @@ var Runs = class {
1094
1416
  capability_requirements: params.capabilityRequirements,
1095
1417
  metadata: params.metadata
1096
1418
  });
1097
- return unwrap3(await this.http.post("/runs", body4));
1419
+ return unwrap5(await this.http.post("/runs", body5));
1098
1420
  }
1099
1421
  async cancel(id) {
1100
- return unwrap3(
1422
+ return unwrap5(
1101
1423
  await this.http.post(
1102
1424
  `/runs/${encodeURIComponent(id)}/cancel`,
1103
1425
  {}
@@ -1107,7 +1429,7 @@ var Runs = class {
1107
1429
  };
1108
1430
 
1109
1431
  // src/resources/analytics.ts
1110
- function unwrap4(payload) {
1432
+ function unwrap6(payload) {
1111
1433
  if (payload && typeof payload === "object") {
1112
1434
  const p = payload;
1113
1435
  for (const k of ["data", "analytics", "series", "items"]) {
@@ -1116,7 +1438,7 @@ function unwrap4(payload) {
1116
1438
  }
1117
1439
  return payload;
1118
1440
  }
1119
- function stripUndefined3(input) {
1441
+ function stripUndefined5(input) {
1120
1442
  return Object.fromEntries(
1121
1443
  Object.entries(input).filter(([, v]) => v !== void 0)
1122
1444
  );
@@ -1128,18 +1450,18 @@ var Analytics = class {
1128
1450
  http;
1129
1451
  /** Get the platform analytics overview. */
1130
1452
  async overview(filters = {}) {
1131
- const query3 = stripUndefined3(filters);
1453
+ const query3 = stripUndefined5(filters);
1132
1454
  const data = await this.http.get("/analytics/overview", query3);
1133
- return unwrap4(data);
1455
+ return unwrap6(data);
1134
1456
  }
1135
1457
  /** Get a timeseries for a metric over a period. */
1136
1458
  async timeseries(params = {}) {
1137
- const query3 = stripUndefined3(params);
1459
+ const query3 = stripUndefined5(params);
1138
1460
  const data = await this.http.get("/analytics/timeseries", query3);
1139
- return unwrap4(data);
1461
+ return unwrap6(data);
1140
1462
  }
1141
1463
  };
1142
- function unwrap5(payload) {
1464
+ function unwrap7(payload) {
1143
1465
  if (payload && typeof payload === "object" && "data" in payload) {
1144
1466
  return payload.data;
1145
1467
  }
@@ -1155,7 +1477,7 @@ function listItems(payload, candidateKeys = ["data", "keys", "api_keys", "items"
1155
1477
  }
1156
1478
  return [];
1157
1479
  }
1158
- function stripUndefined4(input) {
1480
+ function stripUndefined6(input) {
1159
1481
  return Object.fromEntries(
1160
1482
  Object.entries(input).filter(([, v]) => v !== void 0)
1161
1483
  );
@@ -1169,32 +1491,32 @@ var ApiKeys = class {
1169
1491
  }
1170
1492
  http;
1171
1493
  async list(params = {}) {
1172
- const query3 = stripUndefined4({ ...params });
1494
+ const query3 = stripUndefined6({ ...params });
1173
1495
  const data = await this.http.get("/api-keys", query3);
1174
1496
  return listItems(data);
1175
1497
  }
1176
1498
  async create(params) {
1177
1499
  const { idempotencyKey: ikey, expiresAt, ...rest } = params;
1178
- const body4 = stripUndefined4({
1500
+ const body5 = stripUndefined6({
1179
1501
  ...rest,
1180
1502
  expires_at: expiresAt ?? rest.expires_at
1181
1503
  });
1182
1504
  const data = await this.http.request("/api-keys", {
1183
1505
  method: "POST",
1184
- body: body4,
1506
+ body: body5,
1185
1507
  headers: { "Idempotency-Key": idempotencyKey(ikey) }
1186
1508
  });
1187
- return unwrap5(data);
1509
+ return unwrap7(data);
1188
1510
  }
1189
1511
  /** POST /api/v1/api-keys/scoped — L2 delegation token bound to one external user. */
1190
1512
  async createScoped(params) {
1191
- const body4 = stripUndefined4({
1513
+ const body5 = stripUndefined6({
1192
1514
  external_user_id: params.externalUserId,
1193
1515
  scopes: params.scopes,
1194
1516
  expires_at: params.expiresAt
1195
1517
  });
1196
- return unwrap5(
1197
- await this.http.post("/api-keys/scoped", body4)
1518
+ return unwrap7(
1519
+ await this.http.post("/api-keys/scoped", body5)
1198
1520
  );
1199
1521
  }
1200
1522
  async delete(keyId) {
@@ -1203,7 +1525,7 @@ var ApiKeys = class {
1203
1525
  };
1204
1526
 
1205
1527
  // src/resources/audit-log.ts
1206
- function unwrap6(payload) {
1528
+ function unwrap8(payload) {
1207
1529
  if (payload && typeof payload === "object") {
1208
1530
  const p = payload;
1209
1531
  for (const k of ["data", "audit_log", "events", "items"]) {
@@ -1212,7 +1534,7 @@ function unwrap6(payload) {
1212
1534
  }
1213
1535
  return payload;
1214
1536
  }
1215
- function stripUndefined5(input) {
1537
+ function stripUndefined7(input) {
1216
1538
  return Object.fromEntries(
1217
1539
  Object.entries(input).filter(([, v]) => v !== void 0)
1218
1540
  );
@@ -1224,16 +1546,16 @@ var AuditLog = class {
1224
1546
  http;
1225
1547
  /** List audit-log events with optional filters. */
1226
1548
  async list(params = {}) {
1227
- const query3 = stripUndefined5(params);
1549
+ const query3 = stripUndefined7(params);
1228
1550
  const data = await this.http.get("/audit-log", query3);
1229
- const result = unwrap6(data);
1551
+ const result = unwrap8(data);
1230
1552
  if (Array.isArray(result)) return result;
1231
1553
  return [];
1232
1554
  }
1233
1555
  };
1234
1556
 
1235
1557
  // src/resources/benchmarks.ts
1236
- function unwrap7(data) {
1558
+ function unwrap9(data) {
1237
1559
  if (data && typeof data === "object") {
1238
1560
  const d = data;
1239
1561
  for (const k of ["data", "benchmarks", "samples", "items"]) {
@@ -1265,19 +1587,19 @@ var Benchmarks = class {
1265
1587
  return unwrapList(data);
1266
1588
  }
1267
1589
  async get(benchmarkId) {
1268
- return unwrap7(
1590
+ return unwrap9(
1269
1591
  await this.http.get(`/admin/benchmarks/${benchmarkId}`)
1270
1592
  );
1271
1593
  }
1272
1594
  /** Start a new benchmark run — pass kind and run-specific options. */
1273
1595
  async create(params) {
1274
- const body4 = Object.fromEntries(
1596
+ const body5 = Object.fromEntries(
1275
1597
  Object.entries(params).filter(([, v]) => v !== void 0)
1276
1598
  );
1277
- return unwrap7(await this.http.post("/admin/benchmarks", body4));
1599
+ return unwrap9(await this.http.post("/admin/benchmarks", body5));
1278
1600
  }
1279
1601
  async cancel(benchmarkId) {
1280
- return unwrap7(
1602
+ return unwrap9(
1281
1603
  await this.http.post(`/admin/benchmarks/${benchmarkId}/cancel`)
1282
1604
  );
1283
1605
  }
@@ -1294,17 +1616,17 @@ var Benchmarks = class {
1294
1616
  }
1295
1617
  /** Compare two benchmark runs. */
1296
1618
  async compare(params) {
1297
- const body4 = Object.fromEntries(
1619
+ const body5 = Object.fromEntries(
1298
1620
  Object.entries(params).filter(([, v]) => v !== void 0)
1299
1621
  );
1300
- return unwrap7(
1301
- await this.http.post("/admin/benchmarks/compare", body4)
1622
+ return unwrap9(
1623
+ await this.http.post("/admin/benchmarks/compare", body5)
1302
1624
  );
1303
1625
  }
1304
1626
  };
1305
1627
 
1306
1628
  // src/resources/builder-sessions.ts
1307
- function unwrap8(data) {
1629
+ function unwrap10(data) {
1308
1630
  if (data && typeof data === "object") {
1309
1631
  const d = data;
1310
1632
  for (const k of ["data", "sessions", "items"]) {
@@ -1341,7 +1663,7 @@ var BuilderSessions = class {
1341
1663
  return all.find((s) => s.id === sessionId) ?? {};
1342
1664
  }
1343
1665
  async updateTitle(sessionId, title) {
1344
- return unwrap8(
1666
+ return unwrap10(
1345
1667
  await this.http.patch(`/builder/sessions/${sessionId}/title`, {
1346
1668
  title
1347
1669
  })
@@ -1353,7 +1675,7 @@ var BuilderSessions = class {
1353
1675
  };
1354
1676
 
1355
1677
  // src/resources/channels.ts
1356
- function unwrap9(payload) {
1678
+ function unwrap11(payload) {
1357
1679
  if (payload && typeof payload === "object") {
1358
1680
  const p = payload;
1359
1681
  for (const k of ["data", "channels", "notifications", "items"]) {
@@ -1362,7 +1684,7 @@ function unwrap9(payload) {
1362
1684
  }
1363
1685
  return payload;
1364
1686
  }
1365
- function stripUndefined6(input) {
1687
+ function stripUndefined8(input) {
1366
1688
  return Object.fromEntries(
1367
1689
  Object.entries(input).filter(([, v]) => v !== void 0)
1368
1690
  );
@@ -1379,28 +1701,28 @@ var Channels = class {
1379
1701
  http;
1380
1702
  /** List all channels for the tenant. */
1381
1703
  async list(params = {}) {
1382
- const query3 = stripUndefined6(params);
1704
+ const query3 = stripUndefined8(params);
1383
1705
  const data = await this.http.get("/channels", query3);
1384
- const result = unwrap9(data);
1706
+ const result = unwrap11(data);
1385
1707
  if (Array.isArray(result)) return result;
1386
1708
  return [];
1387
1709
  }
1388
1710
  /** Get a single channel. */
1389
1711
  async get(channelId) {
1390
1712
  const data = await this.http.get(`/channels/${channelId}`);
1391
- return unwrap9(data);
1713
+ return unwrap11(data);
1392
1714
  }
1393
1715
  /** Create a new channel. */
1394
1716
  async create(params) {
1395
- const body4 = stripUndefObj(params);
1396
- const data = await this.http.post("/channels", body4);
1397
- return unwrap9(data);
1717
+ const body5 = stripUndefObj(params);
1718
+ const data = await this.http.post("/channels", body5);
1719
+ return unwrap11(data);
1398
1720
  }
1399
1721
  /** Update a channel. */
1400
1722
  async update(channelId, params) {
1401
- const body4 = stripUndefObj(params);
1402
- const data = await this.http.patch(`/channels/${channelId}`, body4);
1403
- return unwrap9(data);
1723
+ const body5 = stripUndefObj(params);
1724
+ const data = await this.http.patch(`/channels/${channelId}`, body5);
1725
+ return unwrap11(data);
1404
1726
  }
1405
1727
  /** Delete a channel. */
1406
1728
  async delete(channelId) {
@@ -1410,42 +1732,42 @@ var Channels = class {
1410
1732
  /** Get notification preferences across all channels. */
1411
1733
  async listNotifications() {
1412
1734
  const data = await this.http.get("/channels/notifications");
1413
- return unwrap9(data);
1735
+ return unwrap11(data);
1414
1736
  }
1415
1737
  /** Update notification preferences. */
1416
1738
  async updateNotifications(params) {
1417
- const body4 = stripUndefObj(params);
1418
- const data = await this.http.put("/channels/notifications", body4);
1419
- return unwrap9(data);
1739
+ const body5 = stripUndefObj(params);
1740
+ const data = await this.http.put("/channels/notifications", body5);
1741
+ return unwrap11(data);
1420
1742
  }
1421
1743
  /** Enable a channel. */
1422
1744
  async enable(channelId) {
1423
1745
  const data = await this.http.post(`/channels/${channelId}/enable`);
1424
- return unwrap9(data);
1746
+ return unwrap11(data);
1425
1747
  }
1426
1748
  /** Disable a channel. */
1427
1749
  async disable(channelId) {
1428
1750
  const data = await this.http.post(
1429
1751
  `/channels/${channelId}/disable`
1430
1752
  );
1431
- return unwrap9(data);
1753
+ return unwrap11(data);
1432
1754
  }
1433
1755
  };
1434
1756
 
1435
1757
  // src/resources/cloud.ts
1436
- function unwrap10(payload) {
1758
+ function unwrap12(payload) {
1437
1759
  if (payload !== null && typeof payload === "object" && "data" in payload && payload.data !== void 0) {
1438
1760
  return payload.data;
1439
1761
  }
1440
1762
  return payload;
1441
1763
  }
1442
- function stripUndefined7(input) {
1764
+ function stripUndefined9(input) {
1443
1765
  return Object.fromEntries(
1444
1766
  Object.entries(input).filter(([, value]) => value !== void 0)
1445
1767
  );
1446
1768
  }
1447
1769
  function accountBody(params) {
1448
- return stripUndefined7({
1770
+ return stripUndefined9({
1449
1771
  provider: params.provider,
1450
1772
  mode: params.mode,
1451
1773
  display_name: params.displayName ?? params.display_name,
@@ -1456,7 +1778,7 @@ function accountBody(params) {
1456
1778
  });
1457
1779
  }
1458
1780
  function regionBody(params) {
1459
- return stripUndefined7({
1781
+ return stripUndefined9({
1460
1782
  cloud_account_id: params.cloudAccountId ?? params.cloud_account_id,
1461
1783
  provider_region: params.providerRegion ?? params.provider_region,
1462
1784
  provider_zone: params.providerZone ?? params.provider_zone,
@@ -1471,7 +1793,7 @@ function regionBody(params) {
1471
1793
  });
1472
1794
  }
1473
1795
  function poolBody(params) {
1474
- return stripUndefined7({
1796
+ return stripUndefined9({
1475
1797
  cloud_region_id: params.cloudRegionId ?? params.cloud_region_id,
1476
1798
  pool_kind: params.poolKind ?? params.pool_kind,
1477
1799
  node_type: params.nodeType ?? params.node_type,
@@ -1485,7 +1807,7 @@ function poolBody(params) {
1485
1807
  });
1486
1808
  }
1487
1809
  function preflightBody(params) {
1488
- return stripUndefined7({
1810
+ return stripUndefined9({
1489
1811
  cloud_account_id: params.cloudAccountId ?? params.cloud_account_id,
1490
1812
  cloud_region_id: params.cloudRegionId ?? params.cloud_region_id,
1491
1813
  provider: params.provider,
@@ -1496,7 +1818,7 @@ function preflightBody(params) {
1496
1818
  });
1497
1819
  }
1498
1820
  function query(params = {}) {
1499
- return stripUndefined7({
1821
+ return stripUndefined9({
1500
1822
  cloud_account_id: params.cloudAccountId ?? params.cloud_account_id,
1501
1823
  cloud_region_id: params.cloudRegionId ?? params.cloud_region_id,
1502
1824
  limit: params.limit
@@ -1508,12 +1830,12 @@ var Cloud = class {
1508
1830
  }
1509
1831
  http;
1510
1832
  async listAccounts() {
1511
- return unwrap10(
1833
+ return unwrap12(
1512
1834
  await this.http.get("/cloud/accounts")
1513
1835
  );
1514
1836
  }
1515
1837
  async createAccount(params) {
1516
- return unwrap10(
1838
+ return unwrap12(
1517
1839
  await this.http.post(
1518
1840
  "/cloud/accounts",
1519
1841
  accountBody(params)
@@ -1521,10 +1843,10 @@ var Cloud = class {
1521
1843
  );
1522
1844
  }
1523
1845
  async attachAwsRole(id, params) {
1524
- return unwrap10(
1846
+ return unwrap12(
1525
1847
  await this.http.post(
1526
1848
  `/cloud/accounts/${encodeURIComponent(id)}/aws/role`,
1527
- stripUndefined7({
1849
+ stripUndefined9({
1528
1850
  role_arn: params.roleArn ?? params.role_arn,
1529
1851
  default_region: params.defaultRegion ?? params.default_region
1530
1852
  })
@@ -1532,7 +1854,7 @@ var Cloud = class {
1532
1854
  );
1533
1855
  }
1534
1856
  async listRegions(params = {}) {
1535
- return unwrap10(
1857
+ return unwrap12(
1536
1858
  await this.http.get(
1537
1859
  "/cloud/regions",
1538
1860
  query(params)
@@ -1540,7 +1862,7 @@ var Cloud = class {
1540
1862
  );
1541
1863
  }
1542
1864
  async createRegion(params) {
1543
- return unwrap10(
1865
+ return unwrap12(
1544
1866
  await this.http.post(
1545
1867
  "/cloud/regions",
1546
1868
  regionBody(params)
@@ -1548,12 +1870,12 @@ var Cloud = class {
1548
1870
  );
1549
1871
  }
1550
1872
  async listPools(params = {}) {
1551
- return unwrap10(
1873
+ return unwrap12(
1552
1874
  await this.http.get("/cloud/pools", query(params))
1553
1875
  );
1554
1876
  }
1555
1877
  async createPool(params) {
1556
- return unwrap10(
1878
+ return unwrap12(
1557
1879
  await this.http.post(
1558
1880
  "/cloud/pools",
1559
1881
  poolBody(params)
@@ -1561,7 +1883,7 @@ var Cloud = class {
1561
1883
  );
1562
1884
  }
1563
1885
  async listPreflights(params = {}) {
1564
- return unwrap10(
1886
+ return unwrap12(
1565
1887
  await this.http.get(
1566
1888
  "/cloud/preflights",
1567
1889
  query(params)
@@ -1569,7 +1891,7 @@ var Cloud = class {
1569
1891
  );
1570
1892
  }
1571
1893
  async recordPreflight(params) {
1572
- return unwrap10(
1894
+ return unwrap12(
1573
1895
  await this.http.post(
1574
1896
  "/cloud/preflights",
1575
1897
  preflightBody(params)
@@ -1579,7 +1901,7 @@ var Cloud = class {
1579
1901
  };
1580
1902
 
1581
1903
  // src/resources/command-center.ts
1582
- function unwrap11(data) {
1904
+ function unwrap13(data) {
1583
1905
  if (data && typeof data === "object") {
1584
1906
  const d = data;
1585
1907
  for (const k of [
@@ -1613,7 +1935,7 @@ var CommandCenter = class {
1613
1935
  http;
1614
1936
  /** Top-level snapshot (GET /command-center). */
1615
1937
  async overview() {
1616
- return unwrap11(await this.http.get("/command-center"));
1938
+ return unwrap13(await this.http.get("/command-center"));
1617
1939
  }
1618
1940
  async agents() {
1619
1941
  return unwrapList3(await this.http.get("/command-center/agents"));
@@ -1624,13 +1946,13 @@ var CommandCenter = class {
1624
1946
  );
1625
1947
  }
1626
1948
  async metrics() {
1627
- return unwrap11(await this.http.get("/command-center/metrics"));
1949
+ return unwrap13(await this.http.get("/command-center/metrics"));
1628
1950
  }
1629
1951
  async presets() {
1630
1952
  return unwrapList3(await this.http.get("/command-center/presets"));
1631
1953
  }
1632
1954
  async tiers() {
1633
- return unwrap11(await this.http.get("/command-center/tiers"));
1955
+ return unwrap13(await this.http.get("/command-center/tiers"));
1634
1956
  }
1635
1957
  /** Stream live command-center events via SSE. */
1636
1958
  events() {
@@ -1639,7 +1961,7 @@ var CommandCenter = class {
1639
1961
  };
1640
1962
 
1641
1963
  // src/resources/community.ts
1642
- function unwrap12(data) {
1964
+ function unwrap14(data) {
1643
1965
  if (data && typeof data === "object") {
1644
1966
  const d = data;
1645
1967
  for (const k of ["data", "templates", "agents", "items"]) {
@@ -1671,7 +1993,7 @@ var Community = class {
1671
1993
  return unwrapList4(await this.http.get("/community/agents", query3));
1672
1994
  }
1673
1995
  async getAgent(agentId) {
1674
- return unwrap12(await this.http.get(`/community/agents/${agentId}`));
1996
+ return unwrap14(await this.http.get(`/community/agents/${agentId}`));
1675
1997
  }
1676
1998
  // ── Templates ─────────────────────────────────────────────────────────
1677
1999
  async listTemplates(filters = {}) {
@@ -1683,41 +2005,41 @@ var Community = class {
1683
2005
  );
1684
2006
  }
1685
2007
  async getTemplate(templateId) {
1686
- return unwrap12(
2008
+ return unwrap14(
1687
2009
  await this.http.get(`/community/templates/${templateId}`)
1688
2010
  );
1689
2011
  }
1690
2012
  /** Install a community template into the caller's tenant. */
1691
2013
  async installTemplate(templateId, opts = {}) {
1692
- const body4 = Object.fromEntries(
2014
+ const body5 = Object.fromEntries(
1693
2015
  Object.entries(opts).filter(([, v]) => v !== void 0)
1694
2016
  );
1695
- return unwrap12(
2017
+ return unwrap14(
1696
2018
  await this.http.post(
1697
2019
  `/community/templates/${templateId}/install`,
1698
- body4
2020
+ body5
1699
2021
  )
1700
2022
  );
1701
2023
  }
1702
2024
  /** Rate a community template (1–5). */
1703
2025
  async rateTemplate(templateId, rating, opts = {}) {
1704
- const body4 = {
2026
+ const body5 = {
1705
2027
  rating,
1706
2028
  ...Object.fromEntries(
1707
2029
  Object.entries(opts).filter(([, v]) => v !== void 0)
1708
2030
  )
1709
2031
  };
1710
- return unwrap12(
2032
+ return unwrap14(
1711
2033
  await this.http.post(
1712
2034
  `/community/templates/${templateId}/rate`,
1713
- body4
2035
+ body5
1714
2036
  )
1715
2037
  );
1716
2038
  }
1717
2039
  };
1718
2040
 
1719
2041
  // src/resources/completions.ts
1720
- function unwrap13(data) {
2042
+ function unwrap15(data) {
1721
2043
  if (data && typeof data === "object") {
1722
2044
  const d = data;
1723
2045
  if (Array.isArray(d.choices)) return d;
@@ -1736,24 +2058,24 @@ var Completions = class {
1736
2058
  }
1737
2059
  http;
1738
2060
  create(params) {
1739
- const body4 = buildBody(params);
2061
+ const body5 = buildBody(params);
1740
2062
  if (params.stream === true) {
1741
2063
  return this.http.stream(
1742
2064
  "/intelligence/completions",
1743
- { method: "POST", body: body4 }
2065
+ { method: "POST", body: body5 }
1744
2066
  );
1745
2067
  }
1746
- return this.http.post("/intelligence/completions", body4).then(unwrap13);
2068
+ return this.http.post("/intelligence/completions", body5).then(unwrap15);
1747
2069
  }
1748
2070
  chat(params) {
1749
- const body4 = buildBody(params);
2071
+ const body5 = buildBody(params);
1750
2072
  if (params.stream === true) {
1751
2073
  return this.http.stream(
1752
2074
  "/intelligence/chat/completions",
1753
- { method: "POST", body: body4 }
2075
+ { method: "POST", body: body5 }
1754
2076
  );
1755
2077
  }
1756
- return this.http.post("/intelligence/chat/completions", body4).then(unwrap13);
2078
+ return this.http.post("/intelligence/chat/completions", body5).then(unwrap15);
1757
2079
  }
1758
2080
  };
1759
2081
 
@@ -1876,7 +2198,7 @@ var Checkpoints = class {
1876
2198
  };
1877
2199
 
1878
2200
  // src/resources/computer-auto-stop.ts
1879
- function unwrap14(data) {
2201
+ function unwrap16(data) {
1880
2202
  if (data && typeof data === "object") {
1881
2203
  const d = data;
1882
2204
  if ("data" in d && Object.keys(d).length <= 2) {
@@ -1894,13 +2216,13 @@ var ComputerAutoStop = class {
1894
2216
  computerId;
1895
2217
  /** Return the current auto-stop configuration. */
1896
2218
  async get() {
1897
- return unwrap14(
2219
+ return unwrap16(
1898
2220
  await this.http.get(`/computers/${this.computerId}/auto-stop`)
1899
2221
  );
1900
2222
  }
1901
2223
  /** Set the idle timeout in seconds (0 disables auto-stop). */
1902
2224
  async update(seconds) {
1903
- return unwrap14(
2225
+ return unwrap16(
1904
2226
  await this.http.patch(
1905
2227
  `/computers/${this.computerId}/auto-stop`,
1906
2228
  { seconds }
@@ -1910,7 +2232,7 @@ var ComputerAutoStop = class {
1910
2232
  };
1911
2233
 
1912
2234
  // src/resources/computer-env.ts
1913
- function unwrap15(data) {
2235
+ function unwrap17(data) {
1914
2236
  if (data && typeof data === "object") {
1915
2237
  const d = data;
1916
2238
  if ("data" in d && Object.keys(d).length <= 2) {
@@ -1945,11 +2267,11 @@ var ComputerEnv = class {
1945
2267
  }
1946
2268
  /** Create a new env var. Use update() to change an existing one. */
1947
2269
  async set(name, value) {
1948
- return unwrap15(await this.http.post(this.base(), { name, value }));
2270
+ return unwrap17(await this.http.post(this.base(), { name, value }));
1949
2271
  }
1950
2272
  /** Patch the value of an existing env var by name. */
1951
2273
  async update(name, value) {
1952
- return unwrap15(
2274
+ return unwrap17(
1953
2275
  await this.http.patch(`${this.base()}/${name}`, { value })
1954
2276
  );
1955
2277
  }
@@ -1966,7 +2288,7 @@ var ComputerEnv = class {
1966
2288
  };
1967
2289
 
1968
2290
  // src/resources/computer-logs.ts
1969
- function unwrap16(data) {
2291
+ function unwrap18(data) {
1970
2292
  if (data && typeof data === "object") {
1971
2293
  const d = data;
1972
2294
  if ("data" in d && Object.keys(d).length <= 2) {
@@ -1987,7 +2309,7 @@ var ComputerLogs = class {
1987
2309
  const query3 = Object.fromEntries(
1988
2310
  Object.entries(params).filter(([, v]) => v !== void 0)
1989
2311
  );
1990
- return unwrap16(
2312
+ return unwrap18(
1991
2313
  await this.http.get(`/computers/${this.computerId}/logs`, query3)
1992
2314
  );
1993
2315
  }
@@ -2000,7 +2322,7 @@ var ComputerLogs = class {
2000
2322
  };
2001
2323
 
2002
2324
  // src/resources/computer-osa.ts
2003
- function unwrap17(data) {
2325
+ function unwrap19(data) {
2004
2326
  if (data && typeof data === "object") {
2005
2327
  const d = data;
2006
2328
  if ("data" in d && Object.keys(d).length <= 2) {
@@ -2018,47 +2340,47 @@ var ComputerOsa = class {
2018
2340
  computerId;
2019
2341
  /** Submit a free-form task to the in-VM OSA agent. */
2020
2342
  async submitTask(task, params = {}) {
2021
- const body4 = {
2343
+ const body5 = {
2022
2344
  task,
2023
2345
  ...Object.fromEntries(
2024
2346
  Object.entries(params).filter(([, v]) => v !== void 0)
2025
2347
  )
2026
2348
  };
2027
- return unwrap17(
2349
+ return unwrap19(
2028
2350
  await this.http.post(
2029
2351
  `/computers/${this.computerId}/osa/task`,
2030
- body4
2352
+ body5
2031
2353
  )
2032
2354
  );
2033
2355
  }
2034
2356
  /** Cancel the currently-running OSA task, if any. */
2035
2357
  async cancelTask() {
2036
- return unwrap17(
2358
+ return unwrap19(
2037
2359
  await this.http.delete(`/computers/${this.computerId}/osa/task`)
2038
2360
  );
2039
2361
  }
2040
2362
  /** Return OSA's current task / configuration / health snapshot. */
2041
2363
  async status() {
2042
- return unwrap17(
2364
+ return unwrap19(
2043
2365
  await this.http.get(`/computers/${this.computerId}/osa/status`)
2044
2366
  );
2045
2367
  }
2046
2368
  /** Update OSA runtime configuration (model, tools, secrets, etc.). */
2047
2369
  async configure(config) {
2048
- const body4 = Object.fromEntries(
2370
+ const body5 = Object.fromEntries(
2049
2371
  Object.entries(config).filter(([, v]) => v !== void 0)
2050
2372
  );
2051
- return unwrap17(
2373
+ return unwrap19(
2052
2374
  await this.http.post(
2053
2375
  `/computers/${this.computerId}/osa/configure`,
2054
- body4
2376
+ body5
2055
2377
  )
2056
2378
  );
2057
2379
  }
2058
2380
  };
2059
2381
 
2060
2382
  // src/resources/computer-ports.ts
2061
- function unwrap18(data) {
2383
+ function unwrap20(data) {
2062
2384
  if (data && typeof data === "object") {
2063
2385
  const d = data;
2064
2386
  if ("data" in d && Object.keys(d).length <= 2) {
@@ -2097,21 +2419,21 @@ var ComputerPorts = class {
2097
2419
  }
2098
2420
  /** Expose port with the given visibility options. */
2099
2421
  async create(port, opts = {}) {
2100
- const body4 = {
2422
+ const body5 = {
2101
2423
  port,
2102
2424
  ...Object.fromEntries(
2103
2425
  Object.entries(opts).filter(([, v]) => v !== void 0)
2104
2426
  )
2105
2427
  };
2106
- return unwrap18(await this.http.post(this.base(), body4));
2428
+ return unwrap20(await this.http.post(this.base(), body5));
2107
2429
  }
2108
2430
  /** Patch visibility / auth options for port. */
2109
2431
  async update(port, opts) {
2110
- const body4 = Object.fromEntries(
2432
+ const body5 = Object.fromEntries(
2111
2433
  Object.entries(opts).filter(([, v]) => v !== void 0)
2112
2434
  );
2113
- return unwrap18(
2114
- await this.http.patch(`${this.base()}/${port}`, body4)
2435
+ return unwrap20(
2436
+ await this.http.patch(`${this.base()}/${port}`, body5)
2115
2437
  );
2116
2438
  }
2117
2439
  /** Stop exposing port. */
@@ -2130,14 +2452,14 @@ var ComputerTerminal = class {
2130
2452
  computerId;
2131
2453
  /** Open a new PTY session. Returns the server payload (session id, etc.). */
2132
2454
  async create(params = {}) {
2133
- const body4 = Object.fromEntries(
2455
+ const body5 = Object.fromEntries(
2134
2456
  Object.entries(params).filter(([, v]) => v !== void 0)
2135
2457
  );
2136
2458
  const raw = await this.http.post(
2137
2459
  `/computers/${this.computerId}/terminal`,
2138
- body4
2460
+ body5
2139
2461
  );
2140
- return unwrap19(raw);
2462
+ return unwrap21(raw);
2141
2463
  }
2142
2464
  /** Resize an existing PTY session. */
2143
2465
  async resize(sessionId, cols, rows) {
@@ -2145,10 +2467,10 @@ var ComputerTerminal = class {
2145
2467
  `/computers/${this.computerId}/pty/${sessionId}/resize`,
2146
2468
  { cols, rows }
2147
2469
  );
2148
- return unwrap19(raw);
2470
+ return unwrap21(raw);
2149
2471
  }
2150
2472
  };
2151
- function unwrap19(data) {
2473
+ function unwrap21(data) {
2152
2474
  if (data && typeof data === "object") {
2153
2475
  const d = data;
2154
2476
  if ("data" in d && Object.keys(d).length <= 2) {
@@ -2159,7 +2481,7 @@ function unwrap19(data) {
2159
2481
  }
2160
2482
 
2161
2483
  // src/resources/computer-volumes.ts
2162
- function unwrap20(data) {
2484
+ function unwrap22(data) {
2163
2485
  if (data && typeof data === "object") {
2164
2486
  const d = data;
2165
2487
  if ("data" in d && Object.keys(d).length <= 2) {
@@ -2193,7 +2515,7 @@ var ComputerVolumes = class {
2193
2515
  }
2194
2516
  /** Attach volumeId at mountPath inside the VM. */
2195
2517
  async attach(volumeId, mountPath) {
2196
- return unwrap20(
2518
+ return unwrap22(
2197
2519
  await this.http.post(this.base(), {
2198
2520
  volume_id: volumeId,
2199
2521
  mount_path: mountPath
@@ -2207,7 +2529,7 @@ var ComputerVolumes = class {
2207
2529
  };
2208
2530
 
2209
2531
  // src/resources/connectors.ts
2210
- function unwrap21(payload) {
2532
+ function unwrap23(payload) {
2211
2533
  if (payload && typeof payload === "object") {
2212
2534
  const p = payload;
2213
2535
  for (const key of ["data", "binding"]) {
@@ -2226,7 +2548,7 @@ function unwrapList8(payload) {
2226
2548
  }
2227
2549
  return [];
2228
2550
  }
2229
- function stripUndefined8(input) {
2551
+ function stripUndefined10(input) {
2230
2552
  return Object.fromEntries(
2231
2553
  Object.entries(input).filter(([, value]) => value !== void 0)
2232
2554
  );
@@ -2249,7 +2571,7 @@ function externalAttributionParams(params = {}) {
2249
2571
  };
2250
2572
  }
2251
2573
  function queryFromListParams(params) {
2252
- return stripUndefined8({
2574
+ return stripUndefined10({
2253
2575
  scope: params.scope,
2254
2576
  workspace_id: pickFirst(params.workspaceId, params.workspace_id),
2255
2577
  owner_user_id: pickFirst(params.ownerUserId, params.owner_user_id),
@@ -2265,7 +2587,7 @@ function bodyFromCreateParams(provider, params) {
2265
2587
  params.api_key,
2266
2588
  credential?.value
2267
2589
  );
2268
- return stripUndefined8({
2590
+ return stripUndefined10({
2269
2591
  provider,
2270
2592
  type: String(params.type ?? "api_key").replaceAll("-", "_"),
2271
2593
  name: params.name,
@@ -2286,7 +2608,7 @@ function bodyFromCreateParams(provider, params) {
2286
2608
  });
2287
2609
  }
2288
2610
  function tokenBody(params = {}) {
2289
- return stripUndefined8({
2611
+ return stripUndefined10({
2290
2612
  subject: params.subject ?? { type: "app" },
2291
2613
  installation_id: pickFirst(params.installationId, params.installation_id),
2292
2614
  project_id: pickFirst(params.projectId, params.project_id),
@@ -2303,7 +2625,7 @@ function tokenBody(params = {}) {
2303
2625
  });
2304
2626
  }
2305
2627
  function queryFromLinkParams(params = {}) {
2306
- return stripUndefined8({
2628
+ return stripUndefined10({
2307
2629
  workspace_id: pickFirst(params.workspaceId, params.workspace_id),
2308
2630
  project_id: pickFirst(params.projectId, params.project_id),
2309
2631
  connector_id: pickFirst(params.connectorId, params.connector_id),
@@ -2313,14 +2635,14 @@ function queryFromLinkParams(params = {}) {
2313
2635
  });
2314
2636
  }
2315
2637
  function queryFromDefaultParams(params = {}) {
2316
- return stripUndefined8({
2638
+ return stripUndefined10({
2317
2639
  ...queryFromLinkParams(params),
2318
2640
  default_scope: pickFirst(params.defaultScope, params.default_scope),
2319
2641
  target: params.target
2320
2642
  });
2321
2643
  }
2322
2644
  function queryFromApplicableDefaultParams(params = {}) {
2323
- return stripUndefined8({
2645
+ return stripUndefined10({
2324
2646
  workspace_id: pickFirst(params.workspaceId, params.workspace_id),
2325
2647
  project_id: pickFirst(params.projectId, params.project_id),
2326
2648
  environment: params.environment,
@@ -2331,7 +2653,7 @@ function queryFromApplicableDefaultParams(params = {}) {
2331
2653
  });
2332
2654
  }
2333
2655
  function materializeDefaultsBody(params = {}) {
2334
- return stripUndefined8({
2656
+ return stripUndefined10({
2335
2657
  workspace_id: pickFirst(params.workspaceId, params.workspace_id),
2336
2658
  project_id: pickFirst(params.projectId, params.project_id),
2337
2659
  environment: params.environment,
@@ -2343,7 +2665,7 @@ function materializeDefaultsBody(params = {}) {
2343
2665
  });
2344
2666
  }
2345
2667
  function projectLinkBody(params) {
2346
- return stripUndefined8({
2668
+ return stripUndefined10({
2347
2669
  connector: params.connector,
2348
2670
  connector_id: pickFirst(params.connectorId, params.connector_id),
2349
2671
  installation_id: pickFirst(params.installationId, params.installation_id),
@@ -2364,14 +2686,14 @@ function projectLinkBody(params) {
2364
2686
  });
2365
2687
  }
2366
2688
  function defaultBody(params) {
2367
- return stripUndefined8({
2689
+ return stripUndefined10({
2368
2690
  ...projectLinkBody(params),
2369
2691
  default_scope: pickFirst(params.defaultScope, params.default_scope),
2370
2692
  target: params.target
2371
2693
  });
2372
2694
  }
2373
2695
  function triggerBody(params) {
2374
- return stripUndefined8({
2696
+ return stripUndefined10({
2375
2697
  connector: params.connector,
2376
2698
  connector_id: pickFirst(params.connectorId, params.connector_id),
2377
2699
  workspace_id: pickFirst(params.workspaceId, params.workspace_id),
@@ -2391,7 +2713,7 @@ function triggerBody(params) {
2391
2713
  });
2392
2714
  }
2393
2715
  function queryFromTriggerDeliveryParams(params = {}) {
2394
- return stripUndefined8({
2716
+ return stripUndefined10({
2395
2717
  ...queryFromLinkParams(params),
2396
2718
  trigger_id: pickFirst(params.triggerId, params.trigger_id),
2397
2719
  event_type: pickFirst(params.eventType, params.event_type)
@@ -2418,7 +2740,7 @@ var Connectors = class {
2418
2740
  const data = await this.http.get(
2419
2741
  `/connect/connectors/${connectorPath(connector)}`
2420
2742
  );
2421
- return unwrap21(data);
2743
+ return unwrap23(data);
2422
2744
  }
2423
2745
  show(connector) {
2424
2746
  return this.get(connector);
@@ -2429,7 +2751,7 @@ var Connectors = class {
2429
2751
  "/connect/connectors",
2430
2752
  bodyFromCreateParams(provider, params)
2431
2753
  );
2432
- return unwrap21(data);
2754
+ return unwrap23(data);
2433
2755
  }
2434
2756
  /** Request a runtime provider token for a connector. */
2435
2757
  async getToken(connector, params = {}) {
@@ -2437,7 +2759,7 @@ var Connectors = class {
2437
2759
  `/connect/token/${connectorPath(connector)}`,
2438
2760
  tokenBody(params)
2439
2761
  );
2440
- return unwrap21(data);
2762
+ return unwrap23(data);
2441
2763
  }
2442
2764
  token(connector, params = {}) {
2443
2765
  return this.getToken(connector, params);
@@ -2451,7 +2773,7 @@ var Connectors = class {
2451
2773
  async startOauth(params) {
2452
2774
  const data = await this.http.post(
2453
2775
  "/connect/oauth/start",
2454
- stripUndefined8({
2776
+ stripUndefined10({
2455
2777
  provider: params.provider,
2456
2778
  scope: params.scope,
2457
2779
  expose_as_env: pickFirst(params.exposeAsEnv, params.expose_as_env),
@@ -2459,7 +2781,7 @@ var Connectors = class {
2459
2781
  ...externalAttributionParams(params)
2460
2782
  })
2461
2783
  );
2462
- return unwrap21(data);
2784
+ return unwrap23(data);
2463
2785
  }
2464
2786
  /** List connector installations/grants. */
2465
2787
  async installations(params = {}) {
@@ -2499,7 +2821,7 @@ var Connectors = class {
2499
2821
  "/connect/defaults/materialize",
2500
2822
  materializeDefaultsBody(params)
2501
2823
  );
2502
- return unwrap21(data);
2824
+ return unwrap23(data);
2503
2825
  }
2504
2826
  /** Create an inherited connector default for future runtime resources. */
2505
2827
  async createDefault(params) {
@@ -2507,7 +2829,7 @@ var Connectors = class {
2507
2829
  "/connect/defaults",
2508
2830
  defaultBody(params)
2509
2831
  );
2510
- return unwrap21(data);
2832
+ return unwrap23(data);
2511
2833
  }
2512
2834
  /** Delete an inherited connector default. */
2513
2835
  async deleteDefault(id) {
@@ -2527,7 +2849,7 @@ var Connectors = class {
2527
2849
  "/connect/triggers",
2528
2850
  triggerBody(params)
2529
2851
  );
2530
- return unwrap21(data);
2852
+ return unwrap23(data);
2531
2853
  }
2532
2854
  /** List inbound provider trigger delivery attempts. */
2533
2855
  async triggerDeliveries(params = {}) {
@@ -2554,7 +2876,7 @@ var Connectors = class {
2554
2876
  "/connect/project-links",
2555
2877
  projectLinkBody(params)
2556
2878
  );
2557
- return unwrap21(data);
2879
+ return unwrap23(data);
2558
2880
  }
2559
2881
  /** Delete a project connector link. */
2560
2882
  async deleteProjectLink(id) {
@@ -2577,7 +2899,7 @@ var RuntimeConnectors = class {
2577
2899
  async attach(params) {
2578
2900
  const data = await this.http.post(
2579
2901
  this.basePath,
2580
- stripUndefined8({
2902
+ stripUndefined10({
2581
2903
  connector: params.connector,
2582
2904
  env_name: params.env,
2583
2905
  mode: params.mode?.replaceAll("-", "_"),
@@ -2590,7 +2912,7 @@ var RuntimeConnectors = class {
2590
2912
  ...externalAttributionParams(params)
2591
2913
  })
2592
2914
  );
2593
- return unwrap21(data);
2915
+ return unwrap23(data);
2594
2916
  }
2595
2917
  /** Detach a connector binding by binding id or connector UID. */
2596
2918
  async detach(bindingOrConnector) {
@@ -2599,15 +2921,15 @@ var RuntimeConnectors = class {
2599
2921
  /** Sync or materialize connector placeholder env vars for this runtime resource. */
2600
2922
  async sync() {
2601
2923
  const data = await this.http.post(`${this.basePath}/sync`, {});
2602
- return unwrap21(data);
2924
+ return unwrap23(data);
2603
2925
  }
2604
2926
  /** Verify a required connector is attached before agent work begins. */
2605
2927
  async preflight(params = {}) {
2606
2928
  const data = await this.http.post(
2607
2929
  `${this.basePath}/preflight`,
2608
- stripUndefined8(params)
2930
+ stripUndefined10(params)
2609
2931
  );
2610
- return unwrap21(data);
2932
+ return unwrap23(data);
2611
2933
  }
2612
2934
  };
2613
2935
  var SandboxConnectors = class extends RuntimeConnectors {
@@ -2716,6 +3038,18 @@ var Desktop = class {
2716
3038
  button
2717
3039
  });
2718
3040
  }
3041
+ /** Explicit left-button click. Alias for click(x, y, "left"). */
3042
+ async leftClick(x, y) {
3043
+ return this.click(x, y, "left");
3044
+ }
3045
+ /** Right-button click. Alias for click(x, y, "right"). */
3046
+ async rightClick(x, y) {
3047
+ return this.click(x, y, "right");
3048
+ }
3049
+ /** Middle-button click. Alias for click(x, y, "middle"). */
3050
+ async middleClick(x, y) {
3051
+ return this.click(x, y, "middle");
3052
+ }
2719
3053
  /** Double-click at the given coordinates. */
2720
3054
  async doubleClick(x, y) {
2721
3055
  const params = { x, y };
@@ -2724,16 +3058,28 @@ var Desktop = class {
2724
3058
  params
2725
3059
  );
2726
3060
  }
3061
+ /** Move the mouse pointer without clicking. */
3062
+ async moveMouse(x, y) {
3063
+ return this.http.post(`${this.base()}/move`, { x, y });
3064
+ }
2727
3065
  /** Type text into the currently focused element. */
2728
3066
  async type(text, delay) {
2729
3067
  const params = { text, ...delay !== void 0 && { delay } };
2730
3068
  return this.http.post(`${this.base()}/type`, params);
2731
3069
  }
3070
+ /** Alias for `type(text)` used by simple computer-control loops. */
3071
+ async write(text, delay) {
3072
+ return this.type(text, delay);
3073
+ }
2732
3074
  /** Send a key or key combination (e.g. "Enter", "ctrl+c"). */
2733
3075
  async key(key) {
2734
3076
  const params = { key };
2735
3077
  return this.http.post(`${this.base()}/key`, params);
2736
3078
  }
3079
+ /** Alias for `key(key)` used by simple computer-control loops. */
3080
+ async press(key) {
3081
+ return this.key(key);
3082
+ }
2737
3083
  /** Scroll in a direction at an optional position. */
2738
3084
  async scroll(direction, clicks = 3, x, y) {
2739
3085
  const params = {
@@ -2786,7 +3132,7 @@ var Desktop = class {
2786
3132
  };
2787
3133
 
2788
3134
  // src/resources/egressAudit.ts
2789
- function unwrap22(payload) {
3135
+ function unwrap24(payload) {
2790
3136
  if (payload && typeof payload === "object") {
2791
3137
  const p = payload;
2792
3138
  for (const k of ["data", "event", "items"]) {
@@ -2805,7 +3151,7 @@ function unwrapList9(payload) {
2805
3151
  }
2806
3152
  return [];
2807
3153
  }
2808
- function stripUndefined9(input) {
3154
+ function stripUndefined11(input) {
2809
3155
  return Object.fromEntries(
2810
3156
  Object.entries(input).filter(([, v]) => v !== void 0)
2811
3157
  );
@@ -2815,7 +3161,7 @@ function pickFirst2(...values) {
2815
3161
  return void 0;
2816
3162
  }
2817
3163
  function listQuery(params) {
2818
- return stripUndefined9({
3164
+ return stripUndefined11({
2819
3165
  resource_id: pickFirst2(params.resourceId, params.resource_id),
2820
3166
  resource_type: pickFirst2(params.resourceType, params.resource_type),
2821
3167
  host: params.host,
@@ -2831,7 +3177,7 @@ function listQuery(params) {
2831
3177
  )
2832
3178
  });
2833
3179
  }
2834
- function sleep4(ms) {
3180
+ function sleep6(ms) {
2835
3181
  return new Promise((resolve) => setTimeout(resolve, ms));
2836
3182
  }
2837
3183
  var EgressAudit = class {
@@ -2852,7 +3198,7 @@ var EgressAudit = class {
2852
3198
  const data = await this.http.get(
2853
3199
  `/egress/audit/${id}`
2854
3200
  );
2855
- return unwrap22(data);
3201
+ return unwrap24(data);
2856
3202
  }
2857
3203
  /**
2858
3204
  * Long-poll the audit endpoint and yield new events as they appear.
@@ -2880,7 +3226,7 @@ var EgressAudit = class {
2880
3226
  const ts = event.inserted_at ?? event.timestamp;
2881
3227
  if (typeof ts === "string") since = ts;
2882
3228
  }
2883
- await sleep4(pollMs);
3229
+ await sleep6(pollMs);
2884
3230
  }
2885
3231
  }
2886
3232
  };
@@ -2928,7 +3274,7 @@ var ComputerAudit = class extends SandboxAudit {
2928
3274
  };
2929
3275
 
2930
3276
  // src/resources/egressNetwork.ts
2931
- function unwrap23(payload) {
3277
+ function unwrap25(payload) {
2932
3278
  if (payload && typeof payload === "object") {
2933
3279
  const p = payload;
2934
3280
  for (const k of ["data", "policy", "rule", "items"]) {
@@ -2954,7 +3300,7 @@ function unwrapList10(payload) {
2954
3300
  }
2955
3301
  return [];
2956
3302
  }
2957
- function stripUndefined10(input) {
3303
+ function stripUndefined12(input) {
2958
3304
  return Object.fromEntries(
2959
3305
  Object.entries(input).filter(([, v]) => v !== void 0)
2960
3306
  );
@@ -2964,7 +3310,7 @@ function pickFirst3(...values) {
2964
3310
  return void 0;
2965
3311
  }
2966
3312
  function ruleBody(host, params, effect) {
2967
- return stripUndefined10({
3313
+ return stripUndefined12({
2968
3314
  host,
2969
3315
  effect,
2970
3316
  methods: params.methods,
@@ -2987,7 +3333,7 @@ var EgressNetwork = class {
2987
3333
  "/egress/allowlist",
2988
3334
  ruleBody(host, params, "allow")
2989
3335
  );
2990
- return unwrap23(data);
3336
+ return unwrap25(data);
2991
3337
  }
2992
3338
  /** Add a `deny` rule for `host` to the allowlist. */
2993
3339
  async deny(host, params = {}) {
@@ -2995,11 +3341,11 @@ var EgressNetwork = class {
2995
3341
  "/egress/allowlist",
2996
3342
  ruleBody(host, params, "deny")
2997
3343
  );
2998
- return unwrap23(data);
3344
+ return unwrap25(data);
2999
3345
  }
3000
3346
  /** List allowlist rules. */
3001
3347
  async rules(params = {}) {
3002
- const query3 = stripUndefined10({
3348
+ const query3 = stripUndefined12({
3003
3349
  policy_id: pickFirst3(params.policyId, params.policy_id),
3004
3350
  resource_id: pickFirst3(params.resourceId, params.resource_id),
3005
3351
  resource_type: pickFirst3(params.resourceType, params.resource_type)
@@ -3014,7 +3360,7 @@ var EgressNetwork = class {
3014
3360
  // ── policies ──────────────────────────────────────────────────────────────
3015
3361
  /** List egress policies. */
3016
3362
  async policies(params = {}) {
3017
- const query3 = stripUndefined10({
3363
+ const query3 = stripUndefined12({
3018
3364
  resource_id: pickFirst3(params.resourceId, params.resource_id),
3019
3365
  resource_type: pickFirst3(params.resourceType, params.resource_type)
3020
3366
  });
@@ -3023,7 +3369,7 @@ var EgressNetwork = class {
3023
3369
  }
3024
3370
  /** Create an egress policy. */
3025
3371
  async createPolicy(params) {
3026
- const body4 = stripUndefined10({
3372
+ const body5 = stripUndefined12({
3027
3373
  name: params.name,
3028
3374
  mode: params.mode ?? "enforce",
3029
3375
  default_effect: pickFirst3(
@@ -3037,13 +3383,13 @@ var EgressNetwork = class {
3037
3383
  });
3038
3384
  const data = await this.http.post(
3039
3385
  "/egress/policies",
3040
- body4
3386
+ body5
3041
3387
  );
3042
- return unwrap23(data);
3388
+ return unwrap25(data);
3043
3389
  }
3044
3390
  /** Update an egress policy by id. */
3045
3391
  async updatePolicy(policyId, params) {
3046
- const body4 = stripUndefined10({
3392
+ const body5 = stripUndefined12({
3047
3393
  mode: params.mode,
3048
3394
  default_effect: pickFirst3(params.defaultEffect, params.default_effect),
3049
3395
  name: params.name,
@@ -3051,9 +3397,9 @@ var EgressNetwork = class {
3051
3397
  });
3052
3398
  const data = await this.http.patch(
3053
3399
  `/egress/policies/${policyId}`,
3054
- body4
3400
+ body5
3055
3401
  );
3056
- return unwrap23(data);
3402
+ return unwrap25(data);
3057
3403
  }
3058
3404
  // ── mode helpers ──────────────────────────────────────────────────────────
3059
3405
  /** Set the policy to `mode="enforce"` — denied egress is blocked. */
@@ -3071,21 +3417,21 @@ var EgressNetwork = class {
3071
3417
  if (policyId) {
3072
3418
  return this.updatePolicy(policyId, { mode });
3073
3419
  }
3074
- const body4 = resourceId !== void 0 && resourceType !== void 0 ? stripUndefined10({
3420
+ const body5 = resourceId !== void 0 && resourceType !== void 0 ? stripUndefined12({
3075
3421
  mode,
3076
3422
  resource_id: resourceId,
3077
3423
  resource_type: resourceType
3078
3424
  }) : { mode };
3079
3425
  const data = await this.http.patch(
3080
3426
  "/egress/policies",
3081
- body4
3427
+ body5
3082
3428
  );
3083
- return unwrap23(data);
3429
+ return unwrap25(data);
3084
3430
  }
3085
3431
  // ── suggestions ───────────────────────────────────────────────────────────
3086
3432
  /** AI-generated allowlist suggestions from recent denied egress. */
3087
3433
  async suggestions(params = {}) {
3088
- const query3 = stripUndefined10({
3434
+ const query3 = stripUndefined12({
3089
3435
  resource_id: pickFirst3(params.resourceId, params.resource_id),
3090
3436
  resource_type: pickFirst3(params.resourceType, params.resource_type),
3091
3437
  since: params.since ?? "7d"
@@ -3136,28 +3482,28 @@ var SandboxNetwork = class {
3136
3482
  return this.delegate.removeRule(ruleId);
3137
3483
  }
3138
3484
  lockdown(params = {}) {
3139
- const body4 = {
3485
+ const body5 = {
3140
3486
  resource_id: this.resourceId,
3141
3487
  resource_type: this.resourceType
3142
3488
  };
3143
- if (params.policyId !== void 0) body4.policyId = params.policyId;
3144
- return this.delegate.lockdown(body4);
3489
+ if (params.policyId !== void 0) body5.policyId = params.policyId;
3490
+ return this.delegate.lockdown(body5);
3145
3491
  }
3146
3492
  observe(params = {}) {
3147
- const body4 = {
3493
+ const body5 = {
3148
3494
  resource_id: this.resourceId,
3149
3495
  resource_type: this.resourceType
3150
3496
  };
3151
- if (params.policyId !== void 0) body4.policyId = params.policyId;
3152
- return this.delegate.observe(body4);
3497
+ if (params.policyId !== void 0) body5.policyId = params.policyId;
3498
+ return this.delegate.observe(body5);
3153
3499
  }
3154
3500
  suggestions(params = {}) {
3155
- const body4 = {
3501
+ const body5 = {
3156
3502
  resource_id: this.resourceId,
3157
3503
  resource_type: this.resourceType
3158
3504
  };
3159
- if (params.since !== void 0) body4.since = params.since;
3160
- return this.delegate.suggestions(body4);
3505
+ if (params.since !== void 0) body5.since = params.since;
3506
+ return this.delegate.suggestions(body5);
3161
3507
  }
3162
3508
  policies() {
3163
3509
  return this.delegate.policies({
@@ -3171,7 +3517,7 @@ var ComputerNetwork = class extends SandboxNetwork {
3171
3517
  };
3172
3518
 
3173
3519
  // src/resources/egressSecrets.ts
3174
- function unwrap24(payload) {
3520
+ function unwrap26(payload) {
3175
3521
  if (payload && typeof payload === "object") {
3176
3522
  const p = payload;
3177
3523
  for (const k of ["data", "secret", "binding", "items"]) {
@@ -3190,7 +3536,7 @@ function unwrapList11(payload) {
3190
3536
  }
3191
3537
  return [];
3192
3538
  }
3193
- function stripUndefined11(input) {
3539
+ function stripUndefined13(input) {
3194
3540
  return Object.fromEntries(
3195
3541
  Object.entries(input).filter(([, v]) => v !== void 0)
3196
3542
  );
@@ -3200,7 +3546,7 @@ function pickFirst4(...values) {
3200
3546
  return void 0;
3201
3547
  }
3202
3548
  function setBody(params) {
3203
- return stripUndefined11({
3549
+ return stripUndefined13({
3204
3550
  name: params.name,
3205
3551
  value: params.value,
3206
3552
  type: params.type ?? "api_key",
@@ -3221,7 +3567,7 @@ function setBody(params) {
3221
3567
  });
3222
3568
  }
3223
3569
  function listQuery2(params) {
3224
- return stripUndefined11({
3570
+ return stripUndefined13({
3225
3571
  scope: params.scope,
3226
3572
  type: params.type,
3227
3573
  workspace_id: pickFirst4(params.workspaceId, params.workspace_id),
@@ -3236,14 +3582,14 @@ function listQuery2(params) {
3236
3582
  });
3237
3583
  }
3238
3584
  function rotateBody(params) {
3239
- return stripUndefined11({
3585
+ return stripUndefined13({
3240
3586
  value: pickFirst4(params.newValue, params.new_value, params.value),
3241
3587
  refresh_token: pickFirst4(params.refreshToken, params.refresh_token),
3242
3588
  expires_at: pickFirst4(params.expiresAt, params.expires_at)
3243
3589
  });
3244
3590
  }
3245
3591
  function bindingBody(params) {
3246
- return stripUndefined11({
3592
+ return stripUndefined13({
3247
3593
  secret_id: pickFirst4(params.secretId, params.secret_id),
3248
3594
  resource_id: pickFirst4(params.resourceId, params.resource_id),
3249
3595
  resource_type: pickFirst4(params.resourceType, params.resource_type),
@@ -3251,14 +3597,14 @@ function bindingBody(params) {
3251
3597
  });
3252
3598
  }
3253
3599
  function bindingQuery(params) {
3254
- return stripUndefined11({
3600
+ return stripUndefined13({
3255
3601
  resource_id: pickFirst4(params.resourceId, params.resource_id),
3256
3602
  resource_type: pickFirst4(params.resourceType, params.resource_type),
3257
3603
  secret_id: pickFirst4(params.secretId, params.secret_id)
3258
3604
  });
3259
3605
  }
3260
3606
  function oauthBody(params) {
3261
- return stripUndefined11({
3607
+ return stripUndefined13({
3262
3608
  provider: params.provider,
3263
3609
  expose_as_env: pickFirst4(params.exposeAsEnv, params.expose_as_env),
3264
3610
  scope: params.scope,
@@ -3273,7 +3619,7 @@ function oauthBody(params) {
3273
3619
  redirect_uri: pickFirst4(params.redirectUri, params.redirect_uri)
3274
3620
  });
3275
3621
  }
3276
- function sleep5(ms) {
3622
+ function sleep7(ms) {
3277
3623
  return new Promise((resolve) => setTimeout(resolve, ms));
3278
3624
  }
3279
3625
  var OAuthFlow = class {
@@ -3307,7 +3653,7 @@ var OAuthFlow = class {
3307
3653
  const data = await this.http.get("/egress/oauth/status", {
3308
3654
  state: this.state
3309
3655
  });
3310
- const payload = unwrap24(data) ?? {};
3656
+ const payload = unwrap26(data) ?? {};
3311
3657
  const status = payload.status;
3312
3658
  if (status === "completed" || status === "ready" || status === "succeeded") {
3313
3659
  return payload;
@@ -3317,7 +3663,7 @@ var OAuthFlow = class {
3317
3663
  `OAuth flow ${this.state} ended in status=${status}: ${payload.error ?? payload.message ?? "no detail"}`
3318
3664
  );
3319
3665
  }
3320
- await sleep5(pollMs);
3666
+ await sleep7(pollMs);
3321
3667
  }
3322
3668
  throw new Error(
3323
3669
  `OAuth flow ${this.state} did not complete within ${timeoutSec}s`
@@ -3339,7 +3685,7 @@ var EgressSecrets = class {
3339
3685
  "/egress/secrets",
3340
3686
  setBody(params)
3341
3687
  );
3342
- return unwrap24(data);
3688
+ return unwrap26(data);
3343
3689
  }
3344
3690
  /** List secrets. */
3345
3691
  async list(params = {}) {
@@ -3354,16 +3700,16 @@ var EgressSecrets = class {
3354
3700
  const data = await this.http.get(
3355
3701
  `/egress/secrets/${id}`
3356
3702
  );
3357
- return unwrap24(data);
3703
+ return unwrap26(data);
3358
3704
  }
3359
3705
  /** Rotate the secret's value. */
3360
3706
  async rotate(id, params) {
3361
- const body4 = typeof params === "string" ? rotateBody({ newValue: params }) : rotateBody(params);
3707
+ const body5 = typeof params === "string" ? rotateBody({ newValue: params }) : rotateBody(params);
3362
3708
  const data = await this.http.patch(
3363
3709
  `/egress/secrets/${id}`,
3364
- body4
3710
+ body5
3365
3711
  );
3366
- return unwrap24(data);
3712
+ return unwrap26(data);
3367
3713
  }
3368
3714
  /** Delete a secret. */
3369
3715
  async delete(id) {
@@ -3376,7 +3722,7 @@ var EgressSecrets = class {
3376
3722
  "/egress/bindings",
3377
3723
  bindingBody(params)
3378
3724
  );
3379
- return unwrap24(data);
3725
+ return unwrap26(data);
3380
3726
  }
3381
3727
  /** List secret bindings. */
3382
3728
  async listBindings(params = {}) {
@@ -3409,7 +3755,7 @@ var EgressSecrets = class {
3409
3755
  "/egress/oauth/start",
3410
3756
  oauthBody(params)
3411
3757
  );
3412
- const payload = unwrap24(data) ?? {};
3758
+ const payload = unwrap26(data) ?? {};
3413
3759
  return new OAuthFlow(this.http, payload, params.provider);
3414
3760
  }
3415
3761
  };
@@ -3973,12 +4319,12 @@ var ComputerInbox = class {
3973
4319
  return unwrapData(raw);
3974
4320
  }
3975
4321
  async update(fields) {
3976
- const body4 = Object.fromEntries(
4322
+ const body5 = Object.fromEntries(
3977
4323
  Object.entries(fields).filter(([, v]) => v !== void 0)
3978
4324
  );
3979
4325
  const raw = await this.http.patch(
3980
4326
  `/computers/${this.computerId}/inbox`,
3981
- body4
4327
+ body5
3982
4328
  );
3983
4329
  return unwrapData(raw);
3984
4330
  }
@@ -4151,6 +4497,21 @@ var Computer = class _Computer {
4151
4497
  wait: options.wait ?? true
4152
4498
  });
4153
4499
  }
4500
+ /**
4501
+ * Dispatch a prompt into this Computer through the Agent Runs API.
4502
+ */
4503
+ async prompt(prompt, options = {}) {
4504
+ return new AgentRuns(this.http).run({
4505
+ ...options,
4506
+ prompt,
4507
+ targetKind: "computer",
4508
+ targetId: this.id,
4509
+ computerId: this.id,
4510
+ provider: options.provider ?? "claude",
4511
+ cwd: options.cwd ?? "/workspace",
4512
+ wait: options.wait ?? true
4513
+ });
4514
+ }
4154
4515
  // ─── Desktop shortcuts ─────────────────────────────────────────────────────
4155
4516
  /**
4156
4517
  * Capture a desktop screenshot as PNG bytes.
@@ -4190,6 +4551,14 @@ var Computer = class _Computer {
4190
4551
  async doubleClick(x, y) {
4191
4552
  await this.desktop.doubleClick(x, y);
4192
4553
  }
4554
+ /** Middle-button click. */
4555
+ async middleClick(x, y) {
4556
+ await this.desktop.click(x, y, "middle");
4557
+ }
4558
+ /** Move the pointer without clicking. */
4559
+ async moveMouse(x, y) {
4560
+ await this.desktop.moveMouse(x, y);
4561
+ }
4193
4562
  /**
4194
4563
  * Type text into the focused element.
4195
4564
  * Shortcut for `computer.desktop.type(text)`.
@@ -4197,6 +4566,10 @@ var Computer = class _Computer {
4197
4566
  async type(text) {
4198
4567
  await this.desktop.type(text);
4199
4568
  }
4569
+ /** Alias for `type(text)`. */
4570
+ async write(text) {
4571
+ await this.desktop.write(text);
4572
+ }
4200
4573
  /**
4201
4574
  * Send a key or key combo.
4202
4575
  * Shortcut for `computer.desktop.key(key)`.
@@ -4204,6 +4577,10 @@ var Computer = class _Computer {
4204
4577
  async key(key) {
4205
4578
  await this.desktop.key(key);
4206
4579
  }
4580
+ /** Alias for `key(key)`. */
4581
+ async press(key) {
4582
+ await this.desktop.press(key);
4583
+ }
4207
4584
  /**
4208
4585
  * Scroll in a direction.
4209
4586
  * Shortcut for `computer.desktop.scroll(direction, clicks)`.
@@ -4319,14 +4696,25 @@ var Computer = class _Computer {
4319
4696
  await this.http.post(`/computers/${this.id}/stream-token`)
4320
4697
  );
4321
4698
  }
4699
+ /**
4700
+ * Mint a passwordless browser embed URL for authenticated platform sessions.
4701
+ *
4702
+ * Use this inside MIOSA or tenant apps. Raw shared desktop URLs can still use
4703
+ * the viewer password flow when opened outside an authenticated platform.
4704
+ */
4705
+ async embed() {
4706
+ return unwrapData(
4707
+ await this.http.get(`/computers/${this.id}/embed`)
4708
+ );
4709
+ }
4322
4710
  /** Clone this computer into a new one. */
4323
4711
  async clone(opts = {}) {
4324
- const body4 = Object.fromEntries(
4712
+ const body5 = Object.fromEntries(
4325
4713
  Object.entries(opts).filter(([, v]) => v !== void 0)
4326
4714
  );
4327
4715
  const raw = await this.http.post(
4328
4716
  `/computers/${this.id}/clone`,
4329
- body4
4717
+ body5
4330
4718
  );
4331
4719
  const data = unwrapData(raw);
4332
4720
  return new _Computer(this.http, data);
@@ -4342,12 +4730,12 @@ var Computer = class _Computer {
4342
4730
  }
4343
4731
  /** Move the computer to a different region or host. */
4344
4732
  async move(opts) {
4345
- const body4 = Object.fromEntries(
4733
+ const body5 = Object.fromEntries(
4346
4734
  Object.entries(opts).filter(([, v]) => v !== void 0)
4347
4735
  );
4348
4736
  const updated = await this.http.post(
4349
4737
  `/computers/${this.id}/move`,
4350
- body4
4738
+ body5
4351
4739
  );
4352
4740
  this.data = updated;
4353
4741
  return this;
@@ -4430,12 +4818,12 @@ var Computers = class {
4430
4818
  agentProfileId,
4431
4819
  skipAgentRuntimeProfile,
4432
4820
  skipRuntimeProfile,
4433
- ...body4
4821
+ ...body5
4434
4822
  } = params;
4435
4823
  const data = await this.http.post("/computers", {
4436
4824
  template_type: "miosa-desktop",
4437
- ...body4,
4438
- size: normalizeComputerSize(body4.size ?? "small"),
4825
+ ...body5,
4826
+ size: normalizeComputerSize(body5.size ?? "small"),
4439
4827
  agent_runtime_profile_id: agentRuntimeProfileId ?? params.agent_runtime_profile_id ?? agentProfileId ?? params.agent_profile_id,
4440
4828
  skip_agent_runtime_profile: skipAgentRuntimeProfile ?? skipRuntimeProfile ?? params.skip_agent_runtime_profile
4441
4829
  });
@@ -4531,7 +4919,7 @@ var Credits = class {
4531
4919
  return this.http.get("/credits/usage");
4532
4920
  }
4533
4921
  };
4534
- function unwrap25(payload) {
4922
+ function unwrap27(payload) {
4535
4923
  if (payload && typeof payload === "object" && "data" in payload) {
4536
4924
  return payload.data;
4537
4925
  }
@@ -4547,7 +4935,7 @@ function listItems2(payload, candidateKeys = ["data", "cron_jobs", "executions",
4547
4935
  }
4548
4936
  return [];
4549
4937
  }
4550
- function stripUndefined12(input) {
4938
+ function stripUndefined14(input) {
4551
4939
  return Object.fromEntries(
4552
4940
  Object.entries(input).filter(([, v]) => v !== void 0)
4553
4941
  );
@@ -4561,28 +4949,28 @@ var CronJobs = class {
4561
4949
  }
4562
4950
  http;
4563
4951
  async list(params = {}) {
4564
- const query3 = stripUndefined12({ ...params });
4952
+ const query3 = stripUndefined14({ ...params });
4565
4953
  const data = await this.http.get("/cron-jobs", query3);
4566
4954
  return listItems2(data);
4567
4955
  }
4568
4956
  async get(jobId) {
4569
4957
  const data = await this.http.get(`/cron-jobs/${jobId}`);
4570
- return unwrap25(data);
4958
+ return unwrap27(data);
4571
4959
  }
4572
4960
  async create(params) {
4573
4961
  const { idempotencyKey: ikey, ...rest } = params;
4574
- const body4 = stripUndefined12(rest);
4962
+ const body5 = stripUndefined14(rest);
4575
4963
  const data = await this.http.request("/cron-jobs", {
4576
4964
  method: "POST",
4577
- body: body4,
4965
+ body: body5,
4578
4966
  headers: { "Idempotency-Key": idempotencyKey2(ikey) }
4579
4967
  });
4580
- return unwrap25(data);
4968
+ return unwrap27(data);
4581
4969
  }
4582
4970
  async update(jobId, params) {
4583
- const body4 = stripUndefined12(params);
4584
- const data = await this.http.patch(`/cron-jobs/${jobId}`, body4);
4585
- return unwrap25(data);
4971
+ const body5 = stripUndefined14(params);
4972
+ const data = await this.http.patch(`/cron-jobs/${jobId}`, body5);
4973
+ return unwrap27(data);
4586
4974
  }
4587
4975
  async delete(jobId) {
4588
4976
  await this.http.delete(`/cron-jobs/${jobId}`);
@@ -4590,11 +4978,11 @@ var CronJobs = class {
4590
4978
  // ── Control ────────────────────────────────────────────────────────────────
4591
4979
  async pause(jobId) {
4592
4980
  const data = await this.http.post(`/cron-jobs/${jobId}/pause`);
4593
- return unwrap25(data);
4981
+ return unwrap27(data);
4594
4982
  }
4595
4983
  async resume(jobId) {
4596
4984
  const data = await this.http.post(`/cron-jobs/${jobId}/resume`);
4597
- return unwrap25(data);
4985
+ return unwrap27(data);
4598
4986
  }
4599
4987
  async runNow(jobId, opts = {}) {
4600
4988
  const data = await this.http.request(
@@ -4604,7 +4992,7 @@ var CronJobs = class {
4604
4992
  headers: { "Idempotency-Key": idempotencyKey2(opts.idempotencyKey) }
4605
4993
  }
4606
4994
  );
4607
- return unwrap25(data);
4995
+ return unwrap27(data);
4608
4996
  }
4609
4997
  // ── Execution history ──────────────────────────────────────────────────────
4610
4998
  async listExecutions(jobId) {
@@ -4619,12 +5007,12 @@ var CronJobs = class {
4619
5007
  const data = await this.http.get(
4620
5008
  `/cron-jobs/${jobId}/executions/${executionId}`
4621
5009
  );
4622
- return unwrap25(data);
5010
+ return unwrap27(data);
4623
5011
  }
4624
5012
  };
4625
5013
 
4626
5014
  // src/resources/dashboard.ts
4627
- function unwrap26(payload) {
5015
+ function unwrap28(payload) {
4628
5016
  if (payload && typeof payload === "object") {
4629
5017
  const p = payload;
4630
5018
  for (const k of ["data", "dashboard", "overview", "items"]) {
@@ -4641,15 +5029,15 @@ var Dashboard = class {
4641
5029
  /** Aggregated user dashboard payload. */
4642
5030
  async summary() {
4643
5031
  const data = await this.http.get("/dashboard");
4644
- return unwrap26(data);
5032
+ return unwrap28(data);
4645
5033
  }
4646
5034
  /** Status / health overview (public endpoint). */
4647
5035
  async overview() {
4648
5036
  const data = await this.http.get("/overview");
4649
- return unwrap26(data);
5037
+ return unwrap28(data);
4650
5038
  }
4651
5039
  };
4652
- function unwrap27(payload) {
5040
+ function unwrap29(payload) {
4653
5041
  if (payload && typeof payload === "object" && "data" in payload) {
4654
5042
  return payload.data;
4655
5043
  }
@@ -4665,7 +5053,7 @@ function listItems3(payload, candidateKeys = ["data", "databases", "items"]) {
4665
5053
  }
4666
5054
  return [];
4667
5055
  }
4668
- function stripUndefined13(input) {
5056
+ function stripUndefined15(input) {
4669
5057
  return Object.fromEntries(
4670
5058
  Object.entries(input).filter(([, v]) => v !== void 0)
4671
5059
  );
@@ -4679,13 +5067,13 @@ var Databases = class {
4679
5067
  }
4680
5068
  http;
4681
5069
  async list(params = {}) {
4682
- const query3 = stripUndefined13({ ...params });
5070
+ const query3 = stripUndefined15({ ...params });
4683
5071
  const data = await this.http.get("/databases", query3);
4684
5072
  return listItems3(data);
4685
5073
  }
4686
5074
  async get(databaseId) {
4687
5075
  const data = await this.http.get(`/databases/${databaseId}`);
4688
- return unwrap27(data);
5076
+ return unwrap29(data);
4689
5077
  }
4690
5078
  async create(params) {
4691
5079
  const {
@@ -4696,20 +5084,20 @@ var Databases = class {
4696
5084
  size: _deprecatedSize,
4697
5085
  ...rest
4698
5086
  } = params;
4699
- const body4 = stripUndefined13({
5087
+ const body5 = stripUndefined15({
4700
5088
  ...rest,
4701
5089
  engine_version: engine_version ?? version
4702
5090
  });
4703
5091
  const data = await this.http.request("/databases", {
4704
5092
  method: "POST",
4705
- body: body4,
5093
+ body: body5,
4706
5094
  headers: {
4707
5095
  "Idempotency-Key": idempotencyKey3(
4708
5096
  camelIdempotencyKey ?? snakeIdempotencyKey
4709
5097
  )
4710
5098
  }
4711
5099
  });
4712
- return unwrap27(data);
5100
+ return unwrap29(data);
4713
5101
  }
4714
5102
  async delete(databaseId) {
4715
5103
  await this.http.delete(`/databases/${databaseId}`);
@@ -4719,27 +5107,27 @@ var Databases = class {
4719
5107
  const data = await this.http.post(
4720
5108
  `/databases/${databaseId}/start`
4721
5109
  );
4722
- return unwrap27(data);
5110
+ return unwrap29(data);
4723
5111
  }
4724
5112
  async stop(databaseId) {
4725
5113
  const data = await this.http.post(`/databases/${databaseId}/stop`);
4726
- return unwrap27(data);
5114
+ return unwrap29(data);
4727
5115
  }
4728
5116
  async restart(databaseId) {
4729
5117
  const data = await this.http.post(
4730
5118
  `/databases/${databaseId}/restart`
4731
5119
  );
4732
- return unwrap27(data);
5120
+ return unwrap29(data);
4733
5121
  }
4734
5122
  // ── Credentials + logs ────────────────────────────────────────────────────
4735
5123
  async credentials(databaseId) {
4736
5124
  const data = await this.http.get(
4737
5125
  `/databases/${databaseId}/credentials`
4738
5126
  );
4739
- return unwrap27(data);
5127
+ return unwrap29(data);
4740
5128
  }
4741
5129
  async logs(databaseId, params = {}) {
4742
- const query3 = stripUndefined13({
5130
+ const query3 = stripUndefined15({
4743
5131
  lines: params.lines,
4744
5132
  since: params.since
4745
5133
  });
@@ -4766,7 +5154,7 @@ function attributionBody(p) {
4766
5154
  function idempotencyKey4(key) {
4767
5155
  return key ?? randomUUID();
4768
5156
  }
4769
- function unwrap28(payload) {
5157
+ function unwrap30(payload) {
4770
5158
  if (payload && typeof payload === "object" && "data" in payload) {
4771
5159
  return payload.data;
4772
5160
  }
@@ -4782,7 +5170,7 @@ function listItems4(payload, candidateKeys = ["items", "deployments", "versions"
4782
5170
  }
4783
5171
  return [];
4784
5172
  }
4785
- function stripUndefined14(input) {
5173
+ function stripUndefined16(input) {
4786
5174
  return Object.fromEntries(
4787
5175
  Object.entries(input).filter(([, v]) => v !== void 0)
4788
5176
  );
@@ -4859,7 +5247,7 @@ var DeploymentVersions = class {
4859
5247
  http;
4860
5248
  deploymentId;
4861
5249
  async list(params = {}) {
4862
- const query3 = stripUndefined14({
5250
+ const query3 = stripUndefined16({
4863
5251
  state: params.state,
4864
5252
  limit: params.limit,
4865
5253
  cursor: params.cursor,
@@ -4875,19 +5263,19 @@ var DeploymentVersions = class {
4875
5263
  const data = await this.http.get(
4876
5264
  `/deployments/${this.deploymentId}/versions/${versionId}`
4877
5265
  );
4878
- return unwrap28(data);
5266
+ return unwrap30(data);
4879
5267
  }
4880
5268
  async promote(versionId, opts = {}) {
4881
- const body4 = stripUndefined14({ environment: opts.environment });
5269
+ const body5 = stripUndefined16({ environment: opts.environment });
4882
5270
  const data = await this.http.request(
4883
5271
  `/deployments/${this.deploymentId}/versions/${versionId}/promote`,
4884
5272
  {
4885
5273
  method: "POST",
4886
- body: body4,
5274
+ body: body5,
4887
5275
  headers: { "Idempotency-Key": idempotencyKey4(opts.idempotencyKey) }
4888
5276
  }
4889
5277
  );
4890
- return unwrap28(data);
5278
+ return unwrap30(data);
4891
5279
  }
4892
5280
  };
4893
5281
  var DeploymentReleases = class {
@@ -4907,7 +5295,7 @@ var DeploymentReleases = class {
4907
5295
  const data = await this.http.get(
4908
5296
  `/deployments/${this.deploymentId}/releases/${releaseId}`
4909
5297
  );
4910
- return unwrap28(data);
5298
+ return unwrap30(data);
4911
5299
  }
4912
5300
  };
4913
5301
  var DeploymentRuntimeInstances = class {
@@ -4927,14 +5315,14 @@ var DeploymentRuntimeInstances = class {
4927
5315
  const data = await this.http.get(
4928
5316
  `/deployments/${this.deploymentId}/runtime-instances/${instanceId}`
4929
5317
  );
4930
- return unwrap28(data);
5318
+ return unwrap30(data);
4931
5319
  }
4932
5320
  async logs(instanceId, lines = 100) {
4933
5321
  const data = await this.http.get(
4934
5322
  `/deployments/${this.deploymentId}/runtime-instances/${instanceId}/logs`,
4935
5323
  { lines }
4936
5324
  );
4937
- const unwrapped = unwrap28(data);
5325
+ const unwrapped = unwrap30(data);
4938
5326
  const result = { logs: String(unwrapped.logs ?? "") };
4939
5327
  if (typeof unwrapped.runtime_instance_id === "string") {
4940
5328
  result.runtime_instance_id = unwrapped.runtime_instance_id;
@@ -4956,7 +5344,7 @@ var DeploymentDomains = class {
4956
5344
  http;
4957
5345
  deploymentId;
4958
5346
  async add(domain, params = {}) {
4959
- const body4 = {
5347
+ const body5 = {
4960
5348
  domain,
4961
5349
  redirect_policy: params.redirectPolicy ?? params.redirect_policy,
4962
5350
  ...attributionBody(params)
@@ -4965,11 +5353,11 @@ var DeploymentDomains = class {
4965
5353
  `/deployments/${this.deploymentId}/domains`,
4966
5354
  {
4967
5355
  method: "POST",
4968
- body: stripUndefined14(body4),
5356
+ body: stripUndefined16(body5),
4969
5357
  headers: { "Idempotency-Key": idempotencyKey4(params.idempotencyKey) }
4970
5358
  }
4971
5359
  );
4972
- return unwrap28(data);
5360
+ return unwrap30(data);
4973
5361
  }
4974
5362
  async list(filters = {}) {
4975
5363
  const data = await this.http.get(
@@ -4982,7 +5370,7 @@ var DeploymentDomains = class {
4982
5370
  const data = await this.http.post(
4983
5371
  `/deployments/${this.deploymentId}/domains/${domainId}/verify`
4984
5372
  );
4985
- return unwrap28(data);
5373
+ return unwrap30(data);
4986
5374
  }
4987
5375
  async delete(domainId) {
4988
5376
  await this.http.delete(
@@ -4997,7 +5385,7 @@ var Deployments = class {
4997
5385
  http;
4998
5386
  async list(params = {}) {
4999
5387
  const projectId = params.projectId ?? params.project_id;
5000
- const query3 = stripUndefined14({
5388
+ const query3 = stripUndefined16({
5001
5389
  project_id: projectId,
5002
5390
  state: params.state,
5003
5391
  limit: params.limit,
@@ -5012,10 +5400,10 @@ var Deployments = class {
5012
5400
  }
5013
5401
  async get(deploymentId) {
5014
5402
  const data = await this.http.get(`/deployments/${deploymentId}`);
5015
- return unwrap28(data);
5403
+ return unwrap30(data);
5016
5404
  }
5017
5405
  async create(params) {
5018
- const body4 = stripUndefined14({
5406
+ const body5 = stripUndefined16({
5019
5407
  name: params.name,
5020
5408
  repo_url: params.repoUrl ?? params.repo_url,
5021
5409
  branch: params.branch,
@@ -5028,10 +5416,10 @@ var Deployments = class {
5028
5416
  });
5029
5417
  const data = await this.http.request("/deployments", {
5030
5418
  method: "POST",
5031
- body: body4,
5419
+ body: body5,
5032
5420
  headers: { "Idempotency-Key": idempotencyKey4(params.idempotencyKey) }
5033
5421
  });
5034
- return unwrap28(data);
5422
+ return unwrap30(data);
5035
5423
  }
5036
5424
  /**
5037
5425
  * Create a deployment that runs on the workspace's dedicated App Engine
@@ -5075,7 +5463,7 @@ var Deployments = class {
5075
5463
  const rawHost = await this.http.get(
5076
5464
  `/docker-deploy/hosts/${hostId}`
5077
5465
  );
5078
- host = unwrap28(
5466
+ host = unwrap30(
5079
5467
  rawHost
5080
5468
  );
5081
5469
  addDoctorCheck(
@@ -5226,7 +5614,7 @@ var Deployments = class {
5226
5614
  const rawHost = await this.http.get(
5227
5615
  `/docker-deploy/hosts/${hostId}`
5228
5616
  );
5229
- const host = unwrap28(
5617
+ const host = unwrap30(
5230
5618
  rawHost
5231
5619
  );
5232
5620
  addProofCheck(
@@ -5322,7 +5710,7 @@ var Deployments = class {
5322
5710
  };
5323
5711
  }
5324
5712
  async update(deploymentId, params) {
5325
- const body4 = stripUndefined14({
5713
+ const body5 = stripUndefined16({
5326
5714
  name: params.name,
5327
5715
  branch: params.branch,
5328
5716
  build_command: params.buildCommand ?? params.build_command,
@@ -5331,15 +5719,15 @@ var Deployments = class {
5331
5719
  });
5332
5720
  const data = await this.http.patch(
5333
5721
  `/deployments/${deploymentId}`,
5334
- body4
5722
+ body5
5335
5723
  );
5336
- return unwrap28(data);
5724
+ return unwrap30(data);
5337
5725
  }
5338
5726
  async delete(deploymentId) {
5339
5727
  await this.http.delete(`/deployments/${deploymentId}`);
5340
5728
  }
5341
5729
  async publish(deploymentId, params) {
5342
- const body4 = stripUndefined14({
5730
+ const body5 = stripUndefined16({
5343
5731
  source_sandbox_id: params.sourceSandboxId ?? params.source_sandbox_id,
5344
5732
  output_path: params.outputPath ?? params.output_path,
5345
5733
  entrypoint: params.entrypoint,
@@ -5349,11 +5737,11 @@ var Deployments = class {
5349
5737
  `/deployments/${deploymentId}/publish`,
5350
5738
  {
5351
5739
  method: "POST",
5352
- body: body4,
5740
+ body: body5,
5353
5741
  headers: { "Idempotency-Key": idempotencyKey4(params.idempotencyKey) }
5354
5742
  }
5355
5743
  );
5356
- return unwrap28(data);
5744
+ return unwrap30(data);
5357
5745
  }
5358
5746
  /**
5359
5747
  * Backward-compatible bridge: POST /sandboxes/:id/deploy. Works today;
@@ -5361,7 +5749,7 @@ var Deployments = class {
5361
5749
  * phase. Prefer `publish()` once Phase 2B/3 lands.
5362
5750
  */
5363
5751
  async publishFromSandbox(sandboxId, params = {}) {
5364
- const body4 = stripUndefined14({
5752
+ const body5 = stripUndefined16({
5365
5753
  name: params.name,
5366
5754
  deployment_id: params.deploymentId ?? params.deployment_id,
5367
5755
  output_path: params.outputPath ?? params.output_path,
@@ -5374,25 +5762,25 @@ var Deployments = class {
5374
5762
  `/sandboxes/${sandboxId}/deploy`,
5375
5763
  {
5376
5764
  method: "POST",
5377
- body: body4,
5765
+ body: body5,
5378
5766
  headers: { "Idempotency-Key": idempotencyKey4(params.idempotencyKey) }
5379
5767
  }
5380
5768
  );
5381
- return unwrap28(data);
5769
+ return unwrap30(data);
5382
5770
  }
5383
5771
  async rollback(deploymentId, params = {}) {
5384
- const body4 = stripUndefined14({
5772
+ const body5 = stripUndefined16({
5385
5773
  version_id: params.versionId ?? params.version_id
5386
5774
  });
5387
5775
  const data = await this.http.request(
5388
5776
  `/deployments/${deploymentId}/rollback`,
5389
5777
  {
5390
5778
  method: "POST",
5391
- body: body4,
5779
+ body: body5,
5392
5780
  headers: { "Idempotency-Key": idempotencyKey4(params.idempotencyKey) }
5393
5781
  }
5394
5782
  );
5395
- return unwrap28(data);
5783
+ return unwrap30(data);
5396
5784
  }
5397
5785
  async listBuilds(deploymentId) {
5398
5786
  const data = await this.http.get(
@@ -5404,7 +5792,7 @@ var Deployments = class {
5404
5792
  const data = await this.http.get(
5405
5793
  `/deployments/${deploymentId}/builds/${buildId}`
5406
5794
  );
5407
- return unwrap28(data);
5795
+ return unwrap30(data);
5408
5796
  }
5409
5797
  async listEnv(deploymentId) {
5410
5798
  const data = await this.http.get(
@@ -5413,10 +5801,10 @@ var Deployments = class {
5413
5801
  return listItems4(data);
5414
5802
  }
5415
5803
  async setEnv(deploymentId, vars, opts = {}) {
5416
- const body4 = stripUndefined14({ env: vars, environment: opts.environment });
5804
+ const body5 = stripUndefined16({ env: vars, environment: opts.environment });
5417
5805
  const data = await this.http.post(
5418
5806
  `/deployments/${deploymentId}/env`,
5419
- body4
5807
+ body5
5420
5808
  );
5421
5809
  return listItems4(data);
5422
5810
  }
@@ -5450,7 +5838,7 @@ var RUNTIME_BINARIES = {
5450
5838
  pi: ["pi"],
5451
5839
  custom: []
5452
5840
  };
5453
- function unwrap29(payload, keys = ["data"]) {
5841
+ function unwrap31(payload, keys = ["data"]) {
5454
5842
  if (payload && typeof payload === "object") {
5455
5843
  const p = payload;
5456
5844
  for (const key of keys) {
@@ -5469,7 +5857,7 @@ function unwrapList12(payload) {
5469
5857
  }
5470
5858
  return [];
5471
5859
  }
5472
- function stripUndefined15(input) {
5860
+ function stripUndefined17(input) {
5473
5861
  return Object.fromEntries(
5474
5862
  Object.entries(input).filter(([, value]) => value !== void 0)
5475
5863
  );
@@ -5479,14 +5867,14 @@ function pickFirst5(...values) {
5479
5867
  return void 0;
5480
5868
  }
5481
5869
  function queryFromListParams2(params = {}) {
5482
- return stripUndefined15({
5870
+ return stripUndefined17({
5483
5871
  kind: pickFirst5(params.kind, params.type),
5484
5872
  workspace_id: pickFirst5(params.workspaceId, params.workspace_id),
5485
5873
  project_id: pickFirst5(params.projectId, params.project_id)
5486
5874
  });
5487
5875
  }
5488
5876
  function queryFromFileParams(params = {}) {
5489
- return stripUndefined15({
5877
+ return stripUndefined17({
5490
5878
  path: params.path
5491
5879
  });
5492
5880
  }
@@ -5509,7 +5897,7 @@ var Devices = class {
5509
5897
  /** Show one unified device by id. */
5510
5898
  async get(id) {
5511
5899
  const data = await this.http.get(`/devices/${devicePath(id)}`);
5512
- return unwrap29(data);
5900
+ return unwrap31(data);
5513
5901
  }
5514
5902
  show(id) {
5515
5903
  return this.get(id);
@@ -5519,20 +5907,20 @@ var Devices = class {
5519
5907
  const data = await this.http.get(
5520
5908
  `/devices/${devicePath(id)}/capabilities`
5521
5909
  );
5522
- return unwrap29(data);
5910
+ return unwrap31(data);
5523
5911
  }
5524
5912
  /** Execute a command inside the device. */
5525
5913
  async exec(id, params) {
5526
5914
  const data = await this.http.post(
5527
5915
  `/devices/${devicePath(id)}/exec`,
5528
- stripUndefined15({
5916
+ stripUndefined17({
5529
5917
  command: params.command,
5530
5918
  timeout_ms: pickFirst5(params.timeoutMs, params.timeout_ms),
5531
5919
  cwd: params.cwd,
5532
5920
  env: params.env
5533
5921
  })
5534
5922
  );
5535
- return unwrap29(data);
5923
+ return unwrap31(data);
5536
5924
  }
5537
5925
  /** List files inside the device filesystem. */
5538
5926
  async listFiles(id, params = {}) {
@@ -5548,19 +5936,19 @@ var Devices = class {
5548
5936
  `/devices/${devicePath(id)}/files/read`,
5549
5937
  queryFromFileParams(params)
5550
5938
  );
5551
- return unwrap29(data);
5939
+ return unwrap31(data);
5552
5940
  }
5553
5941
  /** Write a text or base64 payload into the device filesystem. */
5554
5942
  async writeFile(id, params) {
5555
5943
  const data = await this.http.post(
5556
5944
  `/devices/${devicePath(id)}/files/write`,
5557
- stripUndefined15({
5945
+ stripUndefined17({
5558
5946
  path: params.path,
5559
5947
  content: params.content,
5560
5948
  content_base64: pickFirst5(params.contentBase64, params.content_base64)
5561
5949
  })
5562
5950
  );
5563
- return unwrap29(data);
5951
+ return unwrap31(data);
5564
5952
  }
5565
5953
  /** Expose a device port through MIOSA routing. */
5566
5954
  async expose(id, params) {
@@ -5568,44 +5956,44 @@ var Devices = class {
5568
5956
  `/devices/${devicePath(id)}/expose`,
5569
5957
  { port: params.port }
5570
5958
  );
5571
- return unwrap29(data);
5959
+ return unwrap31(data);
5572
5960
  }
5573
5961
  /** Return browser/desktop connection details for a computer-backed device. */
5574
5962
  async browser(id) {
5575
5963
  const data = await this.http.get(`/devices/${devicePath(id)}/browser`);
5576
- return unwrap29(data);
5964
+ return unwrap31(data);
5577
5965
  }
5578
5966
  async pause(id) {
5579
5967
  const data = await this.http.post(
5580
5968
  `/devices/${devicePath(id)}/pause`,
5581
5969
  {}
5582
5970
  );
5583
- return unwrap29(data);
5971
+ return unwrap31(data);
5584
5972
  }
5585
5973
  async stop(id) {
5586
5974
  const data = await this.http.post(
5587
5975
  `/devices/${devicePath(id)}/stop`,
5588
5976
  {}
5589
5977
  );
5590
- return unwrap29(data);
5978
+ return unwrap31(data);
5591
5979
  }
5592
5980
  async resume(id) {
5593
5981
  const data = await this.http.post(
5594
5982
  `/devices/${devicePath(id)}/resume`,
5595
5983
  {}
5596
5984
  );
5597
- return unwrap29(data);
5985
+ return unwrap31(data);
5598
5986
  }
5599
5987
  async extend(id, params) {
5600
5988
  const data = await this.http.post(
5601
5989
  `/devices/${devicePath(id)}/extend`,
5602
5990
  { timeout_sec: pickFirst5(params.timeoutSec, params.timeout_sec) }
5603
5991
  );
5604
- return unwrap29(data);
5992
+ return unwrap31(data);
5605
5993
  }
5606
5994
  async destroy(id) {
5607
5995
  const data = await this.http.delete(`/devices/${devicePath(id)}`);
5608
- return unwrap29(data);
5996
+ return unwrap31(data);
5609
5997
  }
5610
5998
  /**
5611
5999
  * Write a MIOSA runtime bootstrap manifest and optionally install/probe
@@ -5695,12 +6083,12 @@ function workspaceId(params) {
5695
6083
  return params?.workspace_id ?? params?.workspaceId;
5696
6084
  }
5697
6085
  function ensureBody(params) {
5698
- const body4 = {};
6086
+ const body5 = {};
5699
6087
  const id = params.workspace_id ?? params.workspaceId;
5700
6088
  const externalId = params.external_workspace_id ?? params.externalWorkspaceId;
5701
- if (id) body4.workspace_id = id;
5702
- if (externalId) body4.external_workspace_id = externalId;
5703
- return body4;
6089
+ if (id) body5.workspace_id = id;
6090
+ if (externalId) body5.external_workspace_id = externalId;
6091
+ return body5;
5704
6092
  }
5705
6093
  function unwrapHost(response) {
5706
6094
  const host = response.data ?? response.host;
@@ -5775,7 +6163,7 @@ var DockerDeploy = class {
5775
6163
  };
5776
6164
 
5777
6165
  // src/resources/email.ts
5778
- function unwrap30(data) {
6166
+ function unwrap32(data) {
5779
6167
  if (data && typeof data === "object") {
5780
6168
  const d = data;
5781
6169
  for (const k of [
@@ -5827,12 +6215,12 @@ var EmailCampaigns = class {
5827
6215
  );
5828
6216
  }
5829
6217
  async create(attrs) {
5830
- return unwrap30(
6218
+ return unwrap32(
5831
6219
  await this.http.post("/admin/email-campaigns", strip(attrs))
5832
6220
  );
5833
6221
  }
5834
6222
  async recipientCount(filters = {}) {
5835
- return unwrap30(
6223
+ return unwrap32(
5836
6224
  await this.http.get(
5837
6225
  "/admin/email-campaigns/recipient-count",
5838
6226
  filters
@@ -5840,7 +6228,7 @@ var EmailCampaigns = class {
5840
6228
  );
5841
6229
  }
5842
6230
  async send(campaignId, opts = {}) {
5843
- return unwrap30(
6231
+ return unwrap32(
5844
6232
  await this.http.post(
5845
6233
  `/admin/email-campaigns/${campaignId}/send`,
5846
6234
  strip(opts)
@@ -5848,7 +6236,7 @@ var EmailCampaigns = class {
5848
6236
  );
5849
6237
  }
5850
6238
  async cancel(campaignId) {
5851
- return unwrap30(
6239
+ return unwrap32(
5852
6240
  await this.http.post(
5853
6241
  `/admin/email-campaigns/${campaignId}/cancel`
5854
6242
  )
@@ -5874,7 +6262,7 @@ var EmailTemplates = class {
5874
6262
  );
5875
6263
  }
5876
6264
  async create(key, attrs = {}) {
5877
- return unwrap30(
6265
+ return unwrap32(
5878
6266
  await this.http.post("/admin/email-templates", {
5879
6267
  key,
5880
6268
  ...strip(attrs)
@@ -5882,7 +6270,7 @@ var EmailTemplates = class {
5882
6270
  );
5883
6271
  }
5884
6272
  async update(key, attrs) {
5885
- return unwrap30(
6273
+ return unwrap32(
5886
6274
  await this.http.put(
5887
6275
  `/admin/email-templates/${key}`,
5888
6276
  strip(attrs)
@@ -5890,7 +6278,7 @@ var EmailTemplates = class {
5890
6278
  );
5891
6279
  }
5892
6280
  async reset(key) {
5893
- return unwrap30(
6281
+ return unwrap32(
5894
6282
  await this.http.post(`/admin/email-templates/${key}/reset`)
5895
6283
  );
5896
6284
  }
@@ -5906,17 +6294,17 @@ var EmailInbox = class {
5906
6294
  );
5907
6295
  }
5908
6296
  async send(attrs) {
5909
- return unwrap30(
6297
+ return unwrap32(
5910
6298
  await this.http.post("/admin/email-inbox/send", strip(attrs))
5911
6299
  );
5912
6300
  }
5913
6301
  async markRead(messageId) {
5914
- return unwrap30(
6302
+ return unwrap32(
5915
6303
  await this.http.post(`/admin/email-inbox/${messageId}/read`)
5916
6304
  );
5917
6305
  }
5918
6306
  async archive(messageId) {
5919
- return unwrap30(
6307
+ return unwrap32(
5920
6308
  await this.http.post(`/admin/email-inbox/${messageId}/archive`)
5921
6309
  );
5922
6310
  }
@@ -5945,18 +6333,18 @@ var Embeddings = class {
5945
6333
  * `{ object: "list", data: [...], model, usage }`.
5946
6334
  */
5947
6335
  async create(params) {
5948
- const body4 = Object.fromEntries(
6336
+ const body5 = Object.fromEntries(
5949
6337
  Object.entries(params).filter(([, v]) => v !== void 0)
5950
6338
  );
5951
6339
  return this.http.post(
5952
6340
  "/intelligence/embeddings",
5953
- body4
6341
+ body5
5954
6342
  );
5955
6343
  }
5956
6344
  };
5957
6345
 
5958
6346
  // src/resources/external-keys.ts
5959
- function unwrap31(payload) {
6347
+ function unwrap33(payload) {
5960
6348
  if (payload && typeof payload === "object") {
5961
6349
  const p = payload;
5962
6350
  for (const k of ["data", "external_keys", "items"]) {
@@ -5965,7 +6353,7 @@ function unwrap31(payload) {
5965
6353
  }
5966
6354
  return payload;
5967
6355
  }
5968
- function stripUndefined16(input) {
6356
+ function stripUndefined18(input) {
5969
6357
  return Object.fromEntries(
5970
6358
  Object.entries(input).filter(([, v]) => v !== void 0)
5971
6359
  );
@@ -5978,22 +6366,22 @@ var ExternalKeys = class {
5978
6366
  /** List configured external keys. */
5979
6367
  async list() {
5980
6368
  const data = await this.http.get("/external-keys");
5981
- const result = unwrap31(data);
6369
+ const result = unwrap33(data);
5982
6370
  if (Array.isArray(result)) return result;
5983
6371
  return [];
5984
6372
  }
5985
6373
  /** Create / register an external provider key. */
5986
6374
  async create(params) {
5987
- const body4 = stripUndefined16(params);
5988
- const data = await this.http.post("/external-keys", body4);
5989
- return unwrap31(data);
6375
+ const body5 = stripUndefined18(params);
6376
+ const data = await this.http.post("/external-keys", body5);
6377
+ return unwrap33(data);
5990
6378
  }
5991
6379
  /** Resolve (preview) the stored key for a provider. */
5992
6380
  async resolve(provider) {
5993
6381
  const data = await this.http.get(
5994
6382
  `/external-keys/${provider}/resolve`
5995
6383
  );
5996
- return unwrap31(data);
6384
+ return unwrap33(data);
5997
6385
  }
5998
6386
  /**
5999
6387
  * Delete the stored key for a provider.
@@ -6003,7 +6391,7 @@ var ExternalKeys = class {
6003
6391
  await this.http.delete(`/external-keys/${provider}`);
6004
6392
  }
6005
6393
  };
6006
- function unwrap32(payload) {
6394
+ function unwrap34(payload) {
6007
6395
  if (payload && typeof payload === "object" && "data" in payload) {
6008
6396
  return payload.data;
6009
6397
  }
@@ -6019,7 +6407,7 @@ function listItems5(payload, candidateKeys = ["data", "domains", "items"]) {
6019
6407
  }
6020
6408
  return [];
6021
6409
  }
6022
- function stripUndefined17(input) {
6410
+ function stripUndefined19(input) {
6023
6411
  return Object.fromEntries(
6024
6412
  Object.entries(input).filter(([, v]) => v !== void 0)
6025
6413
  );
@@ -6033,7 +6421,7 @@ var FlatCustomDomains = class {
6033
6421
  }
6034
6422
  http;
6035
6423
  async list(params = {}) {
6036
- const query3 = stripUndefined17({ ...params });
6424
+ const query3 = stripUndefined19({ ...params });
6037
6425
  const data = await this.http.get("/custom-domains", query3);
6038
6426
  return listItems5(data);
6039
6427
  }
@@ -6045,7 +6433,7 @@ var FlatCustomDomains = class {
6045
6433
  redirectPolicy,
6046
6434
  ...rest
6047
6435
  } = params;
6048
- const body4 = stripUndefined17({
6436
+ const body5 = stripUndefined19({
6049
6437
  ...rest,
6050
6438
  resource_type: resourceType ?? rest.resource_type,
6051
6439
  resource_id: resourceId ?? rest.resource_id,
@@ -6053,16 +6441,16 @@ var FlatCustomDomains = class {
6053
6441
  });
6054
6442
  const data = await this.http.request("/custom-domains", {
6055
6443
  method: "POST",
6056
- body: body4,
6444
+ body: body5,
6057
6445
  headers: { "Idempotency-Key": idempotencyKey5(ikey) }
6058
6446
  });
6059
- return unwrap32(data);
6447
+ return unwrap34(data);
6060
6448
  }
6061
6449
  async delete(domainId) {
6062
6450
  await this.http.delete(`/custom-domains/${domainId}`);
6063
6451
  }
6064
6452
  };
6065
- function unwrap33(payload) {
6453
+ function unwrap35(payload) {
6066
6454
  if (payload && typeof payload === "object" && "data" in payload) {
6067
6455
  return payload.data;
6068
6456
  }
@@ -6078,7 +6466,7 @@ function listItems6(payload, candidateKeys = ["data", "functions", "items"]) {
6078
6466
  }
6079
6467
  return [];
6080
6468
  }
6081
- function stripUndefined18(input) {
6469
+ function stripUndefined20(input) {
6082
6470
  return Object.fromEntries(
6083
6471
  Object.entries(input).filter(([, v]) => v !== void 0)
6084
6472
  );
@@ -6092,40 +6480,40 @@ var Functions = class {
6092
6480
  }
6093
6481
  http;
6094
6482
  async list(params = {}) {
6095
- const query3 = stripUndefined18({ ...params });
6483
+ const query3 = stripUndefined20({ ...params });
6096
6484
  const data = await this.http.get("/functions", query3);
6097
6485
  return listItems6(data);
6098
6486
  }
6099
6487
  async get(functionId) {
6100
6488
  const data = await this.http.get(`/functions/${functionId}`);
6101
- return unwrap33(data);
6489
+ return unwrap35(data);
6102
6490
  }
6103
6491
  async create(params) {
6104
6492
  const { idempotencyKey: ikey, memoryMb, timeoutSec, ...rest } = params;
6105
- const body4 = stripUndefined18({
6493
+ const body5 = stripUndefined20({
6106
6494
  ...rest,
6107
6495
  memory_mb: memoryMb ?? rest.memory_mb,
6108
6496
  timeout_sec: timeoutSec ?? rest.timeout_sec
6109
6497
  });
6110
6498
  const data = await this.http.request("/functions", {
6111
6499
  method: "POST",
6112
- body: body4,
6500
+ body: body5,
6113
6501
  headers: { "Idempotency-Key": idempotencyKey6(ikey) }
6114
6502
  });
6115
- return unwrap33(data);
6503
+ return unwrap35(data);
6116
6504
  }
6117
6505
  async update(functionId, params) {
6118
6506
  const { memoryMb, timeoutSec, ...rest } = params;
6119
- const body4 = stripUndefined18({
6507
+ const body5 = stripUndefined20({
6120
6508
  ...rest,
6121
6509
  memory_mb: memoryMb ?? rest.memory_mb,
6122
6510
  timeout_sec: timeoutSec ?? rest.timeout_sec
6123
6511
  });
6124
6512
  const data = await this.http.patch(
6125
6513
  `/functions/${functionId}`,
6126
- body4
6514
+ body5
6127
6515
  );
6128
- return unwrap33(data);
6516
+ return unwrap35(data);
6129
6517
  }
6130
6518
  async delete(functionId) {
6131
6519
  await this.http.delete(`/functions/${functionId}`);
@@ -6146,7 +6534,7 @@ var Functions = class {
6146
6534
  return data ?? {};
6147
6535
  }
6148
6536
  };
6149
- function unwrap34(payload) {
6537
+ function unwrap36(payload) {
6150
6538
  if (payload && typeof payload === "object" && "data" in payload) {
6151
6539
  return payload.data;
6152
6540
  }
@@ -6162,7 +6550,7 @@ function listItems7(payload, candidateKeys = ["data", "health_checks", "items"])
6162
6550
  }
6163
6551
  return [];
6164
6552
  }
6165
- function stripUndefined19(input) {
6553
+ function stripUndefined21(input) {
6166
6554
  return Object.fromEntries(
6167
6555
  Object.entries(input).filter(([, v]) => v !== void 0)
6168
6556
  );
@@ -6176,13 +6564,13 @@ var HealthChecks = class {
6176
6564
  }
6177
6565
  http;
6178
6566
  async list(params = {}) {
6179
- const query3 = stripUndefined19({ ...params });
6567
+ const query3 = stripUndefined21({ ...params });
6180
6568
  const data = await this.http.get("/health-checks", query3);
6181
6569
  return listItems7(data);
6182
6570
  }
6183
6571
  async get(checkId) {
6184
6572
  const data = await this.http.get(`/health-checks/${checkId}`);
6185
- return unwrap34(data);
6573
+ return unwrap36(data);
6186
6574
  }
6187
6575
  async create(params) {
6188
6576
  const {
@@ -6192,7 +6580,7 @@ var HealthChecks = class {
6192
6580
  expectedStatus,
6193
6581
  ...rest
6194
6582
  } = params;
6195
- const body4 = stripUndefined19({
6583
+ const body5 = stripUndefined21({
6196
6584
  ...rest,
6197
6585
  interval_sec: intervalSec ?? rest.interval_sec,
6198
6586
  timeout_sec: timeoutSec ?? rest.timeout_sec,
@@ -6200,14 +6588,14 @@ var HealthChecks = class {
6200
6588
  });
6201
6589
  const data = await this.http.request("/health-checks", {
6202
6590
  method: "POST",
6203
- body: body4,
6591
+ body: body5,
6204
6592
  headers: { "Idempotency-Key": idempotencyKey7(ikey) }
6205
6593
  });
6206
- return unwrap34(data);
6594
+ return unwrap36(data);
6207
6595
  }
6208
6596
  async update(checkId, params) {
6209
6597
  const { intervalSec, timeoutSec, expectedStatus, ...rest } = params;
6210
- const body4 = stripUndefined19({
6598
+ const body5 = stripUndefined21({
6211
6599
  ...rest,
6212
6600
  interval_sec: intervalSec ?? rest.interval_sec,
6213
6601
  timeout_sec: timeoutSec ?? rest.timeout_sec,
@@ -6215,9 +6603,9 @@ var HealthChecks = class {
6215
6603
  });
6216
6604
  const data = await this.http.patch(
6217
6605
  `/health-checks/${checkId}`,
6218
- body4
6606
+ body5
6219
6607
  );
6220
- return unwrap34(data);
6608
+ return unwrap36(data);
6221
6609
  }
6222
6610
  async delete(checkId) {
6223
6611
  await this.http.delete(`/health-checks/${checkId}`);
@@ -6225,7 +6613,7 @@ var HealthChecks = class {
6225
6613
  };
6226
6614
 
6227
6615
  // src/resources/integrations.ts
6228
- function unwrap35(payload) {
6616
+ function unwrap37(payload) {
6229
6617
  if (payload && typeof payload === "object") {
6230
6618
  const p = payload;
6231
6619
  for (const k of ["data", "integrations", "catalog", "items"]) {
@@ -6235,11 +6623,11 @@ function unwrap35(payload) {
6235
6623
  return payload;
6236
6624
  }
6237
6625
  function listItems8(payload) {
6238
- const result = unwrap35(payload);
6626
+ const result = unwrap37(payload);
6239
6627
  if (Array.isArray(result)) return result;
6240
6628
  return [];
6241
6629
  }
6242
- function stripUndefined20(input) {
6630
+ function stripUndefined22(input) {
6243
6631
  return Object.fromEntries(
6244
6632
  Object.entries(input).filter(([, v]) => v !== void 0)
6245
6633
  );
@@ -6264,14 +6652,14 @@ var Integrations = class {
6264
6652
  const data = await this.http.get(
6265
6653
  `/integrations/${provider}/start`
6266
6654
  );
6267
- return unwrap35(data);
6655
+ return unwrap37(data);
6268
6656
  }
6269
6657
  /** Force-refresh the access token for a provider. */
6270
6658
  async refresh(provider) {
6271
6659
  const data = await this.http.post(
6272
6660
  `/integrations/${provider}/refresh`
6273
6661
  );
6274
- return unwrap35(data);
6662
+ return unwrap37(data);
6275
6663
  }
6276
6664
  /** Disconnect (revoke) an integration. */
6277
6665
  async disconnect(provider) {
@@ -6291,41 +6679,41 @@ var Integrations = class {
6291
6679
  // ── Test hooks ─────────────────────────────────────────────────────────────
6292
6680
  /** Send a test message to the connected Slack channel. */
6293
6681
  async slackSendTest(params = {}) {
6294
- const body4 = stripUndefined20(params);
6682
+ const body5 = stripUndefined22(params);
6295
6683
  const data = await this.http.post(
6296
6684
  "/integrations/slack/send-test",
6297
- body4
6685
+ body5
6298
6686
  );
6299
- return unwrap35(data);
6687
+ return unwrap37(data);
6300
6688
  }
6301
6689
  /** Send a test message to the connected Discord channel. */
6302
6690
  async discordSendTest(params = {}) {
6303
- const body4 = stripUndefined20(params);
6691
+ const body5 = stripUndefined22(params);
6304
6692
  const data = await this.http.post(
6305
6693
  "/integrations/discord/send-test",
6306
- body4
6694
+ body5
6307
6695
  );
6308
- return unwrap35(data);
6696
+ return unwrap37(data);
6309
6697
  }
6310
6698
  // ── Linear dedicated controller ────────────────────────────────────────────
6311
6699
  /** Begin Linear OAuth — Linear has provider-specific error shapes. */
6312
6700
  async linearStart() {
6313
6701
  const data = await this.http.get("/integrations/linear/start");
6314
- return unwrap35(data);
6702
+ return unwrap37(data);
6315
6703
  }
6316
6704
  /** Create a Linear issue via the connected workspace. */
6317
6705
  async linearCreateIssue(params = {}) {
6318
- const body4 = stripUndefined20(params);
6706
+ const body5 = stripUndefined22(params);
6319
6707
  const data = await this.http.post(
6320
6708
  "/integrations/linear/create-issue",
6321
- body4
6709
+ body5
6322
6710
  );
6323
- return unwrap35(data);
6711
+ return unwrap37(data);
6324
6712
  }
6325
6713
  };
6326
6714
 
6327
6715
  // src/resources/mcp.ts
6328
- function unwrap36(payload) {
6716
+ function unwrap38(payload) {
6329
6717
  if (payload && typeof payload === "object") {
6330
6718
  const p = payload;
6331
6719
  for (const k of ["data", "mcp", "result", "items"]) {
@@ -6334,7 +6722,7 @@ function unwrap36(payload) {
6334
6722
  }
6335
6723
  return payload;
6336
6724
  }
6337
- function stripUndefined21(input) {
6725
+ function stripUndefined23(input) {
6338
6726
  return Object.fromEntries(
6339
6727
  Object.entries(input).filter(([, v]) => v !== void 0)
6340
6728
  );
@@ -6346,12 +6734,12 @@ var Mcp = class {
6346
6734
  http;
6347
6735
  /** Send a JSON-RPC request to the MCP endpoint. */
6348
6736
  async dispatch(params = {}) {
6349
- const body4 = stripUndefined21(params);
6737
+ const body5 = stripUndefined23(params);
6350
6738
  const data = await this.http.post(
6351
6739
  "/mcp",
6352
- Object.keys(body4).length > 0 ? body4 : void 0
6740
+ Object.keys(body5).length > 0 ? body5 : void 0
6353
6741
  );
6354
- return unwrap36(data);
6742
+ return unwrap38(data);
6355
6743
  }
6356
6744
  /**
6357
6745
  * Open the MCP listen channel (GET).
@@ -6361,7 +6749,7 @@ var Mcp = class {
6361
6749
  */
6362
6750
  async listen() {
6363
6751
  const data = await this.http.get("/mcp");
6364
- return unwrap36(data);
6752
+ return unwrap38(data);
6365
6753
  }
6366
6754
  /** Close (terminate) the MCP session. */
6367
6755
  async close() {
@@ -6370,7 +6758,7 @@ var Mcp = class {
6370
6758
  };
6371
6759
 
6372
6760
  // src/resources/models.ts
6373
- function unwrap37(data) {
6761
+ function unwrap39(data) {
6374
6762
  if (Array.isArray(data)) return data;
6375
6763
  if (data && typeof data === "object") {
6376
6764
  const d = data;
@@ -6391,7 +6779,7 @@ var Models = class {
6391
6779
  Object.entries(filters).filter(([, v]) => v !== void 0)
6392
6780
  );
6393
6781
  const data = await this.http.get("/intelligence/models", query3);
6394
- return unwrap37(data);
6782
+ return unwrap39(data);
6395
6783
  }
6396
6784
  /**
6397
6785
  * Get a single model by id.
@@ -7034,7 +7422,7 @@ function resourcePayload(params) {
7034
7422
  return { resource_type, resource_id };
7035
7423
  }
7036
7424
  function authConfig(params) {
7037
- return stripUndefined22({
7425
+ return stripUndefined24({
7038
7426
  ...params.config ?? {},
7039
7427
  signup_enabled: params.signup_enabled ?? params.signupEnabled,
7040
7428
  email_confirm_required: params.email_confirm_required ?? params.emailConfirmRequired,
@@ -7042,12 +7430,12 @@ function authConfig(params) {
7042
7430
  });
7043
7431
  }
7044
7432
  function requestBody(params) {
7045
- return stripUndefined22({
7433
+ return stripUndefined24({
7046
7434
  ...resourcePayload(params),
7047
7435
  config: authConfig(params)
7048
7436
  });
7049
7437
  }
7050
- function unwrap38(payload) {
7438
+ function unwrap40(payload) {
7051
7439
  if (payload && typeof payload === "object") {
7052
7440
  const p = payload;
7053
7441
  for (const k of ["data", "project_auth", "config", "items"]) {
@@ -7056,7 +7444,7 @@ function unwrap38(payload) {
7056
7444
  }
7057
7445
  return payload;
7058
7446
  }
7059
- function stripUndefined22(input) {
7447
+ function stripUndefined24(input) {
7060
7448
  return Object.fromEntries(
7061
7449
  Object.entries(input).filter(([, v]) => v !== void 0)
7062
7450
  );
@@ -7072,13 +7460,13 @@ var ProjectAuth = class {
7072
7460
  "/project-auth/status",
7073
7461
  resourcePayload(params)
7074
7462
  );
7075
- return unwrap38(data);
7463
+ return unwrap40(data);
7076
7464
  }
7077
7465
  /** Enable project auth. */
7078
7466
  async enable(params) {
7079
- const body4 = requestBody(params);
7080
- const data = await this.http.post("/project-auth/enable", body4);
7081
- return unwrap38(data);
7467
+ const body5 = requestBody(params);
7468
+ const data = await this.http.post("/project-auth/enable", body5);
7469
+ return unwrap40(data);
7082
7470
  }
7083
7471
  /** Disable project auth. */
7084
7472
  async disable(params) {
@@ -7086,18 +7474,18 @@ var ProjectAuth = class {
7086
7474
  "/project-auth/disable",
7087
7475
  resourcePayload(params)
7088
7476
  );
7089
- return unwrap38(data);
7477
+ return unwrap40(data);
7090
7478
  }
7091
7479
  /** Update project-auth configuration. */
7092
7480
  async update(params) {
7093
- const body4 = requestBody(params);
7094
- const data = await this.http.patch("/project-auth/config", body4);
7095
- return unwrap38(data);
7481
+ const body5 = requestBody(params);
7482
+ const data = await this.http.patch("/project-auth/config", body5);
7483
+ return unwrap40(data);
7096
7484
  }
7097
7485
  };
7098
7486
 
7099
7487
  // src/resources/project-integrations.ts
7100
- function unwrap39(payload) {
7488
+ function unwrap41(payload) {
7101
7489
  if (payload && typeof payload === "object") {
7102
7490
  const p = payload;
7103
7491
  for (const k of ["data", "project_integrations", "catalog", "items"]) {
@@ -7107,11 +7495,11 @@ function unwrap39(payload) {
7107
7495
  return payload;
7108
7496
  }
7109
7497
  function listItems9(payload) {
7110
- const result = unwrap39(payload);
7498
+ const result = unwrap41(payload);
7111
7499
  if (Array.isArray(result)) return result;
7112
7500
  return [];
7113
7501
  }
7114
- function stripUndefined23(input) {
7502
+ function stripUndefined25(input) {
7115
7503
  return Object.fromEntries(
7116
7504
  Object.entries(input).filter(([, v]) => v !== void 0)
7117
7505
  );
@@ -7128,7 +7516,7 @@ var ProjectIntegrations = class {
7128
7516
  http;
7129
7517
  /** List project integrations. */
7130
7518
  async list(params = {}) {
7131
- const query3 = stripUndefined23(params);
7519
+ const query3 = stripUndefined25(params);
7132
7520
  const data = await this.http.get("/project-integrations", query3);
7133
7521
  return listItems9(data);
7134
7522
  }
@@ -7142,22 +7530,22 @@ var ProjectIntegrations = class {
7142
7530
  const data = await this.http.get(
7143
7531
  `/project-integrations/${integrationId}`
7144
7532
  );
7145
- return unwrap39(data);
7533
+ return unwrap41(data);
7146
7534
  }
7147
7535
  /** Create a project integration. */
7148
7536
  async create(params) {
7149
- const body4 = stripUndefObj2(params);
7150
- const data = await this.http.post("/project-integrations", body4);
7151
- return unwrap39(data);
7537
+ const body5 = stripUndefObj2(params);
7538
+ const data = await this.http.post("/project-integrations", body5);
7539
+ return unwrap41(data);
7152
7540
  }
7153
7541
  /** Update a project integration. */
7154
7542
  async update(integrationId, params) {
7155
- const body4 = stripUndefObj2(params);
7543
+ const body5 = stripUndefObj2(params);
7156
7544
  const data = await this.http.patch(
7157
7545
  `/project-integrations/${integrationId}`,
7158
- body4
7546
+ body5
7159
7547
  );
7160
- return unwrap39(data);
7548
+ return unwrap41(data);
7161
7549
  }
7162
7550
  /** Delete a project integration. */
7163
7551
  async delete(integrationId) {
@@ -7166,7 +7554,7 @@ var ProjectIntegrations = class {
7166
7554
  };
7167
7555
 
7168
7556
  // src/resources/provider-defaults.ts
7169
- function unwrap40(data) {
7557
+ function unwrap42(data) {
7170
7558
  if (data && typeof data === "object") {
7171
7559
  const d = data;
7172
7560
  for (const k of ["data", "defaults", "provider_defaults", "config"]) {
@@ -7182,7 +7570,7 @@ var ProviderDefaults = class {
7182
7570
  http;
7183
7571
  /** Get the current fleet-wide provider defaults. */
7184
7572
  async list() {
7185
- return unwrap40(await this.http.get("/admin/provider-defaults"));
7573
+ return unwrap42(await this.http.get("/admin/provider-defaults"));
7186
7574
  }
7187
7575
  /** Return the defaults entry for a single provider, or {} if missing. */
7188
7576
  async get(provider) {
@@ -7195,29 +7583,29 @@ var ProviderDefaults = class {
7195
7583
  }
7196
7584
  /** Replace the fleet-wide defaults (PUT /admin/provider-defaults). */
7197
7585
  async update(opts) {
7198
- const body4 = Object.fromEntries(
7586
+ const body5 = Object.fromEntries(
7199
7587
  Object.entries(opts).filter(([, v]) => v !== void 0)
7200
7588
  );
7201
- return unwrap40(
7202
- await this.http.put("/admin/provider-defaults", body4)
7589
+ return unwrap42(
7590
+ await this.http.put("/admin/provider-defaults", body5)
7203
7591
  );
7204
7592
  }
7205
7593
  // ── Per-tenant overrides ────────────────────────────────────────────────
7206
7594
  async getTenant(tenantId) {
7207
- return unwrap40(
7595
+ return unwrap42(
7208
7596
  await this.http.get(
7209
7597
  `/admin/tenants/${tenantId}/provider-config`
7210
7598
  )
7211
7599
  );
7212
7600
  }
7213
7601
  async setTenant(tenantId, opts) {
7214
- const body4 = Object.fromEntries(
7602
+ const body5 = Object.fromEntries(
7215
7603
  Object.entries(opts).filter(([, v]) => v !== void 0)
7216
7604
  );
7217
- return unwrap40(
7605
+ return unwrap42(
7218
7606
  await this.http.put(
7219
7607
  `/admin/tenants/${tenantId}/provider-config`,
7220
- body4
7608
+ body5
7221
7609
  )
7222
7610
  );
7223
7611
  }
@@ -7227,7 +7615,7 @@ var ProviderDefaults = class {
7227
7615
  };
7228
7616
 
7229
7617
  // src/resources/regions.ts
7230
- function unwrap41(payload) {
7618
+ function unwrap43(payload) {
7231
7619
  if (payload && typeof payload === "object") {
7232
7620
  const p = payload;
7233
7621
  for (const k of [
@@ -7244,7 +7632,7 @@ function unwrap41(payload) {
7244
7632
  return payload;
7245
7633
  }
7246
7634
  function listItems10(payload) {
7247
- const result = unwrap41(payload);
7635
+ const result = unwrap43(payload);
7248
7636
  if (Array.isArray(result)) return result;
7249
7637
  return [];
7250
7638
  }
@@ -7258,6 +7646,11 @@ var Regions = class {
7258
7646
  const data = await this.http.get("/compute/regions");
7259
7647
  return listItems10(data);
7260
7648
  }
7649
+ /** Get canonical compute catalog, including product templates and readiness. */
7650
+ async catalog() {
7651
+ const data = await this.http.get("/compute/catalog");
7652
+ return unwrap43(data);
7653
+ }
7261
7654
  /** List available compute sizes. */
7262
7655
  async listSizes() {
7263
7656
  const data = await this.http.get("/compute/sizes");
@@ -7266,7 +7659,7 @@ var Regions = class {
7266
7659
  /** Get static compute pricing data. */
7267
7660
  async pricing() {
7268
7661
  const data = await this.http.get("/compute/pricing");
7269
- return unwrap41(data);
7662
+ return unwrap43(data);
7270
7663
  }
7271
7664
  /** List community computer templates. */
7272
7665
  async listTemplates() {
@@ -7278,18 +7671,18 @@ var Regions = class {
7278
7671
  const data = await this.http.get(
7279
7672
  `/compute/templates/${templateId}`
7280
7673
  );
7281
- return unwrap41(data);
7674
+ return unwrap43(data);
7282
7675
  }
7283
7676
  };
7284
7677
 
7285
7678
  // src/resources/runtime-env.ts
7286
- function unwrap42(payload) {
7679
+ function unwrap44(payload) {
7287
7680
  if (payload !== null && typeof payload === "object" && "data" in payload && payload.data !== void 0) {
7288
7681
  return payload.data;
7289
7682
  }
7290
7683
  return payload;
7291
7684
  }
7292
- function body3(params) {
7685
+ function body4(params) {
7293
7686
  return Object.fromEntries(
7294
7687
  Object.entries({
7295
7688
  scope: params.scope,
@@ -7336,11 +7729,11 @@ var RuntimeEnv = class {
7336
7729
  "/runtime-env",
7337
7730
  query2(params)
7338
7731
  );
7339
- return unwrap42(response).map(normalize2);
7732
+ return unwrap44(response).map(normalize2);
7340
7733
  }
7341
7734
  async get(id) {
7342
7735
  return normalize2(
7343
- unwrap42(
7736
+ unwrap44(
7344
7737
  await this.http.get(
7345
7738
  `/runtime-env/${encodeURIComponent(id)}`
7346
7739
  )
@@ -7349,10 +7742,10 @@ var RuntimeEnv = class {
7349
7742
  }
7350
7743
  async set(params) {
7351
7744
  return normalize2(
7352
- unwrap42(
7745
+ unwrap44(
7353
7746
  await this.http.post(
7354
7747
  "/runtime-env",
7355
- body3(params)
7748
+ body4(params)
7356
7749
  )
7357
7750
  )
7358
7751
  );
@@ -7363,7 +7756,7 @@ var RuntimeEnv = class {
7363
7756
  };
7364
7757
 
7365
7758
  // src/resources/runtime-capabilities.ts
7366
- function unwrap43(payload) {
7759
+ function unwrap45(payload) {
7367
7760
  if (payload && typeof payload === "object" && "data" in payload) {
7368
7761
  return payload.data;
7369
7762
  }
@@ -7375,7 +7768,7 @@ var RuntimeCapabilitiesResource = class {
7375
7768
  }
7376
7769
  http;
7377
7770
  async get() {
7378
- return unwrap43(
7771
+ return unwrap45(
7379
7772
  await this.http.get("/runtime-capabilities")
7380
7773
  );
7381
7774
  }
@@ -7391,11 +7784,21 @@ function encodeContent(content) {
7391
7784
  return btoa(bin);
7392
7785
  }
7393
7786
  var SANDBOX_TEMPLATE = "miosa-sandbox";
7787
+ var SANDBOX_SHAPE_CONTRACTS = {
7788
+ xs: { cpuCount: 1, memoryMb: 2048, diskSizeMb: 10240 },
7789
+ small: { cpuCount: 2, memoryMb: 4096, diskSizeMb: 10240 },
7790
+ medium: { cpuCount: 4, memoryMb: 8192, diskSizeMb: 20480 },
7791
+ large: { cpuCount: 8, memoryMb: 16384, diskSizeMb: 40960 },
7792
+ xl: { cpuCount: 16, memoryMb: 32768, diskSizeMb: 81920 }
7793
+ };
7394
7794
  var AGENT_WORKSPACE_TIMEOUT_SEC = 86400;
7395
7795
  var AGENT_WORKSPACE_IDLE_TIMEOUT_SEC = 1800;
7396
7796
  var AGENT_WORKSPACE_SNAPSHOT_EXPIRATION_DAYS = 30;
7397
7797
  var AGENT_WORKSPACE_KEEP_LAST_SNAPSHOTS = 1;
7398
- function unwrap44(payload) {
7798
+ function isLegacyForkParams(opts) {
7799
+ return "name" in opts || "metadata" in opts;
7800
+ }
7801
+ function unwrap46(payload) {
7399
7802
  if (payload !== null && typeof payload === "object" && "data" in payload && payload.data !== void 0) {
7400
7803
  return payload.data;
7401
7804
  }
@@ -7434,23 +7837,55 @@ function createBody(params = {}) {
7434
7837
  const persistent = params.persistent;
7435
7838
  const snapshotExpirationSec = snapshotExpirationSeconds(params);
7436
7839
  const keepLastSnapshots = params.keepLastSnapshots ?? params.keep_last_snapshots;
7840
+ const legacyPersistencePolicy = persistent !== void 0 && (snapshotExpirationSec !== void 0 || keepLastSnapshots !== void 0);
7437
7841
  const metadata = { ...params.metadata ?? {} };
7438
- if (persistent !== void 0) metadata.miosa_persistent = persistent;
7842
+ if (legacyPersistencePolicy) metadata.miosa_persistent = persistent;
7843
+ const cpuCount = params.cpuCount ?? params.cpu_count;
7844
+ const memoryMb = params.memoryMb ?? params.memory_mb;
7845
+ const diskMb = params.diskMb ?? params.disk_mb ?? params.diskSizeMb ?? params.disk_size_mb;
7846
+ const suppliedResources = [cpuCount, memoryMb, diskMb].filter(
7847
+ (value) => value !== void 0
7848
+ ).length;
7849
+ if (suppliedResources !== 0 && suppliedResources !== 3) {
7850
+ throw new TypeError(
7851
+ "Raw sandbox resources require cpuCount, memoryMb, and diskSizeMb together. Prefer size."
7852
+ );
7853
+ }
7854
+ let resolvedSize = params.size;
7855
+ if (suppliedResources === 3) {
7856
+ const matchingSize = Object.entries(SANDBOX_SHAPE_CONTRACTS).find(
7857
+ ([, contract]) => contract.cpuCount === cpuCount && contract.memoryMb === memoryMb && contract.diskSizeMb === diskMb
7858
+ )?.[0];
7859
+ if (!matchingSize) {
7860
+ throw new TypeError(
7861
+ "Raw sandbox resources must exactly match a named size contract."
7862
+ );
7863
+ }
7864
+ if (resolvedSize && resolvedSize !== matchingSize) {
7865
+ throw new TypeError(
7866
+ `Raw sandbox resources match ${matchingSize}, not requested size ${resolvedSize}.`
7867
+ );
7868
+ }
7869
+ resolvedSize = matchingSize;
7870
+ }
7439
7871
  if (snapshotExpirationSec !== void 0) {
7440
7872
  metadata.snapshot_expiration_sec = snapshotExpirationSec;
7441
7873
  }
7442
7874
  if (keepLastSnapshots !== void 0) {
7443
7875
  metadata.keep_last_snapshots = keepLastSnapshots;
7444
7876
  }
7445
- return stripUndefined24({
7877
+ return stripUndefined26({
7446
7878
  template_id: templateId,
7447
- cpu_count: params.cpuCount ?? params.cpu_count,
7448
- memory_mb: params.memoryMb ?? params.memory_mb,
7879
+ size: resolvedSize,
7880
+ persistent,
7881
+ cpu_count: cpuCount,
7882
+ memory_mb: memoryMb,
7449
7883
  disk_mb: params.diskMb ?? params.disk_mb,
7450
7884
  disk_size_mb: params.diskSizeMb ?? params.disk_size_mb,
7451
- timeout_sec: params.timeoutSec ?? params.timeout_sec ?? (persistent === true ? 86400 : void 0),
7452
- idle_timeout_sec: params.idleTimeoutSec ?? params.idle_timeout_sec ?? (persistent === true ? 1800 : void 0),
7885
+ timeout_sec: params.timeoutSec ?? params.timeout_sec ?? (legacyPersistencePolicy && persistent === true ? 86400 : void 0),
7886
+ idle_timeout_sec: params.idleTimeoutSec ?? params.idle_timeout_sec ?? (legacyPersistencePolicy && persistent === true ? 1800 : void 0),
7453
7887
  always_on: params.alwaysOn ?? params.always_on,
7888
+ allow_provision: params.allowProvision ?? params.allow_provision,
7454
7889
  env: params.env,
7455
7890
  metadata: Object.keys(metadata).length > 0 ? metadata : void 0,
7456
7891
  services: params.services,
@@ -7472,14 +7907,14 @@ function createBody(params = {}) {
7472
7907
  });
7473
7908
  }
7474
7909
  function execBody(command, options = {}) {
7475
- return stripUndefined24({
7910
+ return stripUndefined26({
7476
7911
  command,
7477
7912
  cwd: options.cwd ?? options.workingDir ?? options.working_dir,
7478
7913
  env: options.env,
7479
7914
  timeout: options.timeout ?? options.timeoutSec ?? options.timeout_sec
7480
7915
  });
7481
7916
  }
7482
- function stripUndefined24(input) {
7917
+ function stripUndefined26(input) {
7483
7918
  return Object.fromEntries(
7484
7919
  Object.entries(input).filter(([, value]) => value !== void 0)
7485
7920
  );
@@ -7621,11 +8056,11 @@ var SandboxTerminal = class {
7621
8056
  }
7622
8057
  sandbox;
7623
8058
  async create(params = {}) {
7624
- const body4 = Object.fromEntries(
8059
+ const body5 = Object.fromEntries(
7625
8060
  Object.entries(params).filter(([, v]) => v !== void 0)
7626
8061
  );
7627
- const response = unwrap44(
7628
- await this.sandbox.http.post(`/sandboxes/${this.sandbox.id}/terminal`, body4)
8062
+ const response = unwrap46(
8063
+ await this.sandbox.http.post(`/sandboxes/${this.sandbox.id}/terminal`, body5)
7629
8064
  );
7630
8065
  return response;
7631
8066
  }
@@ -7645,6 +8080,15 @@ var SandboxEvents = class {
7645
8080
  return this.sandbox.http.stream(`/sandboxes/${this.sandbox.id}/events`);
7646
8081
  }
7647
8082
  };
8083
+ var SandboxMetrics = class {
8084
+ constructor(sandbox) {
8085
+ this.sandbox = sandbox;
8086
+ }
8087
+ sandbox;
8088
+ get(window2 = "1h") {
8089
+ return this.sandbox.metrics(window2);
8090
+ }
8091
+ };
7648
8092
  var SandboxPreviews = class {
7649
8093
  constructor(sandbox) {
7650
8094
  this.sandbox = sandbox;
@@ -7667,21 +8111,21 @@ var SandboxPreviews = class {
7667
8111
  return [];
7668
8112
  }
7669
8113
  async create(port, opts = {}) {
7670
- const body4 = {
8114
+ const body5 = {
7671
8115
  port,
7672
8116
  ...Object.fromEntries(
7673
8117
  Object.entries(opts).filter(([, v]) => v !== void 0)
7674
8118
  )
7675
8119
  };
7676
- return unwrap44(
8120
+ return unwrap46(
7677
8121
  await this.http.post(
7678
8122
  `/sandboxes/${this.sandbox.id}/previews`,
7679
- body4
8123
+ body5
7680
8124
  )
7681
8125
  );
7682
8126
  }
7683
8127
  async get(previewId) {
7684
- return unwrap44(
8128
+ return unwrap46(
7685
8129
  await this.http.get(
7686
8130
  `/sandboxes/${this.sandbox.id}/previews/${previewId}`
7687
8131
  )
@@ -7694,7 +8138,7 @@ var SandboxPreviews = class {
7694
8138
  }
7695
8139
  /** Mint a share token for previewId. */
7696
8140
  async share(previewId, opts = {}) {
7697
- return unwrap44(
8141
+ return unwrap46(
7698
8142
  await this.http.post(
7699
8143
  `/sandboxes/${this.sandbox.id}/previews/${previewId}/share`,
7700
8144
  { ttl_seconds: opts.ttl_seconds ?? opts.expires_in_sec ?? 3600 }
@@ -7763,7 +8207,7 @@ var SandboxTags = class {
7763
8207
  sandbox;
7764
8208
  /** Replace the full tag list with tags. */
7765
8209
  async set(tags) {
7766
- return unwrap44(
8210
+ return unwrap46(
7767
8211
  await this.sandbox.http.patch(`/sandboxes/${this.sandbox.id}/tags`, { tags })
7768
8212
  );
7769
8213
  }
@@ -7785,6 +8229,7 @@ var Sandbox = class _Sandbox {
7785
8229
  this.snapshots = new SandboxSnapshots(this);
7786
8230
  this.terminal = new SandboxTerminal(this);
7787
8231
  this.events = new SandboxEvents(this);
8232
+ this.metricsResource = new SandboxMetrics(this);
7788
8233
  this.previews = new SandboxPreviews(this);
7789
8234
  this.env = new SandboxEnv(this);
7790
8235
  this.tags = new SandboxTags(this);
@@ -7807,6 +8252,8 @@ var Sandbox = class _Sandbox {
7807
8252
  terminal;
7808
8253
  /** SSE event stream. */
7809
8254
  events;
8255
+ /** Operational metrics and current resource state. */
8256
+ metricsResource;
7810
8257
  /** Preview CRUD + share/revokeShare. */
7811
8258
  previews;
7812
8259
  /** Read-only env var listing. */
@@ -7834,7 +8281,7 @@ var Sandbox = class _Sandbox {
7834
8281
  return this.data.template_id ?? this.data.image_id ?? "";
7835
8282
  }
7836
8283
  async refresh() {
7837
- this.data = unwrap44(
8284
+ this.data = unwrap46(
7838
8285
  await this.http.get(`/sandboxes/${this.id}`)
7839
8286
  );
7840
8287
  return this;
@@ -7859,9 +8306,24 @@ var Sandbox = class _Sandbox {
7859
8306
  wait: options.wait ?? true
7860
8307
  });
7861
8308
  }
8309
+ /**
8310
+ * Dispatch a prompt into this Sandbox through the Agent Runs API.
8311
+ */
8312
+ async prompt(prompt, options = {}) {
8313
+ return new AgentRuns(this.http).run({
8314
+ ...options,
8315
+ prompt,
8316
+ targetKind: "sandbox",
8317
+ targetId: this.id,
8318
+ sandboxId: this.id,
8319
+ provider: options.provider ?? "claude",
8320
+ cwd: options.cwd ?? "/workspace",
8321
+ wait: options.wait ?? true
8322
+ });
8323
+ }
7862
8324
  async runExec(command, options) {
7863
8325
  this.assertRunning("exec");
7864
- const response = unwrap44(
8326
+ const response = unwrap46(
7865
8327
  await this.http.post(
7866
8328
  `/sandboxes/${this.id}/exec`,
7867
8329
  execBody(command, options)
@@ -7905,11 +8367,11 @@ var Sandbox = class _Sandbox {
7905
8367
  );
7906
8368
  }
7907
8369
  async createExport(params) {
7908
- const body4 = typeof params === "string" ? { path: params } : Array.isArray(params) ? { paths: params } : params;
7909
- const response = unwrap44(
8370
+ const body5 = typeof params === "string" ? { path: params } : Array.isArray(params) ? { paths: params } : params;
8371
+ const response = unwrap46(
7910
8372
  await this.http.post(
7911
8373
  `/sandboxes/${this.id}/exports`,
7912
- body4
8374
+ body5
7913
8375
  )
7914
8376
  );
7915
8377
  return normalizeExport(response);
@@ -7931,7 +8393,7 @@ var Sandbox = class _Sandbox {
7931
8393
  }
7932
8394
  async listFiles(path = "/workspace") {
7933
8395
  this.assertRunning("files.list");
7934
- const response = unwrap44(
8396
+ const response = unwrap46(
7935
8397
  await this.http.get(
7936
8398
  `/sandboxes/${this.id}/files`,
7937
8399
  { path }
@@ -7941,7 +8403,7 @@ var Sandbox = class _Sandbox {
7941
8403
  }
7942
8404
  async statFile(path) {
7943
8405
  this.assertRunning("files.stat");
7944
- return unwrap44(
8406
+ return unwrap46(
7945
8407
  await this.http.post(
7946
8408
  `/sandboxes/${this.id}/files/stat`,
7947
8409
  { path }
@@ -7951,9 +8413,17 @@ var Sandbox = class _Sandbox {
7951
8413
  async expose(port) {
7952
8414
  return (await this.exposeInfo(port)).url;
7953
8415
  }
8416
+ async getUrl(port, path = "/") {
8417
+ const url = new URL((await this.exposeInfo(port)).url);
8418
+ url.pathname = path.startsWith("/") ? path : `/${path}`;
8419
+ return url.toString();
8420
+ }
8421
+ async getHost(port) {
8422
+ return new URL((await this.exposeInfo(port)).url).host;
8423
+ }
7954
8424
  async exposeInfo(port) {
7955
8425
  this.assertRunning("expose");
7956
- const response = unwrap44(
8426
+ const response = unwrap46(
7957
8427
  await this.http.post(
7958
8428
  `/sandboxes/${this.id}/expose`,
7959
8429
  port === void 0 ? {} : { port }
@@ -7963,7 +8433,7 @@ var Sandbox = class _Sandbox {
7963
8433
  }
7964
8434
  async startTemplate(options = {}) {
7965
8435
  this.assertRunning("startTemplate");
7966
- return unwrap44(
8436
+ return unwrap46(
7967
8437
  await this.http.post(
7968
8438
  `/sandboxes/${this.id}/template/start`,
7969
8439
  options
@@ -7971,7 +8441,7 @@ var Sandbox = class _Sandbox {
7971
8441
  );
7972
8442
  }
7973
8443
  async getArtifacts() {
7974
- return unwrap44(
8444
+ return unwrap46(
7975
8445
  await this.http.get(
7976
8446
  `/sandboxes/${this.id}/artifacts`
7977
8447
  )
@@ -7982,16 +8452,27 @@ var Sandbox = class _Sandbox {
7982
8452
  `/sandboxes/${this.id}/logs`,
7983
8453
  { lines }
7984
8454
  );
7985
- return unwrap44(response);
8455
+ return unwrap46(response);
7986
8456
  }
7987
8457
  streamLogs() {
7988
8458
  return this.http.stream(
7989
8459
  `/sandboxes/${this.id}/logs/stream`
7990
8460
  );
7991
8461
  }
8462
+ async metrics(window2 = "1h") {
8463
+ return unwrap46(
8464
+ await this.http.get(
8465
+ `/sandboxes/${this.id}/metrics`,
8466
+ { window: window2 }
8467
+ )
8468
+ );
8469
+ }
8470
+ async getMetrics(window2 = "1h") {
8471
+ return this.metrics(window2);
8472
+ }
7992
8473
  async createSnapshot(comment) {
7993
8474
  this.assertRunning("snapshots.create");
7994
- return unwrap44(
8475
+ return unwrap46(
7995
8476
  await this.http.post(
7996
8477
  `/sandboxes/${this.id}/snapshots`,
7997
8478
  comment ? { comment } : {}
@@ -7999,14 +8480,14 @@ var Sandbox = class _Sandbox {
7999
8480
  );
8000
8481
  }
8001
8482
  async listSnapshots() {
8002
- return unwrap44(
8483
+ return unwrap46(
8003
8484
  await this.http.get(
8004
8485
  `/sandboxes/${this.id}/snapshots`
8005
8486
  )
8006
8487
  );
8007
8488
  }
8008
8489
  async restoreSnapshot(snapshotId) {
8009
- const data = unwrap44(
8490
+ const data = unwrap46(
8010
8491
  await this.http.post(
8011
8492
  `/sandboxes/${this.id}/restore/${snapshotId}`,
8012
8493
  {}
@@ -8017,19 +8498,46 @@ var Sandbox = class _Sandbox {
8017
8498
  async deleteSnapshot(snapshotId) {
8018
8499
  await this.http.delete(`/sandboxes/${this.id}/snapshots/${snapshotId}`);
8019
8500
  }
8020
- /**
8021
- * Fork (clone) this sandbox into a new sandbox via copy-on-write snapshot.
8022
- * The original sandbox continues running unchanged.
8023
- */
8024
8501
  async fork(opts = {}) {
8502
+ if (isLegacyForkParams(opts)) {
8503
+ return this.forkLegacy(opts);
8504
+ }
8025
8505
  this.assertRunning("fork");
8026
- const body4 = {};
8027
- if (opts.name !== void 0) body4.name = opts.name;
8028
- if (opts.metadata !== void 0) body4.metadata = opts.metadata;
8029
- const data = unwrap44(
8030
- await this.http.post(
8506
+ const body5 = stripUndefined26({
8507
+ timeout_sec: opts.timeoutSec ?? opts.timeout_sec,
8508
+ template_id: opts.templateId ?? opts.template_id
8509
+ });
8510
+ const idempotencyKey11 = opts.idempotencyKey ?? opts.idempotency_key;
8511
+ const data = unwrap46(
8512
+ await this.http.request(
8513
+ `/sandboxes/${this.id}/fork`,
8514
+ {
8515
+ method: "POST",
8516
+ body: body5,
8517
+ ...idempotencyKey11 ? { headers: { "Idempotency-Key": idempotencyKey11 } } : {}
8518
+ }
8519
+ )
8520
+ );
8521
+ return new _Sandbox(this.http, data);
8522
+ }
8523
+ /** Fork using private compatibility fields excluded from the public V1 contract. */
8524
+ async forkLegacy(opts = {}) {
8525
+ this.assertRunning("fork");
8526
+ const body5 = stripUndefined26({
8527
+ timeout_sec: opts.timeoutSec ?? opts.timeout_sec,
8528
+ template_id: opts.templateId ?? opts.template_id,
8529
+ name: opts.name,
8530
+ metadata: opts.metadata
8531
+ });
8532
+ const idempotencyKey11 = opts.idempotencyKey ?? opts.idempotency_key;
8533
+ const data = unwrap46(
8534
+ await this.http.request(
8031
8535
  `/sandboxes/${this.id}/fork`,
8032
- body4
8536
+ {
8537
+ method: "POST",
8538
+ body: body5,
8539
+ ...idempotencyKey11 ? { headers: { "Idempotency-Key": idempotencyKey11 } } : {}
8540
+ }
8033
8541
  )
8034
8542
  );
8035
8543
  return new _Sandbox(this.http, data);
@@ -8040,7 +8548,8 @@ var Sandbox = class _Sandbox {
8040
8548
  async update(params) {
8041
8549
  const snapshotExpirationSec = snapshotExpirationSeconds(params);
8042
8550
  const metadata = { ...params.metadata ?? {} };
8043
- if (params.persistent !== void 0) metadata.miosa_persistent = params.persistent;
8551
+ if (params.persistent !== void 0)
8552
+ metadata.miosa_persistent = params.persistent;
8044
8553
  if (snapshotExpirationSec !== void 0) {
8045
8554
  metadata.snapshot_expiration_sec = snapshotExpirationSec;
8046
8555
  }
@@ -8048,7 +8557,7 @@ var Sandbox = class _Sandbox {
8048
8557
  if (keepLastSnapshots !== void 0) {
8049
8558
  metadata.keep_last_snapshots = keepLastSnapshots;
8050
8559
  }
8051
- const body4 = stripUndefined24({
8560
+ const body5 = stripUndefined26({
8052
8561
  name: params.name,
8053
8562
  slug: params.slug,
8054
8563
  tags: params.tags,
@@ -8057,25 +8566,32 @@ var Sandbox = class _Sandbox {
8057
8566
  timeout_sec: params.timeout_sec ?? params.timeoutSec,
8058
8567
  idle_timeout_sec: params.idle_timeout_sec ?? params.idleTimeoutSec
8059
8568
  });
8060
- const data = unwrap44(
8569
+ const data = unwrap46(
8061
8570
  await this.http.patch(
8062
8571
  `/sandboxes/${this.id}`,
8063
- body4
8572
+ body5
8064
8573
  )
8065
8574
  );
8066
8575
  this.data = data;
8067
8576
  return this;
8068
8577
  }
8069
8578
  async extend(timeoutSec) {
8070
- const data = unwrap44(
8579
+ const data = unwrap46(
8071
8580
  await this.http.post(
8072
8581
  `/sandboxes/${this.id}/extend`,
8073
- { timeout_sec: timeoutSec }
8582
+ timeoutSec === void 0 ? {} : { timeout_sec: timeoutSec }
8074
8583
  )
8075
8584
  );
8076
- this.data = data;
8585
+ this.data = { ...this.data, ...data };
8077
8586
  return this;
8078
8587
  }
8588
+ async usage() {
8589
+ return unwrap46(
8590
+ await this.http.get(
8591
+ `/sandboxes/${this.id}/usage`
8592
+ )
8593
+ );
8594
+ }
8079
8595
  /**
8080
8596
  * POST /api/v1/sandboxes/{id}/preview-token → {token, url, expires_at, scope}
8081
8597
  */
@@ -8090,30 +8606,36 @@ var Sandbox = class _Sandbox {
8090
8606
  return raw;
8091
8607
  }
8092
8608
  async pause() {
8093
- const data = unwrap44(
8609
+ const data = unwrap46(
8094
8610
  await this.http.post(
8095
8611
  `/sandboxes/${this.id}/pause`,
8096
8612
  {}
8097
8613
  )
8098
8614
  );
8099
- this.data = data;
8615
+ this.data = { ...this.data, ...data };
8100
8616
  return this;
8101
8617
  }
8102
- async resume() {
8103
- const data = unwrap44(
8104
- await this.http.post(
8105
- `/sandboxes/${this.id}/resume`,
8106
- {}
8107
- )
8618
+ async resume(idempotencyKey11) {
8619
+ const response = idempotencyKey11 ? await this.http.request(
8620
+ `/sandboxes/${this.id}/resume`,
8621
+ {
8622
+ method: "POST",
8623
+ body: {},
8624
+ headers: { "Idempotency-Key": idempotencyKey11 }
8625
+ }
8626
+ ) : await this.http.post(
8627
+ `/sandboxes/${this.id}/resume`,
8628
+ {}
8108
8629
  );
8109
- this.data = data;
8630
+ const data = unwrap46(response);
8631
+ this.data = { ...this.data, ...data };
8110
8632
  return this;
8111
8633
  }
8112
8634
  async deploy(params = {}) {
8113
8635
  const idempotencyKey11 = params.idempotencyKey ?? params.idempotency_key;
8114
8636
  const requestOptions = {
8115
8637
  method: "POST",
8116
- body: stripUndefined24({
8638
+ body: stripUndefined26({
8117
8639
  name: params.name,
8118
8640
  deployment_id: params.deploymentId ?? params.deployment_id,
8119
8641
  output_path: params.outputPath ?? params.output_path ?? params.path ?? params.sourcePath ?? params.source_path,
@@ -8136,7 +8658,7 @@ var Sandbox = class _Sandbox {
8136
8658
  if (idempotencyKey11) {
8137
8659
  requestOptions.headers = { "Idempotency-Key": idempotencyKey11 };
8138
8660
  }
8139
- return unwrap44(
8661
+ return unwrap46(
8140
8662
  await this.http.request(
8141
8663
  `/sandboxes/${this.id}/deploy`,
8142
8664
  requestOptions
@@ -8148,7 +8670,7 @@ var Sandbox = class _Sandbox {
8148
8670
  }
8149
8671
  /** Check readiness of the sandbox (GET /sandboxes/:id/readiness). */
8150
8672
  async readiness() {
8151
- return unwrap44(
8673
+ return unwrap46(
8152
8674
  await this.http.get(
8153
8675
  `/sandboxes/${this.id}/readiness`
8154
8676
  )
@@ -8200,7 +8722,7 @@ var Sandbox = class _Sandbox {
8200
8722
  const headers = {
8201
8723
  Authorization: `Bearer ${this.http.apiKey}`,
8202
8724
  Accept: "text/event-stream",
8203
- "User-Agent": "@miosa/sdk/1.0.0"
8725
+ "User-Agent": SDK_USER_AGENT
8204
8726
  };
8205
8727
  const response = await fetch(
8206
8728
  `${this.http.baseUrl}/sandboxes/${this.id}/readiness/stream`,
@@ -8316,7 +8838,7 @@ var Sandboxes = class {
8316
8838
  if (idempotencyKey11) {
8317
8839
  requestOptions.headers = { "Idempotency-Key": idempotencyKey11 };
8318
8840
  }
8319
- const data = unwrap44(
8841
+ const data = unwrap46(
8320
8842
  await this.http.request(
8321
8843
  "/sandboxes",
8322
8844
  requestOptions
@@ -8335,16 +8857,35 @@ var Sandboxes = class {
8335
8857
  return listItems11(data).map((item) => new Sandbox(this.http, item));
8336
8858
  }
8337
8859
  async get(id) {
8338
- const data = unwrap44(
8860
+ const data = unwrap46(
8339
8861
  await this.http.get(`/sandboxes/${id}`)
8340
8862
  );
8341
8863
  return new Sandbox(this.http, data);
8342
8864
  }
8865
+ async extend(id, timeoutSec) {
8866
+ return (await this.get(id)).extend(timeoutSec);
8867
+ }
8868
+ async usage(id) {
8869
+ return (await this.get(id)).usage();
8870
+ }
8871
+ async pause(id) {
8872
+ return (await this.get(id)).pause();
8873
+ }
8874
+ async resume(id, idempotencyKey11) {
8875
+ return (await this.get(id)).resume(idempotencyKey11);
8876
+ }
8877
+ async fork(id, params = {}) {
8878
+ const sandbox = await this.get(id);
8879
+ return isLegacyForkParams(params) ? sandbox.forkLegacy(params) : sandbox.fork(params);
8880
+ }
8881
+ async forkLegacy(id, params = {}) {
8882
+ return (await this.get(id)).forkLegacy(params);
8883
+ }
8343
8884
  connect(id) {
8344
8885
  return this.get(id);
8345
8886
  }
8346
8887
  async getByName(name) {
8347
- const data = unwrap44(
8888
+ const data = unwrap46(
8348
8889
  await this.http.get(
8349
8890
  `/sandboxes/by-name/${encodeURIComponent(name)}`
8350
8891
  )
@@ -8391,17 +8932,19 @@ var Sandboxes = class {
8391
8932
  );
8392
8933
  }
8393
8934
  async validateBuildSpec(buildSpec) {
8394
- return this.http.post(
8395
- "/sandbox-templates/validate",
8396
- {
8397
- build_spec: buildSpec
8398
- }
8935
+ return unwrap46(
8936
+ await this.http.post(
8937
+ "/sandbox-templates/validate",
8938
+ {
8939
+ build_spec: buildSpec
8940
+ }
8941
+ )
8399
8942
  );
8400
8943
  }
8401
8944
  async createTemplate(params) {
8402
8945
  const response = await this.http.post(
8403
8946
  "/sandbox-templates",
8404
- stripUndefined24({
8947
+ stripUndefined26({
8405
8948
  name: params.name,
8406
8949
  slug: params.slug,
8407
8950
  description: params.description,
@@ -8409,29 +8952,29 @@ var Sandboxes = class {
8409
8952
  metadata: params.metadata
8410
8953
  })
8411
8954
  );
8412
- return unwrap44(response);
8955
+ return unwrap46(response);
8413
8956
  }
8414
8957
  async createTemplateBuild(templateId, params = {}) {
8415
8958
  const response = await this.http.post(
8416
8959
  `/sandbox-templates/${templateId}/builds`,
8417
- stripUndefined24({
8960
+ stripUndefined26({
8418
8961
  build_spec: params.buildSpec ?? params.build_spec,
8419
8962
  metadata: params.metadata
8420
8963
  })
8421
8964
  );
8422
- return unwrap44(response);
8965
+ return unwrap46(response);
8423
8966
  }
8424
8967
  async listTemplateBuilds(templateId) {
8425
8968
  const response = await this.http.get(
8426
8969
  `/sandbox-templates/${templateId}/builds`
8427
8970
  );
8428
- return unwrap44(response);
8971
+ return unwrap46(response);
8429
8972
  }
8430
8973
  async getTemplateBuild(buildId) {
8431
8974
  const response = await this.http.get(
8432
8975
  `/sandbox-template-builds/${buildId}`
8433
8976
  );
8434
- return unwrap44(response);
8977
+ return unwrap46(response);
8435
8978
  }
8436
8979
  };
8437
8980
  function toBase642(bytes) {
@@ -8463,7 +9006,7 @@ function previewInfoFromResponse(response) {
8463
9006
  )
8464
9007
  };
8465
9008
  }
8466
- function unwrap45(payload) {
9009
+ function unwrap47(payload) {
8467
9010
  if (payload && typeof payload === "object" && "data" in payload) {
8468
9011
  return payload.data;
8469
9012
  }
@@ -8479,7 +9022,7 @@ function listItems12(payload, candidateKeys = ["data", "templates", "builds", "i
8479
9022
  }
8480
9023
  return [];
8481
9024
  }
8482
- function stripUndefined25(input) {
9025
+ function stripUndefined27(input) {
8483
9026
  return Object.fromEntries(
8484
9027
  Object.entries(input).filter(([, v]) => v !== void 0)
8485
9028
  );
@@ -8506,7 +9049,7 @@ var SandboxTemplates = class {
8506
9049
  const data = await this.http.get(
8507
9050
  `/sandbox-templates/${templateId}`
8508
9051
  );
8509
- return unwrap45(data);
9052
+ return unwrap47(data);
8510
9053
  }
8511
9054
  async create(params) {
8512
9055
  const {
@@ -8516,17 +9059,17 @@ var SandboxTemplates = class {
8516
9059
  name,
8517
9060
  ...rest
8518
9061
  } = params;
8519
- const body4 = stripUndefined25({
9062
+ const body5 = stripUndefined27({
8520
9063
  name,
8521
9064
  build_spec: buildSpec ?? build_spec,
8522
9065
  ...rest
8523
9066
  });
8524
9067
  const data = await this.http.request("/sandbox-templates", {
8525
9068
  method: "POST",
8526
- body: body4,
9069
+ body: body5,
8527
9070
  headers: { "Idempotency-Key": idempotencyKey8(ikey) }
8528
9071
  });
8529
- return unwrap45(data);
9072
+ return unwrap47(data);
8530
9073
  }
8531
9074
  async buildSpecSchema() {
8532
9075
  const data = await this.http.get("/sandbox-templates/build-spec");
@@ -8550,21 +9093,21 @@ var SandboxTemplates = class {
8550
9093
  }
8551
9094
  async createBuild(templateId, params = {}) {
8552
9095
  const { idempotencyKey: ikey, ...rest } = params;
8553
- const body4 = stripUndefined25(rest);
9096
+ const body5 = stripUndefined27(rest);
8554
9097
  const data = await this.http.request(
8555
9098
  `/sandbox-templates/${templateId}/builds`,
8556
9099
  {
8557
9100
  method: "POST",
8558
- body: body4,
9101
+ body: body5,
8559
9102
  headers: { "Idempotency-Key": idempotencyKey8(ikey) }
8560
9103
  }
8561
9104
  );
8562
- return unwrap45(data);
9105
+ return unwrap47(data);
8563
9106
  }
8564
9107
  };
8565
9108
 
8566
9109
  // src/resources/settings.ts
8567
- function unwrap46(payload) {
9110
+ function unwrap48(payload) {
8568
9111
  if (payload && typeof payload === "object") {
8569
9112
  const p = payload;
8570
9113
  for (const k of [
@@ -8580,11 +9123,11 @@ function unwrap46(payload) {
8580
9123
  return payload;
8581
9124
  }
8582
9125
  function listItems13(payload) {
8583
- const result = unwrap46(payload);
9126
+ const result = unwrap48(payload);
8584
9127
  if (Array.isArray(result)) return result;
8585
9128
  return [];
8586
9129
  }
8587
- function stripUndefined26(input) {
9130
+ function stripUndefined28(input) {
8588
9131
  return Object.fromEntries(
8589
9132
  Object.entries(input).filter(([, v]) => v !== void 0)
8590
9133
  );
@@ -8597,46 +9140,46 @@ var Settings = class {
8597
9140
  /** Get the current tenant settings. */
8598
9141
  async get() {
8599
9142
  const data = await this.http.get("/settings");
8600
- return unwrap46(data);
9143
+ return unwrap48(data);
8601
9144
  }
8602
9145
  /** Update tenant settings. */
8603
9146
  async update(params) {
8604
- const body4 = stripUndefined26(params);
8605
- const data = await this.http.put("/settings", body4);
8606
- return unwrap46(data);
9147
+ const body5 = stripUndefined28(params);
9148
+ const data = await this.http.put("/settings", body5);
9149
+ return unwrap48(data);
8607
9150
  }
8608
9151
  // ── Branding ──────────────────────────────────────────────────────────────
8609
9152
  /** Get tenant branding (logo, colors, custom wordmark). */
8610
9153
  async getBranding() {
8611
9154
  const data = await this.http.get("/settings/branding");
8612
- return unwrap46(data);
9155
+ return unwrap48(data);
8613
9156
  }
8614
9157
  /** Update tenant branding. */
8615
9158
  async updateBranding(params) {
8616
- const body4 = stripUndefined26(params);
8617
- const data = await this.http.put("/settings/branding", body4);
8618
- return unwrap46(data);
9159
+ const body5 = stripUndefined28(params);
9160
+ const data = await this.http.put("/settings/branding", body5);
9161
+ return unwrap48(data);
8619
9162
  }
8620
9163
  // ── Read-only reference data ───────────────────────────────────────────────
8621
9164
  /** Get tenant-scoped compute pricing. */
8622
9165
  async computePricing() {
8623
9166
  const data = await this.http.get("/settings/compute-pricing");
8624
- return unwrap46(data);
9167
+ return unwrap48(data);
8625
9168
  }
8626
9169
  /** Get tenant-scoped GPU pricing. */
8627
9170
  async gpuPricing() {
8628
9171
  const data = await this.http.get("/settings/gpu-pricing");
8629
- return unwrap46(data);
9172
+ return unwrap48(data);
8630
9173
  }
8631
9174
  /** List models available to this tenant. */
8632
9175
  async availableModels() {
8633
9176
  const data = await this.http.get("/settings/available-models");
8634
- return unwrap46(data);
9177
+ return unwrap48(data);
8635
9178
  }
8636
9179
  /** List regions enabled for this tenant. */
8637
9180
  async regions() {
8638
9181
  const data = await this.http.get("/settings/regions");
8639
- return unwrap46(data);
9182
+ return unwrap48(data);
8640
9183
  }
8641
9184
  // ── BYOK provider keys ────────────────────────────────────────────────────
8642
9185
  /** List tenant-level BYOK provider keys (Anthropic, OpenAI, etc.). */
@@ -8646,12 +9189,12 @@ var Settings = class {
8646
9189
  }
8647
9190
  /** Create or update a BYOK provider key. */
8648
9191
  async upsertProviderKey(provider, params) {
8649
- const body4 = stripUndefined26(params);
9192
+ const body5 = stripUndefined28(params);
8650
9193
  const data = await this.http.put(
8651
9194
  `/settings/provider-keys/${provider}`,
8652
- body4
9195
+ body5
8653
9196
  );
8654
- return unwrap46(data);
9197
+ return unwrap48(data);
8655
9198
  }
8656
9199
  /** Delete a BYOK provider key. */
8657
9200
  async deleteProviderKey(provider) {
@@ -8660,7 +9203,7 @@ var Settings = class {
8660
9203
  };
8661
9204
 
8662
9205
  // src/resources/snapshots-standalone.ts
8663
- function unwrap47(data) {
9206
+ function unwrap49(data) {
8664
9207
  if (data && typeof data === "object") {
8665
9208
  const d = data;
8666
9209
  for (const k of ["data", "snapshots", "items"]) {
@@ -8691,14 +9234,14 @@ var SnapshotsStandalone = class {
8691
9234
  return unwrapList14(await this.http.get("/admin/snapshots", query3));
8692
9235
  }
8693
9236
  async get(snapshotId) {
8694
- return unwrap47(
9237
+ return unwrap49(
8695
9238
  await this.http.get(`/admin/snapshots/${snapshotId}`)
8696
9239
  );
8697
9240
  }
8698
9241
  };
8699
9242
 
8700
9243
  // src/resources/storage.ts
8701
- function unwrap48(payload) {
9244
+ function unwrap50(payload) {
8702
9245
  if (payload && typeof payload === "object" && "data" in payload) {
8703
9246
  return payload.data;
8704
9247
  }
@@ -8714,7 +9257,7 @@ function listItems14(payload, candidateKeys = ["data", "buckets", "objects", "it
8714
9257
  }
8715
9258
  return [];
8716
9259
  }
8717
- function stripUndefined27(input) {
9260
+ function stripUndefined29(input) {
8718
9261
  return Object.fromEntries(
8719
9262
  Object.entries(input).filter(([, v]) => v !== void 0)
8720
9263
  );
@@ -8731,24 +9274,24 @@ var Storage = class {
8731
9274
  }
8732
9275
  async createBucket(params) {
8733
9276
  const { name, public: isPublic, visibility, ...rest } = params;
8734
- const body4 = stripUndefined27({
9277
+ const body5 = stripUndefined29({
8735
9278
  name,
8736
9279
  visibility: visibility ?? (isPublic === void 0 ? void 0 : isPublic ? "public" : "private"),
8737
9280
  ...rest
8738
9281
  });
8739
- const data = await this.http.post("/storage/buckets", body4);
8740
- return unwrap48(data);
9282
+ const data = await this.http.post("/storage/buckets", body5);
9283
+ return unwrap50(data);
8741
9284
  }
8742
9285
  async getBucket(bucketId) {
8743
9286
  const data = await this.http.get(`/storage/buckets/${bucketId}`);
8744
- return unwrap48(data);
9287
+ return unwrap50(data);
8745
9288
  }
8746
9289
  async deleteBucket(bucketId) {
8747
9290
  await this.http.delete(`/storage/buckets/${bucketId}`);
8748
9291
  }
8749
9292
  // ── Objects ────────────────────────────────────────────────────────────────
8750
9293
  async listObjects(bucketId, params = {}) {
8751
- const query3 = stripUndefined27({
9294
+ const query3 = stripUndefined29({
8752
9295
  prefix: params.prefix,
8753
9296
  max_keys: params.max_keys ?? params.maxKeys ?? params.limit,
8754
9297
  marker: params.marker ?? params.cursor
@@ -8782,16 +9325,16 @@ var Storage = class {
8782
9325
  // ── Presigned URLs ─────────────────────────────────────────────────────────
8783
9326
  async presign(bucketId, params) {
8784
9327
  const operationMethod = params.operation === "put" ? "PUT" : params.operation === "get" ? "GET" : void 0;
8785
- const body4 = stripUndefined27({
9328
+ const body5 = stripUndefined29({
8786
9329
  key: params.key,
8787
9330
  method: params.method ?? operationMethod ?? "GET",
8788
9331
  expires_in: params.expiresIn ?? params.expires_in ?? params.expiresInSec ?? params.expires_in_sec ?? 3600
8789
9332
  });
8790
9333
  const data = await this.http.post(
8791
9334
  `/storage/buckets/${bucketId}/presign`,
8792
- body4
9335
+ body5
8793
9336
  );
8794
- return unwrap48(data);
9337
+ return unwrap50(data);
8795
9338
  }
8796
9339
  };
8797
9340
 
@@ -8880,8 +9423,58 @@ var OrgInvites = class {
8880
9423
  }
8881
9424
  };
8882
9425
 
9426
+ // src/resources/organizations.ts
9427
+ var OrganizationMembers = class {
9428
+ constructor(http) {
9429
+ this.http = http;
9430
+ }
9431
+ http;
9432
+ async list(organizationId) {
9433
+ return this.http.get(
9434
+ `/tenants/${encodeURIComponent(organizationId)}/members`
9435
+ );
9436
+ }
9437
+ async add(organizationId, userId, role = "member") {
9438
+ return this.http.post(
9439
+ `/tenants/${encodeURIComponent(organizationId)}/members`,
9440
+ { user_id: userId, role }
9441
+ );
9442
+ }
9443
+ async remove(organizationId, userId) {
9444
+ return this.http.delete(
9445
+ `/tenants/${encodeURIComponent(organizationId)}/members/${encodeURIComponent(userId)}`
9446
+ );
9447
+ }
9448
+ };
9449
+ var Organizations = class {
9450
+ constructor(http) {
9451
+ this.http = http;
9452
+ this.members = new OrganizationMembers(http);
9453
+ this.invites = new OrgInvites(http);
9454
+ }
9455
+ http;
9456
+ members;
9457
+ invites;
9458
+ async list() {
9459
+ const response = await this.http.get(
9460
+ "/platform/tenants"
9461
+ );
9462
+ return response.data ?? [];
9463
+ }
9464
+ async current() {
9465
+ return this.http.get("/platform/tenants/current");
9466
+ }
9467
+ /** Requires a user JWT. API keys are pinned to their organization. */
9468
+ async switch(idOrSlug) {
9469
+ return this.http.post(
9470
+ `/platform/tenants/${encodeURIComponent(idOrSlug)}/switch`,
9471
+ {}
9472
+ );
9473
+ }
9474
+ };
9475
+
8883
9476
  // src/resources/tenant.ts
8884
- function unwrap49(payload) {
9477
+ function unwrap51(payload) {
8885
9478
  if (payload && typeof payload === "object") {
8886
9479
  const p = payload;
8887
9480
  for (const k of ["data", "tenant", "branding", "items"]) {
@@ -8890,7 +9483,7 @@ function unwrap49(payload) {
8890
9483
  }
8891
9484
  return payload;
8892
9485
  }
8893
- function stripUndefined28(input) {
9486
+ function stripUndefined30(input) {
8894
9487
  return Object.fromEntries(
8895
9488
  Object.entries(input).filter(([, v]) => v !== void 0)
8896
9489
  );
@@ -8903,14 +9496,14 @@ var PreviewDomain = class {
8903
9496
  /** Get the tenant's white-label preview domain settings. */
8904
9497
  async get() {
8905
9498
  const data = await this.http.get("/tenant/preview-domain");
8906
- return unwrap49(data);
9499
+ return unwrap51(data);
8907
9500
  }
8908
9501
  /** Set the tenant's white-label preview domain. */
8909
9502
  async set(domain) {
8910
9503
  const data = await this.http.put("/tenant/preview-domain", {
8911
9504
  preview_domain: domain
8912
9505
  });
8913
- return unwrap49(data);
9506
+ return unwrap51(data);
8914
9507
  }
8915
9508
  /** Re-run DNS verification for the configured preview domain. */
8916
9509
  async verify() {
@@ -8918,7 +9511,7 @@ var PreviewDomain = class {
8918
9511
  "/tenant/preview-domain/verify",
8919
9512
  {}
8920
9513
  );
8921
- return unwrap49(data);
9514
+ return unwrap51(data);
8922
9515
  }
8923
9516
  /** Remove the tenant's custom preview domain. */
8924
9517
  async delete() {
@@ -8933,14 +9526,14 @@ var Branding = class {
8933
9526
  /** Get tenant branding used by white-label hosted surfaces. */
8934
9527
  async get() {
8935
9528
  const data = await this.http.get("/tenant/branding");
8936
- return unwrap49(data);
9529
+ return unwrap51(data);
8937
9530
  }
8938
9531
  /** Update tenant branding used by white-label hosted surfaces. */
8939
9532
  async set(params) {
8940
9533
  const data = await this.http.put("/tenant/branding", {
8941
- branding: stripUndefined28(params)
9534
+ branding: stripUndefined30(params)
8942
9535
  });
8943
- return unwrap49(data);
9536
+ return unwrap51(data);
8944
9537
  }
8945
9538
  /** Reset tenant branding to platform defaults. */
8946
9539
  async delete() {
@@ -8962,7 +9555,7 @@ var Tenant = class {
8962
9555
  /** Get the current tenant's plan, limits, and live usage counters. */
8963
9556
  async current() {
8964
9557
  const data = await this.http.get("/tenant/plan");
8965
- return unwrap49(data);
9558
+ return unwrap51(data);
8966
9559
  }
8967
9560
  /** Convenience alias for `tenant.branding.get()`. */
8968
9561
  async getBranding() {
@@ -8981,8 +9574,8 @@ var Tenant = class {
8981
9574
  // src/resources/templates.ts
8982
9575
  function unwrapCatalog(payload) {
8983
9576
  if (!payload || typeof payload !== "object") return { templates: [] };
8984
- const data = "data" in payload && typeof payload.data === "object" ? payload.data : payload;
8985
- const templates = Array.isArray(data.templates) ? data.templates : [];
9577
+ const data = "data" in payload && typeof payload.data === "object" && !Array.isArray(payload.data) ? payload.data : payload;
9578
+ const templates = Array.isArray(data.templates) ? data.templates : Array.isArray(data.data) ? data.data : [];
8986
9579
  return {
8987
9580
  ...data,
8988
9581
  templates
@@ -9023,7 +9616,7 @@ var Templates = class {
9023
9616
  };
9024
9617
 
9025
9618
  // src/resources/usage.ts
9026
- function unwrap50(payload) {
9619
+ function unwrap52(payload) {
9027
9620
  if (payload && typeof payload === "object") {
9028
9621
  const p = payload;
9029
9622
  for (const k of ["data", "usage", "sessions", "summary", "items"]) {
@@ -9032,7 +9625,7 @@ function unwrap50(payload) {
9032
9625
  }
9033
9626
  return payload;
9034
9627
  }
9035
- function stripUndefined29(input) {
9628
+ function stripUndefined31(input) {
9036
9629
  return Object.fromEntries(
9037
9630
  Object.entries(input).filter(([, v]) => v !== void 0)
9038
9631
  );
@@ -9045,24 +9638,24 @@ var Usage = class {
9045
9638
  /** Get the current period usage summary. */
9046
9639
  async current() {
9047
9640
  const data = await this.http.get("/usage/summary");
9048
- return unwrap50(data);
9641
+ return unwrap52(data);
9049
9642
  }
9050
9643
  /** List per-session metering events. */
9051
9644
  async sessions(params = {}) {
9052
- const query3 = stripUndefined29(params);
9645
+ const query3 = stripUndefined31(params);
9053
9646
  const data = await this.http.get("/usage/sessions", query3);
9054
- const result = unwrap50(data);
9647
+ const result = unwrap52(data);
9055
9648
  if (Array.isArray(result)) return result;
9056
9649
  return [];
9057
9650
  }
9058
9651
  /** Get a usage report for a period. */
9059
9652
  async report(params = {}) {
9060
- const query3 = stripUndefined29(params);
9653
+ const query3 = stripUndefined31(params);
9061
9654
  const data = await this.http.get("/usage/summary", query3);
9062
- return unwrap50(data);
9655
+ return unwrap52(data);
9063
9656
  }
9064
9657
  };
9065
- function unwrap51(payload) {
9658
+ function unwrap53(payload) {
9066
9659
  if (payload && typeof payload === "object" && "data" in payload) {
9067
9660
  return payload.data;
9068
9661
  }
@@ -9078,7 +9671,7 @@ function listItems15(payload, candidateKeys = ["data", "volumes", "items"]) {
9078
9671
  }
9079
9672
  return [];
9080
9673
  }
9081
- function stripUndefined30(input) {
9674
+ function stripUndefined32(input) {
9082
9675
  return Object.fromEntries(
9083
9676
  Object.entries(input).filter(([, v]) => v !== void 0)
9084
9677
  );
@@ -9092,32 +9685,65 @@ var Volumes = class {
9092
9685
  }
9093
9686
  http;
9094
9687
  async list(params = {}) {
9095
- const query3 = stripUndefined30({ ...params });
9688
+ const query3 = stripUndefined32({ ...params });
9096
9689
  const data = await this.http.get("/volumes", query3);
9097
9690
  return listItems15(data);
9098
9691
  }
9099
9692
  async get(volumeId) {
9100
9693
  const data = await this.http.get(`/volumes/${volumeId}`);
9101
- return unwrap51(data);
9694
+ return unwrap53(data);
9102
9695
  }
9103
9696
  async create(params) {
9104
9697
  const { idempotencyKey: ikey, sizeGb, ...rest } = params;
9105
- const body4 = stripUndefined30({
9698
+ const body5 = stripUndefined32({
9106
9699
  ...rest,
9107
9700
  size_gb: sizeGb ?? rest.size_gb
9108
9701
  });
9109
9702
  const data = await this.http.request("/volumes", {
9110
9703
  method: "POST",
9111
- body: body4,
9704
+ body: body5,
9112
9705
  headers: { "Idempotency-Key": idempotencyKey9(ikey) }
9113
9706
  });
9114
- return unwrap51(data);
9707
+ return unwrap53(data);
9115
9708
  }
9116
9709
  async delete(volumeId) {
9117
9710
  await this.http.delete(`/volumes/${volumeId}`);
9118
9711
  }
9712
+ async listAttachments(computerId) {
9713
+ const data = await this.http.get(`/computers/${computerId}/volumes`);
9714
+ return listItems15(data, [
9715
+ "data",
9716
+ "attachments",
9717
+ "volumes",
9718
+ "items"
9719
+ ]);
9720
+ }
9721
+ async attach(computerId, params) {
9722
+ const volumeId = params.volumeId ?? params.volume_id;
9723
+ const mountPath = params.mountPath ?? params.mount_path;
9724
+ const readOnly = params.readOnly ?? params.read_only;
9725
+ const body5 = stripUndefined32({
9726
+ ...params,
9727
+ volumeId: void 0,
9728
+ mountPath: void 0,
9729
+ readOnly: void 0,
9730
+ volume_id: volumeId,
9731
+ mount_path: mountPath,
9732
+ read_only: readOnly
9733
+ });
9734
+ const data = await this.http.post(
9735
+ `/computers/${computerId}/volumes`,
9736
+ body5
9737
+ );
9738
+ return unwrap53(data);
9739
+ }
9740
+ async detach(computerId, attachmentId) {
9741
+ await this.http.delete(
9742
+ `/computers/${computerId}/volumes/${attachmentId}`
9743
+ );
9744
+ }
9119
9745
  };
9120
- function unwrap52(payload) {
9746
+ function unwrap54(payload) {
9121
9747
  if (payload && typeof payload === "object" && "data" in payload) {
9122
9748
  return payload.data;
9123
9749
  }
@@ -9133,7 +9759,7 @@ function listItems16(payload, candidateKeys = ["data", "webhooks", "deliveries",
9133
9759
  }
9134
9760
  return [];
9135
9761
  }
9136
- function stripUndefined31(input) {
9762
+ function stripUndefined33(input) {
9137
9763
  return Object.fromEntries(
9138
9764
  Object.entries(input).filter(([, v]) => v !== void 0)
9139
9765
  );
@@ -9141,12 +9767,12 @@ function stripUndefined31(input) {
9141
9767
  function idempotencyKey10(key) {
9142
9768
  return key ?? randomUUID();
9143
9769
  }
9144
- function bodyBuffer(body4) {
9145
- if (Buffer.isBuffer(body4)) return body4;
9146
- if (typeof body4 === "string") return Buffer.from(body4, "utf8");
9147
- return Buffer.from(body4);
9770
+ function bodyBuffer(body5) {
9771
+ if (Buffer.isBuffer(body5)) return body5;
9772
+ if (typeof body5 === "string") return Buffer.from(body5, "utf8");
9773
+ return Buffer.from(body5);
9148
9774
  }
9149
- function verifySignature(body4, header, secret, toleranceSec = 300) {
9775
+ function verifySignature(body5, header, secret, toleranceSec = 300) {
9150
9776
  const parts = Object.fromEntries(
9151
9777
  header.split(",").map((chunk) => chunk.split("=", 2)).filter(([key, value]) => key && value)
9152
9778
  );
@@ -9159,7 +9785,7 @@ function verifySignature(body4, header, secret, toleranceSec = 300) {
9159
9785
  if (ageSec > toleranceSec) {
9160
9786
  throw new Error("webhook timestamp too old");
9161
9787
  }
9162
- const rawBody = bodyBuffer(body4);
9788
+ const rawBody = bodyBuffer(body5);
9163
9789
  const signed = Buffer.concat([Buffer.from(`${timestamp}.`), rawBody]);
9164
9790
  const expected = createHmac("sha256", secret).update(signed).digest("hex");
9165
9791
  try {
@@ -9178,28 +9804,28 @@ var Webhooks = class {
9178
9804
  http;
9179
9805
  static verifySignature = verifySignature;
9180
9806
  async list(params = {}) {
9181
- const query3 = stripUndefined31({ ...params });
9807
+ const query3 = stripUndefined33({ ...params });
9182
9808
  const data = await this.http.get("/webhooks", query3);
9183
9809
  return listItems16(data);
9184
9810
  }
9185
9811
  async get(webhookId) {
9186
9812
  const data = await this.http.get(`/webhooks/${webhookId}`);
9187
- return unwrap52(data);
9813
+ return unwrap54(data);
9188
9814
  }
9189
9815
  async create(params) {
9190
9816
  const { idempotencyKey: ikey, ...rest } = params;
9191
- const body4 = stripUndefined31(rest);
9817
+ const body5 = stripUndefined33(rest);
9192
9818
  const data = await this.http.request("/webhooks", {
9193
9819
  method: "POST",
9194
- body: body4,
9820
+ body: body5,
9195
9821
  headers: { "Idempotency-Key": idempotencyKey10(ikey) }
9196
9822
  });
9197
- return unwrap52(data);
9823
+ return unwrap54(data);
9198
9824
  }
9199
9825
  async update(webhookId, params) {
9200
- const body4 = stripUndefined31(params);
9201
- const data = await this.http.patch(`/webhooks/${webhookId}`, body4);
9202
- return unwrap52(data);
9826
+ const body5 = stripUndefined33(params);
9827
+ const data = await this.http.patch(`/webhooks/${webhookId}`, body5);
9828
+ return unwrap54(data);
9203
9829
  }
9204
9830
  async delete(webhookId) {
9205
9831
  await this.http.delete(`/webhooks/${webhookId}`);
@@ -9212,7 +9838,7 @@ var Webhooks = class {
9212
9838
  headers: { "Idempotency-Key": idempotencyKey10(opts.idempotencyKey) }
9213
9839
  }
9214
9840
  );
9215
- return unwrap52(data);
9841
+ return unwrap54(data);
9216
9842
  }
9217
9843
  async deliveries(webhookId) {
9218
9844
  const data = await this.http.get(
@@ -9393,6 +10019,8 @@ var Miosa = class {
9393
10019
  * Requires admin/owner role for write operations.
9394
10020
  */
9395
10021
  orgInvites;
10022
+ /** Organizations available to the user session, membership, invites, and switching. */
10023
+ organizations;
9396
10024
  /** Current tenant plan, limits, and live usage counters. */
9397
10025
  tenant;
9398
10026
  /** Datacenter regions, compute sizes, pricing, community templates. */
@@ -9425,6 +10053,10 @@ var Miosa = class {
9425
10053
  runs;
9426
10054
  /** Run groups - durable multi-run orchestration groups. */
9427
10055
  runGroups;
10056
+ /** Agent runs - compatibility API for prompt dispatch. */
10057
+ agentRuns;
10058
+ /** Agent run groups - compatibility API for multi-agent orchestration. */
10059
+ agentRunGroups;
9428
10060
  /** Agent runtime profiles — tenant/workspace defaults for sandbox/computer agents. */
9429
10061
  agentRuntimeProfiles;
9430
10062
  /** MIOSA Connect — provider connectors and runtime tokens. */
@@ -9507,25 +10139,31 @@ var Miosa = class {
9507
10139
  audit;
9508
10140
  http;
9509
10141
  constructor(config) {
9510
- if (!config.apiKey) {
10142
+ if (config.apiKey && config.accessToken) {
10143
+ throw new Error("Miosa: pass either apiKey or accessToken, not both.");
10144
+ }
10145
+ const credential = config.accessToken ?? config.apiKey;
10146
+ if (!credential) {
9511
10147
  throw new Error(
9512
- 'Miosa: apiKey is required. Pass { apiKey: "msk_u_..." } or set MIOSA_API_KEY.'
10148
+ "Miosa: apiKey or accessToken is required."
9513
10149
  );
9514
10150
  }
9515
- if (!config.apiKey.startsWith("msk_")) {
10151
+ if (config.apiKey && !config.apiKey.startsWith("msk_")) {
9516
10152
  console.warn(
9517
10153
  '[miosa] Warning: API key does not start with "msk_". Double-check your key.'
9518
10154
  );
9519
10155
  }
9520
10156
  this.http = new HttpClient({
9521
10157
  baseUrl: config.baseUrl ?? DEFAULT_BASE_URL,
9522
- apiKey: config.apiKey,
10158
+ apiKey: credential,
10159
+ ...config.tenant ? { tenant: config.tenant } : {},
9523
10160
  timeout: config.timeout ?? DEFAULT_TIMEOUT2,
9524
10161
  maxRetries: config.maxRetries ?? DEFAULT_MAX_RETRIES2
9525
10162
  });
9526
10163
  this.workspaceMembers = new WorkspaceMembers(this.http);
9527
10164
  this.workspaceInvites = new WorkspaceInvites(this.http);
9528
10165
  this.orgInvites = new OrgInvites(this.http);
10166
+ this.organizations = new Organizations(this.http);
9529
10167
  this.tenant = new Tenant(this.http);
9530
10168
  this.regions = new Regions(this.http);
9531
10169
  this.settings = new Settings(this.http);
@@ -9542,6 +10180,8 @@ var Miosa = class {
9542
10180
  this.mcp = new Mcp(this.http);
9543
10181
  this.runs = new Runs(this.http);
9544
10182
  this.runGroups = new RunGroups(this.http);
10183
+ this.agentRuns = new AgentRuns(this.http);
10184
+ this.agentRunGroups = new AgentRunGroups(this.http);
9545
10185
  this.agentRuntimeProfiles = new AgentRuntimeProfiles(this.http);
9546
10186
  this.connectors = new Connectors(this.http);
9547
10187
  this.runtimeEnv = new RuntimeEnv(this.http);
@@ -10001,8 +10641,8 @@ var AppAuth = class {
10001
10641
  }
10002
10642
  });
10003
10643
  if (!resp.ok) {
10004
- const body4 = await resp.text();
10005
- throw new Error(`AppAuth me failed (${resp.status}): ${body4}`);
10644
+ const body5 = await resp.text();
10645
+ throw new Error(`AppAuth me failed (${resp.status}): ${body5}`);
10006
10646
  }
10007
10647
  return unwrapSession(await resp.json());
10008
10648
  }
@@ -10054,12 +10694,12 @@ var AppAuth = class {
10054
10694
  return payload;
10055
10695
  }
10056
10696
  // ── Private ──────────────────────────────────────────────────────────────────
10057
- async _post(action, body4) {
10697
+ async _post(action, body5) {
10058
10698
  const url = `${this.baseUrl}/app-auth/${this.resourceType}/${this.resourceId}/${action}`;
10059
10699
  const resp = await fetch(url, {
10060
10700
  method: "POST",
10061
10701
  headers: { "Content-Type": "application/json" },
10062
- body: JSON.stringify(body4)
10702
+ body: JSON.stringify(body5)
10063
10703
  });
10064
10704
  if (!resp.ok) {
10065
10705
  const text = await resp.text();
@@ -10069,6 +10709,6 @@ var AppAuth = class {
10069
10709
  }
10070
10710
  };
10071
10711
 
10072
- export { AGENT_BUILD_KIND_SPECS, Admin, AgentRuntimeProfiles, Analytics, ApiKeys, AppAuth, AuditLog, AuthError, Benchmarks, BuilderSessions, Channels, Checkpoints, Cloud, CommandCenter, Community, Completions, Computer, ComputerAudit, ComputerAutoStop, ComputerConnectors, ComputerEnv, ComputerInbox, ComputerLogs, ComputerNetwork, ComputerOsa, ComputerPorts, ComputerSecrets, ComputerTerminal, ComputerVolumes, Computers, Connectors, Credits, CronJobs, DEFAULT_AGENT_BUILD_OUTPUT_ROOT, DEFAULT_AGENT_BUILD_PACKET_VERSION, Dashboard, Databases, DeploymentConnectors, DeploymentDomains, DeploymentReleases, DeploymentRuntimeInstances, DeploymentVersions, Deployments, Desktop, Devices, DockerDeploy, EgressAudit, EgressHostNotAllowedError, EgressNetwork, EgressSecrets, Email, EmailCampaigns, EmailInbox, EmailTemplates, Embeddings, Exec, ExternalKeys, Files, FlatCustomDomains, Functions, HealthChecks, InstallationRequiredError, InsufficientCreditsError, Integrations, ManagedProviderBindingOnlyError, Mcp, Miosa, MiosaError, Models, NetworkError, NetworkPolicy, NotFoundError, OAuthFlow, OpenComputers, OrgInvites, ProjectAuth, ProjectIntegrations, ProjectNotLinkedError, ProviderDefaults, RateLimitError, Regions, RunGroups, Runs, RuntimeCapabilitiesResource, RuntimeEnv, SANDBOX_TEMPLATE, Sandbox, SandboxAudit, SandboxCommands, SandboxConnectors, SandboxEnv, SandboxEvents, SandboxFiles, SandboxNetwork, SandboxPreview, SandboxPreviews, SandboxSecrets, SandboxTags, SandboxTemplates, SandboxTerminal, Sandboxes, ScopeNotAllowedError, ScopedFs, Settings, SnapshotsStandalone, Storage, SubjectNotAllowedError, Templates, Tenant, TimeoutError, TokenRefreshFailedError, Usage, UserAuthorizationRequiredError, ValidationError, Volumes, Webhooks, WorkspaceInvites, WorkspaceMembers, createAgentBuildExecutionPacket, createAgentBuildExpectedOutputs, createAgentBuildPrompt, createBuildRunParams, getAgentBuildKindSpec, resolveAgentBuildKind, verifySignature };
10712
+ export { AGENT_BUILD_KIND_SPECS, Admin, AgentRuntimeProfiles, Analytics, ApiKeys, AppAuth, AuditLog, AuthError, Benchmarks, BuilderSessions, Channels, Checkpoints, Cloud, CommandCenter, Community, Completions, Computer, ComputerAudit, ComputerAutoStop, ComputerConnectors, ComputerEnv, ComputerInbox, ComputerLogs, ComputerNetwork, ComputerOsa, ComputerPorts, ComputerSecrets, ComputerTerminal, ComputerVolumes, Computers, Connectors, Credits, CronJobs, DEFAULT_AGENT_BUILD_OUTPUT_ROOT, DEFAULT_AGENT_BUILD_PACKET_VERSION, Dashboard, Databases, DeploymentConnectors, DeploymentDomains, DeploymentReleases, DeploymentRuntimeInstances, DeploymentVersions, Deployments, Desktop, Devices, DockerDeploy, EgressAudit, EgressHostNotAllowedError, EgressNetwork, EgressSecrets, Email, EmailCampaigns, EmailInbox, EmailTemplates, Embeddings, Exec, ExternalKeys, Files, FlatCustomDomains, Functions, HealthChecks, InstallationRequiredError, InsufficientCreditsError, Integrations, ManagedProviderBindingOnlyError, Mcp, Miosa, MiosaError, Models, NetworkError, NetworkPolicy, NotFoundError, OAuthFlow, OpenComputers, OrgInvites, OrganizationMembers, Organizations, ProjectAuth, ProjectIntegrations, ProjectNotLinkedError, ProviderDefaults, RateLimitError, Regions, RunGroups, Runs, RuntimeCapabilitiesResource, RuntimeEnv, SANDBOX_TEMPLATE, Sandbox, SandboxAudit, SandboxCommands, SandboxConnectors, SandboxEnv, SandboxEvents, SandboxFiles, SandboxNetwork, SandboxPreview, SandboxPreviews, SandboxSecrets, SandboxTags, SandboxTemplates, SandboxTerminal, Sandboxes, ScopeNotAllowedError, ScopedFs, Settings, SnapshotsStandalone, Storage, SubjectNotAllowedError, Templates, Tenant, TimeoutError, TokenRefreshFailedError, Usage, UserAuthorizationRequiredError, ValidationError, Volumes, Webhooks, WorkspaceInvites, WorkspaceMembers, createAgentBuildExecutionPacket, createAgentBuildExpectedOutputs, createAgentBuildPrompt, createBuildRunParams, getAgentBuildKindSpec, resolveAgentBuildKind, verifySignature };
10073
10713
  //# sourceMappingURL=index.js.map
10074
10714
  //# sourceMappingURL=index.js.map