@miosa/sdk 1.0.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -155,6 +155,13 @@ 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
+ }>;
158
165
  }
159
166
 
160
167
  /**
@@ -221,6 +228,12 @@ declare class ApiKeys {
221
228
  constructor(http: HttpClient);
222
229
  list(params?: ApiKeyListParams): Promise<ApiKeyData[]>;
223
230
  create(params: ApiKeyCreateParams): Promise<ApiKeyCreateResult>;
231
+ /** POST /api/v1/api-keys/scoped — L2 delegation token bound to one external user. */
232
+ createScoped(params: {
233
+ externalUserId: string;
234
+ scopes: string[];
235
+ expiresAt?: string;
236
+ }): Promise<ApiKeyCreateResult>;
224
237
  delete(keyId: string): Promise<void>;
225
238
  }
226
239
 
@@ -1349,6 +1362,507 @@ declare class Desktop$1 {
1349
1362
  launch(appName: string): Promise<DesktopActionResult>;
1350
1363
  }
1351
1364
 
1365
+ /**
1366
+ * Egress audit log — paginated query + live tail.
1367
+ *
1368
+ * Backed by:
1369
+ * GET /api/v1/egress/audit
1370
+ * GET /api/v1/egress/audit/:id
1371
+ *
1372
+ * `client.audit.tail()` long-polls the REST endpoint and yields new
1373
+ * events as they arrive. The sandbox-scoped variant
1374
+ * (`sandbox.audit.tail()`) upgrades to a live SSE connection backed by
1375
+ * `GET /sandboxes/:id/audit/stream` so the tail latency is
1376
+ * sub-second.
1377
+ */
1378
+
1379
+ interface EgressAuditEvent {
1380
+ id: string;
1381
+ action?: string;
1382
+ effect?: string;
1383
+ host?: string;
1384
+ method?: string;
1385
+ path?: string;
1386
+ status_code?: number;
1387
+ actor_id?: string;
1388
+ resource_id?: string;
1389
+ resource_type?: string;
1390
+ policy_id?: string;
1391
+ rule_id?: string;
1392
+ external_user_id?: string;
1393
+ external_workspace_id?: string;
1394
+ metadata?: Record<string, unknown>;
1395
+ inserted_at?: string;
1396
+ timestamp?: string;
1397
+ [key: string]: unknown;
1398
+ }
1399
+ interface AuditListParams {
1400
+ resourceId?: string;
1401
+ resource_id?: string;
1402
+ resourceType?: string;
1403
+ resource_type?: string;
1404
+ host?: string;
1405
+ action?: string;
1406
+ since?: string;
1407
+ until?: string;
1408
+ limit?: number;
1409
+ cursor?: string;
1410
+ externalUserId?: string;
1411
+ external_user_id?: string;
1412
+ externalWorkspaceId?: string;
1413
+ external_workspace_id?: string;
1414
+ }
1415
+ interface AuditTailParams extends AuditListParams {
1416
+ pollIntervalMs?: number;
1417
+ }
1418
+ declare class EgressAudit {
1419
+ protected readonly http: HttpClient;
1420
+ constructor(http: HttpClient);
1421
+ /** List audit events with optional filters. */
1422
+ list(params?: AuditListParams): Promise<EgressAuditEvent[]>;
1423
+ /** Get a single audit event by id. */
1424
+ get(id: string): Promise<EgressAuditEvent>;
1425
+ /**
1426
+ * Long-poll the audit endpoint and yield new events as they appear.
1427
+ *
1428
+ * Tenant-wide `client.audit.tail()` is REST-based long polling. A
1429
+ * live WebSocket / SSE tail is only available for the sandbox-scoped
1430
+ * variant — see {@link SandboxAudit.tail}.
1431
+ */
1432
+ tail(params?: AuditTailParams): AsyncIterableIterator<EgressAuditEvent>;
1433
+ }
1434
+ /**
1435
+ * Sandbox-bound view of {@link EgressAudit}. `list()` pre-scopes
1436
+ * `resource_id` + `resource_type="sandbox"`. `tail()` upgrades to the
1437
+ * per-sandbox SSE stream for sub-second tail latency.
1438
+ */
1439
+ declare class SandboxAudit {
1440
+ protected readonly http: HttpClient;
1441
+ protected readonly resourceId: string;
1442
+ protected readonly resourceType: string;
1443
+ private readonly delegate;
1444
+ constructor(http: HttpClient, resourceId: string);
1445
+ list(params?: AuditListParams): Promise<EgressAuditEvent[]>;
1446
+ get(id: string): Promise<EgressAuditEvent>;
1447
+ /** SSE tail of the sandbox-scoped audit stream. */
1448
+ tail(params?: AuditTailParams): AsyncIterableIterator<EgressAuditEvent>;
1449
+ }
1450
+ /** Computer-bound audit — same surface, `resource_type="computer"`. */
1451
+ declare class ComputerAudit extends SandboxAudit {
1452
+ protected readonly resourceType: string;
1453
+ }
1454
+
1455
+ /**
1456
+ * Egress network — policies, allowlist, suggestions.
1457
+ *
1458
+ * Backed by:
1459
+ * GET /api/v1/egress/policies
1460
+ * POST /api/v1/egress/policies
1461
+ * PATCH /api/v1/egress/policies/:id (or no id for tenant default)
1462
+ *
1463
+ * GET /api/v1/egress/allowlist
1464
+ * POST /api/v1/egress/allowlist
1465
+ * DELETE /api/v1/egress/allowlist/:id
1466
+ *
1467
+ * GET /api/v1/egress/audit/suggestions
1468
+ */
1469
+
1470
+ type EgressPolicyMode = "enforce" | "audit_only";
1471
+ type EgressRuleEffect = "allow" | "deny";
1472
+ interface EgressAllowlistRule {
1473
+ id: string;
1474
+ host: string;
1475
+ effect: EgressRuleEffect | string;
1476
+ methods?: string[];
1477
+ path_glob?: string | null;
1478
+ policy_id?: string | null;
1479
+ resource_id?: string | null;
1480
+ resource_type?: string | null;
1481
+ note?: string | null;
1482
+ created_at?: string;
1483
+ [key: string]: unknown;
1484
+ }
1485
+ interface EgressPolicyData {
1486
+ id: string;
1487
+ name?: string;
1488
+ mode: EgressPolicyMode | string;
1489
+ default_effect: EgressRuleEffect | string;
1490
+ description?: string | null;
1491
+ resource_id?: string | null;
1492
+ resource_type?: string | null;
1493
+ rules?: EgressAllowlistRule[];
1494
+ created_at?: string;
1495
+ updated_at?: string;
1496
+ [key: string]: unknown;
1497
+ }
1498
+ interface EgressSuggestion {
1499
+ host: string;
1500
+ methods?: string[];
1501
+ path_glob?: string | null;
1502
+ count?: number;
1503
+ first_seen?: string;
1504
+ last_seen?: string;
1505
+ resource_id?: string | null;
1506
+ [key: string]: unknown;
1507
+ }
1508
+ interface AllowParams {
1509
+ methods?: string[];
1510
+ pathGlob?: string;
1511
+ path_glob?: string;
1512
+ policyId?: string;
1513
+ policy_id?: string;
1514
+ resourceId?: string;
1515
+ resource_id?: string;
1516
+ resourceType?: string;
1517
+ resource_type?: string;
1518
+ note?: string;
1519
+ }
1520
+ interface PolicyCreateParams {
1521
+ name: string;
1522
+ mode?: EgressPolicyMode | string;
1523
+ defaultEffect?: EgressRuleEffect | string;
1524
+ default_effect?: EgressRuleEffect | string;
1525
+ resourceId?: string;
1526
+ resource_id?: string;
1527
+ resourceType?: string;
1528
+ resource_type?: string;
1529
+ description?: string;
1530
+ }
1531
+ interface PolicyUpdateParams {
1532
+ mode?: EgressPolicyMode | string;
1533
+ defaultEffect?: EgressRuleEffect | string;
1534
+ default_effect?: EgressRuleEffect | string;
1535
+ name?: string;
1536
+ description?: string;
1537
+ }
1538
+ interface ModeParams {
1539
+ policyId?: string;
1540
+ policy_id?: string;
1541
+ resourceId?: string;
1542
+ resource_id?: string;
1543
+ resourceType?: string;
1544
+ resource_type?: string;
1545
+ }
1546
+ interface SuggestionsParams {
1547
+ resourceId?: string;
1548
+ resource_id?: string;
1549
+ resourceType?: string;
1550
+ resource_type?: string;
1551
+ since?: string;
1552
+ }
1553
+ interface PolicyListParams {
1554
+ resourceId?: string;
1555
+ resource_id?: string;
1556
+ resourceType?: string;
1557
+ resource_type?: string;
1558
+ }
1559
+ interface RulesListParams {
1560
+ policyId?: string;
1561
+ policy_id?: string;
1562
+ resourceId?: string;
1563
+ resource_id?: string;
1564
+ resourceType?: string;
1565
+ resource_type?: string;
1566
+ }
1567
+ declare class EgressNetwork {
1568
+ protected readonly http: HttpClient;
1569
+ constructor(http: HttpClient);
1570
+ /** Add an `allow` rule for `host` to the allowlist. */
1571
+ allow(host: string, params?: AllowParams): Promise<EgressAllowlistRule>;
1572
+ /** Add a `deny` rule for `host` to the allowlist. */
1573
+ deny(host: string, params?: AllowParams): Promise<EgressAllowlistRule>;
1574
+ /** List allowlist rules. */
1575
+ rules(params?: RulesListParams): Promise<EgressAllowlistRule[]>;
1576
+ /** Delete an allowlist rule by id. */
1577
+ removeRule(ruleId: string): Promise<void>;
1578
+ /** List egress policies. */
1579
+ policies(params?: PolicyListParams): Promise<EgressPolicyData[]>;
1580
+ /** Create an egress policy. */
1581
+ createPolicy(params: PolicyCreateParams): Promise<EgressPolicyData>;
1582
+ /** Update an egress policy by id. */
1583
+ updatePolicy(policyId: string, params: PolicyUpdateParams): Promise<EgressPolicyData>;
1584
+ /** Set the policy to `mode="enforce"` — denied egress is blocked. */
1585
+ lockdown(params?: ModeParams): Promise<EgressPolicyData>;
1586
+ /** Set the policy to `mode="audit_only"` — log but do not block. */
1587
+ observe(params?: ModeParams): Promise<EgressPolicyData>;
1588
+ private setMode;
1589
+ /** AI-generated allowlist suggestions from recent denied egress. */
1590
+ suggestions(params?: SuggestionsParams): Promise<EgressSuggestion[]>;
1591
+ }
1592
+ /**
1593
+ * Sandbox-bound view of {@link EgressNetwork}. Pre-scopes
1594
+ * `resource_id` + `resource_type="sandbox"` on every call.
1595
+ */
1596
+ declare class SandboxNetwork {
1597
+ protected readonly resourceId: string;
1598
+ protected readonly resourceType: string;
1599
+ private readonly delegate;
1600
+ constructor(http: HttpClient, resourceId: string);
1601
+ private resolvedResourceId;
1602
+ private resolvedResourceType;
1603
+ allow(host: string, params?: AllowParams): Promise<EgressAllowlistRule>;
1604
+ deny(host: string, params?: AllowParams): Promise<EgressAllowlistRule>;
1605
+ rules(params?: RulesListParams): Promise<EgressAllowlistRule[]>;
1606
+ removeRule(ruleId: string): Promise<void>;
1607
+ lockdown(params?: {
1608
+ policyId?: string;
1609
+ }): Promise<EgressPolicyData>;
1610
+ observe(params?: {
1611
+ policyId?: string;
1612
+ }): Promise<EgressPolicyData>;
1613
+ suggestions(params?: {
1614
+ since?: string;
1615
+ }): Promise<EgressSuggestion[]>;
1616
+ policies(): Promise<EgressPolicyData[]>;
1617
+ }
1618
+ /** Computer-bound network — same surface, `resource_type="computer"`. */
1619
+ declare class ComputerNetwork extends SandboxNetwork {
1620
+ protected readonly resourceType: string;
1621
+ }
1622
+
1623
+ /**
1624
+ * Egress secrets — encrypted API key + OAuth credential vault.
1625
+ *
1626
+ * Backed by:
1627
+ * POST /api/v1/egress/secrets
1628
+ * GET /api/v1/egress/secrets
1629
+ * GET /api/v1/egress/secrets/:id
1630
+ * PATCH /api/v1/egress/secrets/:id (rotate)
1631
+ * DELETE /api/v1/egress/secrets/:id
1632
+ *
1633
+ * POST /api/v1/egress/bindings
1634
+ * GET /api/v1/egress/bindings
1635
+ * DELETE /api/v1/egress/bindings/:id
1636
+ *
1637
+ * GET /api/v1/egress/oauth/providers
1638
+ * POST /api/v1/egress/oauth/start
1639
+ * GET /api/v1/egress/oauth/status?state=...
1640
+ */
1641
+
1642
+ type EgressSecretType = "api_key" | "oauth_token" | "bearer" | "basic" | "generic";
1643
+ type EgressSecretScope = "user" | "workspace" | "tenant" | "external_user" | "external_workspace";
1644
+ interface EgressSecretData {
1645
+ id: string;
1646
+ name?: string;
1647
+ type?: EgressSecretType | string;
1648
+ scope?: EgressSecretScope | string;
1649
+ workspace_id?: string | null;
1650
+ owner_user_id?: string | null;
1651
+ external_user_id?: string | null;
1652
+ external_workspace_id?: string | null;
1653
+ resource_id?: string | null;
1654
+ resource_type?: string | null;
1655
+ masked_value?: string | null;
1656
+ expires_at?: string | null;
1657
+ metadata?: Record<string, unknown>;
1658
+ created_at?: string;
1659
+ updated_at?: string;
1660
+ [key: string]: unknown;
1661
+ }
1662
+ interface EgressBindingData {
1663
+ id: string;
1664
+ secret_id: string;
1665
+ resource_id: string;
1666
+ resource_type: string;
1667
+ expose_as_env: string;
1668
+ created_at?: string;
1669
+ [key: string]: unknown;
1670
+ }
1671
+ interface OauthProvider {
1672
+ name: string;
1673
+ display_name?: string;
1674
+ scopes?: string[];
1675
+ [key: string]: unknown;
1676
+ }
1677
+ interface SecretSetParams {
1678
+ name: string;
1679
+ value: string;
1680
+ type?: EgressSecretType | string;
1681
+ scope?: EgressSecretScope | string;
1682
+ exposeAsEnv?: string;
1683
+ expose_as_env?: string;
1684
+ workspaceId?: string;
1685
+ workspace_id?: string;
1686
+ ownerUserId?: string;
1687
+ owner_user_id?: string;
1688
+ externalUserId?: string;
1689
+ external_user_id?: string;
1690
+ externalWorkspaceId?: string;
1691
+ external_workspace_id?: string;
1692
+ resourceId?: string;
1693
+ resource_id?: string;
1694
+ resourceType?: string;
1695
+ resource_type?: string;
1696
+ refreshToken?: string;
1697
+ refresh_token?: string;
1698
+ expiresAt?: string;
1699
+ expires_at?: string;
1700
+ metadata?: Record<string, unknown>;
1701
+ }
1702
+ interface SecretListParams {
1703
+ scope?: string;
1704
+ type?: string;
1705
+ workspaceId?: string;
1706
+ workspace_id?: string;
1707
+ ownerUserId?: string;
1708
+ owner_user_id?: string;
1709
+ externalUserId?: string;
1710
+ external_user_id?: string;
1711
+ externalWorkspaceId?: string;
1712
+ external_workspace_id?: string;
1713
+ resourceId?: string;
1714
+ resource_id?: string;
1715
+ resourceType?: string;
1716
+ resource_type?: string;
1717
+ }
1718
+ interface SecretRotateParams {
1719
+ newValue?: string;
1720
+ new_value?: string;
1721
+ value?: string;
1722
+ refreshToken?: string;
1723
+ refresh_token?: string;
1724
+ expiresAt?: string;
1725
+ expires_at?: string;
1726
+ }
1727
+ interface BindingCreateParams {
1728
+ secretId?: string;
1729
+ secret_id?: string;
1730
+ resourceId?: string;
1731
+ resource_id?: string;
1732
+ resourceType?: string;
1733
+ resource_type?: string;
1734
+ exposeAsEnv?: string;
1735
+ expose_as_env?: string;
1736
+ }
1737
+ interface BindingListParams {
1738
+ resourceId?: string;
1739
+ resource_id?: string;
1740
+ resourceType?: string;
1741
+ resource_type?: string;
1742
+ secretId?: string;
1743
+ secret_id?: string;
1744
+ }
1745
+ interface OauthConnectParams {
1746
+ provider: string;
1747
+ exposeAsEnv?: string;
1748
+ expose_as_env?: string;
1749
+ scope?: string;
1750
+ ownerUserId?: string;
1751
+ owner_user_id?: string;
1752
+ externalUserId?: string;
1753
+ external_user_id?: string;
1754
+ externalWorkspaceId?: string;
1755
+ external_workspace_id?: string;
1756
+ resourceId?: string;
1757
+ resource_id?: string;
1758
+ resourceType?: string;
1759
+ resource_type?: string;
1760
+ redirectUri?: string;
1761
+ redirect_uri?: string;
1762
+ }
1763
+ interface OauthStartResult {
1764
+ authorize_url: string;
1765
+ authorizeUrl?: string;
1766
+ state: string;
1767
+ provider?: string;
1768
+ expires_at?: string;
1769
+ [key: string]: unknown;
1770
+ }
1771
+ interface OauthStatusResult {
1772
+ status: string;
1773
+ state?: string;
1774
+ secret_id?: string;
1775
+ error?: string;
1776
+ message?: string;
1777
+ [key: string]: unknown;
1778
+ }
1779
+ /**
1780
+ * A pending OAuth flow.
1781
+ *
1782
+ * The SDK does NOT auto-open a browser — the caller is responsible for
1783
+ * surfacing `authorizeUrl` to the end user. Once the user grants
1784
+ * consent, call `waitForCompletion()` to poll the upstream provider
1785
+ * status.
1786
+ */
1787
+ declare class OAuthFlow {
1788
+ readonly authorizeUrl: string;
1789
+ readonly state: string;
1790
+ readonly provider?: string;
1791
+ readonly data: OauthStartResult;
1792
+ private readonly http;
1793
+ constructor(http: HttpClient, payload: OauthStartResult, provider?: string);
1794
+ /**
1795
+ * Poll `GET /egress/oauth/status?state=...` until the flow completes.
1796
+ *
1797
+ * Returns the status payload once the upstream provider issues
1798
+ * tokens. Rejects with a `TimeoutError`-style Error if the flow does
1799
+ * not complete within `timeoutSec` seconds, or if the upstream
1800
+ * returns a failed status.
1801
+ */
1802
+ waitForCompletion(options?: {
1803
+ timeoutSec?: number;
1804
+ pollIntervalMs?: number;
1805
+ }): Promise<OauthStatusResult>;
1806
+ }
1807
+ declare class EgressSecrets {
1808
+ protected readonly http: HttpClient;
1809
+ constructor(http: HttpClient);
1810
+ /**
1811
+ * Create a secret. When `exposeAsEnv` is provided together with
1812
+ * `resourceId` the backend also creates a binding so the value is
1813
+ * injected as an env-var on that resource.
1814
+ */
1815
+ set(params: SecretSetParams): Promise<EgressSecretData>;
1816
+ /** List secrets. */
1817
+ list(params?: SecretListParams): Promise<EgressSecretData[]>;
1818
+ /** Get a single secret by id. */
1819
+ get(id: string): Promise<EgressSecretData>;
1820
+ /** Rotate the secret's value. */
1821
+ rotate(id: string, params: SecretRotateParams | string): Promise<EgressSecretData>;
1822
+ /** Delete a secret. */
1823
+ delete(id: string): Promise<void>;
1824
+ /** Bind a secret to a resource as an env var. */
1825
+ createBinding(params: BindingCreateParams): Promise<EgressBindingData>;
1826
+ /** List secret bindings. */
1827
+ listBindings(params?: BindingListParams): Promise<EgressBindingData[]>;
1828
+ /** Delete a binding. */
1829
+ deleteBinding(id: string): Promise<void>;
1830
+ /** List OAuth providers visible to the current tenant. */
1831
+ providers(): Promise<OauthProvider[]>;
1832
+ /**
1833
+ * Start an OAuth Connect flow.
1834
+ *
1835
+ * Returns an {@link OAuthFlow} — the caller must surface
1836
+ * `flow.authorizeUrl` to the end user (the SDK does NOT open the
1837
+ * browser) and then call `flow.waitForCompletion()` to receive the
1838
+ * resulting secret id.
1839
+ */
1840
+ connect(params: OauthConnectParams): Promise<OAuthFlow>;
1841
+ }
1842
+ /**
1843
+ * Sandbox-bound view of {@link EgressSecrets}. Pre-scopes
1844
+ * `resource_id` + `resource_type="sandbox"` on every call.
1845
+ */
1846
+ declare class SandboxSecrets {
1847
+ protected readonly resourceId: string;
1848
+ protected readonly resourceType: string;
1849
+ private readonly delegate;
1850
+ constructor(http: HttpClient, resourceId: string);
1851
+ private resolvedResourceId;
1852
+ private resolvedResourceType;
1853
+ set(params: SecretSetParams): Promise<EgressSecretData>;
1854
+ list(params?: SecretListParams): Promise<EgressSecretData[]>;
1855
+ get(id: string): Promise<EgressSecretData>;
1856
+ rotate(id: string, params: SecretRotateParams | string): Promise<EgressSecretData>;
1857
+ delete(id: string): Promise<void>;
1858
+ connect(params: OauthConnectParams): Promise<OAuthFlow>;
1859
+ listBindings(params?: BindingListParams): Promise<EgressBindingData[]>;
1860
+ }
1861
+ /** Computer-bound secrets — same shape, `resource_type="computer"`. */
1862
+ declare class ComputerSecrets extends SandboxSecrets {
1863
+ protected readonly resourceType: string;
1864
+ }
1865
+
1352
1866
  /** Options for `Exec.stream()`. */
