@miosa/sdk 1.2.6 → 1.2.7

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.d.ts CHANGED
@@ -164,72 +164,98 @@ declare class Admin {
164
164
  }>;
165
165
  }
166
166
 
167
- type AgentRunId = string & {
168
- readonly __brand: "AgentRunId";
169
- };
167
+ type AgentRuntime = "osa" | "codex" | "claude" | "claude-code" | "pi" | "hermes" | "custom";
168
+ interface AgentRuntimeProfile {
169
+ id: string;
170
+ tenant_id?: string;
171
+ tenantId?: string;
172
+ workspace_id?: string | null;
173
+ workspaceId?: string | null;
174
+ name: string;
175
+ runtime: AgentRuntime | string;
176
+ description?: string | null;
177
+ applies_to?: Record<string, unknown>;
178
+ appliesTo?: Record<string, unknown>;
179
+ tools?: string[];
180
+ connectors?: string[];
181
+ env?: Record<string, string>;
182
+ policy?: Record<string, unknown>;
183
+ metadata?: Record<string, unknown>;
184
+ is_default?: boolean;
185
+ isDefault?: boolean;
186
+ created_at?: string;
187
+ createdAt?: string;
188
+ updated_at?: string;
189
+ updatedAt?: string;
190
+ }
191
+ interface AgentRuntimeProfileParams {
192
+ workspaceId?: string;
193
+ workspace_id?: string;
194
+ name: string;
195
+ runtime: AgentRuntime | string;
196
+ description?: string;
197
+ appliesTo?: Record<string, unknown>;
198
+ applies_to?: Record<string, unknown>;
199
+ tools?: string[];
200
+ connectors?: string[];
201
+ env?: Record<string, string>;
202
+ policy?: Record<string, unknown>;
203
+ metadata?: Record<string, unknown>;
204
+ isDefault?: boolean;
205
+ is_default?: boolean;
206
+ }
207
+ type AgentRuntimeProfileUpdateParams = Partial<AgentRuntimeProfileParams>;
208
+ declare class AgentRuntimeProfiles {
209
+ private readonly http;
210
+ constructor(http: HttpClient);
211
+ list(params?: {
212
+ workspaceId?: string;
213
+ workspace_id?: string;
214
+ }): Promise<AgentRuntimeProfile[]>;
215
+ get(id: string): Promise<AgentRuntimeProfile>;
216
+ create(params: AgentRuntimeProfileParams): Promise<AgentRuntimeProfile>;
217
+ update(id: string, params: AgentRuntimeProfileUpdateParams): Promise<AgentRuntimeProfile>;
218
+ delete(id: string): Promise<void>;
219
+ }
220
+
170
221
  type AgentRunTargetKind = "sandbox" | "computer";
171
222
  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;
223
+ interface AgentRun {
224
+ id: string;
225
+ target_kind: AgentRunTargetKind;
178
226
  target_id: string;
179
- target_name?: string | null;
180
- provider: AgentRunProvider;
181
- model?: string | null;
227
+ provider: string;
182
228
  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;
229
+ status: AgentRunStatus;
230
+ output?: string;
231
+ stderr?: string;
232
+ exit_code?: number;
189
233
  metadata?: Record<string, unknown>;
190
- started_at?: string | null;
191
- finished_at?: string | null;
192
- created_at?: string | null;
193
- updated_at?: string | null;
234
+ started_at?: string;
235
+ finished_at?: string;
236
+ created_at?: string;
237
+ updated_at?: string;
238
+ [key: string]: unknown;
194
239
  }
195
240
  interface AgentRunCreateParams {
196
- target_id?: string;
241
+ prompt: string;
242
+ targetKind?: AgentRunTargetKind;
197
243
  targetId?: string;
198
- sandbox_id?: string;
199
244
  sandboxId?: string;
200
- computer_id?: string;
245
+ /** Shortcut for a computer-backed Agent Run. */
201
246
  computerId?: string;
202
- target_kind?: AgentRunTargetKind;
203
- targetKind?: AgentRunTargetKind;
204
- provider?: AgentRunProvider;
205
- prompt: string;
206
- instruction?: string;
207
- command?: string;
247
+ provider?: string;
208
248
  model?: string;
249
+ command?: string;
250
+ runtimeCommand?: string;
209
251
  cwd?: string;
210
252
  timeout?: number;
211
253
  metadata?: Record<string, unknown>;
212
254
  }
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
255
  declare class AgentRuns {
223
256
  private readonly http;
224
257
  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>;
258
+ run(params: AgentRunCreateParams): Promise<AgentRun>;
233
259
  }
