@miosa/sdk 1.2.15 → 1.2.16

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