@miosa/sdk 1.2.15 → 1.2.17

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
@@ -26,6 +26,8 @@ var MiosaError = class _MiosaError extends Error {
26
26
  const message = body4.error?.message ?? body4.message ?? `HTTP ${status}`;
27
27
  const code = body4.error?.code ?? body4.code ?? "UNKNOWN_ERROR";
28
28
  const details = body4.error?.details;
29
+ const connectError = connectErrorFromCode(code, message, status, details, requestId);
30
+ if (connectError) return connectError;
29
31
  if (status === 401 || status === 403) {
30
32
  return new AuthError(message, status, code, details, requestId);
31
33
  }
@@ -44,6 +46,28 @@ var MiosaError = class _MiosaError extends Error {
44
46
  return new _MiosaError(message, status, code, details, requestId);
45
47
  }
46
48
  };
49
+ function connectErrorFromCode(code, message, status, details, requestId) {
50
+ switch (code) {
51
+ case "PROJECT_NOT_LINKED":
52
+ return new ProjectNotLinkedError(message, status, details, requestId);
53
+ case "SUBJECT_NOT_ALLOWED":
54
+ return new SubjectNotAllowedError(message, status, details, requestId);
55
+ case "SCOPE_NOT_ALLOWED":
56
+ return new ScopeNotAllowedError(message, status, details, requestId);
57
+ case "MANAGED_PROVIDER_BINDING_ONLY":
58
+ return new ManagedProviderBindingOnlyError(message, status, details, requestId);
59
+ case "INSTALLATION_REQUIRED":
60
+ return new InstallationRequiredError(message, status, details, requestId);
61
+ case "USER_AUTHORIZATION_REQUIRED":
62
+ return new UserAuthorizationRequiredError(message, status, details, requestId);
63
+ case "EGRESS_HOST_NOT_ALLOWED":
64
+ return new EgressHostNotAllowedError(message, status, details, requestId);
65
+ case "TOKEN_REFRESH_FAILED":
66
+ return new TokenRefreshFailedError(message, status, details, requestId);
67
+ default:
68
+ return void 0;
69
+ }
70
+ }
47
71
  var AuthError = class extends MiosaError {
48
72
  constructor(message, status = 401, code = "UNAUTHORIZED", details, requestId) {
49
73
  super(message, status, code, details, requestId);
@@ -90,6 +114,54 @@ var NetworkError = class extends MiosaError {
90
114
  this.cause = cause;
91
115
  }
92
116
  };
117
+ var ProjectNotLinkedError = class extends MiosaError {
118
+ constructor(message, status = 403, details, requestId) {
119
+ super(message, status, "PROJECT_NOT_LINKED", details, requestId);
120
+ this.name = "ProjectNotLinkedError";
121
+ }
122
+ };
123
+ var SubjectNotAllowedError = class extends MiosaError {
124
+ constructor(message, status = 403, details, requestId) {
125
+ super(message, status, "SUBJECT_NOT_ALLOWED", details, requestId);
126
+ this.name = "SubjectNotAllowedError";
127
+ }
128
+ };
129
+ var ScopeNotAllowedError = class extends MiosaError {
130
+ constructor(message, status = 403, details, requestId) {
131
+ super(message, status, "SCOPE_NOT_ALLOWED", details, requestId);
132
+ this.name = "ScopeNotAllowedError";
133
+ }
134
+ };
135
+ var ManagedProviderBindingOnlyError = class extends MiosaError {
136
+ constructor(message, status = 403, details, requestId) {
137
+ super(message, status, "MANAGED_PROVIDER_BINDING_ONLY", details, requestId);
138
+ this.name = "ManagedProviderBindingOnlyError";
139
+ }
140
+ };
141
+ var InstallationRequiredError = class extends MiosaError {
142
+ constructor(message, status = 409, details, requestId) {
143
+ super(message, status, "INSTALLATION_REQUIRED", details, requestId);
144
+ this.name = "InstallationRequiredError";
145
+ }
146
+ };
147
+ var UserAuthorizationRequiredError = class extends MiosaError {
148
+ constructor(message, status = 403, details, requestId) {
149
+ super(message, status, "USER_AUTHORIZATION_REQUIRED", details, requestId);
150
+ this.name = "UserAuthorizationRequiredError";
151
+ }
152
+ };
153
+ var EgressHostNotAllowedError = class extends MiosaError {
154
+ constructor(message, status = 403, details, requestId) {
155
+ super(message, status, "EGRESS_HOST_NOT_ALLOWED", details, requestId);
156
+ this.name = "EgressHostNotAllowedError";
157
+ }
158
+ };
159
+ var TokenRefreshFailedError = class extends MiosaError {
160
+ constructor(message, status = 502, details, requestId) {
161
+ super(message, status, "TOKEN_REFRESH_FAILED", details, requestId);
162
+ this.name = "TokenRefreshFailedError";
163
+ }
164
+ };
93
165
 
94
166
  // src/http.ts
95
167
  var _h2Configured = false;
@@ -973,6 +1045,7 @@ var AgentRuns = class {
973
1045
  runtime_command: params.runtimeCommand,
974
1046
  cwd: params.cwd,
975
1047
  timeout: params.timeout,
1048
+ wait: params.wait,
976
1049
  env: params.env,
977
1050
  agent_runtime_profile_id: params.agentRuntimeProfileId,
978
1051
  agent_profile_id: params.agentProfileId,
@@ -1955,6 +2028,426 @@ var ComputerVolumes = class {
1955
2028
  }
1956
2029
  };
1957
2030
 
2031
+ // src/resources/connectors.ts
2032
+ function unwrap20(payload) {
2033
+ if (payload && typeof payload === "object") {
2034
+ const p = payload;
2035
+ for (const key of ["data", "binding"]) {
2036
+ if (key in p) return p[key];
2037
+ }
2038
+ }
2039
+ return payload;
2040
+ }
2041
+ function unwrapList8(payload) {
2042
+ if (Array.isArray(payload)) return payload;
2043
+ if (payload && typeof payload === "object") {
2044
+ const p = payload;
2045
+ for (const key of ["data", "connectors", "items"]) {
2046
+ if (Array.isArray(p[key])) return p[key];
2047
+ }
2048
+ }
2049
+ return [];
2050
+ }
2051
+ function stripUndefined7(input) {
2052
+ return Object.fromEntries(
2053
+ Object.entries(input).filter(([, value]) => value !== void 0)
2054
+ );
2055
+ }
2056
+ function pickFirst(...values) {
2057
+ for (const value of values) if (value !== void 0) return value;
2058
+ return void 0;
2059
+ }
2060
+ function externalAttributionParams(params = {}) {
2061
+ return {
2062
+ external_user_id: pickFirst(params.externalUserId, params.external_user_id),
2063
+ external_workspace_id: pickFirst(
2064
+ params.externalWorkspaceId,
2065
+ params.external_workspace_id
2066
+ ),
2067
+ external_project_id: pickFirst(
2068
+ params.externalProjectId,
2069
+ params.external_project_id
2070
+ )
2071
+ };
2072
+ }
2073
+ function queryFromListParams(params) {
2074
+ return stripUndefined7({
2075
+ scope: params.scope,
2076
+ workspace_id: pickFirst(params.workspaceId, params.workspace_id),
2077
+ owner_user_id: pickFirst(params.ownerUserId, params.owner_user_id),
2078
+ ...externalAttributionParams(params)
2079
+ });
2080
+ }
2081
+ function bodyFromCreateParams(provider, params) {
2082
+ const credential = params.credential && typeof params.credential === "object" && !Array.isArray(params.credential) ? params.credential : void 0;
2083
+ const value = pickFirst(
2084
+ params.value,
2085
+ params.token,
2086
+ params.apiKey,
2087
+ params.api_key,
2088
+ credential?.value
2089
+ );
2090
+ return stripUndefined7({
2091
+ provider,
2092
+ type: String(params.type ?? "api_key").replaceAll("-", "_"),
2093
+ name: params.name,
2094
+ uid: params.uid ?? `${provider}/${params.name ?? "default"}`,
2095
+ scope: params.scope,
2096
+ workspace_id: pickFirst(params.workspaceId, params.workspace_id),
2097
+ owner_user_id: pickFirst(params.ownerUserId, params.owner_user_id),
2098
+ ...externalAttributionParams(params),
2099
+ credential: value ? {
2100
+ field: credential?.field ?? "api_key",
2101
+ value,
2102
+ ...Object.fromEntries(
2103
+ Object.entries(credential ?? {}).filter(
2104
+ ([key]) => key !== "value" && key !== "field"
2105
+ )
2106
+ )
2107
+ } : credential
2108
+ });
2109
+ }
2110
+ function tokenBody(params = {}) {
2111
+ return stripUndefined7({
2112
+ subject: params.subject ?? { type: "app" },
2113
+ installation_id: pickFirst(params.installationId, params.installation_id),
2114
+ project_id: pickFirst(params.projectId, params.project_id),
2115
+ environment: params.environment,
2116
+ resource_type: pickFirst(params.resourceType, params.resource_type),
2117
+ resource_id: pickFirst(params.resourceId, params.resource_id),
2118
+ scopes: pickFirst(params.scopes, params.scope),
2119
+ audience: params.audience,
2120
+ ...externalAttributionParams(params),
2121
+ validity_buffer_ms: pickFirst(
2122
+ params.validityBufferMs,
2123
+ params.validity_buffer_ms
2124
+ )
2125
+ });
2126
+ }
2127
+ function queryFromLinkParams(params = {}) {
2128
+ return stripUndefined7({
2129
+ workspace_id: pickFirst(params.workspaceId, params.workspace_id),
2130
+ project_id: pickFirst(params.projectId, params.project_id),
2131
+ connector_id: pickFirst(params.connectorId, params.connector_id),
2132
+ environment: params.environment,
2133
+ status: params.status,
2134
+ ...externalAttributionParams(params)
2135
+ });
2136
+ }
2137
+ function queryFromDefaultParams(params = {}) {
2138
+ return stripUndefined7({
2139
+ ...queryFromLinkParams(params),
2140
+ default_scope: pickFirst(params.defaultScope, params.default_scope),
2141
+ target: params.target
2142
+ });
2143
+ }
2144
+ function queryFromApplicableDefaultParams(params = {}) {
2145
+ return stripUndefined7({
2146
+ workspace_id: pickFirst(params.workspaceId, params.workspace_id),
2147
+ project_id: pickFirst(params.projectId, params.project_id),
2148
+ environment: params.environment,
2149
+ target: params.target,
2150
+ resource_type: pickFirst(params.resourceType, params.resource_type),
2151
+ resource_id: pickFirst(params.resourceId, params.resource_id),
2152
+ ...externalAttributionParams(params)
2153
+ });
2154
+ }
2155
+ function materializeDefaultsBody(params = {}) {
2156
+ return stripUndefined7({
2157
+ workspace_id: pickFirst(params.workspaceId, params.workspace_id),
2158
+ project_id: pickFirst(params.projectId, params.project_id),
2159
+ environment: params.environment,
2160
+ target: params.target,
2161
+ resource_type: pickFirst(params.resourceType, params.resource_type),
2162
+ resource_id: pickFirst(params.resourceId, params.resource_id),
2163
+ env_name: pickFirst(params.envName, params.env_name),
2164
+ ...externalAttributionParams(params)
2165
+ });
2166
+ }
2167
+ function projectLinkBody(params) {
2168
+ return stripUndefined7({
2169
+ connector: params.connector,
2170
+ connector_id: pickFirst(params.connectorId, params.connector_id),
2171
+ installation_id: pickFirst(params.installationId, params.installation_id),
2172
+ workspace_id: pickFirst(params.workspaceId, params.workspace_id),
2173
+ project_id: pickFirst(params.projectId, params.project_id),
2174
+ environment: params.environment,
2175
+ resource_type: pickFirst(params.resourceType, params.resource_type),
2176
+ resource_id: pickFirst(params.resourceId, params.resource_id),
2177
+ allowed_subjects: pickFirst(
2178
+ params.allowedSubjects,
2179
+ params.allowed_subjects
2180
+ ),
2181
+ allowed_scopes: pickFirst(params.allowedScopes, params.allowed_scopes),
2182
+ mode: params.mode?.replaceAll("-", "_"),
2183
+ effect: params.effect,
2184
+ ...externalAttributionParams(params),
2185
+ metadata: params.metadata
2186
+ });
2187
+ }
2188
+ function defaultBody(params) {
2189
+ return stripUndefined7({
2190
+ ...projectLinkBody(params),
2191
+ default_scope: pickFirst(params.defaultScope, params.default_scope),
2192
+ target: params.target
2193
+ });
2194
+ }
2195
+ function triggerBody(params) {
2196
+ return stripUndefined7({
2197
+ connector: params.connector,
2198
+ connector_id: pickFirst(params.connectorId, params.connector_id),
2199
+ workspace_id: pickFirst(params.workspaceId, params.workspace_id),
2200
+ project_id: pickFirst(params.projectId, params.project_id),
2201
+ environment: params.environment,
2202
+ destination_path: pickFirst(params.destinationPath, params.destination_path),
2203
+ destination_url: pickFirst(params.destinationUrl, params.destination_url),
2204
+ event_types: pickFirst(params.eventTypes, params.event_types),
2205
+ status: params.status,
2206
+ provider_adapter: pickFirst(params.providerAdapter, params.provider_adapter),
2207
+ webhook_signing_secret: pickFirst(
2208
+ params.webhookSigningSecret,
2209
+ params.webhook_signing_secret
2210
+ ),
2211
+ ...externalAttributionParams(params),
2212
+ metadata: params.metadata
2213
+ });
2214
+ }
2215
+ function queryFromTriggerDeliveryParams(params = {}) {
2216
+ return stripUndefined7({
2217
+ ...queryFromLinkParams(params),
2218
+ trigger_id: pickFirst(params.triggerId, params.trigger_id),
2219
+ event_type: pickFirst(params.eventType, params.event_type)
2220
+ });
2221
+ }
2222
+ function connectorPath(connector) {
2223
+ return encodeURIComponent(connector);
2224
+ }
2225
+ var Connectors = class {
2226
+ constructor(http) {
2227
+ this.http = http;
2228
+ }
2229
+ http;
2230
+ /** List Connect provider connectors visible to the current tenant/workspace. */
2231
+ async list(params = {}) {
2232
+ const data = await this.http.get(
2233
+ "/connect/connectors",
2234
+ queryFromListParams(params)
2235
+ );
2236
+ return unwrapList8(data);
2237
+ }
2238
+ /** Show one connector by UID or id. */
2239
+ async get(connector) {
2240
+ const data = await this.http.get(
2241
+ `/connect/connectors/${connectorPath(connector)}`
2242
+ );
2243
+ return unwrap20(data);
2244
+ }
2245
+ show(connector) {
2246
+ return this.get(connector);
2247
+ }
2248
+ /** Create an API-key backed connector. Raw values are never returned later. */
2249
+ async create(provider, params) {
2250
+ const data = await this.http.post(
2251
+ "/connect/connectors",
2252
+ bodyFromCreateParams(provider, params)
2253
+ );
2254
+ return unwrap20(data);
2255
+ }
2256
+ /** Request a runtime provider token for a connector. */
2257
+ async getToken(connector, params = {}) {
2258
+ const data = await this.http.post(
2259
+ `/connect/token/${connectorPath(connector)}`,
2260
+ tokenBody(params)
2261
+ );
2262
+ return unwrap20(data);
2263
+ }
2264
+ token(connector, params = {}) {
2265
+ return this.getToken(connector, params);
2266
+ }
2267
+ /** List OAuth app providers available for end-user authorization. */
2268
+ async oauthProviders() {
2269
+ const data = await this.http.get("/connect/oauth/providers");
2270
+ return unwrapList8(data);
2271
+ }
2272
+ /** Start an OAuth authorization flow for a provider-backed connector. */
2273
+ async startOauth(params) {
2274
+ const data = await this.http.post(
2275
+ "/connect/oauth/start",
2276
+ stripUndefined7({
2277
+ provider: params.provider,
2278
+ scope: params.scope,
2279
+ expose_as_env: pickFirst(params.exposeAsEnv, params.expose_as_env),
2280
+ owner_user_id: pickFirst(params.ownerUserId, params.owner_user_id),
2281
+ ...externalAttributionParams(params)
2282
+ })
2283
+ );
2284
+ return unwrap20(data);
2285
+ }
2286
+ /** List connector installations/grants. */
2287
+ async installations(params = {}) {
2288
+ const data = await this.http.get(
2289
+ "/connect/installations",
2290
+ queryFromLinkParams(params)
2291
+ );
2292
+ return unwrapList8(data);
2293
+ }
2294
+ /** List project/environment connector links. */
2295
+ async projectLinks(params = {}) {
2296
+ const data = await this.http.get(
2297
+ "/connect/project-links",
2298
+ queryFromLinkParams(params)
2299
+ );
2300
+ return unwrapList8(data);
2301
+ }
2302
+ /** List inherited connector defaults for tenant/workspace/project runtimes. */
2303
+ async defaults(params = {}) {
2304
+ const data = await this.http.get(
2305
+ "/connect/defaults",
2306
+ queryFromDefaultParams(params)
2307
+ );
2308
+ return unwrapList8(data);
2309
+ }
2310
+ /** Resolve inherited connector defaults that apply to a runtime target. */
2311
+ async applicableDefaults(params = {}) {
2312
+ const data = await this.http.get(
2313
+ "/connect/defaults/applicable",
2314
+ queryFromApplicableDefaultParams(params)
2315
+ );
2316
+ return unwrapList8(data);
2317
+ }
2318
+ /** Materialize inherited connector defaults onto one runtime resource. */
2319
+ async materializeDefaults(params) {
2320
+ const data = await this.http.post(
2321
+ "/connect/defaults/materialize",
2322
+ materializeDefaultsBody(params)
2323
+ );
2324
+ return unwrap20(data);
2325
+ }
2326
+ /** Create an inherited connector default for future runtime resources. */
2327
+ async createDefault(params) {
2328
+ const data = await this.http.post(
2329
+ "/connect/defaults",
2330
+ defaultBody(params)
2331
+ );
2332
+ return unwrap20(data);
2333
+ }
2334
+ /** Delete an inherited connector default. */
2335
+ async deleteDefault(id) {
2336
+ await this.http.delete(`/connect/defaults/${connectorPath(id)}`);
2337
+ }
2338
+ /** List inbound provider trigger forwarding definitions. */
2339
+ async triggers(params = {}) {
2340
+ const data = await this.http.get(
2341
+ "/connect/triggers",
2342
+ queryFromLinkParams(params)
2343
+ );
2344
+ return unwrapList8(data);
2345
+ }
2346
+ /** Create an inbound provider trigger forwarding definition. */
2347
+ async createTrigger(params) {
2348
+ const data = await this.http.post(
2349
+ "/connect/triggers",
2350
+ triggerBody(params)
2351
+ );
2352
+ return unwrap20(data);
2353
+ }
2354
+ /** List inbound provider trigger delivery attempts. */
2355
+ async triggerDeliveries(params = {}) {
2356
+ const data = await this.http.get(
2357
+ "/connect/trigger-deliveries",
2358
+ queryFromTriggerDeliveryParams(params)
2359
+ );
2360
+ return unwrapList8(data);
2361
+ }
2362
+ /** List delivery attempts for one trigger. */
2363
+ async triggerDeliveryHistory(triggerId) {
2364
+ const data = await this.http.get(
2365
+ `/connect/triggers/${connectorPath(triggerId)}/deliveries`
2366
+ );
2367
+ return unwrapList8(data);
2368
+ }
2369
+ /** Delete an inbound provider trigger forwarding definition. */
2370
+ async deleteTrigger(id) {
2371
+ await this.http.delete(`/connect/triggers/${connectorPath(id)}`);
2372
+ }
2373
+ /** Link a connector to a project/environment/resource. */
2374
+ async createProjectLink(params) {
2375
+ const data = await this.http.post(
2376
+ "/connect/project-links",
2377
+ projectLinkBody(params)
2378
+ );
2379
+ return unwrap20(data);
2380
+ }
2381
+ /** Delete a project connector link. */
2382
+ async deleteProjectLink(id) {
2383
+ await this.http.delete(`/connect/project-links/${connectorPath(id)}`);
2384
+ }
2385
+ };
2386
+ var RuntimeConnectors = class {
2387
+ constructor(http, basePath) {
2388
+ this.http = http;
2389
+ this.basePath = basePath;
2390
+ }
2391
+ http;
2392
+ basePath;
2393
+ /** List provider connector bindings for this runtime resource. */
2394
+ async list() {
2395
+ const data = await this.http.get(this.basePath);
2396
+ return unwrapList8(data);
2397
+ }
2398
+ /** Attach a connector to this runtime resource as a brokered env var. */
2399
+ async attach(params) {
2400
+ const data = await this.http.post(
2401
+ this.basePath,
2402
+ stripUndefined7({
2403
+ connector: params.connector,
2404
+ env_name: params.env,
2405
+ mode: params.mode?.replaceAll("-", "_"),
2406
+ installation_id: pickFirst(
2407
+ params.installationId,
2408
+ params.installation_id
2409
+ ),
2410
+ project_id: pickFirst(params.projectId, params.project_id),
2411
+ environment: params.environment,
2412
+ ...externalAttributionParams(params)
2413
+ })
2414
+ );
2415
+ return unwrap20(data);
2416
+ }
2417
+ /** Detach a connector binding by binding id or connector UID. */
2418
+ async detach(bindingOrConnector) {
2419
+ await this.http.delete(`${this.basePath}/${connectorPath(bindingOrConnector)}`);
2420
+ }
2421
+ /** Sync or materialize connector placeholder env vars for this runtime resource. */
2422
+ async sync() {
2423
+ const data = await this.http.post(`${this.basePath}/sync`, {});
2424
+ return unwrap20(data);
2425
+ }
2426
+ /** Verify a required connector is attached before agent work begins. */
2427
+ async preflight(params = {}) {
2428
+ const data = await this.http.post(
2429
+ `${this.basePath}/preflight`,
2430
+ stripUndefined7(params)
2431
+ );
2432
+ return unwrap20(data);
2433
+ }
2434
+ };
2435
+ var SandboxConnectors = class extends RuntimeConnectors {
2436
+ constructor(http, sandboxId) {
2437
+ super(http, `/sandboxes/${sandboxId}/connectors`);
2438
+ }
2439
+ };
2440
+ var ComputerConnectors = class extends RuntimeConnectors {
2441
+ constructor(http, computerId) {
2442
+ super(http, `/computers/${computerId}/connectors`);
2443
+ }
2444
+ };
2445
+ var DeploymentConnectors = class extends RuntimeConnectors {
2446
+ constructor(http, deploymentId) {
2447
+ super(http, `/deployments/${deploymentId}/connectors`);
2448
+ }
2449
+ };
2450
+
1958
2451
  // src/resources/custom_domains.ts
1959
2452
  var CustomDomains = class {
1960
2453
  http;
@@ -2115,7 +2608,7 @@ var Desktop = class {
2115
2608
  };
2116
2609
 
2117
2610
  // src/resources/egressAudit.ts
2118
- function unwrap20(payload) {
2611
+ function unwrap21(payload) {
2119
2612
  if (payload && typeof payload === "object") {
2120
2613
  const p = payload;
2121
2614
  for (const k of ["data", "event", "items"]) {
@@ -2124,7 +2617,7 @@ function unwrap20(payload) {
2124
2617
  }
2125
2618
  return payload;
2126
2619
  }
2127
- function unwrapList8(payload) {
2620
+ function unwrapList9(payload) {
2128
2621
  if (Array.isArray(payload)) return payload;
2129
2622
  if (payload && typeof payload === "object") {
2130
2623
  const p = payload;
@@ -2134,27 +2627,27 @@ function unwrapList8(payload) {
2134
2627
  }
2135
2628
  return [];
2136
2629
  }
2137
- function stripUndefined7(input) {
2630
+ function stripUndefined8(input) {
2138
2631
  return Object.fromEntries(
2139
2632
  Object.entries(input).filter(([, v]) => v !== void 0)
2140
2633
  );
2141
2634
  }
2142
- function pickFirst(...values) {
2635
+ function pickFirst2(...values) {
2143
2636
  for (const v of values) if (v !== void 0) return v;
2144
2637
  return void 0;
2145
2638
  }
2146
2639
  function listQuery(params) {
2147
- return stripUndefined7({
2148
- resource_id: pickFirst(params.resourceId, params.resource_id),
2149
- resource_type: pickFirst(params.resourceType, params.resource_type),
2640
+ return stripUndefined8({
2641
+ resource_id: pickFirst2(params.resourceId, params.resource_id),
2642
+ resource_type: pickFirst2(params.resourceType, params.resource_type),
2150
2643
  host: params.host,
2151
2644
  action: params.action,
2152
2645
  since: params.since,
2153
2646
  until: params.until,
2154
2647
  limit: params.limit,
2155
2648
  cursor: params.cursor,
2156
- external_user_id: pickFirst(params.externalUserId, params.external_user_id),
2157
- external_workspace_id: pickFirst(
2649
+ external_user_id: pickFirst2(params.externalUserId, params.external_user_id),
2650
+ external_workspace_id: pickFirst2(
2158
2651
  params.externalWorkspaceId,
2159
2652
  params.external_workspace_id
2160
2653
  )
@@ -2174,14 +2667,14 @@ var EgressAudit = class {
2174
2667
  "/egress/audit",
2175
2668
  listQuery(params)
2176
2669
  );
2177
- return unwrapList8(data);
2670
+ return unwrapList9(data);
2178
2671
  }
2179
2672
  /** Get a single audit event by id. */
2180
2673
  async get(id) {
2181
2674
  const data = await this.http.get(
2182
2675
  `/egress/audit/${id}`
2183
2676
  );
2184
- return unwrap20(data);
2677
+ return unwrap21(data);
2185
2678
  }
2186
2679
  /**
2187
2680
  * Long-poll the audit endpoint and yield new events as they appear.
@@ -2201,7 +2694,7 @@ var EgressAudit = class {
2201
2694
  "/egress/audit",
2202
2695
  listQuery(queryParams)
2203
2696
  );
2204
- const events = unwrapList8(data);
2697
+ const events = unwrapList9(data);
2205
2698
  for (const event of events) {
2206
2699
  if (event.id && seen.has(event.id)) continue;
2207
2700
  if (event.id) seen.add(event.id);
@@ -2257,7 +2750,7 @@ var ComputerAudit = class extends SandboxAudit {
2257
2750
  };
2258
2751
 
2259
2752
  // src/resources/egressNetwork.ts
2260
- function unwrap21(payload) {
2753
+ function unwrap22(payload) {
2261
2754
  if (payload && typeof payload === "object") {
2262
2755
  const p = payload;
2263
2756
  for (const k of ["data", "policy", "rule", "items"]) {
@@ -2266,7 +2759,7 @@ function unwrap21(payload) {
2266
2759
  }
2267
2760
  return payload;
2268
2761
  }
2269
- function unwrapList9(payload) {
2762
+ function unwrapList10(payload) {
2270
2763
  if (Array.isArray(payload)) return payload;
2271
2764
  if (payload && typeof payload === "object") {
2272
2765
  const p = payload;
@@ -2283,24 +2776,24 @@ function unwrapList9(payload) {
2283
2776
  }
2284
2777
  return [];
2285
2778
  }
2286
- function stripUndefined8(input) {
2779
+ function stripUndefined9(input) {
2287
2780
  return Object.fromEntries(
2288
2781
  Object.entries(input).filter(([, v]) => v !== void 0)
2289
2782
  );
2290
2783
  }
2291
- function pickFirst2(...values) {
2784
+ function pickFirst3(...values) {
2292
2785
  for (const v of values) if (v !== void 0) return v;
2293
2786
  return void 0;
2294
2787
  }
2295
2788
  function ruleBody(host, params, effect) {
2296
- return stripUndefined8({
2789
+ return stripUndefined9({
2297
2790
  host,
2298
2791
  effect,
2299
2792
  methods: params.methods,
2300
- path_glob: pickFirst2(params.pathGlob, params.path_glob),
2301
- policy_id: pickFirst2(params.policyId, params.policy_id),
2302
- resource_id: pickFirst2(params.resourceId, params.resource_id),
2303
- resource_type: pickFirst2(params.resourceType, params.resource_type),
2793
+ path_glob: pickFirst3(params.pathGlob, params.path_glob),
2794
+ policy_id: pickFirst3(params.policyId, params.policy_id),
2795
+ resource_id: pickFirst3(params.resourceId, params.resource_id),
2796
+ resource_type: pickFirst3(params.resourceType, params.resource_type),
2304
2797
  note: params.note
2305
2798
  });
2306
2799
  }
@@ -2316,7 +2809,7 @@ var EgressNetwork = class {
2316
2809
  "/egress/allowlist",
2317
2810
  ruleBody(host, params, "allow")
2318
2811
  );
2319
- return unwrap21(data);
2812
+ return unwrap22(data);
2320
2813
  }
2321
2814
  /** Add a `deny` rule for `host` to the allowlist. */
2322
2815
  async deny(host, params = {}) {
@@ -2324,17 +2817,17 @@ var EgressNetwork = class {
2324
2817
  "/egress/allowlist",
2325
2818
  ruleBody(host, params, "deny")
2326
2819
  );
2327
- return unwrap21(data);
2820
+ return unwrap22(data);
2328
2821
  }
2329
2822
  /** List allowlist rules. */
2330
2823
  async rules(params = {}) {
2331
- const query2 = stripUndefined8({
2332
- policy_id: pickFirst2(params.policyId, params.policy_id),
2333
- resource_id: pickFirst2(params.resourceId, params.resource_id),
2334
- resource_type: pickFirst2(params.resourceType, params.resource_type)
2824
+ const query2 = stripUndefined9({
2825
+ policy_id: pickFirst3(params.policyId, params.policy_id),
2826
+ resource_id: pickFirst3(params.resourceId, params.resource_id),
2827
+ resource_type: pickFirst3(params.resourceType, params.resource_type)
2335
2828
  });
2336
2829
  const data = await this.http.get("/egress/allowlist", query2);
2337
- return unwrapList9(data);
2830
+ return unwrapList10(data);
2338
2831
  }
2339
2832
  /** Delete an allowlist rule by id. */
2340
2833
  async removeRule(ruleId) {
@@ -2343,38 +2836,38 @@ var EgressNetwork = class {
2343
2836
  // ── policies ──────────────────────────────────────────────────────────────
2344
2837
  /** List egress policies. */
2345
2838
  async policies(params = {}) {
2346
- const query2 = stripUndefined8({
2347
- resource_id: pickFirst2(params.resourceId, params.resource_id),
2348
- resource_type: pickFirst2(params.resourceType, params.resource_type)
2839
+ const query2 = stripUndefined9({
2840
+ resource_id: pickFirst3(params.resourceId, params.resource_id),
2841
+ resource_type: pickFirst3(params.resourceType, params.resource_type)
2349
2842
  });
2350
2843
  const data = await this.http.get("/egress/policies", query2);
2351
- return unwrapList9(data);
2844
+ return unwrapList10(data);
2352
2845
  }
2353
2846
  /** Create an egress policy. */
2354
2847
  async createPolicy(params) {
2355
- const body4 = stripUndefined8({
2848
+ const body4 = stripUndefined9({
2356
2849
  name: params.name,
2357
2850
  mode: params.mode ?? "enforce",
2358
- default_effect: pickFirst2(
2851
+ default_effect: pickFirst3(
2359
2852
  params.defaultEffect,
2360
2853
  params.default_effect,
2361
2854
  "deny"
2362
2855
  ),
2363
- resource_id: pickFirst2(params.resourceId, params.resource_id),
2364
- resource_type: pickFirst2(params.resourceType, params.resource_type),
2856
+ resource_id: pickFirst3(params.resourceId, params.resource_id),
2857
+ resource_type: pickFirst3(params.resourceType, params.resource_type),
2365
2858
  description: params.description
2366
2859
  });
2367
2860
  const data = await this.http.post(
2368
2861
  "/egress/policies",
2369
2862
  body4
2370
2863
  );
2371
- return unwrap21(data);
2864
+ return unwrap22(data);
2372
2865
  }
2373
2866
  /** Update an egress policy by id. */
2374
2867
  async updatePolicy(policyId, params) {
2375
- const body4 = stripUndefined8({
2868
+ const body4 = stripUndefined9({
2376
2869
  mode: params.mode,
2377
- default_effect: pickFirst2(params.defaultEffect, params.default_effect),
2870
+ default_effect: pickFirst3(params.defaultEffect, params.default_effect),
2378
2871
  name: params.name,
2379
2872
  description: params.description
2380
2873
  });
@@ -2382,7 +2875,7 @@ var EgressNetwork = class {
2382
2875
  `/egress/policies/${policyId}`,
2383
2876
  body4
2384
2877
  );
2385
- return unwrap21(data);
2878
+ return unwrap22(data);
2386
2879
  }
2387
2880
  // ── mode helpers ──────────────────────────────────────────────────────────
2388
2881
  /** Set the policy to `mode="enforce"` — denied egress is blocked. */
@@ -2394,13 +2887,13 @@ var EgressNetwork = class {
2394
2887
  return this.setMode("audit_only", params);
2395
2888
  }
2396
2889
  async setMode(mode, params) {
2397
- const policyId = pickFirst2(params.policyId, params.policy_id);
2398
- const resourceId = pickFirst2(params.resourceId, params.resource_id);
2399
- const resourceType = pickFirst2(params.resourceType, params.resource_type);
2890
+ const policyId = pickFirst3(params.policyId, params.policy_id);
2891
+ const resourceId = pickFirst3(params.resourceId, params.resource_id);
2892
+ const resourceType = pickFirst3(params.resourceType, params.resource_type);
2400
2893
  if (policyId) {
2401
2894
  return this.updatePolicy(policyId, { mode });
2402
2895
  }
2403
- const body4 = resourceId !== void 0 && resourceType !== void 0 ? stripUndefined8({
2896
+ const body4 = resourceId !== void 0 && resourceType !== void 0 ? stripUndefined9({
2404
2897
  mode,
2405
2898
  resource_id: resourceId,
2406
2899
  resource_type: resourceType
@@ -2409,21 +2902,21 @@ var EgressNetwork = class {
2409
2902
  "/egress/policies",
2410
2903
  body4
2411
2904
  );
2412
- return unwrap21(data);
2905
+ return unwrap22(data);
2413
2906
  }
2414
2907
  // ── suggestions ───────────────────────────────────────────────────────────
2415
2908
  /** AI-generated allowlist suggestions from recent denied egress. */
2416
2909
  async suggestions(params = {}) {
2417
- const query2 = stripUndefined8({
2418
- resource_id: pickFirst2(params.resourceId, params.resource_id),
2419
- resource_type: pickFirst2(params.resourceType, params.resource_type),
2910
+ const query2 = stripUndefined9({
2911
+ resource_id: pickFirst3(params.resourceId, params.resource_id),
2912
+ resource_type: pickFirst3(params.resourceType, params.resource_type),
2420
2913
  since: params.since ?? "7d"
2421
2914
  });
2422
2915
  const data = await this.http.get(
2423
2916
  "/egress/audit/suggestions",
2424
2917
  query2
2425
2918
  );
2426
- return unwrapList9(data);
2919
+ return unwrapList10(data);
2427
2920
  }
2428
2921
  };
2429
2922
  var SandboxNetwork = class {
@@ -2500,7 +2993,7 @@ var ComputerNetwork = class extends SandboxNetwork {
2500
2993
  };
2501
2994
 
2502
2995
  // src/resources/egressSecrets.ts
2503
- function unwrap22(payload) {
2996
+ function unwrap23(payload) {
2504
2997
  if (payload && typeof payload === "object") {
2505
2998
  const p = payload;
2506
2999
  for (const k of ["data", "secret", "binding", "items"]) {
@@ -2509,7 +3002,7 @@ function unwrap22(payload) {
2509
3002
  }
2510
3003
  return payload;
2511
3004
  }
2512
- function unwrapList10(payload) {
3005
+ function unwrapList11(payload) {
2513
3006
  if (Array.isArray(payload)) return payload;
2514
3007
  if (payload && typeof payload === "object") {
2515
3008
  const p = payload;
@@ -2519,87 +3012,87 @@ function unwrapList10(payload) {
2519
3012
  }
2520
3013
  return [];
2521
3014
  }
2522
- function stripUndefined9(input) {
3015
+ function stripUndefined10(input) {
2523
3016
  return Object.fromEntries(
2524
3017
  Object.entries(input).filter(([, v]) => v !== void 0)
2525
3018
  );
2526
3019
  }
2527
- function pickFirst3(...values) {
3020
+ function pickFirst4(...values) {
2528
3021
  for (const v of values) if (v !== void 0) return v;
2529
3022
  return void 0;
2530
3023
  }
2531
3024
  function setBody(params) {
2532
- return stripUndefined9({
3025
+ return stripUndefined10({
2533
3026
  name: params.name,
2534
3027
  value: params.value,
2535
3028
  type: params.type ?? "api_key",
2536
3029
  scope: params.scope ?? "user",
2537
- expose_as_env: pickFirst3(params.exposeAsEnv, params.expose_as_env),
2538
- workspace_id: pickFirst3(params.workspaceId, params.workspace_id),
2539
- owner_user_id: pickFirst3(params.ownerUserId, params.owner_user_id),
2540
- external_user_id: pickFirst3(params.externalUserId, params.external_user_id),
2541
- external_workspace_id: pickFirst3(
3030
+ expose_as_env: pickFirst4(params.exposeAsEnv, params.expose_as_env),
3031
+ workspace_id: pickFirst4(params.workspaceId, params.workspace_id),
3032
+ owner_user_id: pickFirst4(params.ownerUserId, params.owner_user_id),
3033
+ external_user_id: pickFirst4(params.externalUserId, params.external_user_id),
3034
+ external_workspace_id: pickFirst4(
2542
3035
  params.externalWorkspaceId,
2543
3036
  params.external_workspace_id
2544
3037
  ),
2545
- resource_id: pickFirst3(params.resourceId, params.resource_id),
2546
- resource_type: pickFirst3(params.resourceType, params.resource_type),
2547
- refresh_token: pickFirst3(params.refreshToken, params.refresh_token),
2548
- expires_at: pickFirst3(params.expiresAt, params.expires_at),
3038
+ resource_id: pickFirst4(params.resourceId, params.resource_id),
3039
+ resource_type: pickFirst4(params.resourceType, params.resource_type),
3040
+ refresh_token: pickFirst4(params.refreshToken, params.refresh_token),
3041
+ expires_at: pickFirst4(params.expiresAt, params.expires_at),
2549
3042
  metadata: params.metadata
2550
3043
  });
2551
3044
  }
2552
3045
  function listQuery2(params) {
2553
- return stripUndefined9({
3046
+ return stripUndefined10({
2554
3047
  scope: params.scope,
2555
3048
  type: params.type,
2556
- workspace_id: pickFirst3(params.workspaceId, params.workspace_id),
2557
- owner_user_id: pickFirst3(params.ownerUserId, params.owner_user_id),
2558
- external_user_id: pickFirst3(params.externalUserId, params.external_user_id),
2559
- external_workspace_id: pickFirst3(
3049
+ workspace_id: pickFirst4(params.workspaceId, params.workspace_id),
3050
+ owner_user_id: pickFirst4(params.ownerUserId, params.owner_user_id),
3051
+ external_user_id: pickFirst4(params.externalUserId, params.external_user_id),
3052
+ external_workspace_id: pickFirst4(
2560
3053
  params.externalWorkspaceId,
2561
3054
  params.external_workspace_id
2562
3055
  ),
2563
- resource_id: pickFirst3(params.resourceId, params.resource_id),
2564
- resource_type: pickFirst3(params.resourceType, params.resource_type)
3056
+ resource_id: pickFirst4(params.resourceId, params.resource_id),
3057
+ resource_type: pickFirst4(params.resourceType, params.resource_type)
2565
3058
  });
2566
3059
  }
2567
3060
  function rotateBody(params) {
2568
- return stripUndefined9({
2569
- value: pickFirst3(params.newValue, params.new_value, params.value),
2570
- refresh_token: pickFirst3(params.refreshToken, params.refresh_token),
2571
- expires_at: pickFirst3(params.expiresAt, params.expires_at)
3061
+ return stripUndefined10({
3062
+ value: pickFirst4(params.newValue, params.new_value, params.value),
3063
+ refresh_token: pickFirst4(params.refreshToken, params.refresh_token),
3064
+ expires_at: pickFirst4(params.expiresAt, params.expires_at)
2572
3065
  });
2573
3066
  }
2574
3067
  function bindingBody(params) {
2575
- return stripUndefined9({
2576
- secret_id: pickFirst3(params.secretId, params.secret_id),
2577
- resource_id: pickFirst3(params.resourceId, params.resource_id),
2578
- resource_type: pickFirst3(params.resourceType, params.resource_type),
2579
- expose_as_env: pickFirst3(params.exposeAsEnv, params.expose_as_env)
3068
+ return stripUndefined10({
3069
+ secret_id: pickFirst4(params.secretId, params.secret_id),
3070
+ resource_id: pickFirst4(params.resourceId, params.resource_id),
3071
+ resource_type: pickFirst4(params.resourceType, params.resource_type),
3072
+ expose_as_env: pickFirst4(params.exposeAsEnv, params.expose_as_env)
2580
3073
  });
2581
3074
  }
2582
3075
  function bindingQuery(params) {
2583
- return stripUndefined9({
2584
- resource_id: pickFirst3(params.resourceId, params.resource_id),
2585
- resource_type: pickFirst3(params.resourceType, params.resource_type),
2586
- secret_id: pickFirst3(params.secretId, params.secret_id)
3076
+ return stripUndefined10({
3077
+ resource_id: pickFirst4(params.resourceId, params.resource_id),
3078
+ resource_type: pickFirst4(params.resourceType, params.resource_type),
3079
+ secret_id: pickFirst4(params.secretId, params.secret_id)
2587
3080
  });
2588
3081
  }
2589
3082
  function oauthBody(params) {
2590
- return stripUndefined9({
3083
+ return stripUndefined10({
2591
3084
  provider: params.provider,
2592
- expose_as_env: pickFirst3(params.exposeAsEnv, params.expose_as_env),
3085
+ expose_as_env: pickFirst4(params.exposeAsEnv, params.expose_as_env),
2593
3086
  scope: params.scope,
2594
- owner_user_id: pickFirst3(params.ownerUserId, params.owner_user_id),
2595
- external_user_id: pickFirst3(params.externalUserId, params.external_user_id),
2596
- external_workspace_id: pickFirst3(
3087
+ owner_user_id: pickFirst4(params.ownerUserId, params.owner_user_id),
3088
+ external_user_id: pickFirst4(params.externalUserId, params.external_user_id),
3089
+ external_workspace_id: pickFirst4(
2597
3090
  params.externalWorkspaceId,
2598
3091
  params.external_workspace_id
2599
3092
  ),
2600
- resource_id: pickFirst3(params.resourceId, params.resource_id),
2601
- resource_type: pickFirst3(params.resourceType, params.resource_type),
2602
- redirect_uri: pickFirst3(params.redirectUri, params.redirect_uri)
3093
+ resource_id: pickFirst4(params.resourceId, params.resource_id),
3094
+ resource_type: pickFirst4(params.resourceType, params.resource_type),
3095
+ redirect_uri: pickFirst4(params.redirectUri, params.redirect_uri)
2603
3096
  });
2604
3097
  }
2605
3098
  function sleep5(ms) {
@@ -2636,7 +3129,7 @@ var OAuthFlow = class {
2636
3129
  const data = await this.http.get("/egress/oauth/status", {
2637
3130
  state: this.state
2638
3131
  });
2639
- const payload = unwrap22(data) ?? {};
3132
+ const payload = unwrap23(data) ?? {};
2640
3133
  const status = payload.status;
2641
3134
  if (status === "completed" || status === "ready" || status === "succeeded") {
2642
3135
  return payload;
@@ -2668,7 +3161,7 @@ var EgressSecrets = class {
2668
3161
  "/egress/secrets",
2669
3162
  setBody(params)
2670
3163
  );
2671
- return unwrap22(data);
3164
+ return unwrap23(data);
2672
3165
  }
2673
3166
  /** List secrets. */
2674
3167
  async list(params = {}) {
@@ -2676,14 +3169,14 @@ var EgressSecrets = class {
2676
3169
  "/egress/secrets",
2677
3170
  listQuery2(params)
2678
3171
  );
2679
- return unwrapList10(data);
3172
+ return unwrapList11(data);
2680
3173
  }
2681
3174
  /** Get a single secret by id. */
2682
3175
  async get(id) {
2683
3176
  const data = await this.http.get(
2684
3177
  `/egress/secrets/${id}`
2685
3178
  );
2686
- return unwrap22(data);
3179
+ return unwrap23(data);
2687
3180
  }
2688
3181
  /** Rotate the secret's value. */
2689
3182
  async rotate(id, params) {
@@ -2692,7 +3185,7 @@ var EgressSecrets = class {
2692
3185
  `/egress/secrets/${id}`,
2693
3186
  body4
2694
3187
  );
2695
- return unwrap22(data);
3188
+ return unwrap23(data);
2696
3189
  }
2697
3190
  /** Delete a secret. */
2698
3191
  async delete(id) {
@@ -2705,7 +3198,7 @@ var EgressSecrets = class {
2705
3198
  "/egress/bindings",
2706
3199
  bindingBody(params)
2707
3200
  );
2708
- return unwrap22(data);
3201
+ return unwrap23(data);
2709
3202
  }
2710
3203
  /** List secret bindings. */
2711
3204
  async listBindings(params = {}) {
@@ -2713,7 +3206,7 @@ var EgressSecrets = class {
2713
3206
  "/egress/bindings",
2714
3207
  bindingQuery(params)
2715
3208
  );
2716
- return unwrapList10(data);
3209
+ return unwrapList11(data);
2717
3210
  }
2718
3211
  /** Delete a binding. */
2719
3212
  async deleteBinding(id) {
@@ -2723,7 +3216,7 @@ var EgressSecrets = class {
2723
3216
  /** List OAuth providers visible to the current tenant. */
2724
3217
  async providers() {
2725
3218
  const data = await this.http.get("/egress/oauth/providers");
2726
- return unwrapList10(data);
3219
+ return unwrapList11(data);
2727
3220
  }
2728
3221
  /**
2729
3222
  * Start an OAuth Connect flow.
@@ -2738,7 +3231,7 @@ var EgressSecrets = class {
2738
3231
  "/egress/oauth/start",
2739
3232
  oauthBody(params)
2740
3233
  );
2741
- const payload = unwrap22(data) ?? {};
3234
+ const payload = unwrap23(data) ?? {};
2742
3235
  return new OAuthFlow(this.http, payload, params.provider);
2743
3236
  }
2744
3237
  };
@@ -3354,6 +3847,8 @@ var Computer = class _Computer {
3354
3847
  ports;
3355
3848
  /** Volume attachment — list, attach, detach. */
3356
3849
  volumes;
3850
+ /** MIOSA Connect provider bindings scoped to this computer. */
3851
+ connectors;
3357
3852
  /** Encrypted secrets + OAuth credentials scoped to this computer. */
3358
3853
  secrets;
3359
3854
  /** Egress allowlist + policies scoped to this computer. */
@@ -3380,6 +3875,7 @@ var Computer = class _Computer {
3380
3875
  this.logs = new ComputerLogs(http, id);
3381
3876
  this.ports = new ComputerPorts(http, id);
3382
3877
  this.volumes = new ComputerVolumes(http, id);
3878
+ this.connectors = new ComputerConnectors(http, id);
3383
3879
  this.secrets = new ComputerSecrets(http, id);
3384
3880
  this.network = new ComputerNetwork(http, id);
3385
3881
  this.audit = new ComputerAudit(http, id);
@@ -3791,7 +4287,7 @@ var Credits = class {
3791
4287
  return this.http.get("/credits/usage");
3792
4288
  }
3793
4289
  };
3794
- function unwrap23(payload) {
4290
+ function unwrap24(payload) {
3795
4291
  if (payload && typeof payload === "object" && "data" in payload) {
3796
4292
  return payload.data;
3797
4293
  }
@@ -3807,7 +4303,7 @@ function listItems2(payload, candidateKeys = ["data", "cron_jobs", "executions",
3807
4303
  }
3808
4304
  return [];
3809
4305
  }
3810
- function stripUndefined10(input) {
4306
+ function stripUndefined11(input) {
3811
4307
  return Object.fromEntries(
3812
4308
  Object.entries(input).filter(([, v]) => v !== void 0)
3813
4309
  );
@@ -3821,28 +4317,28 @@ var CronJobs = class {
3821
4317
  }
3822
4318
  http;
3823
4319
  async list(params = {}) {
3824
- const query2 = stripUndefined10({ ...params });
4320
+ const query2 = stripUndefined11({ ...params });
3825
4321
  const data = await this.http.get("/cron-jobs", query2);
3826
4322
  return listItems2(data);
3827
4323
  }
3828
4324
  async get(jobId) {
3829
4325
  const data = await this.http.get(`/cron-jobs/${jobId}`);
3830
- return unwrap23(data);
4326
+ return unwrap24(data);
3831
4327
  }
3832
4328
  async create(params) {
3833
4329
  const { idempotencyKey: ikey, ...rest } = params;
3834
- const body4 = stripUndefined10(rest);
4330
+ const body4 = stripUndefined11(rest);
3835
4331
  const data = await this.http.request("/cron-jobs", {
3836
4332
  method: "POST",
3837
4333
  body: body4,
3838
4334
  headers: { "Idempotency-Key": idempotencyKey2(ikey) }
3839
4335
  });
3840
- return unwrap23(data);
4336
+ return unwrap24(data);
3841
4337
  }
3842
4338
  async update(jobId, params) {
3843
- const body4 = stripUndefined10(params);
4339
+ const body4 = stripUndefined11(params);
3844
4340
  const data = await this.http.patch(`/cron-jobs/${jobId}`, body4);
3845
- return unwrap23(data);
4341
+ return unwrap24(data);
3846
4342
  }
3847
4343
  async delete(jobId) {
3848
4344
  await this.http.delete(`/cron-jobs/${jobId}`);
@@ -3850,11 +4346,11 @@ var CronJobs = class {
3850
4346
  // ── Control ────────────────────────────────────────────────────────────────
3851
4347
  async pause(jobId) {
3852
4348
  const data = await this.http.post(`/cron-jobs/${jobId}/pause`);
3853
- return unwrap23(data);
4349
+ return unwrap24(data);
3854
4350
  }
3855
4351
  async resume(jobId) {
3856
4352
  const data = await this.http.post(`/cron-jobs/${jobId}/resume`);
3857
- return unwrap23(data);
4353
+ return unwrap24(data);
3858
4354
  }
3859
4355
  async runNow(jobId, opts = {}) {
3860
4356
  const data = await this.http.request(
@@ -3864,7 +4360,7 @@ var CronJobs = class {
3864
4360
  headers: { "Idempotency-Key": idempotencyKey2(opts.idempotencyKey) }
3865
4361
  }
3866
4362
  );
3867
- return unwrap23(data);
4363
+ return unwrap24(data);
3868
4364
  }
3869
4365
  // ── Execution history ──────────────────────────────────────────────────────
3870
4366
  async listExecutions(jobId) {
@@ -3879,12 +4375,12 @@ var CronJobs = class {
3879
4375
  const data = await this.http.get(
3880
4376
  `/cron-jobs/${jobId}/executions/${executionId}`
3881
4377
  );
3882
- return unwrap23(data);
4378
+ return unwrap24(data);
3883
4379
  }
3884
4380
  };
3885
4381
 
3886
4382
  // src/resources/dashboard.ts
3887
- function unwrap24(payload) {
4383
+ function unwrap25(payload) {
3888
4384
  if (payload && typeof payload === "object") {
3889
4385
  const p = payload;
3890
4386
  for (const k of ["data", "dashboard", "overview", "items"]) {
@@ -3901,15 +4397,15 @@ var Dashboard = class {
3901
4397
  /** Aggregated user dashboard payload. */
3902
4398
  async summary() {
3903
4399
  const data = await this.http.get("/dashboard");
3904
- return unwrap24(data);
4400
+ return unwrap25(data);
3905
4401
  }
3906
4402
  /** Status / health overview (public endpoint). */
3907
4403
  async overview() {
3908
4404
  const data = await this.http.get("/overview");
3909
- return unwrap24(data);
4405
+ return unwrap25(data);
3910
4406
  }
3911
4407
  };
3912
- function unwrap25(payload) {
4408
+ function unwrap26(payload) {
3913
4409
  if (payload && typeof payload === "object" && "data" in payload) {
3914
4410
  return payload.data;
3915
4411
  }
@@ -3925,7 +4421,7 @@ function listItems3(payload, candidateKeys = ["data", "databases", "items"]) {
3925
4421
  }
3926
4422
  return [];
3927
4423
  }
3928
- function stripUndefined11(input) {
4424
+ function stripUndefined12(input) {
3929
4425
  return Object.fromEntries(
3930
4426
  Object.entries(input).filter(([, v]) => v !== void 0)
3931
4427
  );
@@ -3939,13 +4435,13 @@ var Databases = class {
3939
4435
  }
3940
4436
  http;
3941
4437
  async list(params = {}) {
3942
- const query2 = stripUndefined11({ ...params });
4438
+ const query2 = stripUndefined12({ ...params });
3943
4439
  const data = await this.http.get("/databases", query2);
3944
4440
  return listItems3(data);
3945
4441
  }
3946
4442
  async get(databaseId) {
3947
4443
  const data = await this.http.get(`/databases/${databaseId}`);
3948
- return unwrap25(data);
4444
+ return unwrap26(data);
3949
4445
  }
3950
4446
  async create(params) {
3951
4447
  const {
@@ -3956,7 +4452,7 @@ var Databases = class {
3956
4452
  size: _deprecatedSize,
3957
4453
  ...rest
3958
4454
  } = params;
3959
- const body4 = stripUndefined11({
4455
+ const body4 = stripUndefined12({
3960
4456
  ...rest,
3961
4457
  engine_version: engine_version ?? version
3962
4458
  });
@@ -3969,7 +4465,7 @@ var Databases = class {
3969
4465
  )
3970
4466
  }
3971
4467
  });
3972
- return unwrap25(data);
4468
+ return unwrap26(data);
3973
4469
  }
3974
4470
  async delete(databaseId) {
3975
4471
  await this.http.delete(`/databases/${databaseId}`);
@@ -3979,27 +4475,27 @@ var Databases = class {
3979
4475
  const data = await this.http.post(
3980
4476
  `/databases/${databaseId}/start`
3981
4477
  );
3982
- return unwrap25(data);
4478
+ return unwrap26(data);
3983
4479
  }
3984
4480
  async stop(databaseId) {
3985
4481
  const data = await this.http.post(`/databases/${databaseId}/stop`);
3986
- return unwrap25(data);
4482
+ return unwrap26(data);
3987
4483
  }
3988
4484
  async restart(databaseId) {
3989
4485
  const data = await this.http.post(
3990
4486
  `/databases/${databaseId}/restart`
3991
4487
  );
3992
- return unwrap25(data);
4488
+ return unwrap26(data);
3993
4489
  }
3994
4490
  // ── Credentials + logs ────────────────────────────────────────────────────
3995
4491
  async credentials(databaseId) {
3996
4492
  const data = await this.http.get(
3997
4493
  `/databases/${databaseId}/credentials`
3998
4494
  );
3999
- return unwrap25(data);
4495
+ return unwrap26(data);
4000
4496
  }
4001
4497
  async logs(databaseId, params = {}) {
4002
- const query2 = stripUndefined11({
4498
+ const query2 = stripUndefined12({
4003
4499
  lines: params.lines,
4004
4500
  since: params.since
4005
4501
  });
@@ -4026,7 +4522,7 @@ function attributionBody(p) {
4026
4522
  function idempotencyKey4(key) {
4027
4523
  return key ?? randomUUID();
4028
4524
  }
4029
- function unwrap26(payload) {
4525
+ function unwrap27(payload) {
4030
4526
  if (payload && typeof payload === "object" && "data" in payload) {
4031
4527
  return payload.data;
4032
4528
  }
@@ -4042,7 +4538,7 @@ function listItems4(payload, candidateKeys = ["items", "deployments", "versions"
4042
4538
  }
4043
4539
  return [];
4044
4540
  }
4045
- function stripUndefined12(input) {
4541
+ function stripUndefined13(input) {
4046
4542
  return Object.fromEntries(
4047
4543
  Object.entries(input).filter(([, v]) => v !== void 0)
4048
4544
  );
@@ -4097,7 +4593,7 @@ var DeploymentVersions = class {
4097
4593
  http;
4098
4594
  deploymentId;
4099
4595
  async list(params = {}) {
4100
- const query2 = stripUndefined12({
4596
+ const query2 = stripUndefined13({
4101
4597
  state: params.state,
4102
4598
  limit: params.limit,
4103
4599
  cursor: params.cursor,
@@ -4113,10 +4609,10 @@ var DeploymentVersions = class {
4113
4609
  const data = await this.http.get(
4114
4610
  `/deployments/${this.deploymentId}/versions/${versionId}`
4115
4611
  );
4116
- return unwrap26(data);
4612
+ return unwrap27(data);
4117
4613
  }
4118
4614
  async promote(versionId, opts = {}) {
4119
- const body4 = stripUndefined12({ environment: opts.environment });
4615
+ const body4 = stripUndefined13({ environment: opts.environment });
4120
4616
  const data = await this.http.request(
4121
4617
  `/deployments/${this.deploymentId}/versions/${versionId}/promote`,
4122
4618
  {
@@ -4125,7 +4621,7 @@ var DeploymentVersions = class {
4125
4621
  headers: { "Idempotency-Key": idempotencyKey4(opts.idempotencyKey) }
4126
4622
  }
4127
4623
  );
4128
- return unwrap26(data);
4624
+ return unwrap27(data);
4129
4625
  }
4130
4626
  };
4131
4627
  var DeploymentReleases = class {
@@ -4145,7 +4641,7 @@ var DeploymentReleases = class {
4145
4641
  const data = await this.http.get(
4146
4642
  `/deployments/${this.deploymentId}/releases/${releaseId}`
4147
4643
  );
4148
- return unwrap26(data);
4644
+ return unwrap27(data);
4149
4645
  }
4150
4646
  };
4151
4647
  var DeploymentRuntimeInstances = class {
@@ -4165,14 +4661,14 @@ var DeploymentRuntimeInstances = class {
4165
4661
  const data = await this.http.get(
4166
4662
  `/deployments/${this.deploymentId}/runtime-instances/${instanceId}`
4167
4663
  );
4168
- return unwrap26(data);
4664
+ return unwrap27(data);
4169
4665
  }
4170
4666
  async logs(instanceId, lines = 100) {
4171
4667
  const data = await this.http.get(
4172
4668
  `/deployments/${this.deploymentId}/runtime-instances/${instanceId}/logs`,
4173
4669
  { lines }
4174
4670
  );
4175
- const unwrapped = unwrap26(data);
4671
+ const unwrapped = unwrap27(data);
4176
4672
  const result = { logs: String(unwrapped.logs ?? "") };
4177
4673
  if (typeof unwrapped.runtime_instance_id === "string") {
4178
4674
  result.runtime_instance_id = unwrapped.runtime_instance_id;
@@ -4203,11 +4699,11 @@ var DeploymentDomains = class {
4203
4699
  `/deployments/${this.deploymentId}/domains`,
4204
4700
  {
4205
4701
  method: "POST",
4206
- body: stripUndefined12(body4),
4702
+ body: stripUndefined13(body4),
4207
4703
  headers: { "Idempotency-Key": idempotencyKey4(params.idempotencyKey) }
4208
4704
  }
4209
4705
  );
4210
- return unwrap26(data);
4706
+ return unwrap27(data);
4211
4707
  }
4212
4708
  async list(filters = {}) {
4213
4709
  const data = await this.http.get(
@@ -4220,7 +4716,7 @@ var DeploymentDomains = class {
4220
4716
  const data = await this.http.post(
4221
4717
  `/deployments/${this.deploymentId}/domains/${domainId}/verify`
4222
4718
  );
4223
- return unwrap26(data);
4719
+ return unwrap27(data);
4224
4720
  }
4225
4721
  async delete(domainId) {
4226
4722
  await this.http.delete(
@@ -4235,7 +4731,7 @@ var Deployments = class {
4235
4731
  http;
4236
4732
  async list(params = {}) {
4237
4733
  const projectId = params.projectId ?? params.project_id;
4238
- const query2 = stripUndefined12({
4734
+ const query2 = stripUndefined13({
4239
4735
  project_id: projectId,
4240
4736
  state: params.state,
4241
4737
  limit: params.limit,
@@ -4250,10 +4746,10 @@ var Deployments = class {
4250
4746
  }
4251
4747
  async get(deploymentId) {
4252
4748
  const data = await this.http.get(`/deployments/${deploymentId}`);
4253
- return unwrap26(data);
4749
+ return unwrap27(data);
4254
4750
  }
4255
4751
  async create(params) {
4256
- const body4 = stripUndefined12({
4752
+ const body4 = stripUndefined13({
4257
4753
  name: params.name,
4258
4754
  repo_url: params.repoUrl ?? params.repo_url,
4259
4755
  branch: params.branch,
@@ -4269,7 +4765,7 @@ var Deployments = class {
4269
4765
  body: body4,
4270
4766
  headers: { "Idempotency-Key": idempotencyKey4(params.idempotencyKey) }
4271
4767
  });
4272
- return unwrap26(data);
4768
+ return unwrap27(data);
4273
4769
  }
4274
4770
  /**
4275
4771
  * Create a deployment that runs on the workspace's dedicated Docker Deploy
@@ -4313,7 +4809,7 @@ var Deployments = class {
4313
4809
  const rawHost = await this.http.get(
4314
4810
  `/docker-deploy/hosts/${hostId}`
4315
4811
  );
4316
- host = unwrap26(
4812
+ host = unwrap27(
4317
4813
  rawHost
4318
4814
  );
4319
4815
  addDoctorCheck(
@@ -4416,7 +4912,7 @@ var Deployments = class {
4416
4912
  };
4417
4913
  }
4418
4914
  async update(deploymentId, params) {
4419
- const body4 = stripUndefined12({
4915
+ const body4 = stripUndefined13({
4420
4916
  name: params.name,
4421
4917
  branch: params.branch,
4422
4918
  build_command: params.buildCommand ?? params.build_command,
@@ -4427,13 +4923,13 @@ var Deployments = class {
4427
4923
  `/deployments/${deploymentId}`,
4428
4924
  body4
4429
4925
  );
4430
- return unwrap26(data);
4926
+ return unwrap27(data);
4431
4927
  }
4432
4928
  async delete(deploymentId) {
4433
4929
  await this.http.delete(`/deployments/${deploymentId}`);
4434
4930
  }
4435
4931
  async publish(deploymentId, params) {
4436
- const body4 = stripUndefined12({
4932
+ const body4 = stripUndefined13({
4437
4933
  source_sandbox_id: params.sourceSandboxId ?? params.source_sandbox_id,
4438
4934
  output_path: params.outputPath ?? params.output_path,
4439
4935
  entrypoint: params.entrypoint,
@@ -4447,89 +4943,342 @@ var Deployments = class {
4447
4943
  headers: { "Idempotency-Key": idempotencyKey4(params.idempotencyKey) }
4448
4944
  }
4449
4945
  );
4450
- return unwrap26(data);
4946
+ return unwrap27(data);
4947
+ }
4948
+ /**
4949
+ * Backward-compatible bridge: POST /sandboxes/:id/deploy. Works today;
4950
+ * returns either release-backed or sandbox-backed depending on backend
4951
+ * phase. Prefer `publish()` once Phase 2B/3 lands.
4952
+ */
4953
+ async publishFromSandbox(sandboxId, params = {}) {
4954
+ const body4 = stripUndefined13({
4955
+ name: params.name,
4956
+ deployment_id: params.deploymentId ?? params.deployment_id,
4957
+ output_path: params.outputPath ?? params.output_path,
4958
+ source_snapshot_path: params.sourceSnapshotPath ?? params.source_snapshot_path,
4959
+ entrypoint: params.entrypoint,
4960
+ domain: params.domain,
4961
+ custom_domain: params.customDomain ?? params.custom_domain
4962
+ });
4963
+ const data = await this.http.request(
4964
+ `/sandboxes/${sandboxId}/deploy`,
4965
+ {
4966
+ method: "POST",
4967
+ body: body4,
4968
+ headers: { "Idempotency-Key": idempotencyKey4(params.idempotencyKey) }
4969
+ }
4970
+ );
4971
+ return unwrap27(data);
4972
+ }
4973
+ async rollback(deploymentId, params = {}) {
4974
+ const body4 = stripUndefined13({
4975
+ version_id: params.versionId ?? params.version_id
4976
+ });
4977
+ const data = await this.http.request(
4978
+ `/deployments/${deploymentId}/rollback`,
4979
+ {
4980
+ method: "POST",
4981
+ body: body4,
4982
+ headers: { "Idempotency-Key": idempotencyKey4(params.idempotencyKey) }
4983
+ }
4984
+ );
4985
+ return unwrap27(data);
4986
+ }
4987
+ async listBuilds(deploymentId) {
4988
+ const data = await this.http.get(
4989
+ `/deployments/${deploymentId}/builds`
4990
+ );
4991
+ return listItems4(data);
4992
+ }
4993
+ async getBuild(deploymentId, buildId) {
4994
+ const data = await this.http.get(
4995
+ `/deployments/${deploymentId}/builds/${buildId}`
4996
+ );
4997
+ return unwrap27(data);
4998
+ }
4999
+ async listEnv(deploymentId) {
5000
+ const data = await this.http.get(
5001
+ `/deployments/${deploymentId}/env`
5002
+ );
5003
+ return listItems4(data);
5004
+ }
5005
+ async setEnv(deploymentId, vars, opts = {}) {
5006
+ const body4 = stripUndefined13({ env: vars, environment: opts.environment });
5007
+ const data = await this.http.post(
5008
+ `/deployments/${deploymentId}/env`,
5009
+ body4
5010
+ );
5011
+ return listItems4(data);
5012
+ }
5013
+ versions(deploymentId) {
5014
+ return new DeploymentVersions(this.http, deploymentId);
5015
+ }
5016
+ releases(deploymentId) {
5017
+ return new DeploymentReleases(this.http, deploymentId);
5018
+ }
5019
+ runtimeInstances(deploymentId) {
5020
+ return new DeploymentRuntimeInstances(this.http, deploymentId);
5021
+ }
5022
+ runtime_instances(deploymentId) {
5023
+ return this.runtimeInstances(deploymentId);
5024
+ }
5025
+ domains(deploymentId) {
5026
+ return new DeploymentDomains(this.http, deploymentId);
5027
+ }
5028
+ connectors(deploymentId) {
5029
+ return new DeploymentConnectors(this.http, deploymentId);
5030
+ }
5031
+ };
5032
+
5033
+ // src/resources/devices.ts
5034
+ var RUNTIME_BINARIES = {
5035
+ "claude-code": ["claude-code", "claude"],
5036
+ claude: ["claude"],
5037
+ codex: ["codex"],
5038
+ hermes: ["hermes"],
5039
+ osa: ["osa"],
5040
+ pi: ["pi"],
5041
+ custom: []
5042
+ };
5043
+ function unwrap28(payload, keys = ["data"]) {
5044
+ if (payload && typeof payload === "object") {
5045
+ const p = payload;
5046
+ for (const key of keys) {
5047
+ if (key in p) return p[key];
5048
+ }
5049
+ }
5050
+ return payload;
5051
+ }
5052
+ function unwrapList12(payload) {
5053
+ if (Array.isArray(payload)) return payload;
5054
+ if (payload && typeof payload === "object") {
5055
+ const p = payload;
5056
+ for (const key of ["data", "devices", "items", "entries"]) {
5057
+ if (Array.isArray(p[key])) return p[key];
5058
+ }
5059
+ }
5060
+ return [];
5061
+ }
5062
+ function stripUndefined14(input) {
5063
+ return Object.fromEntries(
5064
+ Object.entries(input).filter(([, value]) => value !== void 0)
5065
+ );
5066
+ }
5067
+ function pickFirst5(...values) {
5068
+ for (const value of values) if (value !== void 0) return value;
5069
+ return void 0;
5070
+ }
5071
+ function queryFromListParams2(params = {}) {
5072
+ return stripUndefined14({
5073
+ kind: pickFirst5(params.kind, params.type),
5074
+ workspace_id: pickFirst5(params.workspaceId, params.workspace_id),
5075
+ project_id: pickFirst5(params.projectId, params.project_id)
5076
+ });
5077
+ }
5078
+ function queryFromFileParams(params = {}) {
5079
+ return stripUndefined14({
5080
+ path: params.path
5081
+ });
5082
+ }
5083
+ function devicePath(id) {
5084
+ return encodeURIComponent(id);
5085
+ }
5086
+ var Devices = class {
5087
+ constructor(http) {
5088
+ this.http = http;
5089
+ }
5090
+ http;
5091
+ /** List unified MIOSA devices: sandbox workers and desktop computers. */
5092
+ async list(params = {}) {
5093
+ const data = await this.http.get(
5094
+ "/devices",
5095
+ queryFromListParams2(params)
5096
+ );
5097
+ return unwrapList12(data);
5098
+ }
5099
+ /** Show one unified device by id. */
5100
+ async get(id) {
5101
+ const data = await this.http.get(`/devices/${devicePath(id)}`);
5102
+ return unwrap28(data);
5103
+ }
5104
+ show(id) {
5105
+ return this.get(id);
4451
5106
  }
4452
- /**
4453
- * Backward-compatible bridge: POST /sandboxes/:id/deploy. Works today;
4454
- * returns either release-backed or sandbox-backed depending on backend
4455
- * phase. Prefer `publish()` once Phase 2B/3 lands.
4456
- */
4457
- async publishFromSandbox(sandboxId, params = {}) {
4458
- const body4 = stripUndefined12({
4459
- name: params.name,
4460
- deployment_id: params.deploymentId ?? params.deployment_id,
4461
- output_path: params.outputPath ?? params.output_path,
4462
- source_snapshot_path: params.sourceSnapshotPath ?? params.source_snapshot_path,
4463
- entrypoint: params.entrypoint,
4464
- domain: params.domain,
4465
- custom_domain: params.customDomain ?? params.custom_domain
4466
- });
4467
- const data = await this.http.request(
4468
- `/sandboxes/${sandboxId}/deploy`,
4469
- {
4470
- method: "POST",
4471
- body: body4,
4472
- headers: { "Idempotency-Key": idempotencyKey4(params.idempotencyKey) }
4473
- }
5107
+ /** Discover the operations this device supports. */
5108
+ async capabilities(id) {
5109
+ const data = await this.http.get(
5110
+ `/devices/${devicePath(id)}/capabilities`
4474
5111
  );
4475
- return unwrap26(data);
5112
+ return unwrap28(data);
4476
5113
  }
4477
- async rollback(deploymentId, params = {}) {
4478
- const body4 = stripUndefined12({
4479
- version_id: params.versionId ?? params.version_id
4480
- });
4481
- const data = await this.http.request(
4482
- `/deployments/${deploymentId}/rollback`,
4483
- {
4484
- method: "POST",
4485
- body: body4,
4486
- headers: { "Idempotency-Key": idempotencyKey4(params.idempotencyKey) }
4487
- }
5114
+ /** Execute a command inside the device. */
5115
+ async exec(id, params) {
5116
+ const data = await this.http.post(
5117
+ `/devices/${devicePath(id)}/exec`,
5118
+ stripUndefined14({
5119
+ command: params.command,
5120
+ timeout_ms: pickFirst5(params.timeoutMs, params.timeout_ms),
5121
+ cwd: params.cwd,
5122
+ env: params.env
5123
+ })
4488
5124
  );
4489
- return unwrap26(data);
5125
+ return unwrap28(data);
4490
5126
  }
4491
- async listBuilds(deploymentId) {
5127
+ /** List files inside the device filesystem. */
5128
+ async listFiles(id, params = {}) {
4492
5129
  const data = await this.http.get(
4493
- `/deployments/${deploymentId}/builds`
5130
+ `/devices/${devicePath(id)}/files`,
5131
+ queryFromFileParams(params)
4494
5132
  );
4495
- return listItems4(data);
5133
+ return unwrapList12(data);
4496
5134
  }
4497
- async getBuild(deploymentId, buildId) {
5135
+ /** Read a file. Content is returned base64-encoded by the API. */
5136
+ async readFile(id, params) {
4498
5137
  const data = await this.http.get(
4499
- `/deployments/${deploymentId}/builds/${buildId}`
5138
+ `/devices/${devicePath(id)}/files/read`,
5139
+ queryFromFileParams(params)
4500
5140
  );
4501
- return unwrap26(data);
5141
+ return unwrap28(data);
4502
5142
  }
4503
- async listEnv(deploymentId) {
4504
- const data = await this.http.get(
4505
- `/deployments/${deploymentId}/env`
5143
+ /** Write a text or base64 payload into the device filesystem. */
5144
+ async writeFile(id, params) {
5145
+ const data = await this.http.post(
5146
+ `/devices/${devicePath(id)}/files/write`,
5147
+ stripUndefined14({
5148
+ path: params.path,
5149
+ content: params.content,
5150
+ content_base64: pickFirst5(params.contentBase64, params.content_base64)
5151
+ })
4506
5152
  );
4507
- return listItems4(data);
5153
+ return unwrap28(data);
4508
5154
  }
4509
- async setEnv(deploymentId, vars, opts = {}) {
4510
- const body4 = stripUndefined12({ env: vars, environment: opts.environment });
5155
+ /** Expose a device port through MIOSA routing. */
5156
+ async expose(id, params) {
4511
5157
  const data = await this.http.post(
4512
- `/deployments/${deploymentId}/env`,
4513
- body4
5158
+ `/devices/${devicePath(id)}/expose`,
5159
+ { port: params.port }
4514
5160
  );
4515
- return listItems4(data);
5161
+ return unwrap28(data);
4516
5162
  }
4517
- versions(deploymentId) {
4518
- return new DeploymentVersions(this.http, deploymentId);
5163
+ /** Return browser/desktop connection details for a computer-backed device. */
5164
+ async browser(id) {
5165
+ const data = await this.http.get(`/devices/${devicePath(id)}/browser`);
5166
+ return unwrap28(data);
4519
5167
  }
4520
- releases(deploymentId) {
4521
- return new DeploymentReleases(this.http, deploymentId);
5168
+ async pause(id) {
5169
+ const data = await this.http.post(
5170
+ `/devices/${devicePath(id)}/pause`,
5171
+ {}
5172
+ );
5173
+ return unwrap28(data);
4522
5174
  }
4523
- runtimeInstances(deploymentId) {
4524
- return new DeploymentRuntimeInstances(this.http, deploymentId);
5175
+ async stop(id) {
5176
+ const data = await this.http.post(
5177
+ `/devices/${devicePath(id)}/stop`,
5178
+ {}
5179
+ );
5180
+ return unwrap28(data);
4525
5181
  }
4526
- runtime_instances(deploymentId) {
4527
- return this.runtimeInstances(deploymentId);
5182
+ async resume(id) {
5183
+ const data = await this.http.post(
5184
+ `/devices/${devicePath(id)}/resume`,
5185
+ {}
5186
+ );
5187
+ return unwrap28(data);
4528
5188
  }
4529
- domains(deploymentId) {
4530
- return new DeploymentDomains(this.http, deploymentId);
5189
+ async extend(id, params) {
5190
+ const data = await this.http.post(
5191
+ `/devices/${devicePath(id)}/extend`,
5192
+ { timeout_sec: pickFirst5(params.timeoutSec, params.timeout_sec) }
5193
+ );
5194
+ return unwrap28(data);
5195
+ }
5196
+ async destroy(id) {
5197
+ const data = await this.http.delete(`/devices/${devicePath(id)}`);
5198
+ return unwrap28(data);
5199
+ }
5200
+ /**
5201
+ * Write a MIOSA runtime bootstrap manifest and optionally install/probe
5202
+ * an agent runtime inside the device.
5203
+ */
5204
+ async bootstrap(id, params) {
5205
+ const runtime = params.runtime.trim().toLowerCase();
5206
+ const cwd = params.cwd ?? "/workspace";
5207
+ const manifestPath = `${cwd.replace(/\/$/, "")}/.miosa/runtime-bootstrap.json`;
5208
+ const steps = [];
5209
+ const manifest = {
5210
+ version: 1,
5211
+ runtime,
5212
+ cwd,
5213
+ expected_binaries: RUNTIME_BINARIES[runtime] ?? [],
5214
+ connectors: params.connectors ?? [],
5215
+ env: params.env ?? {},
5216
+ mcp: params.mcp ?? [],
5217
+ created_by: "@miosa/sdk"
5218
+ };
5219
+ await this.recordStep(
5220
+ steps,
5221
+ "write_manifest",
5222
+ () => this.writeFile(id, {
5223
+ path: manifestPath,
5224
+ content: `${JSON.stringify(manifest, null, 2)}
5225
+ `
5226
+ })
5227
+ );
5228
+ const installCommand = pickFirst5(params.installCommand, params.install_command);
5229
+ if (installCommand) {
5230
+ await this.recordStep(
5231
+ steps,
5232
+ "install",
5233
+ () => this.exec(id, {
5234
+ command: installCommand,
5235
+ cwd,
5236
+ timeoutMs: 6e5
5237
+ })
5238
+ );
5239
+ }
5240
+ if (!(params.skipProbe ?? params.skip_probe)) {
5241
+ await this.recordStep(
5242
+ steps,
5243
+ "probe",
5244
+ () => this.exec(id, {
5245
+ command: runtimeProbeCommand(runtime),
5246
+ cwd,
5247
+ timeoutMs: 6e4
5248
+ })
5249
+ );
5250
+ }
5251
+ return {
5252
+ device_id: id,
5253
+ ok: steps.every((step) => step.ok),
5254
+ runtime,
5255
+ manifest_path: manifestPath,
5256
+ steps
5257
+ };
5258
+ }
5259
+ async recordStep(steps, name, fn) {
5260
+ try {
5261
+ steps.push({ name, ok: true, detail: await fn() });
5262
+ } catch (error) {
5263
+ steps.push({
5264
+ name,
5265
+ ok: false,
5266
+ error: error instanceof Error ? error.message : String(error)
5267
+ });
5268
+ }
4531
5269
  }
4532
5270
  };
5271
+ function runtimeProbeCommand(runtime) {
5272
+ const binaries = RUNTIME_BINARIES[runtime] ?? [];
5273
+ if (binaries.length === 0) return "printf 'custom runtime manifest written\\n'";
5274
+ const checks = binaries.map((binary) => `command -v ${shellWord(binary)} >/dev/null 2>&1`).join(" || ");
5275
+ const display = binaries.join(" or ");
5276
+ return `${checks} && printf 'runtime available: ${display}\\n' || { printf 'runtime missing: ${display}\\n' >&2; exit 127; }`;
5277
+ }
5278
+ function shellWord(value) {
5279
+ if (/^[A-Za-z0-9_./:-]+$/.test(value)) return value;
5280
+ return `'${value.replaceAll("'", `'"'"'`)}'`;
5281
+ }
4533
5282
 
4534
5283
  // src/resources/docker-deploy.ts
4535
5284
  function workspaceId(params) {
@@ -4616,7 +5365,7 @@ var DockerDeploy = class {
4616
5365
  };
4617
5366
 
4618
5367
  // src/resources/email.ts
4619
- function unwrap27(data) {
5368
+ function unwrap29(data) {
4620
5369
  if (data && typeof data === "object") {
4621
5370
  const d = data;
4622
5371
  for (const k of [
@@ -4632,7 +5381,7 @@ function unwrap27(data) {
4632
5381
  }
4633
5382
  return data;
4634
5383
  }
4635
- function unwrapList11(data) {
5384
+ function unwrapList13(data) {
4636
5385
  if (Array.isArray(data)) return data;
4637
5386
  if (data && typeof data === "object") {
4638
5387
  const d = data;
@@ -4660,7 +5409,7 @@ var EmailCampaigns = class {
4660
5409
  }
4661
5410
  http;
4662
5411
  async list(filters = {}) {
4663
- return unwrapList11(
5412
+ return unwrapList13(
4664
5413
  await this.http.get(
4665
5414
  "/admin/email-campaigns",
4666
5415
  filters
@@ -4668,12 +5417,12 @@ var EmailCampaigns = class {
4668
5417
  );
4669
5418
  }
4670
5419
  async create(attrs) {
4671
- return unwrap27(
5420
+ return unwrap29(
4672
5421
  await this.http.post("/admin/email-campaigns", strip(attrs))
4673
5422
  );
4674
5423
  }
4675
5424
  async recipientCount(filters = {}) {
4676
- return unwrap27(
5425
+ return unwrap29(
4677
5426
  await this.http.get(
4678
5427
  "/admin/email-campaigns/recipient-count",
4679
5428
  filters
@@ -4681,7 +5430,7 @@ var EmailCampaigns = class {
4681
5430
  );
4682
5431
  }
4683
5432
  async send(campaignId, opts = {}) {
4684
- return unwrap27(
5433
+ return unwrap29(
4685
5434
  await this.http.post(
4686
5435
  `/admin/email-campaigns/${campaignId}/send`,
4687
5436
  strip(opts)
@@ -4689,14 +5438,14 @@ var EmailCampaigns = class {
4689
5438
  );
4690
5439
  }
4691
5440
  async cancel(campaignId) {
4692
- return unwrap27(
5441
+ return unwrap29(
4693
5442
  await this.http.post(
4694
5443
  `/admin/email-campaigns/${campaignId}/cancel`
4695
5444
  )
4696
5445
  );
4697
5446
  }
4698
5447
  async deliveries(campaignId, filters = {}) {
4699
- return unwrapList11(
5448
+ return unwrapList13(
4700
5449
  await this.http.get(
4701
5450
  `/admin/email-campaigns/${campaignId}/deliveries`,
4702
5451
  filters
@@ -4710,12 +5459,12 @@ var EmailTemplates = class {
4710
5459
  }
4711
5460
  http;
4712
5461
  async list(filters = {}) {
4713
- return unwrapList11(
5462
+ return unwrapList13(
4714
5463
  await this.http.get("/admin/email-templates", filters)
4715
5464
  );
4716
5465
  }
4717
5466
  async create(key, attrs = {}) {
4718
- return unwrap27(
5467
+ return unwrap29(
4719
5468
  await this.http.post("/admin/email-templates", {
4720
5469
  key,
4721
5470
  ...strip(attrs)
@@ -4723,7 +5472,7 @@ var EmailTemplates = class {
4723
5472
  );
4724
5473
  }
4725
5474
  async update(key, attrs) {
4726
- return unwrap27(
5475
+ return unwrap29(
4727
5476
  await this.http.put(
4728
5477
  `/admin/email-templates/${key}`,
4729
5478
  strip(attrs)
@@ -4731,7 +5480,7 @@ var EmailTemplates = class {
4731
5480
  );
4732
5481
  }
4733
5482
  async reset(key) {
4734
- return unwrap27(
5483
+ return unwrap29(
4735
5484
  await this.http.post(`/admin/email-templates/${key}/reset`)
4736
5485
  );
4737
5486
  }
@@ -4742,22 +5491,22 @@ var EmailInbox = class {
4742
5491
  }
4743
5492
  http;
4744
5493
  async list(filters = {}) {
4745
- return unwrapList11(
5494
+ return unwrapList13(
4746
5495
  await this.http.get("/admin/email-inbox", filters)
4747
5496
  );
4748
5497
  }
4749
5498
  async send(attrs) {
4750
- return unwrap27(
5499
+ return unwrap29(
4751
5500
  await this.http.post("/admin/email-inbox/send", strip(attrs))
4752
5501
  );
4753
5502
  }
4754
5503
  async markRead(messageId) {
4755
- return unwrap27(
5504
+ return unwrap29(
4756
5505
  await this.http.post(`/admin/email-inbox/${messageId}/read`)
4757
5506
  );
4758
5507
  }
4759
5508
  async archive(messageId) {
4760
- return unwrap27(
5509
+ return unwrap29(
4761
5510
  await this.http.post(`/admin/email-inbox/${messageId}/archive`)
4762
5511
  );
4763
5512
  }
@@ -4797,7 +5546,7 @@ var Embeddings = class {
4797
5546
  };
4798
5547
 
4799
5548
  // src/resources/external-keys.ts
4800
- function unwrap28(payload) {
5549
+ function unwrap30(payload) {
4801
5550
  if (payload && typeof payload === "object") {
4802
5551
  const p = payload;
4803
5552
  for (const k of ["data", "external_keys", "items"]) {
@@ -4806,7 +5555,7 @@ function unwrap28(payload) {
4806
5555
  }
4807
5556
  return payload;
4808
5557
  }
4809
- function stripUndefined13(input) {
5558
+ function stripUndefined15(input) {
4810
5559
  return Object.fromEntries(
4811
5560
  Object.entries(input).filter(([, v]) => v !== void 0)
4812
5561
  );
@@ -4819,22 +5568,22 @@ var ExternalKeys = class {
4819
5568
  /** List configured external keys. */
4820
5569
  async list() {
4821
5570
  const data = await this.http.get("/external-keys");
4822
- const result = unwrap28(data);
5571
+ const result = unwrap30(data);
4823
5572
  if (Array.isArray(result)) return result;
4824
5573
  return [];
4825
5574
  }
4826
5575
  /** Create / register an external provider key. */
4827
5576
  async create(params) {
4828
- const body4 = stripUndefined13(params);
5577
+ const body4 = stripUndefined15(params);
4829
5578
  const data = await this.http.post("/external-keys", body4);
4830
- return unwrap28(data);
5579
+ return unwrap30(data);
4831
5580
  }
4832
5581
  /** Resolve (preview) the stored key for a provider. */
4833
5582
  async resolve(provider) {
4834
5583
  const data = await this.http.get(
4835
5584
  `/external-keys/${provider}/resolve`
4836
5585
  );
4837
- return unwrap28(data);
5586
+ return unwrap30(data);
4838
5587
  }
4839
5588
  /**
4840
5589
  * Delete the stored key for a provider.
@@ -4844,7 +5593,7 @@ var ExternalKeys = class {
4844
5593
  await this.http.delete(`/external-keys/${provider}`);
4845
5594
  }
4846
5595
  };
4847
- function unwrap29(payload) {
5596
+ function unwrap31(payload) {
4848
5597
  if (payload && typeof payload === "object" && "data" in payload) {
4849
5598
  return payload.data;
4850
5599
  }
@@ -4860,7 +5609,7 @@ function listItems5(payload, candidateKeys = ["data", "domains", "items"]) {
4860
5609
  }
4861
5610
  return [];
4862
5611
  }
4863
- function stripUndefined14(input) {
5612
+ function stripUndefined16(input) {
4864
5613
  return Object.fromEntries(
4865
5614
  Object.entries(input).filter(([, v]) => v !== void 0)
4866
5615
  );
@@ -4874,7 +5623,7 @@ var FlatCustomDomains = class {
4874
5623
  }
4875
5624
  http;
4876
5625
  async list(params = {}) {
4877
- const query2 = stripUndefined14({ ...params });
5626
+ const query2 = stripUndefined16({ ...params });
4878
5627
  const data = await this.http.get("/custom-domains", query2);
4879
5628
  return listItems5(data);
4880
5629
  }
@@ -4886,7 +5635,7 @@ var FlatCustomDomains = class {
4886
5635
  redirectPolicy,
4887
5636
  ...rest
4888
5637
  } = params;
4889
- const body4 = stripUndefined14({
5638
+ const body4 = stripUndefined16({
4890
5639
  ...rest,
4891
5640
  resource_type: resourceType ?? rest.resource_type,
4892
5641
  resource_id: resourceId ?? rest.resource_id,
@@ -4897,13 +5646,13 @@ var FlatCustomDomains = class {
4897
5646
  body: body4,
4898
5647
  headers: { "Idempotency-Key": idempotencyKey5(ikey) }
4899
5648
  });
4900
- return unwrap29(data);
5649
+ return unwrap31(data);
4901
5650
  }
4902
5651
  async delete(domainId) {
4903
5652
  await this.http.delete(`/custom-domains/${domainId}`);
4904
5653
  }
4905
5654
  };
4906
- function unwrap30(payload) {
5655
+ function unwrap32(payload) {
4907
5656
  if (payload && typeof payload === "object" && "data" in payload) {
4908
5657
  return payload.data;
4909
5658
  }
@@ -4919,7 +5668,7 @@ function listItems6(payload, candidateKeys = ["data", "functions", "items"]) {
4919
5668
  }
4920
5669
  return [];
4921
5670
  }
4922
- function stripUndefined15(input) {
5671
+ function stripUndefined17(input) {
4923
5672
  return Object.fromEntries(
4924
5673
  Object.entries(input).filter(([, v]) => v !== void 0)
4925
5674
  );
@@ -4933,17 +5682,17 @@ var Functions = class {
4933
5682
  }
4934
5683
  http;
4935
5684
  async list(params = {}) {
4936
- const query2 = stripUndefined15({ ...params });
5685
+ const query2 = stripUndefined17({ ...params });
4937
5686
  const data = await this.http.get("/functions", query2);
4938
5687
  return listItems6(data);
4939
5688
  }
4940
5689
  async get(functionId) {
4941
5690
  const data = await this.http.get(`/functions/${functionId}`);
4942
- return unwrap30(data);
5691
+ return unwrap32(data);
4943
5692
  }
4944
5693
  async create(params) {
4945
5694
  const { idempotencyKey: ikey, memoryMb, timeoutSec, ...rest } = params;
4946
- const body4 = stripUndefined15({
5695
+ const body4 = stripUndefined17({
4947
5696
  ...rest,
4948
5697
  memory_mb: memoryMb ?? rest.memory_mb,
4949
5698
  timeout_sec: timeoutSec ?? rest.timeout_sec
@@ -4953,11 +5702,11 @@ var Functions = class {
4953
5702
  body: body4,
4954
5703
  headers: { "Idempotency-Key": idempotencyKey6(ikey) }
4955
5704
  });
4956
- return unwrap30(data);
5705
+ return unwrap32(data);
4957
5706
  }
4958
5707
  async update(functionId, params) {
4959
5708
  const { memoryMb, timeoutSec, ...rest } = params;
4960
- const body4 = stripUndefined15({
5709
+ const body4 = stripUndefined17({
4961
5710
  ...rest,
4962
5711
  memory_mb: memoryMb ?? rest.memory_mb,
4963
5712
  timeout_sec: timeoutSec ?? rest.timeout_sec
@@ -4966,7 +5715,7 @@ var Functions = class {
4966
5715
  `/functions/${functionId}`,
4967
5716
  body4
4968
5717
  );
4969
- return unwrap30(data);
5718
+ return unwrap32(data);
4970
5719
  }
4971
5720
  async delete(functionId) {
4972
5721
  await this.http.delete(`/functions/${functionId}`);
@@ -4987,7 +5736,7 @@ var Functions = class {
4987
5736
  return data ?? {};
4988
5737
  }
4989
5738
  };
4990
- function unwrap31(payload) {
5739
+ function unwrap33(payload) {
4991
5740
  if (payload && typeof payload === "object" && "data" in payload) {
4992
5741
  return payload.data;
4993
5742
  }
@@ -5003,7 +5752,7 @@ function listItems7(payload, candidateKeys = ["data", "health_checks", "items"])
5003
5752
  }
5004
5753
  return [];
5005
5754
  }
5006
- function stripUndefined16(input) {
5755
+ function stripUndefined18(input) {
5007
5756
  return Object.fromEntries(
5008
5757
  Object.entries(input).filter(([, v]) => v !== void 0)
5009
5758
  );
@@ -5017,13 +5766,13 @@ var HealthChecks = class {
5017
5766
  }
5018
5767
  http;
5019
5768
  async list(params = {}) {
5020
- const query2 = stripUndefined16({ ...params });
5769
+ const query2 = stripUndefined18({ ...params });
5021
5770
  const data = await this.http.get("/health-checks", query2);
5022
5771
  return listItems7(data);
5023
5772
  }
5024
5773
  async get(checkId) {
5025
5774
  const data = await this.http.get(`/health-checks/${checkId}`);
5026
- return unwrap31(data);
5775
+ return unwrap33(data);
5027
5776
  }
5028
5777
  async create(params) {
5029
5778
  const {
@@ -5033,7 +5782,7 @@ var HealthChecks = class {
5033
5782
  expectedStatus,
5034
5783
  ...rest
5035
5784
  } = params;
5036
- const body4 = stripUndefined16({
5785
+ const body4 = stripUndefined18({
5037
5786
  ...rest,
5038
5787
  interval_sec: intervalSec ?? rest.interval_sec,
5039
5788
  timeout_sec: timeoutSec ?? rest.timeout_sec,
@@ -5044,11 +5793,11 @@ var HealthChecks = class {
5044
5793
  body: body4,
5045
5794
  headers: { "Idempotency-Key": idempotencyKey7(ikey) }
5046
5795
  });
5047
- return unwrap31(data);
5796
+ return unwrap33(data);
5048
5797
  }
5049
5798
  async update(checkId, params) {
5050
5799
  const { intervalSec, timeoutSec, expectedStatus, ...rest } = params;
5051
- const body4 = stripUndefined16({
5800
+ const body4 = stripUndefined18({
5052
5801
  ...rest,
5053
5802
  interval_sec: intervalSec ?? rest.interval_sec,
5054
5803
  timeout_sec: timeoutSec ?? rest.timeout_sec,
@@ -5058,7 +5807,7 @@ var HealthChecks = class {
5058
5807
  `/health-checks/${checkId}`,
5059
5808
  body4
5060
5809
  );
5061
- return unwrap31(data);
5810
+ return unwrap33(data);
5062
5811
  }
5063
5812
  async delete(checkId) {
5064
5813
  await this.http.delete(`/health-checks/${checkId}`);
@@ -5066,7 +5815,7 @@ var HealthChecks = class {
5066
5815
  };
5067
5816
 
5068
5817
  // src/resources/integrations.ts
5069
- function unwrap32(payload) {
5818
+ function unwrap34(payload) {
5070
5819
  if (payload && typeof payload === "object") {
5071
5820
  const p = payload;
5072
5821
  for (const k of ["data", "integrations", "catalog", "items"]) {
@@ -5076,11 +5825,11 @@ function unwrap32(payload) {
5076
5825
  return payload;
5077
5826
  }
5078
5827
  function listItems8(payload) {
5079
- const result = unwrap32(payload);
5828
+ const result = unwrap34(payload);
5080
5829
  if (Array.isArray(result)) return result;
5081
5830
  return [];
5082
5831
  }
5083
- function stripUndefined17(input) {
5832
+ function stripUndefined19(input) {
5084
5833
  return Object.fromEntries(
5085
5834
  Object.entries(input).filter(([, v]) => v !== void 0)
5086
5835
  );
@@ -5105,14 +5854,14 @@ var Integrations = class {
5105
5854
  const data = await this.http.get(
5106
5855
  `/integrations/${provider}/start`
5107
5856
  );
5108
- return unwrap32(data);
5857
+ return unwrap34(data);
5109
5858
  }
5110
5859
  /** Force-refresh the access token for a provider. */
5111
5860
  async refresh(provider) {
5112
5861
  const data = await this.http.post(
5113
5862
  `/integrations/${provider}/refresh`
5114
5863
  );
5115
- return unwrap32(data);
5864
+ return unwrap34(data);
5116
5865
  }
5117
5866
  /** Disconnect (revoke) an integration. */
5118
5867
  async disconnect(provider) {
@@ -5132,41 +5881,41 @@ var Integrations = class {
5132
5881
  // ── Test hooks ─────────────────────────────────────────────────────────────
5133
5882
  /** Send a test message to the connected Slack channel. */
5134
5883
  async slackSendTest(params = {}) {
5135
- const body4 = stripUndefined17(params);
5884
+ const body4 = stripUndefined19(params);
5136
5885
  const data = await this.http.post(
5137
5886
  "/integrations/slack/send-test",
5138
5887
  body4
5139
5888
  );
5140
- return unwrap32(data);
5889
+ return unwrap34(data);
5141
5890
  }
5142
5891
  /** Send a test message to the connected Discord channel. */
5143
5892
  async discordSendTest(params = {}) {
5144
- const body4 = stripUndefined17(params);
5893
+ const body4 = stripUndefined19(params);
5145
5894
  const data = await this.http.post(
5146
5895
  "/integrations/discord/send-test",
5147
5896
  body4
5148
5897
  );
5149
- return unwrap32(data);
5898
+ return unwrap34(data);
5150
5899
  }
5151
5900
  // ── Linear dedicated controller ────────────────────────────────────────────
5152
5901
  /** Begin Linear OAuth — Linear has provider-specific error shapes. */
5153
5902
  async linearStart() {
5154
5903
  const data = await this.http.get("/integrations/linear/start");
5155
- return unwrap32(data);
5904
+ return unwrap34(data);
5156
5905
  }
5157
5906
  /** Create a Linear issue via the connected workspace. */
5158
5907
  async linearCreateIssue(params = {}) {
5159
- const body4 = stripUndefined17(params);
5908
+ const body4 = stripUndefined19(params);
5160
5909
  const data = await this.http.post(
5161
5910
  "/integrations/linear/create-issue",
5162
5911
  body4
5163
5912
  );
5164
- return unwrap32(data);
5913
+ return unwrap34(data);
5165
5914
  }
5166
5915
  };
5167
5916
 
5168
5917
  // src/resources/mcp.ts
5169
- function unwrap33(payload) {
5918
+ function unwrap35(payload) {
5170
5919
  if (payload && typeof payload === "object") {
5171
5920
  const p = payload;
5172
5921
  for (const k of ["data", "mcp", "result", "items"]) {
@@ -5175,7 +5924,7 @@ function unwrap33(payload) {
5175
5924
  }
5176
5925
  return payload;
5177
5926
  }
5178
- function stripUndefined18(input) {
5927
+ function stripUndefined20(input) {
5179
5928
  return Object.fromEntries(
5180
5929
  Object.entries(input).filter(([, v]) => v !== void 0)
5181
5930
  );
@@ -5187,12 +5936,12 @@ var Mcp = class {
5187
5936
  http;
5188
5937
  /** Send a JSON-RPC request to the MCP endpoint. */
5189
5938
  async dispatch(params = {}) {
5190
- const body4 = stripUndefined18(params);
5939
+ const body4 = stripUndefined20(params);
5191
5940
  const data = await this.http.post(
5192
5941
  "/mcp",
5193
5942
  Object.keys(body4).length > 0 ? body4 : void 0
5194
5943
  );
5195
- return unwrap33(data);
5944
+ return unwrap35(data);
5196
5945
  }
5197
5946
  /**
5198
5947
  * Open the MCP listen channel (GET).
@@ -5202,7 +5951,7 @@ var Mcp = class {
5202
5951
  */
5203
5952
  async listen() {
5204
5953
  const data = await this.http.get("/mcp");
5205
- return unwrap33(data);
5954
+ return unwrap35(data);
5206
5955
  }
5207
5956
  /** Close (terminate) the MCP session. */
5208
5957
  async close() {
@@ -5211,7 +5960,7 @@ var Mcp = class {
5211
5960
  };
5212
5961
 
5213
5962
  // src/resources/models.ts
5214
- function unwrap34(data) {
5963
+ function unwrap36(data) {
5215
5964
  if (Array.isArray(data)) return data;
5216
5965
  if (data && typeof data === "object") {
5217
5966
  const d = data;
@@ -5232,7 +5981,7 @@ var Models = class {
5232
5981
  Object.entries(filters).filter(([, v]) => v !== void 0)
5233
5982
  );
5234
5983
  const data = await this.http.get("/intelligence/models", query2);
5235
- return unwrap34(data);
5984
+ return unwrap36(data);
5236
5985
  }
5237
5986
  /**
5238
5987
  * Get a single model by id.
@@ -5875,7 +6624,7 @@ function resourcePayload(params) {
5875
6624
  return { resource_type, resource_id };
5876
6625
  }
5877
6626
  function authConfig(params) {
5878
- return stripUndefined19({
6627
+ return stripUndefined21({
5879
6628
  ...params.config ?? {},
5880
6629
  signup_enabled: params.signup_enabled ?? params.signupEnabled,
5881
6630
  email_confirm_required: params.email_confirm_required ?? params.emailConfirmRequired,
@@ -5883,12 +6632,12 @@ function authConfig(params) {
5883
6632
  });
5884
6633
  }
5885
6634
  function requestBody(params) {
5886
- return stripUndefined19({
6635
+ return stripUndefined21({
5887
6636
  ...resourcePayload(params),
5888
6637
  config: authConfig(params)
5889
6638
  });
5890
6639
  }
5891
- function unwrap35(payload) {
6640
+ function unwrap37(payload) {
5892
6641
  if (payload && typeof payload === "object") {
5893
6642
  const p = payload;
5894
6643
  for (const k of ["data", "project_auth", "config", "items"]) {
@@ -5897,7 +6646,7 @@ function unwrap35(payload) {
5897
6646
  }
5898
6647
  return payload;
5899
6648
  }
5900
- function stripUndefined19(input) {
6649
+ function stripUndefined21(input) {
5901
6650
  return Object.fromEntries(
5902
6651
  Object.entries(input).filter(([, v]) => v !== void 0)
5903
6652
  );
@@ -5913,13 +6662,13 @@ var ProjectAuth = class {
5913
6662
  "/project-auth/status",
5914
6663
  resourcePayload(params)
5915
6664
  );
5916
- return unwrap35(data);
6665
+ return unwrap37(data);
5917
6666
  }
5918
6667
  /** Enable project auth. */
5919
6668
  async enable(params) {
5920
6669
  const body4 = requestBody(params);
5921
6670
  const data = await this.http.post("/project-auth/enable", body4);
5922
- return unwrap35(data);
6671
+ return unwrap37(data);
5923
6672
  }
5924
6673
  /** Disable project auth. */
5925
6674
  async disable(params) {
@@ -5927,18 +6676,18 @@ var ProjectAuth = class {
5927
6676
  "/project-auth/disable",
5928
6677
  resourcePayload(params)
5929
6678
  );
5930
- return unwrap35(data);
6679
+ return unwrap37(data);
5931
6680
  }
5932
6681
  /** Update project-auth configuration. */
5933
6682
  async update(params) {
5934
6683
  const body4 = requestBody(params);
5935
6684
  const data = await this.http.patch("/project-auth/config", body4);
5936
- return unwrap35(data);
6685
+ return unwrap37(data);
5937
6686
  }
5938
6687
  };
5939
6688
 
5940
6689
  // src/resources/project-integrations.ts
5941
- function unwrap36(payload) {
6690
+ function unwrap38(payload) {
5942
6691
  if (payload && typeof payload === "object") {
5943
6692
  const p = payload;
5944
6693
  for (const k of ["data", "project_integrations", "catalog", "items"]) {
@@ -5948,11 +6697,11 @@ function unwrap36(payload) {
5948
6697
  return payload;
5949
6698
  }
5950
6699
  function listItems9(payload) {
5951
- const result = unwrap36(payload);
6700
+ const result = unwrap38(payload);
5952
6701
  if (Array.isArray(result)) return result;
5953
6702
  return [];
5954
6703
  }
5955
- function stripUndefined20(input) {
6704
+ function stripUndefined22(input) {
5956
6705
  return Object.fromEntries(
5957
6706
  Object.entries(input).filter(([, v]) => v !== void 0)
5958
6707
  );
@@ -5969,7 +6718,7 @@ var ProjectIntegrations = class {
5969
6718
  http;
5970
6719
  /** List project integrations. */
5971
6720
  async list(params = {}) {
5972
- const query2 = stripUndefined20(params);
6721
+ const query2 = stripUndefined22(params);
5973
6722
  const data = await this.http.get("/project-integrations", query2);
5974
6723
  return listItems9(data);
5975
6724
  }
@@ -5983,13 +6732,13 @@ var ProjectIntegrations = class {
5983
6732
  const data = await this.http.get(
5984
6733
  `/project-integrations/${integrationId}`
5985
6734
  );
5986
- return unwrap36(data);
6735
+ return unwrap38(data);
5987
6736
  }
5988
6737
  /** Create a project integration. */
5989
6738
  async create(params) {
5990
6739
  const body4 = stripUndefObj2(params);
5991
6740
  const data = await this.http.post("/project-integrations", body4);
5992
- return unwrap36(data);
6741
+ return unwrap38(data);
5993
6742
  }
5994
6743
  /** Update a project integration. */
5995
6744
  async update(integrationId, params) {
@@ -5998,7 +6747,7 @@ var ProjectIntegrations = class {
5998
6747
  `/project-integrations/${integrationId}`,
5999
6748
  body4
6000
6749
  );
6001
- return unwrap36(data);
6750
+ return unwrap38(data);
6002
6751
  }
6003
6752
  /** Delete a project integration. */
6004
6753
  async delete(integrationId) {
@@ -6007,7 +6756,7 @@ var ProjectIntegrations = class {
6007
6756
  };
6008
6757
 
6009
6758
  // src/resources/provider-defaults.ts
6010
- function unwrap37(data) {
6759
+ function unwrap39(data) {
6011
6760
  if (data && typeof data === "object") {
6012
6761
  const d = data;
6013
6762
  for (const k of ["data", "defaults", "provider_defaults", "config"]) {
@@ -6023,7 +6772,7 @@ var ProviderDefaults = class {
6023
6772
  http;
6024
6773
  /** Get the current fleet-wide provider defaults. */
6025
6774
  async list() {
6026
- return unwrap37(await this.http.get("/admin/provider-defaults"));
6775
+ return unwrap39(await this.http.get("/admin/provider-defaults"));
6027
6776
  }
6028
6777
  /** Return the defaults entry for a single provider, or {} if missing. */
6029
6778
  async get(provider) {
@@ -6039,13 +6788,13 @@ var ProviderDefaults = class {
6039
6788
  const body4 = Object.fromEntries(
6040
6789
  Object.entries(opts).filter(([, v]) => v !== void 0)
6041
6790
  );
6042
- return unwrap37(
6791
+ return unwrap39(
6043
6792
  await this.http.put("/admin/provider-defaults", body4)
6044
6793
  );
6045
6794
  }
6046
6795
  // ── Per-tenant overrides ────────────────────────────────────────────────
6047
6796
  async getTenant(tenantId) {
6048
- return unwrap37(
6797
+ return unwrap39(
6049
6798
  await this.http.get(
6050
6799
  `/admin/tenants/${tenantId}/provider-config`
6051
6800
  )
@@ -6055,7 +6804,7 @@ var ProviderDefaults = class {
6055
6804
  const body4 = Object.fromEntries(
6056
6805
  Object.entries(opts).filter(([, v]) => v !== void 0)
6057
6806
  );
6058
- return unwrap37(
6807
+ return unwrap39(
6059
6808
  await this.http.put(
6060
6809
  `/admin/tenants/${tenantId}/provider-config`,
6061
6810
  body4
@@ -6068,7 +6817,7 @@ var ProviderDefaults = class {
6068
6817
  };
6069
6818
 
6070
6819
  // src/resources/regions.ts
6071
- function unwrap38(payload) {
6820
+ function unwrap40(payload) {
6072
6821
  if (payload && typeof payload === "object") {
6073
6822
  const p = payload;
6074
6823
  for (const k of [
@@ -6085,7 +6834,7 @@ function unwrap38(payload) {
6085
6834
  return payload;
6086
6835
  }
6087
6836
  function listItems10(payload) {
6088
- const result = unwrap38(payload);
6837
+ const result = unwrap40(payload);
6089
6838
  if (Array.isArray(result)) return result;
6090
6839
  return [];
6091
6840
  }
@@ -6107,7 +6856,7 @@ var Regions = class {
6107
6856
  /** Get static compute pricing data. */
6108
6857
  async pricing() {
6109
6858
  const data = await this.http.get("/compute/pricing");
6110
- return unwrap38(data);
6859
+ return unwrap40(data);
6111
6860
  }
6112
6861
  /** List community computer templates. */
6113
6862
  async listTemplates() {
@@ -6119,12 +6868,12 @@ var Regions = class {
6119
6868
  const data = await this.http.get(
6120
6869
  `/compute/templates/${templateId}`
6121
6870
  );
6122
- return unwrap38(data);
6871
+ return unwrap40(data);
6123
6872
  }
6124
6873
  };
6125
6874
 
6126
6875
  // src/resources/runtime-env.ts
6127
- function unwrap39(payload) {
6876
+ function unwrap41(payload) {
6128
6877
  if (payload !== null && typeof payload === "object" && "data" in payload && payload.data !== void 0) {
6129
6878
  return payload.data;
6130
6879
  }
@@ -6177,11 +6926,11 @@ var RuntimeEnv = class {
6177
6926
  "/runtime-env",
6178
6927
  query(params)
6179
6928
  );
6180
- return unwrap39(response).map(normalize2);
6929
+ return unwrap41(response).map(normalize2);
6181
6930
  }
6182
6931
  async get(id) {
6183
6932
  return normalize2(
6184
- unwrap39(
6933
+ unwrap41(
6185
6934
  await this.http.get(
6186
6935
  `/runtime-env/${encodeURIComponent(id)}`
6187
6936
  )
@@ -6190,7 +6939,7 @@ var RuntimeEnv = class {
6190
6939
  }
6191
6940
  async set(params) {
6192
6941
  return normalize2(
6193
- unwrap39(
6942
+ unwrap41(
6194
6943
  await this.http.post(
6195
6944
  "/runtime-env",
6196
6945
  body3(params)
@@ -6204,7 +6953,7 @@ var RuntimeEnv = class {
6204
6953
  };
6205
6954
 
6206
6955
  // src/resources/runtime-capabilities.ts
6207
- function unwrap40(payload) {
6956
+ function unwrap42(payload) {
6208
6957
  if (payload && typeof payload === "object" && "data" in payload) {
6209
6958
  return payload.data;
6210
6959
  }
@@ -6216,7 +6965,7 @@ var RuntimeCapabilitiesResource = class {
6216
6965
  }
6217
6966
  http;
6218
6967
  async get() {
6219
- return unwrap40(
6968
+ return unwrap42(
6220
6969
  await this.http.get("/runtime-capabilities")
6221
6970
  );
6222
6971
  }
@@ -6236,7 +6985,7 @@ var AGENT_WORKSPACE_TIMEOUT_SEC = 86400;
6236
6985
  var AGENT_WORKSPACE_IDLE_TIMEOUT_SEC = 1800;
6237
6986
  var AGENT_WORKSPACE_SNAPSHOT_EXPIRATION_DAYS = 30;
6238
6987
  var AGENT_WORKSPACE_KEEP_LAST_SNAPSHOTS = 1;
6239
- function unwrap41(payload) {
6988
+ function unwrap43(payload) {
6240
6989
  if (payload !== null && typeof payload === "object" && "data" in payload && payload.data !== void 0) {
6241
6990
  return payload.data;
6242
6991
  }
@@ -6283,7 +7032,7 @@ function createBody(params = {}) {
6283
7032
  if (keepLastSnapshots !== void 0) {
6284
7033
  metadata.keep_last_snapshots = keepLastSnapshots;
6285
7034
  }
6286
- return stripUndefined21({
7035
+ return stripUndefined23({
6287
7036
  template_id: templateId,
6288
7037
  cpu_count: params.cpuCount ?? params.cpu_count,
6289
7038
  memory_mb: params.memoryMb ?? params.memory_mb,
@@ -6313,14 +7062,14 @@ function createBody(params = {}) {
6313
7062
  });
6314
7063
  }
6315
7064
  function execBody(command, options = {}) {
6316
- return stripUndefined21({
7065
+ return stripUndefined23({
6317
7066
  command,
6318
7067
  cwd: options.cwd ?? options.workingDir ?? options.working_dir,
6319
7068
  env: options.env,
6320
7069
  timeout: options.timeout ?? options.timeoutSec ?? options.timeout_sec
6321
7070
  });
6322
7071
  }
6323
- function stripUndefined21(input) {
7072
+ function stripUndefined23(input) {
6324
7073
  return Object.fromEntries(
6325
7074
  Object.entries(input).filter(([, value]) => value !== void 0)
6326
7075
  );
@@ -6462,7 +7211,7 @@ var SandboxTerminal = class {
6462
7211
  const body4 = Object.fromEntries(
6463
7212
  Object.entries(params).filter(([, v]) => v !== void 0)
6464
7213
  );
6465
- const response = unwrap41(
7214
+ const response = unwrap43(
6466
7215
  await this.sandbox.http.post(`/sandboxes/${this.sandbox.id}/terminal`, body4)
6467
7216
  );
6468
7217
  return response;
@@ -6511,7 +7260,7 @@ var SandboxPreviews = class {
6511
7260
  Object.entries(opts).filter(([, v]) => v !== void 0)
6512
7261
  )
6513
7262
  };
6514
- return unwrap41(
7263
+ return unwrap43(
6515
7264
  await this.http.post(
6516
7265
  `/sandboxes/${this.sandbox.id}/previews`,
6517
7266
  body4
@@ -6519,7 +7268,7 @@ var SandboxPreviews = class {
6519
7268
  );
6520
7269
  }
6521
7270
  async get(previewId) {
6522
- return unwrap41(
7271
+ return unwrap43(
6523
7272
  await this.http.get(
6524
7273
  `/sandboxes/${this.sandbox.id}/previews/${previewId}`
6525
7274
  )
@@ -6532,7 +7281,7 @@ var SandboxPreviews = class {
6532
7281
  }
6533
7282
  /** Mint a share token for previewId. */
6534
7283
  async share(previewId, opts = {}) {
6535
- return unwrap41(
7284
+ return unwrap43(
6536
7285
  await this.http.post(
6537
7286
  `/sandboxes/${this.sandbox.id}/previews/${previewId}/share`,
6538
7287
  { ttl_seconds: opts.ttl_seconds ?? opts.expires_in_sec ?? 3600 }
@@ -6601,7 +7350,7 @@ var SandboxTags = class {
6601
7350
  sandbox;
6602
7351
  /** Replace the full tag list with tags. */
6603
7352
  async set(tags) {
6604
- return unwrap41(
7353
+ return unwrap43(
6605
7354
  await this.sandbox.http.patch(`/sandboxes/${this.sandbox.id}/tags`, { tags })
6606
7355
  );
6607
7356
  }
@@ -6627,6 +7376,7 @@ var Sandbox = class _Sandbox {
6627
7376
  this.env = new SandboxEnv(this);
6628
7377
  this.tags = new SandboxTags(this);
6629
7378
  const sandboxId = data.id;
7379
+ this.connectors = new SandboxConnectors(http, sandboxId);
6630
7380
  this.secrets = new SandboxSecrets(http, sandboxId);
6631
7381
  this.network = new SandboxNetwork(http, sandboxId);
6632
7382
  this.audit = new SandboxAudit(http, sandboxId);
@@ -6650,6 +7400,8 @@ var Sandbox = class _Sandbox {
6650
7400
  env;
6651
7401
  /** Tag replacement. */
6652
7402
  tags;
7403
+ /** MIOSA Connect provider bindings scoped to this sandbox. */
7404
+ connectors;
6653
7405
  /** Encrypted secrets + OAuth credentials scoped to this sandbox. */
6654
7406
  secrets;
6655
7407
  /** Egress allowlist + policies scoped to this sandbox. */
@@ -6669,14 +7421,14 @@ var Sandbox = class _Sandbox {
6669
7421
  return this.data.template_id ?? this.data.image_id ?? "";
6670
7422
  }
6671
7423
  async refresh() {
6672
- this.data = unwrap41(
7424
+ this.data = unwrap43(
6673
7425
  await this.http.get(`/sandboxes/${this.id}`)
6674
7426
  );
6675
7427
  return this;
6676
7428
  }
6677
7429
  async runExec(command, options) {
6678
7430
  this.assertRunning("exec");
6679
- const response = unwrap41(
7431
+ const response = unwrap43(
6680
7432
  await this.http.post(
6681
7433
  `/sandboxes/${this.id}/exec`,
6682
7434
  execBody(command, options)
@@ -6721,7 +7473,7 @@ var Sandbox = class _Sandbox {
6721
7473
  }
6722
7474
  async createExport(params) {
6723
7475
  const body4 = typeof params === "string" ? { path: params } : Array.isArray(params) ? { paths: params } : params;
6724
- const response = unwrap41(
7476
+ const response = unwrap43(
6725
7477
  await this.http.post(
6726
7478
  `/sandboxes/${this.id}/exports`,
6727
7479
  body4
@@ -6746,7 +7498,7 @@ var Sandbox = class _Sandbox {
6746
7498
  }
6747
7499
  async listFiles(path = "/workspace") {
6748
7500
  this.assertRunning("files.list");
6749
- const response = unwrap41(
7501
+ const response = unwrap43(
6750
7502
  await this.http.get(
6751
7503
  `/sandboxes/${this.id}/files`,
6752
7504
  { path }
@@ -6756,7 +7508,7 @@ var Sandbox = class _Sandbox {
6756
7508
  }
6757
7509
  async statFile(path) {
6758
7510
  this.assertRunning("files.stat");
6759
- return unwrap41(
7511
+ return unwrap43(
6760
7512
  await this.http.post(
6761
7513
  `/sandboxes/${this.id}/files/stat`,
6762
7514
  { path }
@@ -6765,7 +7517,7 @@ var Sandbox = class _Sandbox {
6765
7517
  }
6766
7518
  async expose(port) {
6767
7519
  this.assertRunning("expose");
6768
- const response = unwrap41(
7520
+ const response = unwrap43(
6769
7521
  await this.http.post(
6770
7522
  `/sandboxes/${this.id}/expose`,
6771
7523
  port === void 0 ? {} : { port }
@@ -6775,7 +7527,7 @@ var Sandbox = class _Sandbox {
6775
7527
  }
6776
7528
  async startTemplate(options = {}) {
6777
7529
  this.assertRunning("startTemplate");
6778
- return unwrap41(
7530
+ return unwrap43(
6779
7531
  await this.http.post(
6780
7532
  `/sandboxes/${this.id}/template/start`,
6781
7533
  options
@@ -6783,7 +7535,7 @@ var Sandbox = class _Sandbox {
6783
7535
  );
6784
7536
  }
6785
7537
  async getArtifacts() {
6786
- return unwrap41(
7538
+ return unwrap43(
6787
7539
  await this.http.get(
6788
7540
  `/sandboxes/${this.id}/artifacts`
6789
7541
  )
@@ -6794,7 +7546,7 @@ var Sandbox = class _Sandbox {
6794
7546
  `/sandboxes/${this.id}/logs`,
6795
7547
  { lines }
6796
7548
  );
6797
- return unwrap41(response);
7549
+ return unwrap43(response);
6798
7550
  }
6799
7551
  streamLogs() {
6800
7552
  return this.http.stream(
@@ -6803,7 +7555,7 @@ var Sandbox = class _Sandbox {
6803
7555
  }
6804
7556
  async createSnapshot(comment) {
6805
7557
  this.assertRunning("snapshots.create");
6806
- return unwrap41(
7558
+ return unwrap43(
6807
7559
  await this.http.post(
6808
7560
  `/sandboxes/${this.id}/snapshots`,
6809
7561
  comment ? { comment } : {}
@@ -6811,14 +7563,14 @@ var Sandbox = class _Sandbox {
6811
7563
  );
6812
7564
  }
6813
7565
  async listSnapshots() {
6814
- return unwrap41(
7566
+ return unwrap43(
6815
7567
  await this.http.get(
6816
7568
  `/sandboxes/${this.id}/snapshots`
6817
7569
  )
6818
7570
  );
6819
7571
  }
6820
7572
  async restoreSnapshot(snapshotId) {
6821
- const data = unwrap41(
7573
+ const data = unwrap43(
6822
7574
  await this.http.post(
6823
7575
  `/sandboxes/${this.id}/restore/${snapshotId}`,
6824
7576
  {}
@@ -6838,7 +7590,7 @@ var Sandbox = class _Sandbox {
6838
7590
  const body4 = {};
6839
7591
  if (opts.name !== void 0) body4.name = opts.name;
6840
7592
  if (opts.metadata !== void 0) body4.metadata = opts.metadata;
6841
- const data = unwrap41(
7593
+ const data = unwrap43(
6842
7594
  await this.http.post(
6843
7595
  `/sandboxes/${this.id}/fork`,
6844
7596
  body4
@@ -6860,7 +7612,7 @@ var Sandbox = class _Sandbox {
6860
7612
  if (keepLastSnapshots !== void 0) {
6861
7613
  metadata.keep_last_snapshots = keepLastSnapshots;
6862
7614
  }
6863
- const body4 = stripUndefined21({
7615
+ const body4 = stripUndefined23({
6864
7616
  name: params.name,
6865
7617
  slug: params.slug,
6866
7618
  tags: params.tags,
@@ -6869,7 +7621,7 @@ var Sandbox = class _Sandbox {
6869
7621
  timeout_sec: params.timeout_sec ?? params.timeoutSec,
6870
7622
  idle_timeout_sec: params.idle_timeout_sec ?? params.idleTimeoutSec
6871
7623
  });
6872
- const data = unwrap41(
7624
+ const data = unwrap43(
6873
7625
  await this.http.patch(
6874
7626
  `/sandboxes/${this.id}`,
6875
7627
  body4
@@ -6879,7 +7631,7 @@ var Sandbox = class _Sandbox {
6879
7631
  return this;
6880
7632
  }
6881
7633
  async extend(timeoutSec) {
6882
- const data = unwrap41(
7634
+ const data = unwrap43(
6883
7635
  await this.http.post(
6884
7636
  `/sandboxes/${this.id}/extend`,
6885
7637
  { timeout_sec: timeoutSec }
@@ -6902,7 +7654,7 @@ var Sandbox = class _Sandbox {
6902
7654
  return raw;
6903
7655
  }
6904
7656
  async pause() {
6905
- const data = unwrap41(
7657
+ const data = unwrap43(
6906
7658
  await this.http.post(
6907
7659
  `/sandboxes/${this.id}/pause`,
6908
7660
  {}
@@ -6912,7 +7664,7 @@ var Sandbox = class _Sandbox {
6912
7664
  return this;
6913
7665
  }
6914
7666
  async resume() {
6915
- const data = unwrap41(
7667
+ const data = unwrap43(
6916
7668
  await this.http.post(
6917
7669
  `/sandboxes/${this.id}/resume`,
6918
7670
  {}
@@ -6925,7 +7677,7 @@ var Sandbox = class _Sandbox {
6925
7677
  const idempotencyKey11 = params.idempotencyKey ?? params.idempotency_key;
6926
7678
  const requestOptions = {
6927
7679
  method: "POST",
6928
- body: stripUndefined21({
7680
+ body: stripUndefined23({
6929
7681
  name: params.name,
6930
7682
  deployment_id: params.deploymentId ?? params.deployment_id,
6931
7683
  output_path: params.outputPath ?? params.output_path ?? params.path ?? params.sourcePath ?? params.source_path,
@@ -6948,7 +7700,7 @@ var Sandbox = class _Sandbox {
6948
7700
  if (idempotencyKey11) {
6949
7701
  requestOptions.headers = { "Idempotency-Key": idempotencyKey11 };
6950
7702
  }
6951
- return unwrap41(
7703
+ return unwrap43(
6952
7704
  await this.http.request(
6953
7705
  `/sandboxes/${this.id}/deploy`,
6954
7706
  requestOptions
@@ -6960,7 +7712,7 @@ var Sandbox = class _Sandbox {
6960
7712
  }
6961
7713
  /** Check readiness of the sandbox (GET /sandboxes/:id/readiness). */
6962
7714
  async readiness() {
6963
- return unwrap41(
7715
+ return unwrap43(
6964
7716
  await this.http.get(
6965
7717
  `/sandboxes/${this.id}/readiness`
6966
7718
  )
@@ -7128,7 +7880,7 @@ var Sandboxes = class {
7128
7880
  if (idempotencyKey11) {
7129
7881
  requestOptions.headers = { "Idempotency-Key": idempotencyKey11 };
7130
7882
  }
7131
- const data = unwrap41(
7883
+ const data = unwrap43(
7132
7884
  await this.http.request(
7133
7885
  "/sandboxes",
7134
7886
  requestOptions
@@ -7147,7 +7899,7 @@ var Sandboxes = class {
7147
7899
  return listItems11(data).map((item) => new Sandbox(this.http, item));
7148
7900
  }
7149
7901
  async get(id) {
7150
- const data = unwrap41(
7902
+ const data = unwrap43(
7151
7903
  await this.http.get(`/sandboxes/${id}`)
7152
7904
  );
7153
7905
  return new Sandbox(this.http, data);
@@ -7156,7 +7908,7 @@ var Sandboxes = class {
7156
7908
  return this.get(id);
7157
7909
  }
7158
7910
  async getByName(name) {
7159
- const data = unwrap41(
7911
+ const data = unwrap43(
7160
7912
  await this.http.get(
7161
7913
  `/sandboxes/by-name/${encodeURIComponent(name)}`
7162
7914
  )
@@ -7213,7 +7965,7 @@ var Sandboxes = class {
7213
7965
  async createTemplate(params) {
7214
7966
  const response = await this.http.post(
7215
7967
  "/sandbox-templates",
7216
- stripUndefined21({
7968
+ stripUndefined23({
7217
7969
  name: params.name,
7218
7970
  slug: params.slug,
7219
7971
  description: params.description,
@@ -7221,29 +7973,29 @@ var Sandboxes = class {
7221
7973
  metadata: params.metadata
7222
7974
  })
7223
7975
  );
7224
- return unwrap41(response);
7976
+ return unwrap43(response);
7225
7977
  }
7226
7978
  async createTemplateBuild(templateId, params = {}) {
7227
7979
  const response = await this.http.post(
7228
7980
  `/sandbox-templates/${templateId}/builds`,
7229
- stripUndefined21({
7981
+ stripUndefined23({
7230
7982
  build_spec: params.buildSpec ?? params.build_spec,
7231
7983
  metadata: params.metadata
7232
7984
  })
7233
7985
  );
7234
- return unwrap41(response);
7986
+ return unwrap43(response);
7235
7987
  }
7236
7988
  async listTemplateBuilds(templateId) {
7237
7989
  const response = await this.http.get(
7238
7990
  `/sandbox-templates/${templateId}/builds`
7239
7991
  );
7240
- return unwrap41(response);
7992
+ return unwrap43(response);
7241
7993
  }
7242
7994
  async getTemplateBuild(buildId) {
7243
7995
  const response = await this.http.get(
7244
7996
  `/sandbox-template-builds/${buildId}`
7245
7997
  );
7246
- return unwrap41(response);
7998
+ return unwrap43(response);
7247
7999
  }
7248
8000
  };
7249
8001
  function toBase642(bytes) {
@@ -7255,7 +8007,7 @@ function toBase642(bytes) {
7255
8007
  }
7256
8008
  return btoa(binary);
7257
8009
  }
7258
- function unwrap42(payload) {
8010
+ function unwrap44(payload) {
7259
8011
  if (payload && typeof payload === "object" && "data" in payload) {
7260
8012
  return payload.data;
7261
8013
  }
@@ -7271,7 +8023,7 @@ function listItems12(payload, candidateKeys = ["data", "templates", "builds", "i
7271
8023
  }
7272
8024
  return [];
7273
8025
  }
7274
- function stripUndefined22(input) {
8026
+ function stripUndefined24(input) {
7275
8027
  return Object.fromEntries(
7276
8028
  Object.entries(input).filter(([, v]) => v !== void 0)
7277
8029
  );
@@ -7298,7 +8050,7 @@ var SandboxTemplates = class {
7298
8050
  const data = await this.http.get(
7299
8051
  `/sandbox-templates/${templateId}`
7300
8052
  );
7301
- return unwrap42(data);
8053
+ return unwrap44(data);
7302
8054
  }
7303
8055
  async create(params) {
7304
8056
  const {
@@ -7308,7 +8060,7 @@ var SandboxTemplates = class {
7308
8060
  name,
7309
8061
  ...rest
7310
8062
  } = params;
7311
- const body4 = stripUndefined22({
8063
+ const body4 = stripUndefined24({
7312
8064
  name,
7313
8065
  build_spec: buildSpec ?? build_spec,
7314
8066
  ...rest
@@ -7318,7 +8070,7 @@ var SandboxTemplates = class {
7318
8070
  body: body4,
7319
8071
  headers: { "Idempotency-Key": idempotencyKey8(ikey) }
7320
8072
  });
7321
- return unwrap42(data);
8073
+ return unwrap44(data);
7322
8074
  }
7323
8075
  async buildSpecSchema() {
7324
8076
  const data = await this.http.get("/sandbox-templates/build-spec");
@@ -7342,7 +8094,7 @@ var SandboxTemplates = class {
7342
8094
  }
7343
8095
  async createBuild(templateId, params = {}) {
7344
8096
  const { idempotencyKey: ikey, ...rest } = params;
7345
- const body4 = stripUndefined22(rest);
8097
+ const body4 = stripUndefined24(rest);
7346
8098
  const data = await this.http.request(
7347
8099
  `/sandbox-templates/${templateId}/builds`,
7348
8100
  {
@@ -7351,12 +8103,12 @@ var SandboxTemplates = class {
7351
8103
  headers: { "Idempotency-Key": idempotencyKey8(ikey) }
7352
8104
  }
7353
8105
  );
7354
- return unwrap42(data);
8106
+ return unwrap44(data);
7355
8107
  }
7356
8108
  };
7357
8109
 
7358
8110
  // src/resources/settings.ts
7359
- function unwrap43(payload) {
8111
+ function unwrap45(payload) {
7360
8112
  if (payload && typeof payload === "object") {
7361
8113
  const p = payload;
7362
8114
  for (const k of [
@@ -7372,11 +8124,11 @@ function unwrap43(payload) {
7372
8124
  return payload;
7373
8125
  }
7374
8126
  function listItems13(payload) {
7375
- const result = unwrap43(payload);
8127
+ const result = unwrap45(payload);
7376
8128
  if (Array.isArray(result)) return result;
7377
8129
  return [];
7378
8130
  }
7379
- function stripUndefined23(input) {
8131
+ function stripUndefined25(input) {
7380
8132
  return Object.fromEntries(
7381
8133
  Object.entries(input).filter(([, v]) => v !== void 0)
7382
8134
  );
@@ -7389,46 +8141,46 @@ var Settings = class {
7389
8141
  /** Get the current tenant settings. */
7390
8142
  async get() {
7391
8143
  const data = await this.http.get("/settings");
7392
- return unwrap43(data);
8144
+ return unwrap45(data);
7393
8145
  }
7394
8146
  /** Update tenant settings. */
7395
8147
  async update(params) {
7396
- const body4 = stripUndefined23(params);
8148
+ const body4 = stripUndefined25(params);
7397
8149
  const data = await this.http.put("/settings", body4);
7398
- return unwrap43(data);
8150
+ return unwrap45(data);
7399
8151
  }
7400
8152
  // ── Branding ──────────────────────────────────────────────────────────────
7401
8153
  /** Get tenant branding (logo, colors, custom wordmark). */
7402
8154
  async getBranding() {
7403
8155
  const data = await this.http.get("/settings/branding");
7404
- return unwrap43(data);
8156
+ return unwrap45(data);
7405
8157
  }
7406
8158
  /** Update tenant branding. */
7407
8159
  async updateBranding(params) {
7408
- const body4 = stripUndefined23(params);
8160
+ const body4 = stripUndefined25(params);
7409
8161
  const data = await this.http.put("/settings/branding", body4);
7410
- return unwrap43(data);
8162
+ return unwrap45(data);
7411
8163
  }
7412
8164
  // ── Read-only reference data ───────────────────────────────────────────────
7413
8165
  /** Get tenant-scoped compute pricing. */
7414
8166
  async computePricing() {
7415
8167
  const data = await this.http.get("/settings/compute-pricing");
7416
- return unwrap43(data);
8168
+ return unwrap45(data);
7417
8169
  }
7418
8170
  /** Get tenant-scoped GPU pricing. */
7419
8171
  async gpuPricing() {
7420
8172
  const data = await this.http.get("/settings/gpu-pricing");
7421
- return unwrap43(data);
8173
+ return unwrap45(data);
7422
8174
  }
7423
8175
  /** List models available to this tenant. */
7424
8176
  async availableModels() {
7425
8177
  const data = await this.http.get("/settings/available-models");
7426
- return unwrap43(data);
8178
+ return unwrap45(data);
7427
8179
  }
7428
8180
  /** List regions enabled for this tenant. */
7429
8181
  async regions() {
7430
8182
  const data = await this.http.get("/settings/regions");
7431
- return unwrap43(data);
8183
+ return unwrap45(data);
7432
8184
  }
7433
8185
  // ── BYOK provider keys ────────────────────────────────────────────────────
7434
8186
  /** List tenant-level BYOK provider keys (Anthropic, OpenAI, etc.). */
@@ -7438,12 +8190,12 @@ var Settings = class {
7438
8190
  }
7439
8191
  /** Create or update a BYOK provider key. */
7440
8192
  async upsertProviderKey(provider, params) {
7441
- const body4 = stripUndefined23(params);
8193
+ const body4 = stripUndefined25(params);
7442
8194
  const data = await this.http.put(
7443
8195
  `/settings/provider-keys/${provider}`,
7444
8196
  body4
7445
8197
  );
7446
- return unwrap43(data);
8198
+ return unwrap45(data);
7447
8199
  }
7448
8200
  /** Delete a BYOK provider key. */
7449
8201
  async deleteProviderKey(provider) {
@@ -7452,7 +8204,7 @@ var Settings = class {
7452
8204
  };
7453
8205
 
7454
8206
  // src/resources/snapshots-standalone.ts
7455
- function unwrap44(data) {
8207
+ function unwrap46(data) {
7456
8208
  if (data && typeof data === "object") {
7457
8209
  const d = data;
7458
8210
  for (const k of ["data", "snapshots", "items"]) {
@@ -7461,7 +8213,7 @@ function unwrap44(data) {
7461
8213
  }
7462
8214
  return data;
7463
8215
  }
7464
- function unwrapList12(data) {
8216
+ function unwrapList14(data) {
7465
8217
  if (Array.isArray(data)) return data;
7466
8218
  if (data && typeof data === "object") {
7467
8219
  const d = data;
@@ -7480,17 +8232,17 @@ var SnapshotsStandalone = class {
7480
8232
  const query2 = Object.fromEntries(
7481
8233
  Object.entries(filters).filter(([, v]) => v !== void 0)
7482
8234
  );
7483
- return unwrapList12(await this.http.get("/admin/snapshots", query2));
8235
+ return unwrapList14(await this.http.get("/admin/snapshots", query2));
7484
8236
  }
7485
8237
  async get(snapshotId) {
7486
- return unwrap44(
8238
+ return unwrap46(
7487
8239
  await this.http.get(`/admin/snapshots/${snapshotId}`)
7488
8240
  );
7489
8241
  }
7490
8242
  };
7491
8243
 
7492
8244
  // src/resources/storage.ts
7493
- function unwrap45(payload) {
8245
+ function unwrap47(payload) {
7494
8246
  if (payload && typeof payload === "object" && "data" in payload) {
7495
8247
  return payload.data;
7496
8248
  }
@@ -7506,7 +8258,7 @@ function listItems14(payload, candidateKeys = ["data", "buckets", "objects", "it
7506
8258
  }
7507
8259
  return [];
7508
8260
  }
7509
- function stripUndefined24(input) {
8261
+ function stripUndefined26(input) {
7510
8262
  return Object.fromEntries(
7511
8263
  Object.entries(input).filter(([, v]) => v !== void 0)
7512
8264
  );
@@ -7523,24 +8275,24 @@ var Storage = class {
7523
8275
  }
7524
8276
  async createBucket(params) {
7525
8277
  const { name, public: isPublic, visibility, ...rest } = params;
7526
- const body4 = stripUndefined24({
8278
+ const body4 = stripUndefined26({
7527
8279
  name,
7528
8280
  visibility: visibility ?? (isPublic === void 0 ? void 0 : isPublic ? "public" : "private"),
7529
8281
  ...rest
7530
8282
  });
7531
8283
  const data = await this.http.post("/storage/buckets", body4);
7532
- return unwrap45(data);
8284
+ return unwrap47(data);
7533
8285
  }
7534
8286
  async getBucket(bucketId) {
7535
8287
  const data = await this.http.get(`/storage/buckets/${bucketId}`);
7536
- return unwrap45(data);
8288
+ return unwrap47(data);
7537
8289
  }
7538
8290
  async deleteBucket(bucketId) {
7539
8291
  await this.http.delete(`/storage/buckets/${bucketId}`);
7540
8292
  }
7541
8293
  // ── Objects ────────────────────────────────────────────────────────────────
7542
8294
  async listObjects(bucketId, params = {}) {
7543
- const query2 = stripUndefined24({
8295
+ const query2 = stripUndefined26({
7544
8296
  prefix: params.prefix,
7545
8297
  max_keys: params.max_keys ?? params.maxKeys ?? params.limit,
7546
8298
  marker: params.marker ?? params.cursor
@@ -7574,7 +8326,7 @@ var Storage = class {
7574
8326
  // ── Presigned URLs ─────────────────────────────────────────────────────────
7575
8327
  async presign(bucketId, params) {
7576
8328
  const operationMethod = params.operation === "put" ? "PUT" : params.operation === "get" ? "GET" : void 0;
7577
- const body4 = stripUndefined24({
8329
+ const body4 = stripUndefined26({
7578
8330
  key: params.key,
7579
8331
  method: params.method ?? operationMethod ?? "GET",
7580
8332
  expires_in: params.expiresIn ?? params.expires_in ?? params.expiresInSec ?? params.expires_in_sec ?? 3600
@@ -7583,7 +8335,7 @@ var Storage = class {
7583
8335
  `/storage/buckets/${bucketId}/presign`,
7584
8336
  body4
7585
8337
  );
7586
- return unwrap45(data);
8338
+ return unwrap47(data);
7587
8339
  }
7588
8340
  };
7589
8341
 
@@ -7673,7 +8425,7 @@ var OrgInvites = class {
7673
8425
  };
7674
8426
 
7675
8427
  // src/resources/tenant.ts
7676
- function unwrap46(payload) {
8428
+ function unwrap48(payload) {
7677
8429
  if (payload && typeof payload === "object") {
7678
8430
  const p = payload;
7679
8431
  for (const k of ["data", "tenant", "branding", "items"]) {
@@ -7682,7 +8434,7 @@ function unwrap46(payload) {
7682
8434
  }
7683
8435
  return payload;
7684
8436
  }
7685
- function stripUndefined25(input) {
8437
+ function stripUndefined27(input) {
7686
8438
  return Object.fromEntries(
7687
8439
  Object.entries(input).filter(([, v]) => v !== void 0)
7688
8440
  );
@@ -7695,14 +8447,14 @@ var PreviewDomain = class {
7695
8447
  /** Get the tenant's white-label preview domain settings. */
7696
8448
  async get() {
7697
8449
  const data = await this.http.get("/tenant/preview-domain");
7698
- return unwrap46(data);
8450
+ return unwrap48(data);
7699
8451
  }
7700
8452
  /** Set the tenant's white-label preview domain. */
7701
8453
  async set(domain) {
7702
8454
  const data = await this.http.put("/tenant/preview-domain", {
7703
8455
  preview_domain: domain
7704
8456
  });
7705
- return unwrap46(data);
8457
+ return unwrap48(data);
7706
8458
  }
7707
8459
  /** Re-run DNS verification for the configured preview domain. */
7708
8460
  async verify() {
@@ -7710,7 +8462,7 @@ var PreviewDomain = class {
7710
8462
  "/tenant/preview-domain/verify",
7711
8463
  {}
7712
8464
  );
7713
- return unwrap46(data);
8465
+ return unwrap48(data);
7714
8466
  }
7715
8467
  /** Remove the tenant's custom preview domain. */
7716
8468
  async delete() {
@@ -7725,14 +8477,14 @@ var Branding = class {
7725
8477
  /** Get tenant branding used by white-label hosted surfaces. */
7726
8478
  async get() {
7727
8479
  const data = await this.http.get("/tenant/branding");
7728
- return unwrap46(data);
8480
+ return unwrap48(data);
7729
8481
  }
7730
8482
  /** Update tenant branding used by white-label hosted surfaces. */
7731
8483
  async set(params) {
7732
8484
  const data = await this.http.put("/tenant/branding", {
7733
- branding: stripUndefined25(params)
8485
+ branding: stripUndefined27(params)
7734
8486
  });
7735
- return unwrap46(data);
8487
+ return unwrap48(data);
7736
8488
  }
7737
8489
  /** Reset tenant branding to platform defaults. */
7738
8490
  async delete() {
@@ -7754,7 +8506,7 @@ var Tenant = class {
7754
8506
  /** Get the current tenant's plan, limits, and live usage counters. */
7755
8507
  async current() {
7756
8508
  const data = await this.http.get("/tenant/plan");
7757
- return unwrap46(data);
8509
+ return unwrap48(data);
7758
8510
  }
7759
8511
  /** Convenience alias for `tenant.branding.get()`. */
7760
8512
  async getBranding() {
@@ -7771,7 +8523,7 @@ var Tenant = class {
7771
8523
  };
7772
8524
 
7773
8525
  // src/resources/usage.ts
7774
- function unwrap47(payload) {
8526
+ function unwrap49(payload) {
7775
8527
  if (payload && typeof payload === "object") {
7776
8528
  const p = payload;
7777
8529
  for (const k of ["data", "usage", "sessions", "summary", "items"]) {
@@ -7780,7 +8532,7 @@ function unwrap47(payload) {
7780
8532
  }
7781
8533
  return payload;
7782
8534
  }
7783
- function stripUndefined26(input) {
8535
+ function stripUndefined28(input) {
7784
8536
  return Object.fromEntries(
7785
8537
  Object.entries(input).filter(([, v]) => v !== void 0)
7786
8538
  );
@@ -7793,24 +8545,24 @@ var Usage = class {
7793
8545
  /** Get the current period usage summary. */
7794
8546
  async current() {
7795
8547
  const data = await this.http.get("/usage/summary");
7796
- return unwrap47(data);
8548
+ return unwrap49(data);
7797
8549
  }
7798
8550
  /** List per-session metering events. */
7799
8551
  async sessions(params = {}) {
7800
- const query2 = stripUndefined26(params);
8552
+ const query2 = stripUndefined28(params);
7801
8553
  const data = await this.http.get("/usage/sessions", query2);
7802
- const result = unwrap47(data);
8554
+ const result = unwrap49(data);
7803
8555
  if (Array.isArray(result)) return result;
7804
8556
  return [];
7805
8557
  }
7806
8558
  /** Get a usage report for a period. */
7807
8559
  async report(params = {}) {
7808
- const query2 = stripUndefined26(params);
8560
+ const query2 = stripUndefined28(params);
7809
8561
  const data = await this.http.get("/usage/summary", query2);
7810
- return unwrap47(data);
8562
+ return unwrap49(data);
7811
8563
  }
7812
8564
  };
7813
- function unwrap48(payload) {
8565
+ function unwrap50(payload) {
7814
8566
  if (payload && typeof payload === "object" && "data" in payload) {
7815
8567
  return payload.data;
7816
8568
  }
@@ -7826,7 +8578,7 @@ function listItems15(payload, candidateKeys = ["data", "volumes", "items"]) {
7826
8578
  }
7827
8579
  return [];
7828
8580
  }
7829
- function stripUndefined27(input) {
8581
+ function stripUndefined29(input) {
7830
8582
  return Object.fromEntries(
7831
8583
  Object.entries(input).filter(([, v]) => v !== void 0)
7832
8584
  );
@@ -7840,17 +8592,17 @@ var Volumes = class {
7840
8592
  }
7841
8593
  http;
7842
8594
  async list(params = {}) {
7843
- const query2 = stripUndefined27({ ...params });
8595
+ const query2 = stripUndefined29({ ...params });
7844
8596
  const data = await this.http.get("/volumes", query2);
7845
8597
  return listItems15(data);
7846
8598
  }
7847
8599
  async get(volumeId) {
7848
8600
  const data = await this.http.get(`/volumes/${volumeId}`);
7849
- return unwrap48(data);
8601
+ return unwrap50(data);
7850
8602
  }
7851
8603
  async create(params) {
7852
8604
  const { idempotencyKey: ikey, sizeGb, ...rest } = params;
7853
- const body4 = stripUndefined27({
8605
+ const body4 = stripUndefined29({
7854
8606
  ...rest,
7855
8607
  size_gb: sizeGb ?? rest.size_gb
7856
8608
  });
@@ -7859,13 +8611,13 @@ var Volumes = class {
7859
8611
  body: body4,
7860
8612
  headers: { "Idempotency-Key": idempotencyKey9(ikey) }
7861
8613
  });
7862
- return unwrap48(data);
8614
+ return unwrap50(data);
7863
8615
  }
7864
8616
  async delete(volumeId) {
7865
8617
  await this.http.delete(`/volumes/${volumeId}`);
7866
8618
  }
7867
8619
  };
7868
- function unwrap49(payload) {
8620
+ function unwrap51(payload) {
7869
8621
  if (payload && typeof payload === "object" && "data" in payload) {
7870
8622
  return payload.data;
7871
8623
  }
@@ -7881,7 +8633,7 @@ function listItems16(payload, candidateKeys = ["data", "webhooks", "deliveries",
7881
8633
  }
7882
8634
  return [];
7883
8635
  }
7884
- function stripUndefined28(input) {
8636
+ function stripUndefined30(input) {
7885
8637
  return Object.fromEntries(
7886
8638
  Object.entries(input).filter(([, v]) => v !== void 0)
7887
8639
  );
@@ -7926,28 +8678,28 @@ var Webhooks = class {
7926
8678
  http;
7927
8679
  static verifySignature = verifySignature;
7928
8680
  async list(params = {}) {
7929
- const query2 = stripUndefined28({ ...params });
8681
+ const query2 = stripUndefined30({ ...params });
7930
8682
  const data = await this.http.get("/webhooks", query2);
7931
8683
  return listItems16(data);
7932
8684
  }
7933
8685
  async get(webhookId) {
7934
8686
  const data = await this.http.get(`/webhooks/${webhookId}`);
7935
- return unwrap49(data);
8687
+ return unwrap51(data);
7936
8688
  }
7937
8689
  async create(params) {
7938
8690
  const { idempotencyKey: ikey, ...rest } = params;
7939
- const body4 = stripUndefined28(rest);
8691
+ const body4 = stripUndefined30(rest);
7940
8692
  const data = await this.http.request("/webhooks", {
7941
8693
  method: "POST",
7942
8694
  body: body4,
7943
8695
  headers: { "Idempotency-Key": idempotencyKey10(ikey) }
7944
8696
  });
7945
- return unwrap49(data);
8697
+ return unwrap51(data);
7946
8698
  }
7947
8699
  async update(webhookId, params) {
7948
- const body4 = stripUndefined28(params);
8700
+ const body4 = stripUndefined30(params);
7949
8701
  const data = await this.http.patch(`/webhooks/${webhookId}`, body4);
7950
- return unwrap49(data);
8702
+ return unwrap51(data);
7951
8703
  }
7952
8704
  async delete(webhookId) {
7953
8705
  await this.http.delete(`/webhooks/${webhookId}`);
@@ -7960,7 +8712,7 @@ var Webhooks = class {
7960
8712
  headers: { "Idempotency-Key": idempotencyKey10(opts.idempotencyKey) }
7961
8713
  }
7962
8714
  );
7963
- return unwrap49(data);
8715
+ return unwrap51(data);
7964
8716
  }
7965
8717
  async deliveries(webhookId) {
7966
8718
  const data = await this.http.get(
@@ -8173,10 +8925,14 @@ var Miosa = class {
8173
8925
  agentRunGroups;
8174
8926
  /** Agent runtime profiles — tenant/workspace defaults for sandbox/computer agents. */
8175
8927
  agentRuntimeProfiles;
8928
+ /** MIOSA Connect — provider connectors and runtime tokens. */
8929
+ connectors;
8176
8930
  /** Inherited runtime env — tenant/workspace/project defaults for agent runtimes. */
8177
8931
  runtimeEnv;
8178
8932
  /** Runtime capabilities — live backend feature and contract discovery. */
8179
8933
  runtimeCapabilities;
8934
+ /** Unified devices — sandbox workers and desktop computers behind one API. */
8935
+ devices;
8180
8936
  /** Computer management — create, list, get, delete. */
8181
8937
  computers;
8182
8938
  /** Sandboxes — native code-execution environments under `/sandboxes`. */
@@ -8282,8 +9038,10 @@ var Miosa = class {
8282
9038
  this.agentRuns = new AgentRuns(this.http);
8283
9039
  this.agentRunGroups = new AgentRunGroups(this.http);
8284
9040
  this.agentRuntimeProfiles = new AgentRuntimeProfiles(this.http);
9041
+ this.connectors = new Connectors(this.http);
8285
9042
  this.runtimeEnv = new RuntimeEnv(this.http);
8286
9043
  this.runtimeCapabilities = new RuntimeCapabilitiesResource(this.http);
9044
+ this.devices = new Devices(this.http);
8287
9045
  this.computers = new Computers(this.http);
8288
9046
  this.sandboxes = new Sandboxes(this.http);
8289
9047
  this.deployments = new Deployments(this.http);
@@ -8473,6 +9231,6 @@ var AppAuth = class {
8473
9231
  }
8474
9232
  };
8475
9233
 
8476
- export { Admin, AgentRunGroups, AgentRuns, AgentRuntimeProfiles, Analytics, ApiKeys, AppAuth, AuditLog, AuthError, Benchmarks, BuilderSessions, Channels, Checkpoints, CommandCenter, Community, Completions, Computer, ComputerAudit, ComputerAutoStop, ComputerEnv, ComputerInbox, ComputerLogs, ComputerNetwork, ComputerOsa, ComputerPorts, ComputerSecrets, ComputerTerminal, ComputerVolumes, Computers, Credits, CronJobs, Dashboard, Databases, DeploymentDomains, DeploymentReleases, DeploymentRuntimeInstances, DeploymentVersions, Deployments, Desktop, DockerDeploy, EgressAudit, EgressNetwork, EgressSecrets, Email, EmailCampaigns, EmailInbox, EmailTemplates, Embeddings, Exec, ExternalKeys, Files, FlatCustomDomains, Functions, HealthChecks, InsufficientCreditsError, Integrations, Mcp, Miosa, MiosaError, Models, NetworkError, NetworkPolicy, NotFoundError, OAuthFlow, OpenComputers, OrgInvites, ProjectAuth, ProjectIntegrations, ProviderDefaults, RateLimitError, Regions, RuntimeCapabilitiesResource, RuntimeEnv, SANDBOX_TEMPLATE, Sandbox, SandboxArtifacts, SandboxAudit, SandboxCommands, SandboxEnv, SandboxEvents, SandboxFiles, SandboxNetwork, SandboxPreview, SandboxPreviews, SandboxSecrets, SandboxTags, SandboxTemplates, SandboxTerminal, Sandboxes, ScopedFs, Settings, SnapshotsStandalone, Storage, Tenant, TimeoutError, Usage, ValidationError, Volumes, Webhooks, WorkspaceInvites, WorkspaceMembers, verifySignature };
9234
+ export { Admin, AgentRunGroups, AgentRuns, AgentRuntimeProfiles, Analytics, ApiKeys, AppAuth, AuditLog, AuthError, Benchmarks, BuilderSessions, Channels, Checkpoints, CommandCenter, Community, Completions, Computer, ComputerAudit, ComputerAutoStop, ComputerConnectors, ComputerEnv, ComputerInbox, ComputerLogs, ComputerNetwork, ComputerOsa, ComputerPorts, ComputerSecrets, ComputerTerminal, ComputerVolumes, Computers, Connectors, Credits, CronJobs, 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, RuntimeCapabilitiesResource, RuntimeEnv, SANDBOX_TEMPLATE, Sandbox, SandboxArtifacts, SandboxAudit, SandboxCommands, SandboxConnectors, SandboxEnv, SandboxEvents, SandboxFiles, SandboxNetwork, SandboxPreview, SandboxPreviews, SandboxSecrets, SandboxTags, SandboxTemplates, SandboxTerminal, Sandboxes, ScopeNotAllowedError, ScopedFs, Settings, SnapshotsStandalone, Storage, SubjectNotAllowedError, Tenant, TimeoutError, TokenRefreshFailedError, Usage, UserAuthorizationRequiredError, ValidationError, Volumes, Webhooks, WorkspaceInvites, WorkspaceMembers, verifySignature };
8477
9235
  //# sourceMappingURL=index.js.map
8478
9236
  //# sourceMappingURL=index.js.map