234
260
 
235
261
  /**
@@ -826,6 +852,18 @@ interface ComputerCreateParams {
826
852
  size?: ComputerSize;
827
853
  visibility?: ComputerVisibility;
828
854
  metadata?: Record<string, string>;
855
+ /**
856
+ * Explicit agent runtime profile to mount into this computer. When omitted,
857
+ * MIOSA applies the workspace/tenant default profile that targets computers.
858
+ */
859
+ agentRuntimeProfileId?: string;
860
+ agent_runtime_profile_id?: string;
861
+ /** Back-compat shorthand for agentRuntimeProfileId. */
862
+ agentProfileId?: string;
863
+ agent_profile_id?: string;
864
+ /** Opt out of the default agent runtime profile for this create call. */
865
+ skipAgentRuntimeProfile?: boolean;
866
+ skip_agent_runtime_profile?: boolean;
829
867
  }
830
868
  interface ComputerUpdateParams {
831
869
  name?: string;
@@ -2616,6 +2654,90 @@ declare class Databases {
2616
2654
  streamLogs(databaseId: string): AsyncIterableIterator<unknown>;
2617
2655
  }
2618
2656
 
2657
+ type DockerDeployHostId = string & {
2658
+ readonly __brand: "DockerDeployHostId";
2659
+ };
2660
+ type DockerDeployHostStatus = "pending" | "provisioning" | "bootstrapping" | "active" | "degraded" | "suspended" | "retired" | "error";
2661
+ type DockerDeployApplianceStatus = "not_installed" | "installing" | "starting" | "healthy" | "unhealthy" | "unknown";
2662
+ interface DockerDeployHostData {
2663
+ id: DockerDeployHostId;
2664
+ tenant_id: string;
2665
+ workspace_id: string;
2666
+ external_workspace_id?: string | null;
2667
+ computer_id?: string | null;
2668
+ fleet_node_id?: string | null;
2669
+ status: DockerDeployHostStatus;
2670
+ size: string;
2671
+ region: string;
2672
+ portal_domain?: string | null;
2673
+ runtime_base_url?: string | null;
2674
+ agent_base_url?: string | null;
2675
+ appliance_image?: string | null;
2676
+ appliance_version?: string | null;
2677
+ appliance_status: DockerDeployApplianceStatus;
2678
+ agent_last_seen_at?: string | null;
2679
+ metadata?: Record<string, unknown>;
2680
+ created_at?: string;
2681
+ updated_at?: string;
2682
+ }
2683
+ interface DockerDeployHostListParams {
2684
+ workspace_id?: string;
2685
+ workspaceId?: string;
2686
+ }
2687
+ interface DockerDeployHostEnsureParams {
2688
+ workspace_id?: string;
2689
+ workspaceId?: string;
2690
+ external_workspace_id?: string;
2691
+ externalWorkspaceId?: string;
2692
+ }
2693
+ interface DockerDeployHostListResponse {
2694
+ data?: DockerDeployHostData[];
2695
+ hosts?: DockerDeployHostData[];
2696
+ }
2697
+ interface DockerDeployHostResponse {
2698
+ data?: DockerDeployHostData;
2699
+ host?: DockerDeployHostData;
2700
+ queued?: boolean;
2701
+ }
2702
+ interface DockerDeployTemplate {
2703
+ id: string;
2704
+ name: string;
2705
+ description?: string;
2706
+ category?: string;
2707
+ runtime?: string;
2708
+ tags?: string[];
2709
+ metadata?: Record<string, unknown>;
2710
+ [key: string]: unknown;
2711
+ }
2712
+ declare class DockerDeploy {
2713
+ private readonly http;
2714
+ constructor(http: HttpClient);
2715
+ /**
2716
+ * List Docker Deploy appliance hosts scoped to the current tenant.
2717
+ *
2718
+ * Pass a workspace ID to inspect the dedicated always-on appliance machine
2719
+ * for one white-label workspace.
2720
+ */
2721
+ listHosts(params?: DockerDeployHostListParams): Promise<DockerDeployHostData[]>;
2722
+ /**
2723
+ * Ensure a workspace has its dedicated Docker Deploy appliance host.
2724
+ *
2725
+ * The host may still be `pending`, `provisioning`, or `bootstrapping` after
2726
+ * this call. Treat `status === "active"` and `appliance_status === "healthy"`
2727
+ * as the ready condition before sending app/container traffic to it.
2728
+ */
2729
+ ensureHost(params?: DockerDeployHostEnsureParams): Promise<{
2730
+ host: DockerDeployHostData;
2731
+ queued: boolean;
2732
+ }>;
2733
+ /** Fetch one Docker Deploy host by ID. */
2734
+ getHost(hostId: string): Promise<DockerDeployHostData>;
2735
+ /** List Docker Deploy starter templates. */
2736
+ listTemplates(): Promise<DockerDeployTemplate[]>;
2737
+ /** Fetch one Docker Deploy starter template by ID. */
2738
+ getTemplate(templateId: string): Promise<DockerDeployTemplate>;
2739
+ }
2740
+
2619
2741
  /**
2620
2742
  * Deployments resource — sandbox→production publishing surface.
2621
2743
  *
@@ -2846,6 +2968,31 @@ interface DeploymentCreateParams extends ExternalAttribution {
2846
2968
  }
2847
2969
  interface DockerDeployCreateParams extends DeploymentCreateParams {
2848
2970
  }
2971
+ interface DockerDeployDoctorCheck {
2972
+ name: string;
2973
+ ok: boolean;
2974
+ message: string;
2975
+ details?: Record<string, unknown>;
2976
+ }
2977
+ interface DockerDeployDoctorProbe {
2978
+ url: string;
2979
+ ok: boolean;
2980
+ status?: number;
2981
+ error?: string;
2982
+ }
2983
+ interface DockerDeployDoctorResult {
2984
+ ok: boolean;
2985
+ deployment: DeploymentData;
2986
+ host?: DockerDeployHostData;
2987
+ checks: DockerDeployDoctorCheck[];
2988
+ probe?: DockerDeployDoctorProbe;
2989
+ }
2990
+ interface DockerDeployDoctorParams {
2991
+ probePath?: string;
2992
+ probe_path?: string;
2993
+ timeoutMs?: number;
2994
+ timeout_ms?: number;
2995
+ }
2849
2996
  interface DeploymentUpdateParams {
2850
2997
  name?: string;
2851
2998
  branch?: string;
@@ -2976,6 +3123,12 @@ declare class Deployments {
2976
3123
  * deployment so the control plane attaches it to the workspace Docker host.
2977
3124
  */
2978
3125
  createDockerDeploy(params: DockerDeployCreateParams): Promise<DeploymentData>;
3126
+ /**
3127
+ * Verify a Docker Deploy deployment before telling a user or agent it is
3128
+ * live. Checks product markers, appliance host health, route metadata, and
3129
+ * optionally probes the public URL.
3130
+ */
3131
+ doctorDockerDeploy(deploymentId: string, params?: DockerDeployDoctorParams): Promise<DockerDeployDoctorResult>;
2979
3132
  update(deploymentId: string, params: DeploymentUpdateParams): Promise<DeploymentData>;
2980
3133
  delete(deploymentId: string): Promise<void>;
2981
3134
  publish(deploymentId: string, params: PublishParams): Promise<PublishResult>;
@@ -2999,90 +3152,6 @@ declare class Deployments {
2999
3152
  domains(deploymentId: string): DeploymentDomains;
3000
3153
  }
3001
3154
 
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;
3027
- }
3028
- interface DockerDeployHostListParams {
3029
- workspace_id?: string;
3030
- workspaceId?: string;
3031
- }
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[];
3041
- }
3042
- interface DockerDeployHostResponse {
3043
- data?: DockerDeployHostData;
3044
- host?: DockerDeployHostData;
3045
- queued?: boolean;
3046
- }
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;
3056
- }
3057
- declare class DockerDeploy {
3058
- private readonly http;
3059
- constructor(http: HttpClient);
3060
- /**
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.
3065
- */
3066
- listHosts(params?: DockerDeployHostListParams): Promise<DockerDeployHostData[]>;
3067
- /**
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.
3073
- */
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>;
3084
- }
3085
-
3086
3155
  /**
3087
3156
  * Email — admin email campaigns, templates, and inbox surfaces.
3088
3157
  *
@@ -3627,28 +3696,53 @@ interface TunnelUpdateParams {
3627
3696
  interface TunnelListResponse {
3628
3697
  data: TunnelData[];
3629
3698
  }
3630
- type AgentSessionStatus = "pending" | "running" | "completed" | "failed" | "cancelled";
3699
+ type AgentSessionStatus = "pending" | "running" | "succeeded" | "completed" | "failed" | "canceled" | "cancelled";
3631
3700
  interface OcAgentSessionData {
3632
3701
  id: string;
3702
+ session_id?: string;
3633
3703
  host_id: HostId;
3634
3704
  task: string;
3635
- model_id: string | null;
3705
+ model_id?: string | null;
3706
+ model?: string | null;
3636
3707
  status: AgentSessionStatus;
3637
- max_turns: number;
3638
- turns_used: number;
3639
- created_at: string;
3640
- updated_at: string;
3641
- completed_at: string | null;
3642
- error: string | null;
3708
+ tools?: string[];
3709
+ max_turns?: number;
3710
+ turns_used?: number;
3711
+ max_steps?: number | null;
3712
+ max_tokens?: number | null;
3713
+ timeout_ms?: number | null;
3714
+ agent_runtime_profile_id?: string | null;
3715
+ runtime_context?: Record<string, unknown>;
3716
+ sse_url?: string;
3717
+ optimal_session_id?: string | null;
3718
+ created_at?: string;
3719
+ updated_at?: string;
3720
+ started_at?: string | null;
3721
+ ended_at?: string | null;
3722
+ inserted_at?: string;
3723
+ completed_at?: string | null;
3724
+ error?: string | null;
3725
+ result_summary?: string | null;
3643
3726
  }
3644
3727
  interface AgentDispatchParams {
3645
3728
  task: string;
3729
+ model?: string;
3646
3730
  model_id?: string;
3647
3731
  max_turns?: number;
3732
+ tools?: string[];
3733
+ budget?: {
3734
+ max_steps?: number;
3735
+ max_tokens?: number;
3736
+ timeout_ms?: number;
3737
+ };
3738
+ agent_runtime_profile_id?: string;
3739
+ agent_profile_id?: string;
3740
+ skip_agent_runtime_profile?: boolean;
3648
3741
  context?: Record<string, unknown>;
3649
3742
  }
3650
3743
  interface AgentSessionListResponse {
3651
- data: OcAgentSessionData[];
3744
+ data?: OcAgentSessionData[];
3745
+ sessions?: OcAgentSessionData[];
3652
3746
  }
3653
3747
  interface AgentEvent {
3654
3748
  type: string;
@@ -3775,6 +3869,8 @@ declare class Agents {
3775
3869
  private readonly http;
3776
3870
  constructor(http: HttpClient);
3777
3871
  private base;
3872
+ private unwrapSession;
3873
+ private unwrapList;
3778
3874
  /**
3779
3875
  * Dispatch a new agent session on the host.
3780
3876
  */