1353
1867
  interface ExecStreamOptions {
1354
1868
  /** Command to execute. */
@@ -1650,6 +2164,12 @@ declare class Computer {
1650
2164
  readonly ports: ComputerPorts;
1651
2165
  /** Volume attachment — list, attach, detach. */
1652
2166
  readonly volumes: ComputerVolumes;
2167
+ /** Encrypted secrets + OAuth credentials scoped to this computer. */
2168
+ readonly secrets: ComputerSecrets;
2169
+ /** Egress allowlist + policies scoped to this computer. */
2170
+ readonly network: ComputerNetwork;
2171
+ /** Egress audit log + live tail scoped to this computer. */
2172
+ readonly audit: ComputerAudit;
1653
2173
  private readonly http;
1654
2174
  constructor(http: HttpClient, data: ComputerData);
1655
2175
  get id(): ComputerId;
@@ -3812,6 +4332,7 @@ interface SandboxCreateParams {
3812
4332
  tags?: string[];
3813
4333
  idempotencyKey?: string;
3814
4334
  idempotency_key?: string;
4335
+ slug?: string;
3815
4336
  externalWorkspaceId?: string;
3816
4337
  external_workspace_id?: string;
3817
4338
  externalUserId?: string;
@@ -3972,6 +4493,38 @@ interface SandboxFileEntry {
3972
4493
  modifiedAt?: string;
3973
4494
  [key: string]: unknown;
3974
4495
  }
4496
+ interface SandboxFileTreeNode {
4497
+ path: string;
4498
+ name: string;
4499
+ type: "file" | "dir";
4500
+ size?: number;
4501
+ modified_at?: string;
4502
+ children?: SandboxFileTreeNode[];
4503
+ }
4504
+ interface SandboxWriteManyEntry {
4505
+ path: string;
4506
+ content: string | Uint8Array;
4507
+ }
4508
+ interface SandboxWriteManyResult {
4509
+ written: Array<{
4510
+ path: string;
4511
+ size_bytes: number;
4512
+ }>;
4513
+ failed: Array<{
4514
+ path: string;
4515
+ error: string;
4516
+ }>;
4517
+ }
4518
+ interface SandboxFileChange {
4519
+ type: "created" | "modified" | "deleted";
4520
+ path: string;
4521
+ size_bytes?: number;
4522
+ }
4523
+ interface SandboxEnvVar {
4524
+ key: string;
4525
+ encrypted: boolean;
4526
+ value?: string;
4527
+ }
3975
4528
  interface SandboxFileList {
3976
4529
  path?: string;
3977
4530
  entries: SandboxFileEntry[];
@@ -4029,6 +4582,12 @@ declare class SandboxFiles {
4029
4582
  stat(path: string): Promise<SandboxFileStat>;
4030
4583
  upload(path: string, content: string | Uint8Array): Promise<void>;
4031
4584
  download(path: string): Promise<Uint8Array>;
4585
+ /** GET /api/v1/sandboxes/{id}/files/tree — recursive directory tree. */
4586
+ tree(path?: string, depth?: number): Promise<SandboxFileTreeNode>;
4587
+ /** POST /api/v1/sandboxes/{id}/files/write-many — write multiple files atomically. */
4588
+ writeMany(files: SandboxWriteManyEntry[]): Promise<SandboxWriteManyResult>;
4589
+ /** GET /api/v1/sandboxes/{id}/files/watch (SSE) — live file change events. */
4590
+ watch(): AsyncIterableIterator<SandboxFileChange>;
4032
4591
  }
4033
4592
  declare class SandboxPreview {
4034
4593
  private readonly sandbox;
@@ -4091,11 +4650,19 @@ declare class SandboxPreviews {
4091
4650
  declare class SandboxEnv {
4092
4651
  private readonly sandbox;
4093
4652
  constructor(sandbox: Sandbox);
4094
- /**
4095
- * Read-only listing of sandbox env vars.
4096
- * The backend has no per-name CRUD route; use Sandbox.create(env=...) to set values.
4097
- */
4098
- list(): Promise<Record<string, unknown>>;
4653
+ private get http();
4654
+ /** GET /api/v1/sandboxes/{id}/env → list of env vars. */
4655
+ get(): Promise<SandboxEnvVar[]>;
4656
+ /** @deprecated Use get() */
4657
+ list(): Promise<SandboxEnvVar[]>;
4658
+ /** PUT /api/v1/sandboxes/{id}/env — set (replace) env vars. */
4659
+ set(vars: Array<{
4660
+ key: string;
4661
+ value: string;
4662
+ encrypted?: boolean;
4663
+ }>): Promise<SandboxEnvVar[]>;
4664
+ /** DELETE /api/v1/sandboxes/{id}/env/{key} — remove a single env var. */
4665
+ delete(key: string): Promise<void>;
4099
4666
  }
4100
4667
  declare class SandboxTags {
4101
4668
  private readonly sandbox;
@@ -4123,6 +4690,12 @@ declare class Sandbox {
4123
4690
  readonly env: SandboxEnv;
4124
4691
  /** Tag replacement. */
4125
4692
  readonly tags: SandboxTags;
4693
+ /** Encrypted secrets + OAuth credentials scoped to this sandbox. */
4694
+ readonly secrets: SandboxSecrets;
4695
+ /** Egress allowlist + policies scoped to this sandbox. */
4696
+ readonly network: SandboxNetwork;
4697
+ /** Egress audit log + live tail scoped to this sandbox. */
4698
+ readonly audit: SandboxAudit;
4126
4699
  constructor(http: HttpClient, data: SandboxData);
4127
4700
  get id(): SandboxId;
4128
4701
  get state(): SandboxState;
@@ -4145,6 +4718,36 @@ declare class Sandbox {
4145
4718
  listSnapshots(): Promise<SandboxSnapshot[]>;
4146
4719
  restoreSnapshot(snapshotId: string): Promise<Sandbox>;
4147
4720
  deleteSnapshot(snapshotId: string): Promise<void>;
4721
+ /**
4722
+ * Fork (clone) this sandbox into a new sandbox via copy-on-write snapshot.
4723
+ * The original sandbox continues running unchanged.
4724
+ */
4725
+ fork(opts?: {
4726
+ name?: string;
4727
+ metadata?: Record<string, unknown>;
4728
+ }): Promise<Sandbox>;
4729
+ /**
4730
+ * PATCH /api/v1/sandboxes/{id} — update mutable sandbox fields.
4731
+ */
4732
+ update(params: {
4733
+ name?: string;
4734
+ slug?: string;
4735
+ tags?: string[];
4736
+ metadata?: Record<string, unknown>;
4737
+ always_on?: boolean;
4738
+ timeout_sec?: number;
4739
+ idle_timeout_sec?: number;
4740
+ }): Promise<Sandbox>;
4741
+ /**
4742
+ * POST /api/v1/sandboxes/{id}/preview-token → {token, url, expires_at, scope}
4743
+ */
4744
+ previewToken(expiresIn?: number, scope?: string): Promise<{
4745
+ token: string;
4746
+ url: string;
4747
+ expires_at: string;
4748
+ scope: string;
4749
+ [key: string]: unknown;
4750
+ }>;
4148
4751
  pause(): Promise<Sandbox>;
4149
4752
  resume(): Promise<Sandbox>;
4150
4753
  deploy(params?: SandboxDeployParams): Promise<Record<string, unknown>>;
@@ -4402,6 +5005,133 @@ declare class Storage {
4402
5005
  presign(bucketId: string, params: PresignParams): Promise<PresignResult>;
4403
5006
  }
4404
5007
 
5008
+ /**
5009
+ * Org Invites — email invite flow for org (tenant) membership.
5010
+ *
5011
+ * Public endpoints (no auth):
5012
+ * GET /invites/:token
5013
+ *
5014
+ * Authenticated endpoints (admin/owner role required for create/list/revoke):
5015
+ * POST /tenants/:id/invites
5016
+ * GET /tenants/:id/invites
5017
+ * DELETE /tenants/:id/invites/:invite_id
5018
+ * POST /invites/:token/accept
5019
+ */
5020
+
5021
+ type OrgRole = "owner" | "admin" | "member";
5022
+ interface OrgInvite {
5023
+ id: string;
5024
+ tenant_id: string;
5025
+ email: string;
5026
+ role: OrgRole;
5027
+ invited_by: string | null;
5028
+ expires_at: string;
5029
+ accepted_at: string | null;
5030
+ created_at: string;
5031
+ }
5032
+ interface OrgInviteCreated {
5033
+ invite_id: string;
5034
+ email: string;
5035
+ role: OrgRole;
5036
+ expires_at: string;
5037
+ /**
5038
+ * Full URL for the invite landing page. On white-label tenants this uses
5039
+ * the tenant's custom domain.
5040
+ */
5041
+ invite_url: string;
5042
+ }
5043
+ interface OrgInvitePreview {
5044
+ email: string;
5045
+ tenant_name: string;
5046
+ role: OrgRole;
5047
+ expires_at: string;
5048
+ expired: boolean;
5049
+ accepted: boolean;
5050
+ }
5051
+ interface TenantSummary {
5052
+ id: string;
5053
+ name: string;
5054
+ slug: string;
5055
+ owner_user_id: string | null;
5056
+ plan_id: string | null;
5057
+ plan_name: string | null;
5058
+ settings: Record<string, unknown>;
5059
+ inserted_at: string;
5060
+ updated_at: string;
5061
+ }
5062
+ interface CreateOrgInviteParams {
5063
+ email: string;
5064
+ role?: OrgRole;
5065
+ }
5066
+ interface OrgInviteCreatedResponse {
5067
+ data: OrgInviteCreated;
5068
+ }
5069
+ interface OrgInviteListResponse {
5070
+ data: OrgInvite[];
5071
+ total: number;
5072
+ }
5073
+ interface OrgInviteRevokeResponse {
5074
+ invite_id: string;
5075
+ revoked: boolean;
5076
+ }
5077
+ interface AcceptOrgInviteResponse {
5078
+ accepted: boolean;
5079
+ tenant_id: string;
5080
+ tenant: TenantSummary | null;
5081
+ }
5082
+ declare class OrgInvites {
5083
+ private readonly http;
5084
+ constructor(http: HttpClient);
5085
+ /**
5086
+ * Create an org invite and dispatch the invite email.
5087
+ *
5088
+ * The invite URL in the response is host-aware: on white-label tenants it
5089
+ * uses the custom domain so the recipient lands on the branded experience.
5090
+ * Requires `admin` or `owner` role in the tenant.
5091
+ *
5092
+ * `POST /tenants/:id/invites`
5093
+ */
5094
+ create(tenantId: string, params: CreateOrgInviteParams): Promise<OrgInviteCreated>;
5095
+ /**
5096
+ * List all pending (non-expired, non-accepted, non-revoked) org invites.
5097
+ *
5098
+ * Requires `admin` or `owner` role.
5099
+ *
5100
+ * `GET /tenants/:id/invites`
5101
+ */
5102
+ list(tenantId: string): Promise<OrgInvite[]>;
5103
+ /**
5104
+ * Revoke a pending org invite.
5105
+ *
5106
+ * Returns `409` when the invite was already legitimately accepted.
5107
+ * Requires `admin` or `owner` role.
5108
+ *
5109
+ * `DELETE /tenants/:id/invites/:invite_id`
5110
+ */
5111
+ revoke(tenantId: string, inviteId: string): Promise<OrgInviteRevokeResponse>;
5112
+ /**
5113
+ * Preview an org invite by token (no auth required).
5114
+ *
5115
+ * Returns `null` when the token is unknown or has been revoked.
5116
+ *
5117
+ * `GET /invites/:token`
5118
+ */
5119
+ preview(token: string): Promise<OrgInvitePreview | null>;
5120
+ /**
5121
+ * Accept an org invite on behalf of the authenticated user.
5122
+ *
5123
+ * The caller's JWT email must match the invite email (case-insensitive).
5124
+ * On success inserts a `tenant_members` row.
5125
+ *
5126
+ * Error responses:
5127
+ * - `400` — invalid or expired token.
5128
+ * - `422 EMAIL_MISMATCH` — JWT email does not match the invite email.
5129
+ *
5130
+ * `POST /invites/:token/accept`
5131
+ */
5132
+ accept(token: string): Promise<AcceptOrgInviteResponse>;
5133
+ }
5134
+
4405
5135
  /**
4406
5136
  * Tenant — current tenant info and plan/usage.
4407
5137
  */
@@ -4569,6 +5299,220 @@ declare class Webhooks {
4569
5299
  deliveries(webhookId: string): Promise<WebhookDeliveryData[]>;
4570
5300
  }
4571
5301
 
5302
+ /**
5303
+ * Workspace Members — per-workspace user roster.
5304
+ *
5305
+ * Endpoints:
5306
+ * GET /workspaces/:id/members
5307
+ * POST /workspaces/:id/members
5308
+ * PATCH /workspaces/:id/members/:user_id
5309
+ * DELETE /workspaces/:id/members/:user_id
5310
+ */
5311
+
5312
+ /** Role a user can hold within a workspace. */
5313
+ type WorkspaceRole = "owner" | "admin" | "member" | "viewer";
5314
+ /**
5315
+ * Workspace member as returned by `list` — includes denormalised user fields
5316
+ * for display.
5317
+ */
5318
+ interface WorkspaceMember {
5319
+ user_id: string;
5320
+ email: string | null;
5321
+ name: string | null;
5322
+ avatar_url: string | null;
5323
+ role: WorkspaceRole;
5324
+ joined_at: string | null;
5325
+ added_by: string | null;
5326
+ }
5327
+ /** Raw workspace_members row returned after add/update operations. */
5328
+ interface WorkspaceMemberRecord {
5329
+ user_id: string;
5330
+ workspace_id: string;
5331
+ role: WorkspaceRole;
5332
+ joined_at: string | null;
5333
+ added_by: string | null;
5334
+ }
5335
+ interface AddWorkspaceMemberParams {
5336
+ /** UUID of the tenant user to add. Must already be an org member. */
5337
+ user_id: string;
5338
+ /** Role to assign; defaults to `"member"`. */
5339
+ role?: WorkspaceRole;
5340
+ }
5341
+ interface UpdateWorkspaceMemberRoleParams {
5342
+ role: WorkspaceRole;
5343
+ }
5344
+ interface WorkspaceMemberListResponse {
5345
+ data: WorkspaceMember[];
5346
+ }
5347
+ interface WorkspaceMemberRecordResponse {
5348
+ data: WorkspaceMemberRecord;
5349
+ }
5350
+ interface WorkspaceMemberDeleteResponse {
5351
+ deleted: boolean;
5352
+ }
5353
+ declare class WorkspaceMembers {
5354
+ private readonly http;
5355
+ constructor(http: HttpClient);
5356
+ /**
5357
+ * List all members of a workspace.
5358
+ *
5359
+ * `GET /workspaces/:id/members`
5360
+ */
5361
+ list(workspaceId: string): Promise<WorkspaceMember[]>;
5362
+ /**
5363
+ * Add an existing tenant user to a workspace.
5364
+ *
5365
+ * The `user_id` must already hold a `tenant_members` row for the parent org.
5366
+ * Use {@link WorkspaceInvites.create} to invite someone who is not yet an org
5367
+ * member.
5368
+ *
5369
+ * `POST /workspaces/:id/members`
5370
+ *
5371
+ * @throws `MiosaError` with code `NOT_TENANT_MEMBER` if the user is not an
5372
+ * org member.
5373
+ */
5374
+ add(workspaceId: string, params: AddWorkspaceMemberParams): Promise<WorkspaceMemberRecord>;
5375
+ /**
5376
+ * Change a workspace member's role.
5377
+ *
5378
+ * `PATCH /workspaces/:id/members/:user_id`
5379
+ */
5380
+ updateRole(workspaceId: string, userId: string, params: UpdateWorkspaceMemberRoleParams): Promise<WorkspaceMemberRecord>;
5381
+ /**
5382
+ * Remove a user from a workspace.
5383
+ *
5384
+ * The last `owner` of a workspace cannot be removed. Promote another member
5385
+ * to `owner` first using {@link updateRole}.
5386
+ *
5387
+ * `DELETE /workspaces/:id/members/:user_id`
5388
+ *
5389
+ * @throws `MiosaError` with code `LAST_OWNER` if the target is the sole owner.
5390
+ */
5391
+ remove(workspaceId: string, userId: string): Promise<WorkspaceMemberDeleteResponse>;
5392
+ }
5393
+
5394
+ /**
5395
+ * Workspace Invites — email invite flow for workspace access.
5396
+ *
5397
+ * Sending an invite to an email that already belongs to a tenant member
5398
+ * short-circuits to directly adding that user (returns `type: "added"`).
5399
+ * Accepting a workspace invite for an unknown email auto-creates both a
5400
+ * `tenant_members` and a `workspace_members` row atomically.
5401
+ *
5402
+ * Public endpoints (no auth):
5403
+ * GET /workspace-invites/:token
5404
+ *
5405
+ * Authenticated endpoints:
5406
+ * POST /workspaces/:id/invites
5407
+ * GET /workspaces/:id/invites
5408
+ * DELETE /workspaces/:id/invites/:invite_id
5409
+ * POST /workspace-invites/:token/accept
5410
+ */
5411
+
5412
+ interface WorkspaceInvite {
5413
+ id: string;
5414
+ workspace_id: string;
5415
+ tenant_id: string;
5416
+ email: string;
5417
+ role: WorkspaceRole;
5418
+ invited_by: string | null;
5419
+ expires_at: string;
5420
+ accepted_at: string | null;
5421
+ inserted_at: string;
5422
+ }
5423
+ interface WorkspaceInvitePreview {
5424
+ workspace_name: string;
5425
+ tenant_name: string;
5426
+ role: WorkspaceRole;
5427
+ email: string;
5428
+ expires_at: string;
5429
+ expired: boolean;
5430
+ revoked: boolean;
5431
+ accepted: boolean;
5432
+ }
5433
+ interface CreateWorkspaceInviteParams {
5434
+ email: string;
5435
+ role?: WorkspaceRole;
5436
+ }
5437
+ /** Returned when the email was unknown — an invite was created. */
5438
+ interface WorkspaceInviteCreatedResponse {
5439
+ data: WorkspaceInvite;
5440
+ type: "invited";
5441
+ }
5442
+ /** Returned when the email already had a tenant_members row — added directly. */
5443
+ interface WorkspaceMemberAddedResponse {
5444
+ data: WorkspaceMemberRecord;
5445
+ type: "added";
5446
+ }
5447
+ type CreateWorkspaceInviteResponse = WorkspaceInviteCreatedResponse | WorkspaceMemberAddedResponse;
5448
+ interface WorkspaceInviteListResponse {
5449
+ data: WorkspaceInvite[];
5450
+ total: number;
5451
+ }
5452
+ interface WorkspaceInviteRevokeResponse {
5453
+ invite_id: string;
5454
+ revoked: boolean;
5455
+ }
5456
+ interface AcceptWorkspaceInviteResponse {
5457
+ accepted: boolean;
5458
+ workspace_id: string;
5459
+ tenant_id: string;
5460
+ role: WorkspaceRole;
5461
+ }
5462
+ declare class WorkspaceInvites {
5463
+ private readonly http;
5464
+ constructor(http: HttpClient);
5465
+ /**
5466
+ * Create a workspace invite or add a member directly.
5467
+ *
5468
+ * If `email` already maps to a tenant member the user is added directly and
5469
+ * `type === "added"` is returned with a `WorkspaceMemberRecord`. Otherwise
5470
+ * an invite row is created and `type === "invited"` is returned.
5471
+ *
5472
+ * `POST /workspaces/:id/invites`
5473
+ */
5474
+ create(workspaceId: string, params: CreateWorkspaceInviteParams): Promise<CreateWorkspaceInviteResponse>;
5475
+ /**
5476
+ * List all pending (non-expired, non-accepted, non-revoked) workspace invites.
5477
+ *
5478
+ * `GET /workspaces/:id/invites`
5479
+ */
5480
+ list(workspaceId: string): Promise<WorkspaceInvite[]>;
5481
+ /**
5482
+ * Revoke a pending workspace invite.
5483
+ *
5484
+ * Already-revoked invites are idempotent (returns `revoked: true`). An invite
5485
+ * that was legitimately accepted throws `409 ALREADY_ACCEPTED`.
5486
+ *
5487
+ * `DELETE /workspaces/:id/invites/:invite_id`
5488
+ */
5489
+ revoke(workspaceId: string, inviteId: string): Promise<WorkspaceInviteRevokeResponse>;
5490
+ /**
5491
+ * Preview a workspace invite by token (no auth required).
5492
+ *
5493
+ * Use this to render the invite landing page before prompting the user to
5494
+ * log in or sign up. Returns `null` when the token is unknown or revoked.
5495
+ *
5496
+ * `GET /workspace-invites/:token`
5497
+ */
5498
+ preview(token: string): Promise<WorkspaceInvitePreview | null>;
5499
+ /**
5500
+ * Accept a workspace invite on behalf of the authenticated user.
5501
+ *
5502
+ * The caller's JWT email must match the invite email (case-insensitive).
5503
+ *
5504
+ * Error codes:
5505
+ * - `INVALID_TOKEN` (404) — token not found.
5506
+ * - `EXPIRED` (410) — invite TTL elapsed.
5507
+ * - `REVOKED` (409) — invite was revoked.
5508
+ * - `ALREADY_ACCEPTED` (409) — already used.
5509
+ * - `EMAIL_MISMATCH` (422) — JWT email differs from invite email.
5510
+ *
5511
+ * `POST /workspace-invites/:token/accept`
5512
+ */
5513
+ accept(token: string): Promise<AcceptWorkspaceInviteResponse>;
5514
+ }
5515
+
4572
5516
  /**
4573
5517
  * The top-level MIOSA client.
4574
5518
  *
@@ -4583,6 +5527,18 @@ declare class Webhooks {
4583
5527
  * ```
4584
5528
  */
4585
5529
  declare class Miosa {
5530
+ /** Per-workspace user roster — list, add, update role, remove. */
5531
+ readonly workspaceMembers: WorkspaceMembers;
5532
+ /**
5533
+ * Workspace invite flow — create invite, list, revoke, preview, accept.
5534
+ * Sending to an email already in the org adds the user directly.
5535
+ */
5536
+ readonly workspaceInvites: WorkspaceInvites;
5537
+ /**
5538
+ * Org invite flow — create invite, list, revoke, preview, accept.
5539
+ * Requires admin/owner role for write operations.
5540
+ */
5541
+ readonly orgInvites: OrgInvites;
4586
5542
  /** Current tenant plan, limits, and live usage counters. */
4587
5543
  readonly tenant: Tenant;
4588
5544
  /** Datacenter regions, compute sizes, pricing, community templates. */
@@ -4667,6 +5623,12 @@ declare class Miosa {
4667
5623
  readonly builderSessions: BuilderSessions;
4668
5624
  /** Admin: fleet-wide snapshot index. */
4669
5625
  readonly snapshotsStandalone: SnapshotsStandalone;
5626
+ /** Encrypted secret + OAuth credential vault (`/egress/secrets`). */
5627
+ readonly secrets: EgressSecrets;
5628
+ /** Egress allowlist + policies — host-level firewall (`/egress/policies`). */
5629
+ readonly network: EgressNetwork;
5630
+ /** Egress audit log — every outbound request, paginated query + tail. */
5631
+ readonly audit: EgressAudit;
4670
5632
  private readonly http;
4671
5633
  constructor(config: MiosaClientConfig);
4672
5634
  }
@@ -4712,4 +5674,4 @@ declare class NetworkError extends MiosaError {
4712
5674
  constructor(message: string, cause: Error);
4713
5675
  }
4714
5676
 
4715
- export { type AddDomainParams, Admin, type AgentDispatchParams, type AgentEvent$1 as AgentEvent, type AgentEventType, type AgentSessionCreateParams, type AgentSessionData, type AgentSessionListResponse$1 as AgentSessionListResponse, type AgentSessionStatus$1 as AgentSessionStatus, Analytics, type AnalyticsFilters, type ApiKeyCreateParams, type ApiKeyCreateResult, type ApiKeyData, type ApiKeyId, type ApiKeyListParams, ApiKeys, type AppCatalogEntry, type AppInstallData, type AppInstallEvent, AuditLog, type AuditLogEvent, type AuditLogListParams, AuthError, type BenchmarkCompareParams, type BenchmarkCreateParams, Benchmarks, 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, ComputerAutoStop, type ComputerCreateParams, type ComputerData, ComputerEnv, type ComputerId, ComputerInbox, type ComputerListParams, type ComputerListResponse, ComputerLogs, type ComputerLogsGetParams, ComputerOsa, ComputerPorts, type ComputerSize, type ComputerStatus, type ComputerTemplateType, ComputerTerminal, type ComputerUpdateParams, type ComputerVisibility, ComputerVolumes, Computers, type CopyParams, type CreateAdminApiKeyParams, 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 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, type DoubleClickParams, type DragParams, 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, Models, type MouseButton, NetworkError, NetworkPolicy, type NetworkPolicyData, type NetworkPolicyEffect, type NetworkPolicyProtocol, type NetworkPolicyRule, type NetworkPolicySetParams, NotFoundError, type NotificationPrefsUpdateParams, 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 OverviewData, 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 RuntimeInstanceData, type RuntimeInstanceId, type RuntimeInstanceState, type RuntimeLogsResult, SANDBOX_TEMPLATE, Sandbox, SandboxArtifacts, type SandboxBuildSpec, type SandboxBuildSpecError, type SandboxBuildSpecValidation, SandboxCommands, type SandboxCreateParams, type SandboxData, SandboxEnv, SandboxEvents, type SandboxExecOptions, type SandboxExecResult, SandboxFiles, type SandboxId, type SandboxListParams, SandboxPreview, SandboxPreviews, 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 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 TemplateBuildCreateParams, type TemplateCreateParams, type TemplateData, Tenant, type TenantId, type TenantPlan, type TerminalCreateParams, TimeoutError, type TimeseriesParams, type TunnelAuthMode, type TunnelCreateParams, type TunnelData, type TunnelId, type TunnelListResponse, type TunnelUpdateParams, type TypeParams, 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 WsTicket };
5677
+ 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 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 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, 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 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, 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 };