@miosa/sdk 1.2.5 → 1.2.6

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.
Files changed (92) hide show
  1. package/README.md +107 -59
  2. package/dist/index.d.ts +331 -202
  3. package/dist/index.js +572 -603
  4. package/dist/index.js.map +1 -1
  5. package/package.json +1 -2
  6. package/src/client.ts +0 -293
  7. package/src/errors.ts +0 -136
  8. package/src/http.test.ts +0 -374
  9. package/src/http.ts +0 -390
  10. package/src/index.ts +0 -569
  11. package/src/resources/admin.ts +0 -348
  12. package/src/resources/analytics.ts +0 -60
  13. package/src/resources/api-keys.ts +0 -119
  14. package/src/resources/audit-log.ts +0 -64
  15. package/src/resources/benchmarks.ts +0 -104
  16. package/src/resources/builder-sessions.ts +0 -75
  17. package/src/resources/channels.ts +0 -143
  18. package/src/resources/checkpoints.ts +0 -225
  19. package/src/resources/command-center.ts +0 -73
  20. package/src/resources/community.ts +0 -103
  21. package/src/resources/completions.ts +0 -104
  22. package/src/resources/computer-auto-stop.ts +0 -43
  23. package/src/resources/computer-env.ts +0 -76
  24. package/src/resources/computer-logs.ts +0 -50
  25. package/src/resources/computer-osa.ts +0 -76
  26. package/src/resources/computer-ports.ts +0 -91
  27. package/src/resources/computer-terminal.ts +0 -61
  28. package/src/resources/computer-volumes.ts +0 -64
  29. package/src/resources/computer.ts +0 -551
  30. package/src/resources/computers.ts +0 -75
  31. package/src/resources/credits.ts +0 -43
  32. package/src/resources/cron-jobs.ts +0 -191
  33. package/src/resources/custom_domains.ts +0 -123
  34. package/src/resources/dashboard.ts +0 -49
  35. package/src/resources/databases.ts +0 -218
  36. package/src/resources/deployments.test.ts +0 -197
  37. package/src/resources/deployments.ts +0 -1208
  38. package/src/resources/desktop.ts +0 -134
  39. package/src/resources/devices.test.ts +0 -92
  40. package/src/resources/devices.ts +0 -291
  41. package/src/resources/egress.test.ts +0 -318
  42. package/src/resources/egressAudit.ts +0 -245
  43. package/src/resources/egressNetwork.ts +0 -450
  44. package/src/resources/egressSecrets.ts +0 -577
  45. package/src/resources/email.ts +0 -212
  46. package/src/resources/embeddings.ts +0 -36
  47. package/src/resources/events.ts +0 -296
  48. package/src/resources/exec.ts +0 -319
  49. package/src/resources/external-keys.ts +0 -79
  50. package/src/resources/files.test.ts +0 -339
  51. package/src/resources/files.ts +0 -220
  52. package/src/resources/flat-custom-domains.ts +0 -127
  53. package/src/resources/functions.ts +0 -178
  54. package/src/resources/health-checks.ts +0 -165
  55. package/src/resources/integrations.ts +0 -183
  56. package/src/resources/mcp.ts +0 -70
  57. package/src/resources/models.ts +0 -45
  58. package/src/resources/network_policy.ts +0 -73
  59. package/src/resources/open-computers/agents.ts +0 -91
  60. package/src/resources/open-computers/apps.ts +0 -102
  61. package/src/resources/open-computers/clusters.ts +0 -88
  62. package/src/resources/open-computers/desktop.ts +0 -34
  63. package/src/resources/open-computers/files.ts +0 -97
  64. package/src/resources/open-computers/hosts.ts +0 -85
  65. package/src/resources/open-computers/index.ts +0 -98
  66. package/src/resources/open-computers/jobs.ts +0 -75
  67. package/src/resources/open-computers/open_computers.test.ts +0 -288
  68. package/src/resources/open-computers/secrets.ts +0 -115
  69. package/src/resources/open-computers/terminal.ts +0 -33
  70. package/src/resources/open-computers/tunnels.ts +0 -87
  71. package/src/resources/open-computers/types.ts +0 -343
  72. package/src/resources/open-computers/workspaces.ts +0 -135
  73. package/src/resources/org-invites.ts +0 -189
  74. package/src/resources/project-auth.ts +0 -142
  75. package/src/resources/project-integrations.ts +0 -133
  76. package/src/resources/provider-defaults.ts +0 -89
  77. package/src/resources/regions.ts +0 -94
  78. package/src/resources/sandbox-templates.ts +0 -195
  79. package/src/resources/sandboxes.live.test.ts +0 -92
  80. package/src/resources/sandboxes.test.ts +0 -655
  81. package/src/resources/sandboxes.ts +0 -1437
  82. package/src/resources/settings.ts +0 -143
  83. package/src/resources/snapshots-standalone.ts +0 -51
  84. package/src/resources/storage.ts +0 -221
  85. package/src/resources/tenant.ts +0 -66
  86. package/src/resources/usage.ts +0 -85
  87. package/src/resources/volumes.ts +0 -117
  88. package/src/resources/webhooks.ts +0 -239
  89. package/src/resources/workspace-invites.ts +0 -188
  90. package/src/resources/workspace-members.test.ts +0 -121
  91. package/src/resources/workspace-members.ts +0 -143
  92. package/src/types.ts +0 -463
package/dist/index.d.ts CHANGED
@@ -155,6 +155,81 @@ declare class Admin {
155
155
  optimalStatus(): Promise<Json>;
156
156
  listOptimalModels(): Promise<Json>;
157
157
  switchOptimalModel(modelId: string): Promise<Json>;
158
+ /** POST /api/v1/admin/impersonate — returns {token, expires_at}. */
159
+ impersonate(externalUserId: string, options?: {
160
+ ttlSec?: number;
161
+ }): Promise<{
162
+ token: string;
163
+ expires_at: string;
164
+ }>;
165
+ }
166
+
167
+ type AgentRunId = string & {
168
+ readonly __brand: "AgentRunId";
169
+ };
170
+ type AgentRunTargetKind = "sandbox" | "computer";
171
+ type AgentRunStatus = "running" | "succeeded" | "failed" | "canceled";
172
+ type AgentRunProvider = "claude" | "claude-code" | "codex" | "custom" | "hermes" | "osa" | "pi" | (string & {});
173
+ interface AgentRunData {
174
+ id: AgentRunId;
175
+ tenant_id?: string | null;
176
+ user_id?: string | null;
177
+ target_kind: AgentRunTargetKind | string;
178
+ target_id: string;
179
+ target_name?: string | null;
180
+ provider: AgentRunProvider;
181
+ model?: string | null;
182
+ prompt: string;
183
+ status: AgentRunStatus | string;
184
+ output?: string | null;
185
+ stderr?: string | null;
186
+ exit_code?: number | null;
187
+ error_code?: string | null;
188
+ error_message?: string | null;
189
+ metadata?: Record<string, unknown>;
190
+ started_at?: string | null;
191
+ finished_at?: string | null;
192
+ created_at?: string | null;
193
+ updated_at?: string | null;
194
+ }
195
+ interface AgentRunCreateParams {
196
+ target_id?: string;
197
+ targetId?: string;
198
+ sandbox_id?: string;
199
+ sandboxId?: string;
200
+ computer_id?: string;
201
+ computerId?: string;
202
+ target_kind?: AgentRunTargetKind;
203
+ targetKind?: AgentRunTargetKind;
204
+ provider?: AgentRunProvider;
205
+ prompt: string;
206
+ instruction?: string;
207
+ command?: string;
208
+ model?: string;
209
+ cwd?: string;
210
+ timeout?: number;
211
+ metadata?: Record<string, unknown>;
212
+ }
213
+ interface AgentRunListParams {
214
+ target_id?: string;
215
+ targetId?: string;
216
+ sandbox_id?: string;
217
+ sandboxId?: string;
218
+ computer_id?: string;
219
+ computerId?: string;
220
+ limit?: number;
221
+ }
222
+ declare class AgentRuns {
223
+ private readonly http;
224
+ constructor(http: HttpClient);
225
+ /** Dispatch a prompt to a sandbox/computer and persist the run record. */
226
+ create(params: AgentRunCreateParams): Promise<AgentRunData>;
227
+ /** Alias for create(), matching the product language. */
228
+ run(params: AgentRunCreateParams): Promise<AgentRunData>;
229
+ /** List recent agent runs for the authenticated tenant. */
230
+ list(params?: AgentRunListParams): Promise<AgentRunData[]>;
231
+ /** Fetch one persisted agent run. */
232
+ get(runId: string): Promise<AgentRunData>;
158
233
  }