@@ -4523,6 +4619,12 @@ interface SandboxCreateParams {
4523
4619
  idempotencyKey?: string;
4524
4620
  idempotency_key?: string;
4525
4621
  slug?: string;
4622
+ agentRuntimeProfileId?: string;
4623
+ agent_runtime_profile_id?: string;
4624
+ agentProfileId?: string;
4625
+ agent_profile_id?: string;
4626
+ skipAgentRuntimeProfile?: boolean;
4627
+ skip_agent_runtime_profile?: boolean;
4526
4628
  externalWorkspaceId?: string;
4527
4629
  external_workspace_id?: string;
4528
4630
  externalUserId?: string;
@@ -4566,6 +4668,30 @@ interface SandboxExecResult {
4566
4668
  durationMs?: number;
4567
4669
  duration_ms?: number;
4568
4670
  }
4671
+ interface SandboxExportFile {
4672
+ path: string;
4673
+ filename?: string;
4674
+ download_url?: string;
4675
+ downloadUrl?: string;
4676
+ }
4677
+ interface SandboxExport {
4678
+ id: string;
4679
+ sandbox_id?: string;
4680
+ sandboxId?: string;
4681
+ label?: string | null;
4682
+ status: string;
4683
+ files: SandboxExportFile[];
4684
+ archive_download_url?: string;
4685
+ archiveDownloadUrl?: string;
4686
+ created_at?: string;
4687
+ createdAt?: string;
4688
+ }
4689
+ interface SandboxExportParams {
4690
+ path?: string;
4691
+ paths?: string[];
4692
+ label?: string;
4693
+ filename?: string;
4694
+ }
4569
4695
  type SandboxExecEvent = {
4570
4696
  type?: "stdout";
4571
4697
  line: string;
@@ -4920,6 +5046,10 @@ declare class Sandbox {
4920
5046
  private execStream;
4921
5047
  writeFile(path: string, content: string | Uint8Array): Promise<void>;
4922
5048
  download(path: string): Promise<Uint8Array>;
5049
+ createExport(params: string | string[] | SandboxExportParams): Promise<SandboxExport>;
5050
+ downloadExport(paths: string | string[], options?: {
5051
+ filename?: string;
5052
+ }): Promise<Uint8Array>;
4923
5053
  readFile(path: string): Promise<string>;
4924
5054
  listFiles(path?: string): Promise<SandboxFileList>;
4925
5055
  statFile(path: string): Promise<SandboxFileStat>;
@@ -5397,11 +5527,62 @@ interface TenantPlan {
5397
5527
  usage?: Record<string, unknown>;
5398
5528
  [key: string]: unknown;
5399
5529
  }
5530
+ interface PreviewDomainData {
5531
+ preview_domain?: string | null;
5532
+ default_domain?: string;
5533
+ status?: string;
5534
+ dns_status?: string;
5535
+ cname_target?: string | null;
5536
+ dns_instructions?: unknown;
5537
+ [key: string]: unknown;
5538
+ }
5539
+ interface TenantBrandingUpdateParams {
5540
+ product_name?: string;
5541
+ logo_url?: string;
5542
+ support_url?: string;
5543
+ support_email?: string;
5544
+ primary_color?: string;
5545
+ background_color?: string;
5546
+ [key: string]: unknown;
5547
+ }
5548
+ type BrandingData = TenantBrandingUpdateParams;
5549
+ declare class PreviewDomain {
5550
+ private readonly http;
5551
+ constructor(http: HttpClient);
5552
+ /** Get the tenant's white-label preview domain settings. */
5553
+ get(): Promise<PreviewDomainData>;
5554
+ /** Set the tenant's white-label preview domain. */
5555
+ set(domain: string): Promise<PreviewDomainData>;
5556
+ /** Re-run DNS verification for the configured preview domain. */
5557
+ verify(): Promise<PreviewDomainData>;
5558
+ /** Remove the tenant's custom preview domain. */
5559
+ delete(): Promise<void>;
5560
+ }
5561
+ declare class Branding {
5562
+ private readonly http;
5563
+ constructor(http: HttpClient);
5564
+ /** Get tenant branding used by white-label hosted surfaces. */
5565
+ get(): Promise<BrandingData>;
5566
+ /** Update tenant branding used by white-label hosted surfaces. */
5567
+ set(params: TenantBrandingUpdateParams): Promise<BrandingData>;
5568
+ /** Reset tenant branding to platform defaults. */
5569
+ delete(): Promise<void>;
5570
+ }
5400
5571
  declare class Tenant {
5401
5572
  private readonly http;
5573
+ readonly preview_domain: PreviewDomain;
5574
+ readonly branding: Branding;
5575
+ /** camelCase alias for SDK consumers that avoid snake_case properties. */
5576
+ readonly previewDomain: PreviewDomain;
5402
5577
  constructor(http: HttpClient);
5403
5578
  /** Get the current tenant's plan, limits, and live usage counters. */
5404
5579
  current(): Promise<TenantPlan>;
5580
+ /** Convenience alias for `tenant.branding.get()`. */
5581
+ getBranding(): Promise<BrandingData>;
5582
+ /** Convenience alias for `tenant.branding.set(...)`. */
5583
+ setBranding(params: TenantBrandingUpdateParams): Promise<BrandingData>;
5584
+ /** Convenience alias for `tenant.branding.delete()`. */
5585
+ deleteBranding(): Promise<void>;
5405
5586
  }
5406
5587
 
5407
5588
  /**
@@ -5539,8 +5720,16 @@ interface WebhookUpdateParams {
5539
5720
  enabled?: boolean;
5540
5721
  [key: string]: unknown;
5541
5722
  }
5723
+ /**
5724
+ * Verify the `Miosa-Signature` webhook header.
5725
+ *
5726
+ * Header format: `t=<unix_seconds>,v1=<hex_hmac>`.
5727
+ * Signed payload: `<timestamp>.<raw_body>`.
5728
+ */
5729
+ declare function verifySignature(body: Buffer | Uint8Array | string, header: string, secret: string, toleranceSec?: number): boolean;
5542
5730
  declare class Webhooks {
5543
5731
  private readonly http;
5732
+ static verifySignature: typeof verifySignature;
5544
5733
  constructor(http: HttpClient);
5545
5734
  list(params?: WebhookListParams): Promise<WebhookData[]>;
5546
5735
  get(webhookId: string): Promise<WebhookData>;
@@ -5783,8 +5972,6 @@ declare class WorkspaceInvites {
5783
5972
  declare class Miosa {
5784
5973
  /** Per-workspace user roster — list, add, update role, remove. */
5785
5974
  readonly workspaceMembers: WorkspaceMembers;
5786
- /** Target-agnostic prompt dispatch to sandboxes/computers with durable records. */
5787
- readonly agentRuns: AgentRuns;
5788
5975
  /**
5789
5976
  * Workspace invite flow — create invite, list, revoke, preview, accept.
5790
5977
  * Sending to an email already in the org adds the user directly.
@@ -5821,6 +6008,10 @@ declare class Miosa {
5821
6008
  readonly externalKeys: ExternalKeys;
5822
6009
  /** Model Context Protocol — JSON-RPC dispatch + streaming channel. */
5823
6010
  readonly mcp: Mcp;
6011
+ /** Agent Runs — prompt dispatch into sandbox targets. */
6012
+ readonly agentRuns: AgentRuns;
6013
+ /** Agent runtime profiles — tenant/workspace defaults for sandbox/computer agents. */
6014
+ readonly agentRuntimeProfiles: AgentRuntimeProfiles;
5824
6015
  /** Computer management — create, list, get, delete. */
5825
6016
  readonly computers: Computers;
5826
6017
  /** Sandboxes — native code-execution environments under `/sandboxes`. */
@@ -6030,4 +6221,4 @@ declare class NetworkError extends MiosaError {
6030
6221
  constructor(message: string, cause: Error);
6031
6222
  }
6032
6223
 
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 };
6224
+ export { type AcceptOrgInviteResponse, type AcceptWorkspaceInviteResponse, type AddDomainParams, type AddWorkspaceMemberParams, Admin, type AgentDispatchParams, type AgentEvent$1 as AgentEvent, type AgentEventType, type AgentRun, type AgentRunCreateParams, type AgentRunStatus, type AgentRunTargetKind, AgentRuns, AgentRuntimeProfiles, 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 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 DirEntry, type DirListResult, type DiscordSendTestParams, DockerDeploy, type DockerDeployApplianceStatus, type DockerDeployCreateParams, type DockerDeployDoctorCheck, type DockerDeployDoctorParams, type DockerDeployDoctorProbe, type DockerDeployDoctorResult, 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, 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 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 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, 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, verifySignature };