159
234
 
160
235
  /**
@@ -221,6 +296,12 @@ declare class ApiKeys {
221
296
  constructor(http: HttpClient);
222
297
  list(params?: ApiKeyListParams): Promise<ApiKeyData[]>;
223
298
  create(params: ApiKeyCreateParams): Promise<ApiKeyCreateResult>;
299
+ /** POST /api/v1/api-keys/scoped — L2 delegation token bound to one external user. */
300
+ createScoped(params: {
301
+ externalUserId: string;
302
+ scopes: string[];
303
+ expiresAt?: string;
304
+ }): Promise<ApiKeyCreateResult>;
224
305
  delete(keyId: string): Promise<void>;
225
306
  }
226
307
 
@@ -639,7 +720,7 @@ interface CustomDomainData$1 {
639
720
  * // 1. Register the domain
640
721
  * const domain = await computer.domains.register("app.example.com");
641
722
  * console.log(domain.instructions);
642
- * // => "Add a CNAME record: app.example.com → <slug>.sandbox.<tenant-domain>"
723
+ * // => "Add a CNAME record: app.example.com → <slug>.sandbox.miosa.ai"
643
724
  *
644
725
  * // 2. Add the CNAME in your DNS registrar, then...
645
726
  *
@@ -755,9 +836,9 @@ interface ComputerData {
755
836
  id: ComputerId;
756
837
  name: string;
757
838
  /**
758
- * URL-safe identifier used in preview URLs:
759
- * `https://{port}-{slug}.sandbox.{preview_domain}`.
760
- * Falls back to the computer id when no slug is assigned.
839
+ * URL-safe identifier used in preview URLs: `https://{port}-{slug}.sandbox.{preview_domain}`.
840
+ * Falls back to the computer id when no slug is assigned. The domain is the
841
+ * tenant's white-label `preview_domain` (server-provided) never hardcode it.
761
842
  */
762
843
  slug: string;
763
844
  status: ComputerStatus;
@@ -768,9 +849,9 @@ interface ComputerData {
768
849
  metadata: Record<string, string>;
769
850
  /** Controls who can access the HTTP preview URL. Defaults to `"public"`. */
770
851
  visibility: ComputerVisibility;
771
- /** Public ingress root, e.g. `https://<slug>.sandbox.<preview_domain>`. */
852
+ /** Public ingress root, e.g. `https://<slug>.sandbox.<preview_domain>` (server-provided). */
772
853
  sandbox_url?: string;
773
- /** Tenant's white-label preview/base domain, e.g. `cliniciq.com`. */
854
+ /** Tenant's white-label preview/base domain (e.g. `cliniciq.com`). Use to build preview URLs. */
774
855
  preview_domain?: string;
775
856
  /** KasmVNC URL for desktop templates. */
776
857
  desktop_url?: string;
@@ -2760,107 +2841,11 @@ interface DeploymentCreateParams extends ExternalAttribution {
2760
2841
  auto_deploy?: boolean;
2761
2842
  autoDeploy?: boolean;
2762
2843
  database?: DeploymentDatabaseRequest;
2763
- docker_deploy_template_id?: string;
2764
- dockerDeployTemplateId?: string;
2765
2844
  metadata?: Record<string, unknown>;
2766
2845
  idempotencyKey?: string;
2767
2846
  }
2768
2847
  interface DockerDeployCreateParams extends DeploymentCreateParams {
2769
2848
  }
2770
- interface DockerDeployHostData {
2771
- id: string;
2772
- tenant_id?: string;
2773
- workspace_id?: string | null;
2774
- computer_id?: string | null;
2775
- fleet_node_id?: string | null;
2776
- runtime_base_url?: string | null;
2777
- status?: string;
2778
- appliance_status?: string | null;
2779
- appliance_version?: string | null;
2780
- appliance_image?: string | null;
2781
- agent_configured?: boolean;
2782
- last_health_check_at?: string | null;
2783
- created_at?: string;
2784
- updated_at?: string;
2785
- metadata?: Record<string, unknown>;
2786
- }
2787
- interface DockerDeployHostListParams {
2788
- workspace_id?: string;
2789
- workspaceId?: string;
2790
- }
2791
- interface DockerDeployHostEnsureParams {
2792
- workspace_id: string;
2793
- workspaceId?: string;
2794
- region?: string;
2795
- size?: string;
2796
- appliance_image?: string;
2797
- applianceImage?: string;
2798
- metadata?: Record<string, unknown>;
2799
- idempotencyKey?: string;
2800
- }
2801
- interface DockerDeployTemplateData {
2802
- id: string;
2803
- name: string;
2804
- summary?: string;
2805
- description?: string;
2806
- category?: string;
2807
- runtime?: string;
2808
- framework?: string;
2809
- build_command?: string | null;
2810
- run_command?: string | null;
2811
- ports?: number[];
2812
- env?: Record<string, string>;
2813
- files?: Record<string, string>;
2814
- design_md?: string | null;
2815
- design_source_url?: string | null;
2816
- design_sources?: string[];
2817
- design_reference_presets?: DockerDeployDesignReferencePreset[];
2818
- metadata?: Record<string, unknown>;
2819
- }
2820
- interface DockerDeployDesignReferencePreset {
2821
- id: string;
2822
- name: string;
2823
- summary: string;
2824
- best_for?: string[];
2825
- }
2826
- interface DockerDeployTemplateListParams {
2827
- category?: string;
2828
- runtime?: string;
2829
- framework?: string;
2830
- includePreview?: boolean;
2831
- include_preview?: boolean;
2832
- }
2833
- interface DockerDeployDoctorParams {
2834
- /** Probe the deployment public URL after checking control-plane metadata. Default: true. */
2835
- probe?: boolean;
2836
- /** Path to request on the public URL. Default: "/". */
2837
- probePath?: string;
2838
- /** Public URL probe timeout in milliseconds. Default: 20_000. */
2839
- timeoutMs?: number;
2840
- /** Test hook or custom runtime fetch implementation. */
2841
- fetchImpl?: typeof fetch;
2842
- }
2843
- interface DockerDeployDoctorCheck {
2844
- name: string;
2845
- ok: boolean;
2846
- message: string;
2847
- data?: Record<string, unknown>;
2848
- }
2849
- interface DockerDeployDoctorProbe {
2850
- url: string;
2851
- status: number | null;
2852
- ok: boolean;
2853
- responseSnippet: string;
2854
- gatewayJson?: boolean;
2855
- }
2856
- interface DockerDeployDoctorResult {
2857
- ok: boolean;
2858
- deployment: DeploymentData;
2859
- host?: DockerDeployHostData;
2860
- publicUrl?: string | null;
2861
- checks: DockerDeployDoctorCheck[];
2862
- probe?: DockerDeployDoctorProbe;
2863
- }
2864
2849
  interface DeploymentUpdateParams {
2865
2850
  name?: string;
2866
2851
  branch?: string;
@@ -2906,10 +2891,6 @@ interface PublishParams extends ExternalAttribution {
2906
2891
  healthCheckPath?: string;
2907
2892
  /** @deprecated Reserved for dynamic runtime publish. */
2908
2893
  health_check_path?: string;
2909
- deploymentType?: DeploymentProduct | string;
2910
- deployment_type?: DeploymentProduct | string;
2911
- dockerDeployTemplateId?: string;
2912
- docker_deploy_template_id?: string;
2913
2894
  /** @deprecated Reserved for managed data-service binding. */
2914
2895
  dataServices?: string[];
2915
2896
  /** @deprecated Reserved for managed data-service binding. */
@@ -2995,20 +2976,6 @@ declare class Deployments {
2995
2976
  * deployment so the control plane attaches it to the workspace Docker host.
2996
2977
  */
2997
2978
  createDockerDeploy(params: DockerDeployCreateParams): Promise<DeploymentData>;
2998
- listDockerDeployHosts(params?: DockerDeployHostListParams): Promise<DockerDeployHostData[]>;
2999
- ensureDockerDeployHost(params: DockerDeployHostEnsureParams): Promise<DockerDeployHostData>;
3000
- getDockerDeployHost(hostId: string): Promise<DockerDeployHostData>;
3001
- /**
3002
- * Verify a Docker Deploy deployment end-to-end.
3003
- *
3004
- * This checks the deployment product marker, Docker Deploy host linkage,
3005
- * appliance health, route runtime metadata, and optionally the public URL.
3006
- * It is intentionally agent-friendly: use this after sandbox.deployDocker()
3007
- * or createDockerDeploy() before telling a user the app is live.
3008
- */
3009
- doctorDockerDeploy(deploymentId: string, params?: DockerDeployDoctorParams): Promise<DockerDeployDoctorResult>;
3010
- listDockerDeployTemplates(params?: DockerDeployTemplateListParams): Promise<DockerDeployTemplateData[]>;
3011
- getDockerDeployTemplate(templateId: string): Promise<DockerDeployTemplateData>;
3012
2979
  update(deploymentId: string, params: DeploymentUpdateParams): Promise<DeploymentData>;
3013
2980
  delete(deploymentId: string): Promise<void>;
3014
2981
  publish(deploymentId: string, params: PublishParams): Promise<PublishResult>;
@@ -3032,58 +2999,88 @@ declare class Deployments {
3032
2999
  domains(deploymentId: string): DeploymentDomains;
3033
3000
  }
3034
3001
 
3035
- type DeviceKind = "sandbox_worker" | "computer" | "local_device" | "docker_deploy_host";
3036
- type DeviceSource = "sandboxes" | "computers";
3037
- interface DeviceCatalogEntry {
3038
- kind: DeviceKind;
3039
- label: string;
3040
- purpose: string;
3041
- lifecycle: string;
3042
- persistence: string;
3043
- primaryCommands: string[];
3044
- useWhen: string[];
3045
- avoidWhen: string[];
3002
+ type DockerDeployHostId = string & {
3003
+ readonly __brand: "DockerDeployHostId";
3004
+ };
3005
+ type DockerDeployHostStatus = "pending" | "provisioning" | "bootstrapping" | "active" | "degraded" | "suspended" | "retired" | "error";
3006
+ type DockerDeployApplianceStatus = "not_installed" | "installing" | "starting" | "healthy" | "unhealthy" | "unknown";
3007
+ interface DockerDeployHostData {
3008
+ id: DockerDeployHostId;
3009
+ tenant_id: string;
3010
+ workspace_id: string;
3011
+ external_workspace_id?: string | null;
3012
+ computer_id?: string | null;
3013
+ fleet_node_id?: string | null;
3014
+ status: DockerDeployHostStatus;
3015
+ size: string;
3016
+ region: string;
3017
+ portal_domain?: string | null;
3018
+ runtime_base_url?: string | null;
3019
+ agent_base_url?: string | null;
3020
+ appliance_image?: string | null;
3021
+ appliance_version?: string | null;
3022
+ appliance_status: DockerDeployApplianceStatus;
3023
+ agent_last_seen_at?: string | null;
3024
+ metadata?: Record<string, unknown>;
3025
+ created_at?: string;
3026
+ updated_at?: string;
3046
3027
  }
3047
- interface DeviceRecord {
3048
- id: string;
3049
- kind: DeviceKind;
3050
- source: DeviceSource;
3051
- name?: string;
3052
- state?: string;
3053
- ready?: boolean;
3054
- persistent?: boolean;
3055
- alwaysOn?: boolean;
3056
- region?: string;
3057
- template?: string;
3058
- previewUrl?: string;
3059
- timeoutRemainingMs?: number;
3028
+ interface DockerDeployHostListParams {
3029
+ workspace_id?: string;
3030
+ workspaceId?: string;
3060
3031
  }
3061
- interface DeviceListError {
3062
- source: DeviceSource;
3063
- message: string;
3064
- retryable: boolean;
3032
+ interface DockerDeployHostEnsureParams {
3033
+ workspace_id?: string;
3034
+ workspaceId?: string;
3035
+ external_workspace_id?: string;
3036
+ externalWorkspaceId?: string;
3037
+ }
3038
+ interface DockerDeployHostListResponse {
3039
+ data?: DockerDeployHostData[];
3040
+ hosts?: DockerDeployHostData[];
3065
3041
  }
3066
- interface DeviceListParams {
3067
- kind?: "all" | "sandbox_worker" | "sandbox" | "computer";
3042
+ interface DockerDeployHostResponse {
3043
+ data?: DockerDeployHostData;
3044
+ host?: DockerDeployHostData;
3045
+ queued?: boolean;
3068
3046
  }
3069
- interface DeviceListResponse {
3070
- devices: DeviceRecord[];
3071
- errors: DeviceListError[];
3047
+ interface DockerDeployTemplate {
3048
+ id: string;
3049
+ name: string;
3050
+ description?: string;
3051
+ category?: string;
3052
+ runtime?: string;
3053
+ tags?: string[];
3054
+ metadata?: Record<string, unknown>;
3055
+ [key: string]: unknown;
3072
3056
  }
3073
- declare class Devices {
3057
+ declare class DockerDeploy {
3074
3058
  private readonly http;
3075
3059
  constructor(http: HttpClient);
3076
3060
  /**
3077
- * Return the static device catalog used by orchestration apps to choose the
3078
- * right MIOSA execution surface before creating resources.
3061
+ * List Docker Deploy appliance hosts scoped to the current tenant.
3062
+ *
3063
+ * Pass a workspace ID to inspect the dedicated always-on appliance machine
3064
+ * for one white-label workspace.
3079
3065
  */
3080
- catalog(): DeviceCatalogEntry[];
3066
+ listHosts(params?: DockerDeployHostListParams): Promise<DockerDeployHostData[]>;
3081
3067
  /**
3082
- * List hosted devices by normalizing existing sandboxes and computers.
3083
- * Partial backend failures are returned in `errors` so orchestration UIs can
3084
- * still show usable inventory instead of failing the whole page.
3068
+ * Ensure a workspace has its dedicated Docker Deploy appliance host.
3069
+ *
3070
+ * The host may still be `pending`, `provisioning`, or `bootstrapping` after
3071
+ * this call. Treat `status === "active"` and `appliance_status === "healthy"`
3072
+ * as the ready condition before sending app/container traffic to it.
3085
3073
  */
3086
- list(params?: DeviceListParams): Promise<DeviceListResponse>;
3074
+ ensureHost(params?: DockerDeployHostEnsureParams): Promise<{
3075
+ host: DockerDeployHostData;
3076
+ queued: boolean;
3077
+ }>;
3078
+ /** Fetch one Docker Deploy host by ID. */
3079
+ getHost(hostId: string): Promise<DockerDeployHostData>;
3080
+ /** List Docker Deploy starter templates. */
3081
+ listTemplates(): Promise<DockerDeployTemplate[]>;
3082
+ /** Fetch one Docker Deploy starter template by ID. */
3083
+ getTemplate(templateId: string): Promise<DockerDeployTemplate>;
3087
3084
  }
3088
3085
 
3089
3086
  /**
@@ -4483,6 +4480,28 @@ interface SandboxCreateParams {
4483
4480
  timeout_sec?: number;
4484
4481
  idleTimeoutSec?: number;
4485
4482
  idle_timeout_sec?: number;
4483
+ /**
4484
+ * Persistence policy for builder/agent sandboxes.
4485
+ *
4486
+ * MIOSA persistence means the sandbox should snapshot/pause when idle and
4487
+ * resume from that checkpoint later. It does not mean "keep CPU running".
4488
+ * Use alwaysOn for a sandbox that must keep executing without idle pause.
4489
+ */
4490
+ persistent?: boolean;
4491
+ snapshotExpirationSec?: number;
4492
+ snapshot_expiration_sec?: number;
4493
+ snapshotExpirationDays?: number;
4494
+ snapshot_expiration_days?: number;
4495
+ keepLastSnapshots?: number | {
4496
+ count: number;
4497
+ expirationSec?: number;
4498
+ deleteEvicted?: boolean;
4499
+ };
4500
+ keep_last_snapshots?: number | {
4501
+ count: number;
4502
+ expiration_sec?: number;
4503
+ delete_evicted?: boolean;
4504
+ };
4486
4505
  alwaysOn?: boolean;
4487
4506
  always_on?: boolean;
4488
4507
  env?: Record<string, string>;
@@ -4511,6 +4530,15 @@ interface SandboxCreateParams {
4511
4530
  externalProjectId?: string;
4512
4531
  external_project_id?: string;
4513
4532
  }
4533
+ interface SandboxGetOrCreateParams extends SandboxCreateParams {
4534
+ name: string;
4535
+ /** Resume an existing paused sandbox before returning it. Defaults to true. */
4536
+ resume?: boolean;
4537
+ /** Wait for readiness before returning a created/resumed sandbox. Defaults to false. */
4538
+ waitUntilReady?: boolean;
4539
+ /** Readiness wait timeout in seconds. Defaults to 60 when waitUntilReady is true. */
4540
+ waitTimeoutSec?: number;
4541
+ }
4514
4542
  interface SandboxListParams {
4515
4543
  state?: SandboxState | string;
4516
4544
  tags?: string[];
@@ -4742,8 +4770,6 @@ interface SandboxDeployParams {
4742
4770
  health_check_path?: string;
4743
4771
  deploymentType?: "miosa_deploy" | "docker_deploy" | "docker-deploy" | string;
4744
4772
  deployment_type?: "miosa_deploy" | "docker_deploy" | "docker-deploy" | string;
4745
- dockerDeployTemplateId?: string;
4746
- docker_deploy_template_id?: string;
4747
4773
  type?: "static" | "dynamic" | "server" | string;
4748
4774
  mode?: "static" | "dynamic" | "server" | string;
4749
4775
  database?: boolean | Record<string, unknown>;
@@ -4923,9 +4949,28 @@ declare class Sandbox {
4923
4949
  tags?: string[];
4924
4950
  metadata?: Record<string, unknown>;
4925
4951
  always_on?: boolean;
4952
+ alwaysOn?: boolean;
4926
4953
  timeout_sec?: number;
4954
+ timeoutSec?: number;
4927
4955
  idle_timeout_sec?: number;
4956
+ idleTimeoutSec?: number;
4957
+ persistent?: boolean;
4958
+ snapshotExpirationSec?: number;
4959
+ snapshot_expiration_sec?: number;
4960
+ snapshotExpirationDays?: number;
4961
+ snapshot_expiration_days?: number;
4962
+ keepLastSnapshots?: number | {
4963
+ count: number;
4964
+ expirationSec?: number;
4965
+ deleteEvicted?: boolean;
4966
+ };
4967
+ keep_last_snapshots?: number | {
4968
+ count: number;
4969
+ expiration_sec?: number;
4970
+ delete_evicted?: boolean;
4971
+ };
4928
4972
  }): Promise<Sandbox>;
4973
+ extend(timeoutSec: number): Promise<Sandbox>;
4929
4974
  /**
4930
4975
  * POST /api/v1/sandboxes/{id}/preview-token → {token, url, expires_at, scope}
4931
4976
  */
@@ -4975,10 +5020,30 @@ declare class Sandbox {
4975
5020
  declare class Sandboxes {
4976
5021
  private readonly http;
4977
5022
  constructor(http: HttpClient);
5023
+ /**
5024
+ * Create a persistent agent workspace.
5025
+ *
5026
+ * This is the preferred entry point for AI builders, coding agents, and
5027
+ * product workspaces. It gives the sandbox a stable name, a longer interactive
5028
+ * timeout, and metadata that makes the workspace easy to identify later. The
5029
+ * agent should create/edit files in `/workspace`, run installs/tests/builds
5030
+ * inside the sandbox, expose previews from the sandbox, and publish from the
5031
+ * sandbox when ready.
5032
+ */
5033
+ createAgentWorkspace(params: SandboxGetOrCreateParams): Promise<Sandbox>;
4978
5034
  create(params?: SandboxCreateParams): Promise<Sandbox>;
4979
5035
  list(params?: SandboxListParams): Promise<Sandbox[]>;
4980
5036
  get(id: SandboxId | string): Promise<Sandbox>;
4981
5037
  connect(id: SandboxId | string): Promise<Sandbox>;
5038
+ getByName(name: string): Promise<Sandbox>;
5039
+ /**
5040
+ * Idempotently obtain a persistent sandbox by stable name.
5041
+ *
5042
+ * If the sandbox exists, it is returned. If it is paused and `resume !== false`,
5043
+ * it is resumed first. If it does not exist, it is created with the supplied
5044
+ * params. Destroyed sandboxes are permanent and are not resumed by this helper.
5045
+ */
5046
+ getOrCreate(params: SandboxGetOrCreateParams): Promise<Sandbox>;
4982
5047
  delete(id: SandboxId | string): Promise<void>;
4983
5048
  listTemplates(options?: {
4984
5049
  includeAliases?: boolean;
@@ -5328,34 +5393,10 @@ declare class OrgInvites {
5328
5393
  interface TenantPlan {
5329
5394
  id?: string;
5330
5395
  name?: string;
5331
- preview_domain?: string | null;
5332
- deployment_domain?: string | null;
5333
- fallback_miosa_domain?: string | null;
5334
5396
  limits?: Record<string, unknown>;
5335
5397
  usage?: Record<string, unknown>;
5336
5398
  [key: string]: unknown;
5337
5399
  }
5338
- interface BrandingData {
5339
- logo_url?: string | null;
5340
- primary_color?: string | null;
5341
- wordmark?: string | null;
5342
- favicon_url?: string | null;
5343
- [key: string]: unknown;
5344
- }
5345
- interface PreviewDomainData {
5346
- preview_domain?: string | null;
5347
- deployment_domain?: string | null;
5348
- fallback_miosa_domain?: string | null;
5349
- status?: string;
5350
- [key: string]: unknown;
5351
- }
5352
- interface TenantBrandingUpdateParams {
5353
- logo_url?: string | null;
5354
- primary_color?: string | null;
5355
- wordmark?: string | null;
5356
- favicon_url?: string | null;
5357
- [key: string]: unknown;
5358
- }
5359
5400
  declare class Tenant {
5360
5401
  private readonly http;
5361
5402
  constructor(http: HttpClient);
@@ -5498,20 +5539,8 @@ interface WebhookUpdateParams {
5498
5539
  enabled?: boolean;
5499
5540
  [key: string]: unknown;
5500
5541
  }
5501
- interface WebhookSignatureVerifyOptions {
5502
- /** Maximum age for the webhook timestamp in seconds. Defaults to 300. */
5503
- toleranceSeconds?: number;
5504
- }
5505
- /**
5506
- * Verify a MIOSA webhook signature header.
5507
- *
5508
- * Header format: `t=<unix_seconds>,v1=<hex_hmac_sha256>`.
5509
- */
5510
- declare function verifySignature(body: string | Buffer | Uint8Array, header: string, secret: string, options?: WebhookSignatureVerifyOptions): boolean;
5511
5542
  declare class Webhooks {
5512
5543
  private readonly http;
5513
- static verifySignature: typeof verifySignature;
5514
- static verify_signature: typeof verifySignature;
5515
5544
  constructor(http: HttpClient);
5516
5545
  list(params?: WebhookListParams): Promise<WebhookData[]>;
5517
5546
  get(webhookId: string): Promise<WebhookData>;
@@ -5754,6 +5783,8 @@ declare class WorkspaceInvites {
5754
5783
  declare class Miosa {
5755
5784
  /** Per-workspace user roster — list, add, update role, remove. */
5756
5785
  readonly workspaceMembers: WorkspaceMembers;
5786
+ /** Target-agnostic prompt dispatch to sandboxes/computers with durable records. */
5787
+ readonly agentRuns: AgentRuns;
5757
5788
  /**
5758
5789
  * Workspace invite flow — create invite, list, revoke, preview, accept.
5759
5790
  * Sending to an email already in the org adds the user directly.
@@ -5794,13 +5825,13 @@ declare class Miosa {
5794
5825
  readonly computers: Computers;
5795
5826
  /** Sandboxes — native code-execution environments under `/sandboxes`. */
5796
5827
  readonly sandboxes: Sandboxes;
5797
- /** Agent device facade — route work across Sandboxes, Computers, and deploy hosts. */
5798
- readonly devices: Devices;
5799
5828
  /**
5800
5829
  * Deployments — publish from a sandbox to a stable production URL.
5801
5830
  * Versions, releases, rollback, custom domains.
5802
5831
  */
5803
5832
  readonly deployments: Deployments;
5833
+ /** Docker Deploy appliance hosts — one always-on workspace host, many apps. */
5834
+ readonly dockerDeploy: DockerDeploy;
5804
5835
  /** Credit balance and usage. */
5805
5836
  readonly credits: Credits;
5806
5837
  /** Admin surface (`/api/v1/admin/*`) — requires an admin credential. */
@@ -5860,6 +5891,104 @@ declare class Miosa {
5860
5891
  constructor(config: MiosaClientConfig);
5861
5892
  }
5862
5893
 
5894
+ /**
5895
+ * AppAuth — end-user authentication client for apps deployed on MIOSA.
5896
+ *
5897
+ * Reads AUTH_URL and AUTH_JWT_SECRET from the process environment at
5898
+ * construction time. Both are injected automatically when a sandbox or
5899
+ * deployment boots.
5900
+ *
5901
+ * @example
5902
+ * ```ts
5903
+ * import { AppAuth } from '@miosa/sdk';
5904
+ *
5905
+ * const auth = new AppAuth({ resourceType: 'deployment', resourceId: 'dep_abc' });
5906
+ *
5907
+ * const session = await auth.signup('alice@example.com', 'hunter2');
5908
+ * console.log(session.userId, session.token);
5909
+ *
5910
+ * const verified = await auth.verifyToken(session.token);
5911
+ * console.log(verified.sub);
5912
+ * ```
5913
+ */
5914
+ /** Branded string types for domain safety. */
5915
+ type UserId = string & {
5916
+ readonly __brand: "UserId";
5917
+ };
5918
+ type AuthToken = string & {
5919
+ readonly __brand: "AuthToken";
5920
+ };
5921
+ /** Response returned by signup, login, verify, and me. */
5922
+ interface AppAuthSession {
5923
+ userId: UserId;
5924
+ token: AuthToken;
5925
+ expiresAt: string;
5926
+ }
5927
+ /** Decoded JWT payload returned by verifyToken. */
5928
+ interface AppAuthTokenPayload {
5929
+ sub: string;
5930
+ exp: number;
5931
+ iat: number;
5932
+ [key: string]: unknown;
5933
+ }
5934
+ type AppAuthResourceType = "sandbox" | "deployment";
5935
+ interface AppAuthConfig {
5936
+ /** Resource type — "sandbox" or "deployment". */
5937
+ resourceType: AppAuthResourceType;
5938
+ /** Resource ID (sandbox ID or deployment ID). */
5939
+ resourceId: string;
5940
+ /**
5941
+ * Base URL of the app-auth service. Defaults to the AUTH_URL environment
5942
+ * variable, which is injected at boot inside every MIOSA sandbox/deployment.
5943
+ */
5944
+ authUrl?: string;
5945
+ /**
5946
+ * HS256 secret for verifyToken(). Defaults to AUTH_JWT_SECRET from env.
5947
+ * Only needed if you call verifyToken() server-side.
5948
+ */
5949
+ jwtSecret?: string;
5950
+ }
5951
+ declare class AppAuth {
5952
+ private readonly baseUrl;
5953
+ private readonly resourceType;
5954
+ private readonly resourceId;
5955
+ private readonly jwtSecret;
5956
+ constructor(config: AppAuthConfig);
5957
+ /** POST /app-auth/:resourceType/:resourceId/signup */
5958
+ signup(email: string, password: string): Promise<AppAuthSession>;
5959
+ /** POST /app-auth/:resourceType/:resourceId/login */
5960
+ login(email: string, password: string): Promise<AppAuthSession>;
5961
+ /**
5962
+ * POST /app-auth/:resourceType/:resourceId/verify
5963
+ * Verifies an email confirmation or magic-link token issued by the backend.
5964
+ */
5965
+ verify(token: string): Promise<AppAuthSession>;
5966
+ /** POST /app-auth/:resourceType/:resourceId/password-reset */
5967
+ passwordReset(email: string): Promise<{
5968
+ ok: boolean;
5969
+ }>;
5970
+ /**
5971
+ * POST /app-auth/:resourceType/:resourceId/logout
5972
+ * Invalidates the given bearer token server-side.
5973
+ */
5974
+ logout(token: AuthToken): Promise<{
5975
+ ok: boolean;
5976
+ }>;
5977
+ /**
5978
+ * GET /app-auth/:resourceType/:resourceId/me
5979
+ * Returns the session for the bearer token.
5980
+ */
5981
+ me(token: AuthToken): Promise<AppAuthSession>;
5982
+ /**
5983
+ * Verifies a JWT token locally using HS256 + AUTH_JWT_SECRET.
5984
+ *
5985
+ * Does NOT make a network call. Throws if the signature is invalid or the
5986
+ * token is expired. Returns the decoded payload on success.
5987
+ */
5988
+ verifyToken(token: string): Promise<AppAuthTokenPayload>;
5989
+ private _post;
5990
+ }
5991
+
5863
5992
  interface MiosaErrorBody {
5864
5993
  error?: {
5865
5994
  code?: string;
@@ -5901,4 +6030,4 @@ declare class NetworkError extends MiosaError {
5901
6030
  constructor(message: string, cause: Error);
5902
6031
  }
5903
6032
 
5904
- export { type AcceptOrgInviteResponse, type AcceptWorkspaceInviteResponse, type AddDomainParams, type AddWorkspaceMemberParams, Admin, type AgentDispatchParams, type AgentEvent$1 as AgentEvent, type AgentEventType, type AgentSessionCreateParams, type AgentSessionData, type AgentSessionListResponse$1 as AgentSessionListResponse, type AgentSessionStatus$1 as AgentSessionStatus, type AllowParams, Analytics, type AnalyticsFilters, type ApiKeyCreateParams, type ApiKeyCreateResult, type ApiKeyData, type ApiKeyId, type ApiKeyListParams, ApiKeys, type AppCatalogEntry, type AppInstallData, type AppInstallEvent, type AuditListParams, AuditLog, type AuditLogEvent, type AuditLogListParams, type AuditTailParams, AuthError, type BenchmarkCompareParams, type BenchmarkCreateParams, Benchmarks, type BindingCreateParams, type BindingListParams, type BrandingData, type BrandingUpdateParams, type BucketCreateParams, type BucketData, type BucketId, type BuilderSessionListParams, BuilderSessions, type BulkUserActionParams, type ChannelCreateParams, type ChannelData, type ChannelListParams, type ChannelUpdateParams, Channels, type ChatCompletionCreateParams, type ChatCompletionCreateStreamParams, Checkpoints, type ClickParams, type ClusterCreateParams, type ClusterData, type ClusterEvent, type ClusterId, type ClusterListResponse, type ClusterStatus, CommandCenter, Community, type CompletionCreateParams, type CompletionCreateStreamParams, Completions, Computer, ComputerAudit, ComputerAutoStop, type ComputerCreateParams, type ComputerData, ComputerEnv, type ComputerId, ComputerInbox, type ComputerListParams, type ComputerListResponse, ComputerLogs, type ComputerLogsGetParams, ComputerNetwork, ComputerOsa, ComputerPorts, ComputerSecrets, type ComputerSize, type ComputerStatus, type ComputerTemplateType, ComputerTerminal, type ComputerUpdateParams, type ComputerVisibility, ComputerVolumes, Computers, type CopyParams, type CreateAdminApiKeyParams, type CreateOrgInviteParams, type CreateWorkspaceInviteParams, type CreateWorkspaceInviteResponse, type CreditBalance, type CreditTransaction, type CreditTransactionListResponse, type CreditUsage, Credits, type CronJobCreateParams, type CronJobData, type CronJobExecutionData, type CronJobExecutionId, type CronJobId, type CronJobListParams, type CronJobUpdateParams, CronJobs, type CursorInfo, type CustomDomainCreateParams, type CustomDomainData, type CustomDomainId, type CustomDomainListParams, Dashboard, type DashboardSummary, type DatabaseCreateParams, type DatabaseCredentials, type DatabaseData, type DatabaseId, type DatabaseListParams, type DatabaseLogsParams, type DatabaseLogsResult, Databases, type DeploymentBuildData, type DeploymentCreateParams, type DeploymentData, DeploymentDomains, type DeploymentId, type DeploymentListParams, type DeploymentProduct, type DeploymentReleaseData, type DeploymentReleaseId, DeploymentReleases, DeploymentRuntimeInstances, type DeploymentServiceData, type DeploymentServiceId, type DeploymentServiceType, type DeploymentSourceType, type DeploymentState, type DeploymentUpdateParams, type DeploymentVersionData, type DeploymentVersionId, type DeploymentVersionKind, type DeploymentVersionState, DeploymentVersions, Deployments, Desktop$1 as Desktop, type DesktopActionResult, type DeviceCatalogEntry, type DeviceKind, type DeviceListError, type DeviceListParams, type DeviceListResponse, type DeviceRecord, type DeviceSource, Devices, type DirEntry, type DirListResult, type DiscordSendTestParams, type DockerDeployCreateParams, type DockerDeployDesignReferencePreset, type DockerDeployDoctorCheck, type DockerDeployDoctorParams, type DockerDeployDoctorProbe, type DockerDeployDoctorResult, type DockerDeployHostData, type DockerDeployHostEnsureParams, type DockerDeployHostListParams, type DockerDeployTemplateData, type DockerDeployTemplateListParams, type DoubleClickParams, type DragParams, type EgressAllowlistRule, EgressAudit, type EgressAuditEvent, type EgressBindingData, EgressNetwork, type EgressPolicyData, type EgressPolicyMode, type EgressRuleEffect, type EgressSecretData, type EgressSecretScope, type EgressSecretType, EgressSecrets, type EgressSuggestion, Email, EmailCampaigns, EmailInbox, EmailTemplates, type EmbeddingCreateParams, Embeddings, Exec, type ExecParams, type ExecPythonParams, type ExecResult, type ExternalAttribution, type ExternalKeyCreateParams, type ExternalKeyData, ExternalKeys, type FileDeleteParams, type FileDownloadParams, type FileEntry, type FileExportParams, type FileExportResult, type FileListParams, type FileListResult, type FileStat, Files, FlatCustomDomains, type FsEntry, type FsListResponse, type FsStat, type FunctionCreateParams, type FunctionData, type FunctionId, type FunctionInvokeParams, type FunctionListParams, type FunctionUpdateParams, Functions, type GithubRepo, type GithubSshKey, type HealthCheckCreateParams, type HealthCheckData, type HealthCheckId, type HealthCheckListParams, type HealthCheckUpdateParams, HealthChecks, type HostCreateParams, type HostData, type HostEvent, type HostId, type HostListResponse, type HostStatus, type HostUpdateParams, InsufficientCreditsError, type IntegrationCatalogEntry, type IntegrationData, Integrations, type JobData, type JobEvent, type JobEventType, type JobId, type JobListResponse, type JobRunParams, type JobStatus, type KeyParams, type LaunchParams, type LinearCreateIssueParams, type ListAdminApiKeysParams, type ListAdminComputersParams, type ListAdminTenantsParams, type ListAdminUsersParams, Mcp, type McpDispatchParams, Miosa, type MiosaClientConfig, MiosaError, type MkdirParams, type ModeParams, Models, type MouseButton, NetworkError, NetworkPolicy, type NetworkPolicyData, type NetworkPolicyEffect, type NetworkPolicyProtocol, type NetworkPolicyRule, type NetworkPolicySetParams, NotFoundError, type NotificationPrefsUpdateParams, OAuthFlow, type OauthConnectParams, type OauthProvider, type OauthStartResult, type OauthStatusResult, type ObjectListParams, type AgentEvent as OcAgentEvent, type OcAgentSessionData, type AgentSessionListResponse as OcAgentSessionListResponse, type OcWorkspaceCreateParams, type OcWorkspaceData, type OcWorkspaceEvent, type OcWorkspaceListResponse, type OcWorkspaceStatus, type OcWorkspaceUpdateParams, OpenComputers, type OrgInvite, type OrgInviteCreated, type OrgInviteCreatedResponse, type OrgInviteListResponse, type OrgInvitePreview, type OrgInviteRevokeResponse, OrgInvites, type OrgRole, type OverviewData, type PolicyCreateParams, type PolicyListParams, type PolicyUpdateParams, type PresignParams, type PresignResult, type PreviewDomainData, ProjectAuth, type ProjectAuthEnableParams, type ProjectAuthStatus, type ProjectAuthUpdateParams, type ProjectIntegrationCatalogEntry, type ProjectIntegrationCreateParams, type ProjectIntegrationData, type ProjectIntegrationListParams, type ProjectIntegrationUpdateParams, ProjectIntegrations, ProviderDefaults, type ProviderKeyUpsertParams, type PublishFromSandboxParams, type PublishParams, type PublishResult, RateLimitError, type RegionData, Regions, type RollbackParams, type RulesListParams, type RuntimeInstanceData, type RuntimeInstanceId, type RuntimeInstanceState, type RuntimeLogsResult, SANDBOX_TEMPLATE, Sandbox, SandboxArtifacts, SandboxAudit, type SandboxBuildSpec, type SandboxBuildSpecError, type SandboxBuildSpecValidation, SandboxCommands, type SandboxCreateParams, type SandboxData, SandboxEnv, SandboxEvents, type SandboxExecOptions, type SandboxExecResult, SandboxFiles, type SandboxId, type SandboxListParams, SandboxNetwork, SandboxPreview, SandboxPreviews, SandboxSecrets, type SandboxState, SandboxTags, type SandboxTemplate, type SandboxTemplateBuild, type SandboxTemplateBuildCreateParams, type SandboxTemplateBuildResourceData, type SandboxTemplateBuildResourceId, type SandboxTemplateCreateParams, type SandboxTemplateList, type SandboxTemplateListParams, type SandboxTemplateResourceData, type SandboxTemplateResourceId, SandboxTemplates, SandboxTerminal, Sandboxes, ScopedFs, type ScrollDirection, type ScrollParams, type SecretCreateParams, type SecretData, type SecretId, type SecretListParams, type SecretRotateParams, type SecretSetParams, type SecretUpdateParams, type SessionId, Settings, type SettingsUpdateParams, type SizeData, type SlackSendTestParams, type SnapshotCreateParams, type SnapshotData, type SnapshotListResponse, type SnapshotProgressEvent, type SnapshotRestoreResult, type SnapshotStatus, SnapshotsStandalone, Storage, type StorageObjectData, type SuggestionsParams, type TemplateBuildCreateParams, type TemplateCreateParams, type TemplateData, Tenant, type TenantBrandingUpdateParams, type TenantId, type TenantPlan, type TenantSummary, type TerminalCreateParams, TimeoutError, type TimeseriesParams, type TunnelAuthMode, type TunnelCreateParams, type TunnelData, type TunnelId, type TunnelListResponse, type TunnelUpdateParams, type TypeParams, type UpdateWorkspaceMemberRoleParams, Usage, type UsageReportParams, type UsageSession, type UsageSessionsParams, type UsageSummary, ValidationError, type VersionListParams, type VolumeCreateParams, type VolumeData, type VolumeId, type VolumeListParams, Volumes, type WaitParams, type WebhookCreateParams, type WebhookData, type WebhookDeliveryData, type WebhookDeliveryId, type WebhookId, type WebhookListParams, type WebhookUpdateParams, Webhooks, type WindowFocusParams, type WindowInfo, type WorkspaceId, type WorkspaceInvite, type WorkspaceInviteCreatedResponse, type WorkspaceInviteListResponse, type WorkspaceInvitePreview, type WorkspaceInviteRevokeResponse, WorkspaceInvites, type WorkspaceMember, type WorkspaceMemberAddedResponse, type WorkspaceMemberDeleteResponse, type WorkspaceMemberListResponse, type WorkspaceMemberRecord, type WorkspaceMemberRecordResponse, WorkspaceMembers, type WorkspaceRole, type WsTicket, verifySignature };
6033
+ export { type AcceptOrgInviteResponse, type AcceptWorkspaceInviteResponse, type AddDomainParams, type AddWorkspaceMemberParams, Admin, type AgentDispatchParams, type AgentEvent$1 as AgentEvent, type AgentEventType, type AgentRunCreateParams, type AgentRunData, type AgentRunId, type AgentRunListParams, type AgentRunProvider, type AgentRunStatus, type AgentRunTargetKind, AgentRuns, type AgentSessionCreateParams, type AgentSessionData, type AgentSessionListResponse$1 as AgentSessionListResponse, type AgentSessionStatus$1 as AgentSessionStatus, type AllowParams, Analytics, type AnalyticsFilters, type ApiKeyCreateParams, type ApiKeyCreateResult, type ApiKeyData, type ApiKeyId, type ApiKeyListParams, ApiKeys, AppAuth, type AppAuthConfig, type AppAuthResourceType, type AppAuthSession, type AppAuthTokenPayload, type AppCatalogEntry, type AppInstallData, type AppInstallEvent, type AuditListParams, AuditLog, type AuditLogEvent, type AuditLogListParams, type AuditTailParams, AuthError, type AuthToken, type BenchmarkCompareParams, type BenchmarkCreateParams, Benchmarks, type BindingCreateParams, type BindingListParams, type BrandingUpdateParams, type BucketCreateParams, type BucketData, type BucketId, type BuilderSessionListParams, BuilderSessions, type BulkUserActionParams, type ChannelCreateParams, type ChannelData, type ChannelListParams, type ChannelUpdateParams, Channels, type ChatCompletionCreateParams, type ChatCompletionCreateStreamParams, Checkpoints, type ClickParams, type ClusterCreateParams, type ClusterData, type ClusterEvent, type ClusterId, type ClusterListResponse, type ClusterStatus, CommandCenter, Community, type CompletionCreateParams, type CompletionCreateStreamParams, Completions, Computer, ComputerAudit, ComputerAutoStop, type ComputerCreateParams, type ComputerData, ComputerEnv, type ComputerId, ComputerInbox, type ComputerListParams, type ComputerListResponse, ComputerLogs, type ComputerLogsGetParams, ComputerNetwork, ComputerOsa, ComputerPorts, ComputerSecrets, type ComputerSize, type ComputerStatus, type ComputerTemplateType, ComputerTerminal, type ComputerUpdateParams, type ComputerVisibility, ComputerVolumes, Computers, type CopyParams, type CreateAdminApiKeyParams, type CreateOrgInviteParams, type CreateWorkspaceInviteParams, type CreateWorkspaceInviteResponse, type CreditBalance, type CreditTransaction, type CreditTransactionListResponse, type CreditUsage, Credits, type CronJobCreateParams, type CronJobData, type CronJobExecutionData, type CronJobExecutionId, type CronJobId, type CronJobListParams, type CronJobUpdateParams, CronJobs, type CursorInfo, type CustomDomainCreateParams, type CustomDomainData, type CustomDomainId, type CustomDomainListParams, Dashboard, type DashboardSummary, type DatabaseCreateParams, type DatabaseCredentials, type DatabaseData, type DatabaseId, type DatabaseListParams, type DatabaseLogsParams, type DatabaseLogsResult, Databases, type DeploymentBuildData, type DeploymentCreateParams, type DeploymentData, DeploymentDomains, type DeploymentId, type DeploymentListParams, type DeploymentProduct, type DeploymentReleaseData, type DeploymentReleaseId, DeploymentReleases, DeploymentRuntimeInstances, type DeploymentServiceData, type DeploymentServiceId, type DeploymentServiceType, type DeploymentSourceType, type DeploymentState, type DeploymentUpdateParams, type DeploymentVersionData, type DeploymentVersionId, type DeploymentVersionKind, type DeploymentVersionState, DeploymentVersions, Deployments, Desktop$1 as Desktop, type DesktopActionResult, type DirEntry, type DirListResult, type DiscordSendTestParams, DockerDeploy, type DockerDeployApplianceStatus, type DockerDeployCreateParams, type DockerDeployHostData, type DockerDeployHostEnsureParams, type DockerDeployHostId, type DockerDeployHostListParams, type DockerDeployHostListResponse, type DockerDeployHostResponse, type DockerDeployHostStatus, type DoubleClickParams, type DragParams, type EgressAllowlistRule, EgressAudit, type EgressAuditEvent, type EgressBindingData, EgressNetwork, type EgressPolicyData, type EgressPolicyMode, type EgressRuleEffect, type EgressSecretData, type EgressSecretScope, type EgressSecretType, EgressSecrets, type EgressSuggestion, Email, EmailCampaigns, EmailInbox, EmailTemplates, type EmbeddingCreateParams, Embeddings, Exec, type ExecParams, type ExecPythonParams, type ExecResult, type ExternalAttribution, type ExternalKeyCreateParams, type ExternalKeyData, ExternalKeys, type FileDeleteParams, type FileDownloadParams, type FileEntry, type FileExportParams, type FileExportResult, type FileListParams, type FileListResult, type FileStat, Files, FlatCustomDomains, type FsEntry, type FsListResponse, type FsStat, type FunctionCreateParams, type FunctionData, type FunctionId, type FunctionInvokeParams, type FunctionListParams, type FunctionUpdateParams, Functions, type GithubRepo, type GithubSshKey, type HealthCheckCreateParams, type HealthCheckData, type HealthCheckId, type HealthCheckListParams, type HealthCheckUpdateParams, HealthChecks, type HostCreateParams, type HostData, type HostEvent, type HostId, type HostListResponse, type HostStatus, type HostUpdateParams, InsufficientCreditsError, type IntegrationCatalogEntry, type IntegrationData, Integrations, type JobData, type JobEvent, type JobEventType, type JobId, type JobListResponse, type JobRunParams, type JobStatus, type KeyParams, type LaunchParams, type LinearCreateIssueParams, type ListAdminApiKeysParams, type ListAdminComputersParams, type ListAdminTenantsParams, type ListAdminUsersParams, Mcp, type McpDispatchParams, Miosa, type MiosaClientConfig, MiosaError, type MkdirParams, type ModeParams, Models, type MouseButton, NetworkError, NetworkPolicy, type NetworkPolicyData, type NetworkPolicyEffect, type NetworkPolicyProtocol, type NetworkPolicyRule, type NetworkPolicySetParams, NotFoundError, type NotificationPrefsUpdateParams, OAuthFlow, type OauthConnectParams, type OauthProvider, type OauthStartResult, type OauthStatusResult, type ObjectListParams, type AgentEvent as OcAgentEvent, type OcAgentSessionData, type AgentSessionListResponse as OcAgentSessionListResponse, type OcWorkspaceCreateParams, type OcWorkspaceData, type OcWorkspaceEvent, type OcWorkspaceListResponse, type OcWorkspaceStatus, type OcWorkspaceUpdateParams, OpenComputers, type OrgInvite, type OrgInviteCreated, type OrgInviteCreatedResponse, type OrgInviteListResponse, type OrgInvitePreview, type OrgInviteRevokeResponse, OrgInvites, type OrgRole, type OverviewData, type PolicyCreateParams, type PolicyListParams, type PolicyUpdateParams, type PresignParams, type PresignResult, ProjectAuth, type ProjectAuthEnableParams, type ProjectAuthStatus, type ProjectAuthUpdateParams, type ProjectIntegrationCatalogEntry, type ProjectIntegrationCreateParams, type ProjectIntegrationData, type ProjectIntegrationListParams, type ProjectIntegrationUpdateParams, ProjectIntegrations, ProviderDefaults, type ProviderKeyUpsertParams, type PublishFromSandboxParams, type PublishParams, type PublishResult, RateLimitError, type RegionData, Regions, type RollbackParams, type RulesListParams, type RuntimeInstanceData, type RuntimeInstanceId, type RuntimeInstanceState, type RuntimeLogsResult, SANDBOX_TEMPLATE, Sandbox, SandboxArtifacts, SandboxAudit, type SandboxBuildSpec, type SandboxBuildSpecError, type SandboxBuildSpecValidation, SandboxCommands, type SandboxCreateParams, type SandboxData, SandboxEnv, SandboxEvents, type SandboxExecOptions, type SandboxExecResult, SandboxFiles, type SandboxGetOrCreateParams, type SandboxId, type SandboxListParams, SandboxNetwork, SandboxPreview, SandboxPreviews, SandboxSecrets, type SandboxState, SandboxTags, type SandboxTemplate, type SandboxTemplateBuild, type SandboxTemplateBuildCreateParams, type SandboxTemplateBuildResourceData, type SandboxTemplateBuildResourceId, type SandboxTemplateCreateParams, type SandboxTemplateList, type SandboxTemplateListParams, type SandboxTemplateResourceData, type SandboxTemplateResourceId, SandboxTemplates, SandboxTerminal, Sandboxes, ScopedFs, type ScrollDirection, type ScrollParams, type SecretCreateParams, type SecretData, type SecretId, type SecretListParams, type SecretRotateParams, type SecretSetParams, type SecretUpdateParams, type SessionId, Settings, type SettingsUpdateParams, type SizeData, type SlackSendTestParams, type SnapshotCreateParams, type SnapshotData, type SnapshotListResponse, type SnapshotProgressEvent, type SnapshotRestoreResult, type SnapshotStatus, SnapshotsStandalone, Storage, type StorageObjectData, type SuggestionsParams, type TemplateBuildCreateParams, type TemplateCreateParams, type TemplateData, Tenant, type TenantId, type TenantPlan, type TenantSummary, type TerminalCreateParams, TimeoutError, type TimeseriesParams, type TunnelAuthMode, type TunnelCreateParams, type TunnelData, type TunnelId, type TunnelListResponse, type TunnelUpdateParams, type TypeParams, type UpdateWorkspaceMemberRoleParams, Usage, type UsageReportParams, type UsageSession, type UsageSessionsParams, type UsageSummary, type UserId, ValidationError, type VersionListParams, type VolumeCreateParams, type VolumeData, type VolumeId, type VolumeListParams, Volumes, type WaitParams, type WebhookCreateParams, type WebhookData, type WebhookDeliveryData, type WebhookDeliveryId, type WebhookId, type WebhookListParams, type WebhookUpdateParams, Webhooks, type WindowFocusParams, type WindowInfo, type WorkspaceId, type WorkspaceInvite, type WorkspaceInviteCreatedResponse, type WorkspaceInviteListResponse, type WorkspaceInvitePreview, type WorkspaceInviteRevokeResponse, WorkspaceInvites, type WorkspaceMember, type WorkspaceMemberAddedResponse, type WorkspaceMemberDeleteResponse, type WorkspaceMemberListResponse, type WorkspaceMemberRecord, type WorkspaceMemberRecordResponse, WorkspaceMembers, type WorkspaceRole, type WsTicket };