@brazosd/node 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (6) hide show
  1. package/README.md +37 -1
  2. package/browser.d.ts +7631 -0
  3. package/browser.js +11233 -0
  4. package/index.d.ts +854 -76
  5. package/index.js +1556 -99
  6. package/package.json +11 -1
package/index.d.ts CHANGED
@@ -175,6 +175,10 @@ type Agent = {
175
175
  * Factory repository UUID that provides the agent version used by this instance.
176
176
  */
177
177
  agentRepoId: string;
178
+ /**
179
+ * Creator-controlled repository policy allowing users to run this agent with their own non-official models. Ordinary repositories default to false; Brazosd-created repositories default to true. Updates that omit this field preserve its value.
180
+ */
181
+ allowNonOfficialModels: boolean;
178
182
  /**
179
183
  * Public file UUID for the agent avatar, if present.
180
184
  */
@@ -183,6 +187,10 @@ type Agent = {
183
187
  * Public file UUID for the 500x500 agent avatar thumbnail, if present.
184
188
  */
185
189
  avatarThumbnailPublicFileId?: string | null;
190
+ /**
191
+ * Immutable context window captured from the repository when this instance was created. Runtime uses the smaller of this value and the model window. Zero uses the model window.
192
+ */
193
+ contextWindow: number;
186
194
  /**
187
195
  * Time when the agent was created.
188
196
  */
@@ -233,10 +241,18 @@ type Agent = {
233
241
  updatedAt: string;
234
242
  };
235
243
  type AgentConfig = {
244
+ /**
245
+ * Creator-controlled repository policy allowing users to run this agent with their own non-official models. Ordinary repositories default to false; Brazosd-created repositories default to true. Updates that omit this field preserve its value.
246
+ */
247
+ allowNonOfficialModels: boolean;
236
248
  /**
237
249
  * Tool names allowed by this agent.
238
250
  */
239
251
  allowTools: Array<string>;
252
+ /**
253
+ * Repository default context window in tokens, copied into new agent instances only. Existing instances never change. Zero uses the model window; omission preserves the existing repository value on updates.
254
+ */
255
+ contextWindow: number;
240
256
  /**
241
257
  * Core system instruction that defines the agent's duties.
242
258
  */
@@ -422,6 +438,10 @@ type AgentSession = {
422
438
  * Model ID resolved for the session.
423
439
  */
424
440
  llmModelId?: string | null;
441
+ /**
442
+ * Shared LLM recovery task associated with the last external failure. May reference a finished task; other session actions do not clear this historical association.
443
+ */
444
+ retryAsyncTaskId?: number | null;
425
445
  /**
426
446
  * 由其他会话启动的智能体分身会话所对应的父会话 UUID。
427
447
  */
@@ -431,6 +451,10 @@ type AgentSession = {
431
451
  */
432
452
  snapshotUUID?: string | null;
433
453
  status?: AgentSessionStatus;
454
+ /**
455
+ * Structured reason for the current stop. Cleared when a new run starts. A retained retry task ID alone does not imply automatic recovery is pending.
456
+ */
457
+ stopReason?: "user_interrupted" | "llm_unavailable" | "llm_request_failed" | "action_required" | "runtime_failed" | null;
434
458
  /**
435
459
  * Optional title summarizing the session topic.
436
460
  */
@@ -562,10 +586,40 @@ type AgentSessionTodoItem = {
562
586
  ordinal: number;
563
587
  status: AgentSessionTodoStatus;
564
588
  };
589
+ type AgentSessionTreeActionResult = {
590
+ /**
591
+ * Sessions changed by this request, in execution order. Empty when no sessions needed the action.
592
+ */
593
+ affectedSessionIds: Array<string>;
594
+ rootSession: AgentSession;
595
+ };
596
+ type MCPReference = {
597
+ device_id?: string;
598
+ mcp_id: string;
599
+ };
600
+ type AgentToolSettings = {
601
+ /**
602
+ * Exact MCP installations. A device MCP must match both mcp_id and device_id. No device_id means a remote MCP.
603
+ */
604
+ allowedMcps: Array<MCPReference>;
605
+ /**
606
+ * Exact runtime tool names, including built-in media tools and fully qualified MCP tool names. Both whitelists apply to MCP tool calls. No wildcards.
607
+ */
608
+ allowedTools: Array<string>;
609
+ mcpWhitelistEnabled: boolean;
610
+ toolWhitelistEnabled: boolean;
611
+ };
612
+ type AgentToolSettingsResponse = {
613
+ /**
614
+ * Built-in tool names for the settings editor. Fully qualified MCP names can also be entered.
615
+ */
616
+ availableTools: Array<string>;
617
+ settings: AgentToolSettings;
618
+ };
565
619
  type AgentTrdpMarkupStatus = {
566
620
  agentId: string;
567
621
  /**
568
- * Whether the current user is an owner of the consumer organization and may confirm.
622
+ * Whether the current user may confirm under enterprise RN authorization or the ordinary-organization owner fallback.
569
623
  */
570
624
  canConfirm: boolean;
571
625
  confirmationRequired: boolean;
@@ -1066,6 +1120,27 @@ type ChannelMessageSearchResponse = {
1066
1120
  */
1067
1121
  nextCursor?: string | null;
1068
1122
  };
1123
+ type ClientMCPBoundTool = {
1124
+ description: string;
1125
+ inputSchema: Record<string, any>;
1126
+ name: string;
1127
+ originalName: string;
1128
+ };
1129
+ type ClientMCPInstallation = {
1130
+ mcpId: string;
1131
+ namespace: string;
1132
+ prefix: string;
1133
+ revision: string;
1134
+ tools: Array<ClientMCPBoundTool>;
1135
+ };
1136
+ /**
1137
+ * MCP CallToolResult. The first accepted result wins. Accepted means stored, not necessarily consumed by the model before timeout. Maximum encoded size is 1 MiB.
1138
+ */
1139
+ export type ClientMCPToolResult = {
1140
+ content: Array<Record<string, any>>;
1141
+ isError?: boolean;
1142
+ structuredContent?: Record<string, any>;
1143
+ };
1069
1144
  type CloudDriveFnode = {
1070
1145
  /**
1071
1146
  * MIME type of the file, when known. Null for directories.
@@ -1088,7 +1163,7 @@ type CloudDriveFnode = {
1088
1163
  */
1089
1164
  name: string;
1090
1165
  /**
1091
- * Canonical cloud-drive path of the node.
1166
+ * Canonical cloud-drive path of the node. Unicode text; percent sequences and plus signs are literal filename characters, not URL encoding.
1092
1167
  */
1093
1168
  path: string;
1094
1169
  /**
@@ -1378,7 +1453,7 @@ type CopyBrowserFileRequest = {
1378
1453
  };
1379
1454
  type CopyCloudDriveFnodeRequest = {
1380
1455
  /**
1381
- * Canonical destination path to copy to.
1456
+ * Canonical destination path to copy to. Unicode text; percent sequences and plus signs are literal filename characters, not URL encoding.
1382
1457
  */
1383
1458
  destinationPath: string;
1384
1459
  /**
@@ -1386,7 +1461,7 @@ type CopyCloudDriveFnodeRequest = {
1386
1461
  */
1387
1462
  overwrite?: boolean;
1388
1463
  /**
1389
- * Canonical source path to copy from.
1464
+ * Canonical source path to copy from. Unicode text; percent sequences and plus signs are literal filename characters, not URL encoding.
1390
1465
  */
1391
1466
  sourcePath: string;
1392
1467
  };
@@ -1397,6 +1472,14 @@ type CreateAccountOrgRequest = {
1397
1472
  name: string;
1398
1473
  };
1399
1474
  type CreateAgentRequest = {
1475
+ /**
1476
+ * Creator-controlled repository policy allowing users to run this agent with their own non-official models. Ordinary repositories default to false; Brazosd-created repositories default to true. Updates that omit this field preserve its value.
1477
+ */
1478
+ allowNonOfficialModels?: boolean;
1479
+ /**
1480
+ * Repository default context window in tokens, copied into new agent instances only. Existing instances never change. Zero uses the model window; omission preserves the existing repository value on updates.
1481
+ */
1482
+ contextWindow?: number;
1400
1483
  /**
1401
1484
  * Short description of the agent's purpose.
1402
1485
  */
@@ -1515,7 +1598,7 @@ type CreateChannelRequest = {
1515
1598
  };
1516
1599
  type CreateCloudDriveDirectoryRequest = {
1517
1600
  /**
1518
- * Canonical destination path of the directory to create.
1601
+ * Canonical destination path of the directory to create. Unicode text; percent sequences and plus signs are literal filename characters, not URL encoding.
1519
1602
  */
1520
1603
  path: string;
1521
1604
  };
@@ -1696,6 +1779,32 @@ type Credential$1 = {
1696
1779
  */
1697
1780
  key: string;
1698
1781
  };
1782
+ type EnterprisePermissionCondition = Record<string, Record<string, Array<string>>>;
1783
+ type EnterprisePermissionRule = {
1784
+ /**
1785
+ * Namespaced actions such as agents:read or cloud-drive:write. A star may replace either action segment; a standalone star matches all actions.
1786
+ */
1787
+ actions: Array<string>;
1788
+ condition?: EnterprisePermissionCondition;
1789
+ effect: "allow" | "deny";
1790
+ /**
1791
+ * Resource RNs without actions. A star matches exactly one segment; a final double-star includes the current resource and descendants. rn:* covers all namespaces subject to organization isolation. orgs:* is allowed in policies. A final directory slash-star includes the directory and descendants.
1792
+ */
1793
+ resources: Array<string>;
1794
+ };
1795
+ type CurrentOrgPermissions = {
1796
+ /**
1797
+ * Whether stored enterprise permissions apply, including after subscription expiry.
1798
+ */
1799
+ enterpriseEnabled: boolean;
1800
+ orgId: number;
1801
+ /**
1802
+ * Legacy owner fallback for ordinary organizations only; false when enterprise permissions apply.
1803
+ */
1804
+ owner: boolean;
1805
+ rules: Array<EnterprisePermissionRule>;
1806
+ userId: number;
1807
+ };
1699
1808
  type DebugAgentSessionResponse = {
1700
1809
  /**
1701
1810
  * Created or targeted agent session UUID.
@@ -1725,8 +1834,11 @@ type DebugSandboxNetworkTrafficSettlement = {
1725
1834
  type DebugSandboxState = {
1726
1835
  agentSessionId?: string | null;
1727
1836
  deepSleepAt?: string | null;
1728
- deepSleepCheckpointId?: string | null;
1729
1837
  deepSleepSeconds: number;
1838
+ /**
1839
+ * Internal managed snapshot used for deep-sleep recovery.
1840
+ */
1841
+ deepSleepSnapshotId?: string | null;
1730
1842
  deepSleepTaskId?: number | null;
1731
1843
  destroyedAt?: string | null;
1732
1844
  disableSleep: boolean;
@@ -1766,7 +1878,7 @@ type DebugTestAccountResponse = {
1766
1878
  };
1767
1879
  type DeleteCloudDriveFnodeRequest = {
1768
1880
  /**
1769
- * Canonical path of the file or directory to delete.
1881
+ * Canonical path of the file or directory to delete. Unicode text; percent sequences and plus signs are literal filename characters, not URL encoding.
1770
1882
  */
1771
1883
  path: string;
1772
1884
  /**
@@ -1793,6 +1905,9 @@ type Device = {
1793
1905
  lastPongAt?: string | null;
1794
1906
  online: boolean;
1795
1907
  orgId: number;
1908
+ /**
1909
+ * Whether the device is visible to its organization (true) or only its owner (false). Enterprise device permissions also apply.
1910
+ */
1796
1911
  orgScope: boolean;
1797
1912
  platform: DevicePlatform;
1798
1913
  tokenVersion: number;
@@ -1841,13 +1956,6 @@ type DeviceSessionToolCallRequest = {
1841
1956
  */
1842
1957
  timeoutMs: number;
1843
1958
  };
1844
- type EnterprisePermissionRule = {
1845
- allowed: boolean;
1846
- /**
1847
- * Current-organization RN, system-model RN under rn:llm-models, or rn:* for a global grant or deny. Existing organization and resource access checks always apply. A middle star matches one segment; a terminal star covers the subtree. A final directory slash-star includes the directory and all descendants. No regex.
1848
- */
1849
- rn: string;
1850
- };
1851
1959
  type EnterprisePermissionPolicy = {
1852
1960
  description: string;
1853
1961
  id: string;
@@ -1910,6 +2018,14 @@ type GiftTopupRequest = {
1910
2018
  amountMicroyuans: number;
1911
2019
  note?: string;
1912
2020
  };
2021
+ type ClientMCPToolDefinition = {
2022
+ description: string;
2023
+ inputSchema: Record<string, any>;
2024
+ name: string;
2025
+ };
2026
+ type InstallClientMCP = {
2027
+ tools: Array<ClientMCPToolDefinition>;
2028
+ };
1913
2029
  type InvitationCode = {
1914
2030
  /**
1915
2031
  * Invitation code value.
@@ -2090,6 +2206,7 @@ type MCPSettings = {
2090
2206
  };
2091
2207
  type MCPManageRequest = {
2092
2208
  action: "list" | "get" | "add" | "update" | "delete" | "start" | "stop" | "restart" | "capabilities" | "load" | "unload" | "reload" | "set";
2209
+ agent_id?: string;
2093
2210
  /**
2094
2211
  * Organization-local numeric device key or full UUID.
2095
2212
  */
@@ -2097,20 +2214,75 @@ type MCPManageRequest = {
2097
2214
  expected_revision?: number;
2098
2215
  key?: string;
2099
2216
  mcp_id?: string;
2217
+ mcps?: Array<MCPReference>;
2100
2218
  namespace?: string;
2101
- scope: "remote" | "device" | "session" | "secret";
2219
+ /**
2220
+ * Remote configuration visibility. True shares with the organization; false is private to the current user in this organization. Omitted on creation preserves the legacy shared default.
2221
+ */
2222
+ org_scope?: boolean;
2223
+ scope: "available" | "remote" | "device" | "session" | "secret" | "agent";
2102
2224
  session_id?: string;
2103
2225
  settings?: MCPSettings;
2104
2226
  value?: string;
2105
2227
  };
2106
- type MCPManageResult = Record<string, any>;
2228
+ type MCPDeviceDiscoveryError = {
2229
+ device_id: string;
2230
+ device_key: number;
2231
+ device_name: string;
2232
+ error: string;
2233
+ };
2234
+ type MCPDiscoveryItem = {
2235
+ device_id?: string;
2236
+ device_key?: number;
2237
+ device_name?: string;
2238
+ mcp_id: string;
2239
+ namespace: string;
2240
+ org_scope?: boolean;
2241
+ source: "remote" | "device";
2242
+ };
2243
+ type MCPStartupStatus = {
2244
+ device_id?: string;
2245
+ error: string;
2246
+ mcp_id: string;
2247
+ state: "pending" | "loading" | "loaded" | "failed" | "unloaded";
2248
+ };
2249
+ type MCPManageResult = {
2250
+ available?: Array<MCPDiscoveryItem>;
2251
+ capabilities?: Record<string, any>;
2252
+ code?: string;
2253
+ config_revision?: number;
2254
+ deleted?: boolean;
2255
+ device_errors?: Array<MCPDeviceDiscoveryError>;
2256
+ device_id?: string | null;
2257
+ device_key?: number;
2258
+ error?: string;
2259
+ item?: Record<string, any>;
2260
+ items?: Array<Record<string, any>>;
2261
+ mcp_id?: string;
2262
+ mcps?: Array<MCPReference>;
2263
+ namespace?: string;
2264
+ org_scope?: boolean;
2265
+ prefix?: string;
2266
+ revision?: string;
2267
+ secrets?: Array<{
2268
+ key: string;
2269
+ updated_at: string;
2270
+ }>;
2271
+ settings?: Record<string, any>;
2272
+ source?: string;
2273
+ startup?: Array<MCPStartupStatus>;
2274
+ tools?: Array<Record<string, any>>;
2275
+ unloaded?: boolean;
2276
+ updated_at?: string;
2277
+ user_id?: number | null;
2278
+ };
2107
2279
  type MoveCloudDriveFnodeRequest = {
2108
2280
  /**
2109
- * Canonical destination path to move to.
2281
+ * Canonical destination path to move to. Unicode text; percent sequences and plus signs are literal filename characters, not URL encoding.
2110
2282
  */
2111
2283
  destinationPath: string;
2112
2284
  /**
2113
- * Canonical source path to move from.
2285
+ * Canonical source path to move from. Unicode text; percent sequences and plus signs are literal filename characters, not URL encoding.
2114
2286
  */
2115
2287
  sourcePath: string;
2116
2288
  };
@@ -2197,7 +2369,7 @@ type OrgFeatureSettings = {
2197
2369
  */
2198
2370
  allowAgentPublishing: boolean;
2199
2371
  /**
2200
- * Allow members to register devices. Owners are exempt. Existing devices remain usable and connected.
2372
+ * Allow members to register devices. Applies to ordinary organizations; their owners are exempt. Enterprise organizations use RN permissions. Existing devices remain usable and connected.
2201
2373
  */
2202
2374
  allowDeviceRegistration: boolean;
2203
2375
  /**
@@ -2205,7 +2377,7 @@ type OrgFeatureSettings = {
2205
2377
  */
2206
2378
  allowSessionSharing: boolean;
2207
2379
  /**
2208
- * Allow members to recruit third-party agents. Owners are exempt. Existing agents remain usable.
2380
+ * Allow members to recruit third-party agents. Applies to ordinary organizations; their owners are exempt. Enterprise organizations use RN permissions. Existing agents remain usable.
2209
2381
  */
2210
2382
  allowThirdPartyAgentRecruitment: boolean;
2211
2383
  };
@@ -2441,6 +2613,17 @@ type PublicOrganization = {
2441
2613
  */
2442
2614
  orgId: number;
2443
2615
  };
2616
+ type PublicSnapshot = {
2617
+ architecture: string;
2618
+ baseImage: string;
2619
+ description: string;
2620
+ id: string;
2621
+ name: string;
2622
+ orgId: number;
2623
+ publishedAt: string;
2624
+ storageGib?: number;
2625
+ userId: number;
2626
+ };
2444
2627
  type PublishAgentRequest = {
2445
2628
  /**
2446
2629
  * Third-party token charge multiplier from 1x through 50x in 0.01x increments.
@@ -2676,7 +2859,7 @@ type RenameCloudDriveFnodeRequest = {
2676
2859
  */
2677
2860
  name: string;
2678
2861
  /**
2679
- * Canonical path of the existing file or directory.
2862
+ * Canonical path of the existing file or directory. Unicode text; percent sequences and plus signs are literal filename characters, not URL encoding.
2680
2863
  */
2681
2864
  path: string;
2682
2865
  };
@@ -2697,7 +2880,7 @@ type ReplaceDevicePortForwardsRequest = {
2697
2880
  };
2698
2881
  type RestoreCloudDriveFnodeRequest = {
2699
2882
  /**
2700
- * Canonical trash path of the item to restore.
2883
+ * Canonical trash path of the item to restore. Unicode text; percent sequences and plus signs are literal filename characters, not URL encoding.
2701
2884
  */
2702
2885
  path: string;
2703
2886
  };
@@ -2738,6 +2921,94 @@ type SandboxCommandResult = {
2738
2921
  */
2739
2922
  stdout: string;
2740
2923
  };
2924
+ type ScheduledHttpRequest = {
2925
+ /**
2926
+ * UTF-8 body template, at most 65536 bytes both before and after secret substitution. JSON bodies are substituted structurally and re-encoded.
2927
+ */
2928
+ body: string;
2929
+ headers: Record<string, string>;
2930
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS";
2931
+ query: Record<string, string>;
2932
+ /**
2933
+ * HTTP(S) URL. Credentials may be referenced in the path/query, headers or body, never in the host.
2934
+ */
2935
+ url: string;
2936
+ };
2937
+ type ScheduledTask = {
2938
+ actionType: "http" | "agent_message";
2939
+ agentId?: string;
2940
+ /**
2941
+ * Message to the agent, separate from the task description
2942
+ */
2943
+ content?: string;
2944
+ createdAt: string;
2945
+ /**
2946
+ * Execution user, preserved when other organization members edit the task
2947
+ */
2948
+ creatorUserId: number;
2949
+ /**
2950
+ * Six-field cron with a single seconds value; minimum interval one minute. Supports CRON_TZ.
2951
+ */
2952
+ cronExpression?: string;
2953
+ description: string;
2954
+ httpRequest?: ScheduledHttpRequest;
2955
+ id: string;
2956
+ name: string;
2957
+ nextRunAt?: string;
2958
+ orgId: number;
2959
+ ownerUserId?: number;
2960
+ runAt?: string;
2961
+ scheduleType: "cron" | "once";
2962
+ scope: "org" | "user";
2963
+ /**
2964
+ * Optional existing session owned by the execution user, in this organization and for agentId. Omit to create a new session each time. Active sessions queue the message; finished or interrupted sessions resume. Archived sessions fail without creating a replacement.
2965
+ */
2966
+ sessionId?: string;
2967
+ status: string;
2968
+ /**
2969
+ * IANA timezone for cron schedules. Defaults to UTC.
2970
+ */
2971
+ timezone?: string;
2972
+ updatedAt: string;
2973
+ };
2974
+ type ScheduledTaskInput = {
2975
+ actionType: "http" | "agent_message";
2976
+ agentId?: string;
2977
+ /**
2978
+ * Message to the agent, separate from the task description
2979
+ */
2980
+ content?: string;
2981
+ /**
2982
+ * Six-field cron with a single seconds value; minimum interval one minute. Supports CRON_TZ.
2983
+ */
2984
+ cronExpression?: string;
2985
+ description: string;
2986
+ httpRequest?: ScheduledHttpRequest;
2987
+ name: string;
2988
+ runAt?: string;
2989
+ scheduleType: "cron" | "once";
2990
+ scope: "org" | "user";
2991
+ /**
2992
+ * Optional existing session owned by the execution user, in this organization and for agentId. Omit to create a new session each time. Active sessions queue the message; finished or interrupted sessions resume. Archived sessions fail without creating a replacement.
2993
+ */
2994
+ sessionId?: string;
2995
+ /**
2996
+ * IANA timezone for cron schedules. Defaults to UTC.
2997
+ */
2998
+ timezone?: string;
2999
+ };
3000
+ type ScheduledTaskRun = {
3001
+ error: string;
3002
+ finishedAt?: string;
3003
+ httpStatus?: number;
3004
+ id: string;
3005
+ responseSummary: string;
3006
+ scheduledAt: string;
3007
+ scheduledTaskId: string;
3008
+ sessionId?: string;
3009
+ startedAt: string;
3010
+ status: "running" | "succeeded" | "failed" | "unknown";
3011
+ };
2741
3012
  type PhoneCodeType = "register" | "reset_password";
2742
3013
  type SendPhoneCodeRequest = {
2743
3014
  /**
@@ -2759,6 +3030,12 @@ type SetDeviceDNSAliasRequest = {
2759
3030
  */
2760
3031
  alias: string;
2761
3032
  };
3033
+ type SetDeviceScopeRequest = {
3034
+ /**
3035
+ * True for organization visibility; false for private visibility. The device owner remains unchanged.
3036
+ */
3037
+ orgScope: boolean;
3038
+ };
2762
3039
  type SetPublisherNamespaceRequest = {
2763
3040
  namespace: string;
2764
3041
  };
@@ -2779,6 +3056,12 @@ type SettleDebugSandboxNetworkTrafficRequest = {
2779
3056
  */
2780
3057
  usageDate: string;
2781
3058
  };
3059
+ type SetUserDailyBudgetRequest = {
3060
+ /**
3061
+ * Daily limit in microyuans (1000000 = CNY 1); null or omitted means unlimited.
3062
+ */
3063
+ limitMicroyuans?: number | null;
3064
+ };
2782
3065
  type SharedAgentSessionAgent = {
2783
3066
  /**
2784
3067
  * Agent repository UUID attributed by the share page.
@@ -2924,6 +3207,10 @@ type Snapshot = {
2924
3207
  name: string;
2925
3208
  orgId: number;
2926
3209
  provider: SnapshotProvider;
3210
+ /**
3211
+ * ID of this snapshot’s active public publication.
3212
+ */
3213
+ publicationId?: string;
2927
3214
  sourceSandboxId?: string;
2928
3215
  state: "creating" | "ready" | "failed" | "deleting";
2929
3216
  /**
@@ -2937,6 +3224,10 @@ type Snapshot = {
2937
3224
  */
2938
3225
  userId: number;
2939
3226
  };
3227
+ type SnapshotPublication = {
3228
+ id: string;
3229
+ snapshotId: string;
3230
+ };
2940
3231
  type SSOAppConfiguration = {
2941
3232
  redirectUris: Array<string>;
2942
3233
  };
@@ -3179,6 +3470,14 @@ type UpdateAgentRepoTrdpMarkupRequest = {
3179
3470
  targetMarkupPpm: number;
3180
3471
  };
3181
3472
  type UpdateAgentRequest = {
3473
+ /**
3474
+ * Creator-controlled repository policy allowing users to run this agent with their own non-official models. Ordinary repositories default to false; Brazosd-created repositories default to true. Updates that omit this field preserve its value.
3475
+ */
3476
+ allowNonOfficialModels?: boolean;
3477
+ /**
3478
+ * Repository default context window in tokens, copied into new agent instances only. Existing instances never change. Zero uses the model window; omission preserves the existing repository value on updates.
3479
+ */
3480
+ contextWindow?: number;
3182
3481
  /**
3183
3482
  * Short description of the agent's purpose.
3184
3483
  */
@@ -3206,6 +3505,12 @@ type UpdateAgentSessionLlmModel = {
3206
3505
  */
3207
3506
  llmModelId: string;
3208
3507
  };
3508
+ type UpdateAgentSessionTitle = {
3509
+ /**
3510
+ * New session title. Leading and trailing whitespace is removed; the result must not be blank.
3511
+ */
3512
+ topicTitle: string;
3513
+ };
3209
3514
  type UpdateChannelDescriptionRequest = {
3210
3515
  /**
3211
3516
  * New channel description.
@@ -3230,7 +3535,7 @@ type UpdateChannelReadRequest = {
3230
3535
  };
3231
3536
  type UpdateCloudDriveSettingsRequest = {
3232
3537
  /**
3233
- * Canonical root path of the user or channel drive whose settings should change.
3538
+ * Canonical root path of the user or channel drive whose settings should change. Unicode text; percent sequences and plus signs are literal filename characters, not URL encoding.
3234
3539
  */
3235
3540
  path: string;
3236
3541
  /**
@@ -3380,9 +3685,27 @@ type UpsertOrgInvitationTokenRequest = {
3380
3685
  type UpsertTradeMerchantCallbackURLRequest = {
3381
3686
  url: string;
3382
3687
  };
3688
+ type UserDailyBudget = {
3689
+ /**
3690
+ * Aggregated usage is at or above the limit.
3691
+ */
3692
+ exceeded: boolean;
3693
+ limitMicroyuans?: number | null;
3694
+ resetsAt: string;
3695
+ spentMicroyuans: number;
3696
+ /**
3697
+ * UTC billing date (YYYY-MM-DD).
3698
+ */
3699
+ usageDate: string;
3700
+ userId: number;
3701
+ };
3383
3702
  type WorkloadCredentials = {
3384
3703
  accessToken: string;
3385
3704
  expiresAt: string;
3705
+ /**
3706
+ * Instance-bound VPC credential for the trusted network sidecar. Never exposed in the application credential file.
3707
+ */
3708
+ networkToken?: string;
3386
3709
  refreshToken: string;
3387
3710
  };
3388
3711
  type XipayNotifySuccessResponse = {
@@ -3683,7 +4006,7 @@ declare class DefaultService {
3683
4006
  }): CancelablePromise<AgentRepoTrdpMarkupState>;
3684
4007
  /**
3685
4008
  * Update agent repository third-party markup
3686
- * Organization owners may change the multiplier. Decreases apply immediately. Increases have five days of notice, one day for settlement fanout, and apply on day six.
4009
+ * Enterprise members with repository edit permission, or ordinary-organization owners, may change the multiplier. Decreases apply immediately. Increases have five days of notice, one day for settlement fanout, and apply on day six.
3687
4010
  * @returns AgentRepoTrdpMarkupState Third-party markup updated or scheduled
3688
4011
  * @throws ApiError
3689
4012
  */
@@ -3693,7 +4016,7 @@ declare class DefaultService {
3693
4016
  }): CancelablePromise<AgentRepoTrdpMarkupState>;
3694
4017
  /**
3695
4018
  * Cancel a pending third-party markup increase
3696
- * Organization owners may cancel during the five-day notice window. Settlement and later states are locked.
4019
+ * Enterprise members with repository edit permission, or ordinary-organization owners, may cancel during the five-day notice window. Settlement and later states are locked.
3697
4020
  * @returns AgentRepoTrdpMarkupState Increase cancelled
3698
4021
  * @throws ApiError
3699
4022
  */
@@ -3703,7 +4026,7 @@ declare class DefaultService {
3703
4026
  }): CancelablePromise<AgentRepoTrdpMarkupState>;
3704
4027
  /**
3705
4028
  * List published agent users' daily token costs
3706
- * Only owners of the publishing organization can query a currently published repository. Includes all deployments and versions, grouped by UTC settlement date and organization-scoped anonymous user UUID. Amounts are actual LLM charges for input, output and cached tokens, including session-title calls; excludes marketplace markup, tools and sandboxes. Agent clone calls belong to the clone's repository. Data is eventually consistent via RisingWave. No consumer organization IDs, numeric user IDs or profile information are returned.
4029
+ * Members with the repository token-costs:read permission (or ordinary-organization owners) can query a currently published repository. Includes all deployments and versions, grouped by UTC settlement date and organization-scoped anonymous user UUID. Amounts are actual LLM charges for input, output and cached tokens, including session-title calls; excludes marketplace markup, tools and sandboxes. Agent clone calls belong to the clone's repository. Data is eventually consistent via RisingWave. No consumer organization IDs, numeric user IDs or profile information are returned.
3707
4030
  * @returns PublishedAgentUserDailyTokenCostPage Daily token costs listed; users without recorded usage have no row.
3708
4031
  * @throws ApiError
3709
4032
  */
@@ -3790,6 +4113,47 @@ declare class DefaultService {
3790
4113
  cursor?: string;
3791
4114
  limit?: number;
3792
4115
  }): CancelablePromise<AgentSessionHistoryPage>;
4116
+ /**
4117
+ * Submit a client-side MCP tool result
4118
+ * First accepted write wins. HTTP 204 confirms storage only; near timeout the model may still receive a timeout. Duplicate submissions and calls not accepting results return 409.
4119
+ * @returns void
4120
+ * @throws ApiError
4121
+ */
4122
+ submitAgentSessionClientMcpResult({ sessionId, runId, toolCallId, requestBody, }: {
4123
+ sessionId: string;
4124
+ runId: string;
4125
+ toolCallId: string;
4126
+ requestBody: ClientMCPToolResult;
4127
+ }): CancelablePromise<void>;
4128
+ /**
4129
+ * List client-side MCP installations in a session
4130
+ * @returns ClientMCPInstallation Session client-side MCPs
4131
+ * @throws ApiError
4132
+ */
4133
+ listAgentSessionClientMcPs({ sessionId, }: {
4134
+ sessionId: string;
4135
+ }): CancelablePromise<Array<ClientMCPInstallation>>;
4136
+ /**
4137
+ * Uninstall a session client-side MCP
4138
+ * Idempotent. Uninstall affects future tool dispatch; already waiting calls may still submit their results.
4139
+ * @returns void
4140
+ * @throws ApiError
4141
+ */
4142
+ uninstallAgentSessionClientMcp({ sessionId, namespace, }: {
4143
+ sessionId: string;
4144
+ namespace: string;
4145
+ }): CancelablePromise<void>;
4146
+ /**
4147
+ * Install or replace a session client-side MCP
4148
+ * Idempotent by session and namespace. Identical definitions retain their revision. Maximum 32 client MCPs per session and 1 MiB per installation.
4149
+ * @returns ClientMCPInstallation Installed snapshot
4150
+ * @throws ApiError
4151
+ */
4152
+ installAgentSessionClientMcp({ sessionId, namespace, requestBody, }: {
4153
+ sessionId: string;
4154
+ namespace: string;
4155
+ requestBody: InstallClientMCP;
4156
+ }): CancelablePromise<ClientMCPInstallation>;
3793
4157
  /**
3794
4158
  * Compact agent session
3795
4159
  * Trigger an asynchronous context compaction run for a managed agent session
@@ -3864,6 +4228,18 @@ declare class DefaultService {
3864
4228
  */
3865
4229
  sessionId: string;
3866
4230
  }): CancelablePromise<AgentSession>;
4231
+ /**
4232
+ * Interrupt an agent session and its descendants
4233
+ * Interrupt unarchived working or retrying sessions in the subtree rooted at sessionId, root first and then each level from top to bottom. Children are discovered after their parents are interrupted. Traverse through inactive and archived ancestors. Execution stops on the first error; earlier successful interruptions remain applied and a retry skips them.
4234
+ * @returns AgentSessionTreeActionResult All active sessions interrupted
4235
+ * @throws ApiError
4236
+ */
4237
+ interruptAgentSessionTree({ sessionId, }: {
4238
+ /**
4239
+ * UUID of the root of the session subtree.
4240
+ */
4241
+ sessionId: string;
4242
+ }): CancelablePromise<AgentSessionTreeActionResult>;
3867
4243
  /**
3868
4244
  * Update agent session LLM model
3869
4245
  * Change the model used by subsequent LLM requests in an agent session
@@ -3877,6 +4253,27 @@ declare class DefaultService {
3877
4253
  sessionId: string;
3878
4254
  requestBody: UpdateAgentSessionLlmModel;
3879
4255
  }): CancelablePromise<AgentSession>;
4256
+ /**
4257
+ * Resume an interrupted agent session
4258
+ * Continue unfinished work without adding a user prompt. Starts a new run linked to the stopped run. Already running or otherwise ineligible sessions return 409.
4259
+ * @returns AgentSession Recovery accepted
4260
+ * @throws ApiError
4261
+ */
4262
+ resumeAgentSession({ sessionId, }: {
4263
+ sessionId: string;
4264
+ }): CancelablePromise<AgentSession>;
4265
+ /**
4266
+ * Resume an agent session and its descendants
4267
+ * Resume unarchived interrupted sessions in the subtree rooted at sessionId, deepest level first and root last. Traverse through inactive and archived ancestors. Other session states are skipped. Each resume uses the existing recovery, model, permission and quota checks. Execution stops on the first error; earlier successful resumes remain applied and a retry skips them.
4268
+ * @returns AgentSessionTreeActionResult All eligible sessions resumed
4269
+ * @throws ApiError
4270
+ */
4271
+ resumeAgentSessionTree({ sessionId, }: {
4272
+ /**
4273
+ * UUID of the root of the session subtree.
4274
+ */
4275
+ sessionId: string;
4276
+ }): CancelablePromise<AgentSessionTreeActionResult>;
3880
4277
  /**
3881
4278
  * Revoke the active agent session share
3882
4279
  * Invalidate the current share link immediately.
@@ -3916,6 +4313,16 @@ declare class DefaultService {
3916
4313
  rotateAgentSessionShare({ sessionId, }: {
3917
4314
  sessionId: string;
3918
4315
  }): CancelablePromise<SharedAgentSessionToken>;
4316
+ /**
4317
+ * Rename agent session
4318
+ * Change the title of a session owned by the current user in the current organization, including archived sessions. A manually set title is preserved when automatic title generation finishes.
4319
+ * @returns AgentSession Agent session renamed
4320
+ * @throws ApiError
4321
+ */
4322
+ updateAgentSessionTitle({ sessionId, requestBody, }: {
4323
+ sessionId: string;
4324
+ requestBody: UpdateAgentSessionTitle;
4325
+ }): CancelablePromise<AgentSession>;
3919
4326
  /**
3920
4327
  * Get agent session todo list
3921
4328
  * Get the persisted todo list for a managed agent session ordered by ordinal ascending
@@ -4236,6 +4643,23 @@ declare class DefaultService {
4236
4643
  */
4237
4644
  invokedByUserScheduledTask?: boolean;
4238
4645
  }): CancelablePromise<Array<AgentSession>>;
4646
+ /**
4647
+ * Read agent MCP and tool whitelists
4648
+ * @returns AgentToolSettingsResponse Agent tool settings
4649
+ * @throws ApiError
4650
+ */
4651
+ getAgentToolSettings({ agentId, }: {
4652
+ agentId: string;
4653
+ }): CancelablePromise<AgentToolSettingsResponse>;
4654
+ /**
4655
+ * Update agent MCP and tool whitelists
4656
+ * @returns AgentToolSettingsResponse Agent tool settings
4657
+ * @throws ApiError
4658
+ */
4659
+ updateAgentToolSettings({ agentId, requestBody, }: {
4660
+ agentId: string;
4661
+ requestBody: AgentToolSettings;
4662
+ }): CancelablePromise<AgentToolSettingsResponse>;
4239
4663
  /**
4240
4664
  * Get recruited agent price confirmation status
4241
4665
  * All members of the consumer organization can read this status for the session price-change banner.
@@ -4247,7 +4671,7 @@ declare class DefaultService {
4247
4671
  }): CancelablePromise<AgentTrdpMarkupStatus>;
4248
4672
  /**
4249
4673
  * Confirm a recruited agent price
4250
- * Only an owner of the consumer organization can raise the accepted maximum price and clear a price-caused system pause.
4674
+ * Enterprise members with agent edit permission, or ordinary-organization owners, can raise the accepted maximum price and clear a price-caused system pause.
4251
4675
  * @returns AgentTrdpMarkupStatus Price confirmed
4252
4676
  * @throws ApiError
4253
4677
  */
@@ -4821,7 +5245,7 @@ declare class DefaultService {
4821
5245
  */
4822
5246
  getCloudDrive({ path, }: {
4823
5247
  /**
4824
- * Canonical path to inspect. Directories return JSON children; files redirect to a temporary download URL.
5248
+ * Canonical path to inspect. Directories return JSON children; files redirect to a temporary download URL. Use Unicode filename text verbatim, including percent and plus signs. Encode only the outer HTTP query parameter.
4825
5249
  */
4826
5250
  path: string;
4827
5251
  }): CancelablePromise<(Array<CloudDriveFnode> | Response)>;
@@ -4851,7 +5275,7 @@ declare class DefaultService {
4851
5275
  */
4852
5276
  downloadCloudDrive({ path, }: {
4853
5277
  /**
4854
- * Canonical file path to download.
5278
+ * Canonical file path to download. Use Unicode filename text verbatim, including percent and plus signs. Encode only the outer HTTP query parameter.
4855
5279
  */
4856
5280
  path: string;
4857
5281
  }): CancelablePromise<Response>;
@@ -4890,7 +5314,7 @@ declare class DefaultService {
4890
5314
  */
4891
5315
  getCloudDriveSettings({ path, }: {
4892
5316
  /**
4893
- * Canonical root path of the user or channel drive whose settings should be returned.
5317
+ * Canonical root path of the user or channel drive whose settings should be returned. Use Unicode filename text verbatim, including percent and plus signs. Encode only the outer HTTP query parameter.
4894
5318
  */
4895
5319
  path: string;
4896
5320
  }): CancelablePromise<CloudDriveSettings>;
@@ -4911,19 +5335,19 @@ declare class DefaultService {
4911
5335
  */
4912
5336
  statCloudDrive({ path, }: {
4913
5337
  /**
4914
- * Canonical file or directory path, including session.drive paths.
5338
+ * Canonical file or directory path, including session.drive paths. Use Unicode filename text verbatim, including percent and plus signs. Encode only the outer HTTP query parameter.
4915
5339
  */
4916
5340
  path: string;
4917
5341
  }): CancelablePromise<CloudDriveFnode>;
4918
5342
  /**
4919
5343
  * Upload cloud drive file
4920
- * Upload a file into a canonical cloud drive destination path. Query parameters are signed; the multipart body is sent with unsigned payload mode and the file content integrity is checked with the signed sha256 query parameter.
5344
+ * Stream a file of at most 5 GiB (5368709120 bytes) into a canonical cloud drive destination path without buffering the complete payload in application memory or on disk. Query parameters are signed; the multipart body is sent with unsigned payload mode and the file content integrity is checked with the signed sha256 query parameter. Interrupted uploads must be restarted from the beginning.
4921
5345
  * @returns CloudDriveFnode File uploaded
4922
5346
  * @throws ApiError
4923
5347
  */
4924
5348
  uploadCloudDriveFile({ path, sha256, formData, overwrite, skip, ifMatch, }: {
4925
5349
  /**
4926
- * Canonical destination path where the uploaded file should be written.
5350
+ * Canonical destination path where the uploaded file should be written. Use Unicode filename text verbatim, including percent and plus signs. Encode only the outer HTTP query parameter.
4927
5351
  */
4928
5352
  path: string;
4929
5353
  /**
@@ -4946,7 +5370,7 @@ declare class DefaultService {
4946
5370
  }): CancelablePromise<CloudDriveFnode>;
4947
5371
  /**
4948
5372
  * Upload cloud drive file into user tmp
4949
- * Stream a file of at most 512 MiB into the authenticated user's cloud-drive temporary area without buffering the complete payload in application memory or on disk. The backend allocates a unique dated tmp path so clients do not need to generate one. Interrupted uploads must be restarted from the beginning.
5373
+ * Stream a file of at most 5 GiB (5368709120 bytes) into the authenticated user's cloud-drive temporary area without buffering the complete payload in application memory or on disk. The backend allocates a unique dated tmp path so clients do not need to generate one. Interrupted uploads must be restarted from the beginning.
4950
5374
  * @returns CloudDriveFnode File uploaded into tmp
4951
5375
  * @throws ApiError
4952
5376
  */
@@ -4963,7 +5387,11 @@ declare class DefaultService {
4963
5387
  * @returns ConsentForm Consent forms listed
4964
5388
  * @throws ApiError
4965
5389
  */
4966
- listConsentForms({ offset, limit, }: {
5390
+ listConsentForms({ pendingOnly, offset, limit, }: {
5391
+ /**
5392
+ * Return only pending, unexpired forms before applying pagination.
5393
+ */
5394
+ pendingOnly?: boolean;
4967
5395
  /**
4968
5396
  * Zero-based offset into the user's consent-form list. Defaults to 0.
4969
5397
  */
@@ -5150,7 +5578,7 @@ declare class DefaultService {
5150
5578
  listDevices(): CancelablePromise<Array<Device>>;
5151
5579
  /**
5152
5580
  * Register device
5153
- * Register a new device. Organization settings may disable registration for members; the organization owner is exempt. Existing device connections and usage are unchanged.
5581
+ * Register a new device. Enterprise organizations require devices:create. Ordinary organization settings may disable registration for members; the organization owner is exempt. Existing device connections and usage are unchanged.
5154
5582
  * @returns RegisterDeviceResult Device registered
5155
5583
  * @throws ApiError
5156
5584
  */
@@ -5224,6 +5652,16 @@ declare class DefaultService {
5224
5652
  deviceId: string;
5225
5653
  requestBody: ReplaceDevicePortForwardsRequest;
5226
5654
  }): CancelablePromise<DevicePortForwardSnapshot>;
5655
+ /**
5656
+ * Set device access scope
5657
+ * Set a device to organization-visible or private. In non-enterprise organizations only the device owner can change its scope. Enterprise organizations use the existing device access permission, subject to device visibility; ownership does not bypass enterprise permissions. Setting orgScope to false saves private visibility before requesting disconnection of the current device tunnel. Repeating a private request retries disconnection. Device credentials remain valid for reconnecting.
5658
+ * @returns Device Device access scope updated and, for private scope, tunnel disconnection requested if a tunnel record exists. This does not acknowledge actual closure.
5659
+ * @throws ApiError
5660
+ */
5661
+ setDeviceScope({ deviceId, requestBody, }: {
5662
+ deviceId: string;
5663
+ requestBody: SetDeviceScopeRequest;
5664
+ }): CancelablePromise<Device>;
5227
5665
  /**
5228
5666
  * Rotate device token
5229
5667
  * @returns RotateDeviceTokenResult Device token rotated
@@ -5363,7 +5801,7 @@ declare class DefaultService {
5363
5801
  }): CancelablePromise<MCPManageResult>;
5364
5802
  /**
5365
5803
  * Update current organization
5366
- * Update the current organization's profile. Only the organization owner can update it.
5804
+ * Update the current organization's profile. An authorized enterprise member or an ordinary-organization owner can update it.
5367
5805
  * @returns AccountOrg Current organization updated
5368
5806
  * @throws ApiError
5369
5807
  */
@@ -5447,7 +5885,7 @@ declare class DefaultService {
5447
5885
  }): CancelablePromise<OrgCloudSkillSlugAvailability>;
5448
5886
  /**
5449
5887
  * Get org invitation token
5450
- * Get the current organization invitation token. Only the org owner can read it.
5888
+ * Get the current organization invitation token. An authorized enterprise member or an ordinary-organization owner can read it.
5451
5889
  * @returns OrgInvitationToken Token exists
5452
5890
  * @throws ApiError
5453
5891
  */
@@ -5485,7 +5923,7 @@ declare class DefaultService {
5485
5923
  */
5486
5924
  downloadOrgPublicCloudDrive({ path, disposition, }: {
5487
5925
  /**
5488
- * Canonical organization-public file path to download.
5926
+ * Canonical organization-public file path to download. Use Unicode filename text verbatim, including percent and plus signs. Encode only the outer HTTP query parameter.
5489
5927
  */
5490
5928
  path: string;
5491
5929
  /**
@@ -5501,13 +5939,13 @@ declare class DefaultService {
5501
5939
  */
5502
5940
  listOrgUsers({ includeInactive, }: {
5503
5941
  /**
5504
- * Include deactivated managed accounts. Only the organization owner can request this.
5942
+ * Include deactivated managed accounts. An authorized enterprise member or an ordinary-organization owner can request this.
5505
5943
  */
5506
5944
  includeInactive?: boolean;
5507
5945
  }): CancelablePromise<Array<OrgUser>>;
5508
5946
  /**
5509
5947
  * Create an organization-managed account
5510
- * Only the current organization's owner may provision an account while its enterprise subscription is active. Enterprise credentials also require rn:orgs:<orgId>:users:create; ownership does not bypass RN checks. Creates an account without a phone number, allocates an enterprise seat, and returns a random temporary password once. The user must change it on first login. Never log the response.
5948
+ * Requires rn:orgs:<orgId>:users:create in an enterprise organization with an active subscription. Ordinary organizations retain the owner fallback, but still require an active subscription to provision accounts. Creates an account without a phone number, allocates an enterprise seat, and returns a random temporary password once. The user must change it on first login. Never log the response.
5511
5949
  * @returns ManagedAccountCredentials Account created; save the temporary password before leaving this response
5512
5950
  * @throws ApiError
5513
5951
  */
@@ -5516,7 +5954,7 @@ declare class DefaultService {
5516
5954
  }): CancelablePromise<ManagedAccountCredentials>;
5517
5955
  /**
5518
5956
  * Deactivate org user
5519
- * Deactivate an existing org user. Only the org owner can deactivate users.
5957
+ * Deactivate an existing org user. An authorized enterprise member or an ordinary-organization owner can deactivate users.
5520
5958
  * @returns void
5521
5959
  * @throws ApiError
5522
5960
  */
@@ -5537,7 +5975,7 @@ declare class DefaultService {
5537
5975
  }): CancelablePromise<OrgUser>;
5538
5976
  /**
5539
5977
  * Deactivate a managed account
5540
- * Owner only. Stops login, revokes credentials and releases its occupied seat. Repeated deactivation preserves the original cooldown start.
5978
+ * Requires the operation RN in enterprise organizations; ordinary organizations require the owner. Stops login, revokes credentials and releases its occupied seat. Repeated deactivation preserves the original cooldown start.
5541
5979
  * @returns void
5542
5980
  * @throws ApiError
5543
5981
  */
@@ -5546,7 +5984,7 @@ declare class DefaultService {
5546
5984
  }): CancelablePromise<void>;
5547
5985
  /**
5548
5986
  * Reactivate a managed account
5549
- * Owner only, at least 24 hours after deactivation. Rechecks quotas and enterprise seats transactionally. Does not reset the password or automatically log in the user.
5987
+ * Requires the operation RN in enterprise organizations, or the owner in ordinary organizations, at least 24 hours after deactivation. Rechecks quotas and enterprise seats transactionally. Does not reset the password or automatically log in the user.
5550
5988
  * @returns void
5551
5989
  * @throws ApiError
5552
5990
  */
@@ -5555,7 +5993,7 @@ declare class DefaultService {
5555
5993
  }): CancelablePromise<void>;
5556
5994
  /**
5557
5995
  * Reset a managed account's password
5558
- * Owner only. Generates a temporary password and revokes existing credentials without changing activation status.
5996
+ * Requires the operation RN in enterprise organizations; ordinary organizations require the owner. Generates a temporary password and revokes existing credentials without changing activation status.
5559
5997
  * @returns ManagedPasswordReset Temporary password generated
5560
5998
  * @throws ApiError
5561
5999
  */
@@ -5582,14 +6020,14 @@ declare class DefaultService {
5582
6020
  }): CancelablePromise<OrgUser>;
5583
6021
  /**
5584
6022
  * Get organization agent-session settings
5585
- * Get the current organization's inactivity archive timeout. Only the organization owner can read this setting.
6023
+ * Get the current organization's inactivity archive timeout. An authorized enterprise member or an ordinary-organization owner can read this setting.
5586
6024
  * @returns OrgAgentSessionSettings Agent-session settings returned
5587
6025
  * @throws ApiError
5588
6026
  */
5589
6027
  getOrgAgentSessionSettings(): CancelablePromise<OrgAgentSessionSettings>;
5590
6028
  /**
5591
6029
  * Update organization agent-session settings
5592
- * Set the inactivity archive timeout for all sessions in the current organization. Only the organization owner can update this setting.
6030
+ * Set the inactivity archive timeout for all sessions in the current organization. An authorized enterprise member or an ordinary-organization owner can update this setting.
5593
6031
  * @returns OrgAgentSessionSettings Agent-session settings updated
5594
6032
  * @throws ApiError
5595
6033
  */
@@ -5614,7 +6052,7 @@ declare class DefaultService {
5614
6052
  getOrgEnterprise(): CancelablePromise<OrgEnterpriseSubscription>;
5615
6053
  /**
5616
6054
  * Activate organization enterprise subscription
5617
- * Activate enterprise billing, or restore automatic renewal for an active paid period. Only the organization owner can perform this operation.
6055
+ * Activate enterprise billing, or restore automatic renewal for an active paid period. An authorized enterprise member or an ordinary-organization owner can perform this operation.
5618
6056
  * @returns OrgEnterpriseSubscription Enterprise subscription activated or automatic renewal restored
5619
6057
  * @throws ApiError
5620
6058
  */
@@ -5665,21 +6103,21 @@ declare class DefaultService {
5665
6103
  }): CancelablePromise<EnterprisePermissionPolicy>;
5666
6104
  /**
5667
6105
  * Cancel organization enterprise renewal
5668
- * Stop automatic renewal after the current paid period. The organization remains enterprise until the period ends. Only the organization owner can perform this operation.
6106
+ * Stop automatic renewal after the current paid period. The organization remains enterprise until the period ends. An authorized enterprise member or an ordinary-organization owner can perform this operation.
5669
6107
  * @returns OrgEnterpriseSubscription Automatic renewal cancelled
5670
6108
  * @throws ApiError
5671
6109
  */
5672
6110
  cancelOrgEnterpriseRenewal(): CancelablePromise<OrgEnterpriseSubscription>;
5673
6111
  /**
5674
6112
  * Get organization feature settings
5675
- * Read organization settings and the current user's effective permissions. All settings default to allowed. Owners bypass recruitment and device registration restrictions only.
6113
+ * Read organization settings and the current user's effective permissions. All settings default to allowed. Enterprise recruitment and device registration use RN permissions instead of the legacy member switches; ordinary-organization owners bypass those two switches. Publishing and sharing switches apply to everyone.
5676
6114
  * @returns OrgFeatureSettingsResponse Organization feature settings and effective permissions
5677
6115
  * @throws ApiError
5678
6116
  */
5679
6117
  getOrgFeatureSettings(): CancelablePromise<OrgFeatureSettingsResponse>;
5680
6118
  /**
5681
6119
  * Update organization feature settings
5682
- * Owner only. Replace all four settings. Restrictions apply to subsequent recruitment, device registration, publishing, and share creation or rotation requests. Existing agents, devices, publications, and shares remain unchanged.
6120
+ * Requires the operation RN in enterprise organizations; ordinary organizations require the owner. Replace all four settings. Restrictions apply to subsequent recruitment, device registration, publishing, and share creation or rotation requests. Existing agents, devices, publications, and shares remain unchanged.
5683
6121
  * @returns OrgFeatureSettingsResponse Organization feature settings updated
5684
6122
  * @throws ApiError
5685
6123
  */
@@ -5774,13 +6212,20 @@ declare class DefaultService {
5774
6212
  getOrgLlmSettings(): CancelablePromise<OrgLlmSettings>;
5775
6213
  /**
5776
6214
  * Replace organization model settings
5777
- * Only the organization owner may change these settings. Omitted or null overrides restore the corresponding default. Existing agents, sessions, and forks are not migrated.
6215
+ * Enterprise members with llm-model-settings:edit, or ordinary-organization owners, may change these settings. Omitted or null overrides restore the corresponding default. Existing agents, sessions, and forks are not migrated.
5778
6216
  * @returns OrgLlmSettings Organization model settings saved
5779
6217
  * @throws ApiError
5780
6218
  */
5781
6219
  updateOrgLlmSettings({ requestBody, }: {
5782
6220
  requestBody: OrgLlmSettings;
5783
6221
  }): CancelablePromise<OrgLlmSettings>;
6222
+ /**
6223
+ * Get the current user's organization authorization
6224
+ * Returns the authenticated user's effective enterprise rules, including group and policy grants and denies, or ordinary-organization owner fallback. Subscription expiry does not disable enterprise authorization. This read-only response never initializes grants and cannot inspect another user. Operations always recheck authorization independently.
6225
+ * @returns CurrentOrgPermissions Current organization authorization
6226
+ * @throws ApiError
6227
+ */
6228
+ getCurrentOrgPermissions(): CancelablePromise<CurrentOrgPermissions>;
5784
6229
  /**
5785
6230
  * List organization quotas
5786
6231
  * List effective quota limits and current usage for the authenticated organization.
@@ -5788,6 +6233,25 @@ declare class DefaultService {
5788
6233
  * @throws ApiError
5789
6234
  */
5790
6235
  listOrgQuotas(): CancelablePromise<QuotaListResponse>;
6236
+ /**
6237
+ * Get an enterprise member's daily usage budget
6238
+ * Uses the current UTC billing date and all usage categories from the billing aggregates. Only Agent/model admission is limited. Subscription expiry does not remove configured budgets.
6239
+ * @returns UserDailyBudget Current budget and aggregated usage
6240
+ * @throws ApiError
6241
+ */
6242
+ getUserDailyBudget({ userId, }: {
6243
+ userId: number;
6244
+ }): CancelablePromise<UserDailyBudget>;
6245
+ /**
6246
+ * Set an enterprise member's daily usage budget
6247
+ * Zero blocks new Agent/model work; omit limitMicroyuans or set it to null for unlimited usage. Settings propagate to other workers within 7 seconds while dependencies are healthy. Usage checks additionally cache billing aggregates for at most 5 seconds. RisingWave lag and already admitted concurrent calls can cause overspending. No automatic replay of stopped work occurs at the next UTC day.
6248
+ * @returns UserDailyBudget Saved budget and current aggregated usage
6249
+ * @throws ApiError
6250
+ */
6251
+ setUserDailyBudget({ userId, requestBody, }: {
6252
+ userId: number;
6253
+ requestBody: SetUserDailyBudgetRequest;
6254
+ }): CancelablePromise<UserDailyBudget>;
5791
6255
  /**
5792
6256
  * Get a member's bound policy IDs
5793
6257
  * Requires an enterprise organization and the corresponding enterprise RN permission.
@@ -5878,6 +6342,26 @@ declare class DefaultService {
5878
6342
  publishOrgCloudSkill({ slug, }: {
5879
6343
  slug: string;
5880
6344
  }): CancelablePromise<PublicCloudSkillMetadata>;
6345
+ /**
6346
+ * List public snapshots
6347
+ * @returns PublicSnapshot Public snapshots
6348
+ * @throws ApiError
6349
+ */
6350
+ listPublicSnapshots({ after, }: {
6351
+ /**
6352
+ * Last publication ID from the previous page. Pages contain at most 100 items.
6353
+ */
6354
+ after?: string;
6355
+ }): CancelablePromise<Array<PublicSnapshot>>;
6356
+ /**
6357
+ * Import a public snapshot into the current organization
6358
+ * Create an independent saved snapshot reference to the same immutable resource. Storage billing starts when imported.
6359
+ * @returns Snapshot Organization snapshot created
6360
+ * @throws ApiError
6361
+ */
6362
+ importPublicSnapshot({ publicationId, }: {
6363
+ publicationId: string;
6364
+ }): CancelablePromise<Snapshot>;
5881
6365
  /**
5882
6366
  * Get public agent
5883
6367
  * Get the current published main version of a public agent repository. This endpoint does not require authentication.
@@ -5934,7 +6418,7 @@ declare class DefaultService {
5934
6418
  getPublisherNamespace(): CancelablePromise<PublisherNamespace>;
5935
6419
  /**
5936
6420
  * Reserve or change the org's publisher namespace
5937
- * Only the organization owner can change the namespace. It can be changed once every 7 days; prior namespaces remain reserved and working for 60 days.
6421
+ * An authorized enterprise member or an ordinary-organization owner can change the namespace. It can be changed once every 7 days; prior namespaces remain reserved and working for 60 days.
5938
6422
  * @returns PublisherNamespace Namespace updated
5939
6423
  * @throws ApiError
5940
6424
  */
@@ -5988,6 +6472,71 @@ declare class DefaultService {
5988
6472
  sandboxId: string;
5989
6473
  requestBody: CreateSnapshotRequest;
5990
6474
  }): CancelablePromise<Snapshot>;
6475
+ /**
6476
+ * List accessible platform scheduled tasks in the current organization
6477
+ * @returns ScheduledTask Organization tasks and the current user's personal tasks
6478
+ * @throws ApiError
6479
+ */
6480
+ listScheduledTasks({ scope, }: {
6481
+ scope?: "org" | "user";
6482
+ }): CancelablePromise<Array<ScheduledTask>>;
6483
+ /**
6484
+ * Create a platform scheduled task
6485
+ * @returns ScheduledTask Created
6486
+ * @throws ApiError
6487
+ */
6488
+ createScheduledTask({ requestBody, }: {
6489
+ requestBody: ScheduledTaskInput;
6490
+ }): CancelablePromise<ScheduledTask>;
6491
+ /**
6492
+ * Delete a task while retaining its history
6493
+ * @returns void
6494
+ * @throws ApiError
6495
+ */
6496
+ deleteScheduledTask({ scheduledTaskId, }: {
6497
+ scheduledTaskId: string;
6498
+ }): CancelablePromise<void>;
6499
+ /**
6500
+ * Get a scheduled task
6501
+ * @returns ScheduledTask Task
6502
+ * @throws ApiError
6503
+ */
6504
+ getScheduledTask({ scheduledTaskId, }: {
6505
+ scheduledTaskId: string;
6506
+ }): CancelablePromise<ScheduledTask>;
6507
+ /**
6508
+ * Update a task without changing its owner or execution user
6509
+ * @returns ScheduledTask Updated
6510
+ * @throws ApiError
6511
+ */
6512
+ updateScheduledTask({ scheduledTaskId, requestBody, }: {
6513
+ scheduledTaskId: string;
6514
+ requestBody: ScheduledTaskInput;
6515
+ }): CancelablePromise<ScheduledTask>;
6516
+ /**
6517
+ * Pause a scheduled task
6518
+ * @returns ScheduledTask Paused
6519
+ * @throws ApiError
6520
+ */
6521
+ pauseScheduledTask({ scheduledTaskId, }: {
6522
+ scheduledTaskId: string;
6523
+ }): CancelablePromise<ScheduledTask>;
6524
+ /**
6525
+ * Resume a scheduled task
6526
+ * @returns ScheduledTask Resumed
6527
+ * @throws ApiError
6528
+ */
6529
+ resumeScheduledTask({ scheduledTaskId, }: {
6530
+ scheduledTaskId: string;
6531
+ }): CancelablePromise<ScheduledTask>;
6532
+ /**
6533
+ * List the latest 100 executions, newest first
6534
+ * @returns ScheduledTaskRun Executions; message acceptance does not imply agent completion
6535
+ * @throws ApiError
6536
+ */
6537
+ listScheduledTaskRuns({ scheduledTaskId, }: {
6538
+ scheduledTaskId: string;
6539
+ }): CancelablePromise<Array<ScheduledTaskRun>>;
5991
6540
  /**
5992
6541
  * List organization service users
5993
6542
  * @returns ServiceUser Service users, which do not consume seats
@@ -6072,8 +6621,8 @@ declare class DefaultService {
6072
6621
  listSnapshots(): CancelablePromise<Array<Snapshot>>;
6073
6622
  /**
6074
6623
  * Delete snapshot
6075
- * Queue deletion of an unreferenced snapshot. Only its creator or the organization owner can delete it.
6076
- * @returns any Snapshot deletion queued
6624
+ * Remove a snapshot and its public publication. Imported copies and managed sandbox references remain usable. Enterprise members need the snapshot delete permission. Ordinary organizations allow its creator or owner to delete it.
6625
+ * @returns any Snapshot reference removed; provider cleanup is deferred
6077
6626
  * @throws ApiError
6078
6627
  */
6079
6628
  deleteSnapshot({ snapshotUuid, }: {
@@ -6090,9 +6639,26 @@ declare class DefaultService {
6090
6639
  getSnapshot({ snapshotUuid, }: {
6091
6640
  snapshotUuid: string;
6092
6641
  }): CancelablePromise<Snapshot>;
6642
+ /**
6643
+ * Unpublish an organization snapshot
6644
+ * @returns void
6645
+ * @throws ApiError
6646
+ */
6647
+ unpublishSnapshot({ snapshotUuid, }: {
6648
+ snapshotUuid: string;
6649
+ }): CancelablePromise<void>;
6650
+ /**
6651
+ * Publish an organization snapshot
6652
+ * Publish a ready saved snapshot for other organizations to import. Enterprise members need the snapshot publish permission. Ordinary organizations allow its creator or owner to publish it.
6653
+ * @returns SnapshotPublication Publication ID (publishing again is idempotent)
6654
+ * @throws ApiError
6655
+ */
6656
+ publishSnapshot({ snapshotUuid, }: {
6657
+ snapshotUuid: string;
6658
+ }): CancelablePromise<SnapshotPublication>;
6093
6659
  /**
6094
6660
  * Register additional exact SSO callback URLs
6095
- * Requires permission to manage the application's service user. The application's https hostname with /auth/brazosd/callback is always registered. HTTPS is required except for loopback development callbacks.
6661
+ * Requires active membership in the application's organization; enterprise permissions are enforced at the API layer. The application's https hostname with /auth/brazosd/callback is always registered. HTTPS is required except for loopback development callbacks.
6096
6662
  * @returns SSOAppConfiguration Configured callbacks
6097
6663
  * @throws ApiError
6098
6664
  */
@@ -6358,6 +6924,10 @@ type TaskAttributes = {
6358
6924
  timeout?: string;
6359
6925
  cronjob?: TaskCronjob;
6360
6926
  retryPolicy?: TaskRetryPolicy;
6927
+ /**
6928
+ * Clear the unique tag atomically when the task becomes completed, failed, or cancelled. Pauses, retries, deferrals, and recurring cron runs retain the tag. Defaults to false.
6929
+ */
6930
+ releaseUniqueTagOnTerminal?: boolean;
6361
6931
  /**
6362
6932
  * Worker claim and scheduling labels. A worker must have all task labels to claim the task.
6363
6933
  */
@@ -6543,9 +7113,11 @@ type App = {
6543
7113
  desiredDeploymentId?: string;
6544
7114
  deployment?: Deployment;
6545
7115
  };
7116
+ type NodeMemoryGiB = 2;
7117
+ type NodeVCPU = 1;
6546
7118
  type AppInput = {
6547
7119
  /**
6548
- * Existing service user in this organization. Omit to create one atomically with the function.
7120
+ * Existing active service user in this organization, regardless of its creator. Omit to create one atomically with the function.
6549
7121
  */
6550
7122
  serviceUserId?: number;
6551
7123
  name: string;
@@ -6556,8 +7128,8 @@ type AppInput = {
6556
7128
  * Application listen port; 8081 is reserved for the runtime.
6557
7129
  */
6558
7130
  port?: number;
6559
- vcpu?: VCPU;
6560
- memoryGiB?: MemoryGiB;
7131
+ vcpu?: NodeVCPU;
7132
+ memoryGiB?: NodeMemoryGiB;
6561
7133
  /**
6562
7134
  * Deployment readiness only; exact status or inclusive range, e.g. 200-499.
6563
7135
  */
@@ -6572,6 +7144,36 @@ type AppInput = {
6572
7144
  */
6573
7145
  environment?: Record<string, string>;
6574
7146
  };
7147
+ type AppLogEntry = {
7148
+ /**
7149
+ * Unix timestamp in seconds.
7150
+ */
7151
+ timestamp: number;
7152
+ instanceId: string;
7153
+ deploymentId: string;
7154
+ stream: "stdout" | "stderr";
7155
+ content: string;
7156
+ truncated: boolean;
7157
+ /**
7158
+ * Pass to logs/content to download the original message; expires with the cursor.
7159
+ */
7160
+ downloadToken?: string;
7161
+ };
7162
+ type AppLogPage = {
7163
+ items: Array<AppLogEntry>;
7164
+ /**
7165
+ * Complete means this page's provider query completed, not that pagination ended.
7166
+ */
7167
+ status: "complete" | "incomplete";
7168
+ /**
7169
+ * Continue with this cursor; a final continuation may return an empty page.
7170
+ */
7171
+ nextCursor?: string;
7172
+ /**
7173
+ * Present for incomplete queries; retry the same position after this delay.
7174
+ */
7175
+ retryAfterSeconds?: number;
7176
+ };
6575
7177
  type AppSettings = {
6576
7178
  enabled?: boolean;
6577
7179
  runtime?: "nodejs";
@@ -6579,8 +7181,8 @@ type AppSettings = {
6579
7181
  * Application listen port; 8081 is reserved for the runtime.
6580
7182
  */
6581
7183
  port?: number;
6582
- vcpu?: VCPU;
6583
- memoryGiB?: MemoryGiB;
7184
+ vcpu?: NodeVCPU;
7185
+ memoryGiB?: NodeMemoryGiB;
6584
7186
  entrypoint?: string;
6585
7187
  healthPath?: string;
6586
7188
  /**
@@ -6611,6 +7213,28 @@ type AppSummary = {
6611
7213
  desiredDeploymentId?: string;
6612
7214
  deploymentState?: string;
6613
7215
  };
7216
+ type DomainDNSRecord = {
7217
+ type: "CNAME" | "TXT";
7218
+ name: string;
7219
+ value: string;
7220
+ purpose: "routing" | "ownership";
7221
+ };
7222
+ type CustomDomain = {
7223
+ id: string;
7224
+ hostname: string;
7225
+ url: string;
7226
+ state: "pending_dns" | "issuing" | "ready" | "renewing" | "error";
7227
+ dnsRecords: Array<DomainDNSRecord>;
7228
+ createdAt: string;
7229
+ verifiedAt?: string;
7230
+ certificateExpiresAt?: string;
7231
+ renewAt?: string;
7232
+ nextAttemptAt: string;
7233
+ lastError: string;
7234
+ };
7235
+ type CustomDomainInput = {
7236
+ hostname: string;
7237
+ };
6614
7238
  type Database = {
6615
7239
  id: string;
6616
7240
  name: string;
@@ -6674,12 +7298,36 @@ type Usage = {
6674
7298
  declare class DefaultService$2 {
6675
7299
  readonly httpRequest: BaseHttpRequest;
6676
7300
  constructor(httpRequest: BaseHttpRequest);
7301
+ /**
7302
+ * @returns CustomDomain Custom domains and DNS configuration
7303
+ * @throws ApiError
7304
+ */
7305
+ listAppDomains({ id, }: {
7306
+ id: string;
7307
+ }): CancelablePromise<Array<CustomDomain>>;
7308
+ /**
7309
+ * @returns CustomDomain Domain reserved; configure both DNS records to begin verification
7310
+ * @throws ApiError
7311
+ */
7312
+ createAppDomain({ id, requestBody, }: {
7313
+ id: string;
7314
+ requestBody: CustomDomainInput;
7315
+ }): CancelablePromise<CustomDomain>;
7316
+ /**
7317
+ * @returns void
7318
+ * @throws ApiError
7319
+ */
7320
+ deleteAppDomain({ id, domainId, }: {
7321
+ id: string;
7322
+ domainId: string;
7323
+ }): CancelablePromise<void>;
6677
7324
  /**
6678
7325
  * @returns string Serverless API contract; paths are relative to /api/v1/serverless.
6679
7326
  * @throws ApiError
6680
7327
  */
6681
7328
  getServerlessOpenApi(): CancelablePromise<string>;
6682
7329
  /**
7330
+ * Lists all undeleted functions in the caller's organization. Active organization members share management access; enterprise permissions belong to the API layer.
6683
7331
  * @returns AppSummary Success
6684
7332
  * @throws ApiError
6685
7333
  */
@@ -6713,6 +7361,49 @@ declare class DefaultService$2 {
6713
7361
  deleteApp({ id, }: {
6714
7362
  id: string;
6715
7363
  }): CancelablePromise<any>;
7364
+ /**
7365
+ * Query cloud function stdout and stderr without waking the function
7366
+ * Queries retained container logs for current and stopped instances. Requires the same
7367
+ * active organization membership as getApp. Enterprise permissions belong to the API layer.
7368
+ * The interval is [from, to),
7369
+ * at most seven days, with to no later than the request time. Results are newest first.
7370
+ * Each response contains at most 100 entries and 1 MiB of JSON. Messages longer than
7371
+ * 32 KiB are previews with truncated=true and a short-lived downloadToken for the original.
7372
+ * Keep from, to and stream unchanged when following nextCursor. Cursors expire after
7373
+ * 15 minutes. An incomplete page contains no entries and a retry cursor at the same position.
7374
+ * Recent logs can arrive late: pagination is not a snapshot of SLS ingestion; refresh the
7375
+ * interval to include delayed logs. Retention is seven days, not archival storage.
7376
+ * Queries spanning more than 256 instances must use a narrower time range.
7377
+ *
7378
+ * @returns AppLogPage Bounded log page; inspect status before treating it as complete.
7379
+ * @throws ApiError
7380
+ */
7381
+ listAppLogs({ id, from, to, limit, stream, cursor, }: {
7382
+ id: string;
7383
+ /**
7384
+ * Inclusive Unix timestamp in seconds.
7385
+ */
7386
+ from: number;
7387
+ /**
7388
+ * Exclusive Unix timestamp in seconds; keep fixed while paging.
7389
+ */
7390
+ to: number;
7391
+ limit?: number;
7392
+ stream?: "stdout" | "stderr";
7393
+ /**
7394
+ * Opaque nextCursor from the previous response.
7395
+ */
7396
+ cursor?: string;
7397
+ }): CancelablePromise<AppLogPage>;
7398
+ /**
7399
+ * Download one original log message referenced by a truncated preview
7400
+ * @returns binary Original UTF-8 log message, served as an attachment.
7401
+ * @throws ApiError
7402
+ */
7403
+ downloadAppLogContent({ id, token, }: {
7404
+ id: string;
7405
+ token: string;
7406
+ }): CancelablePromise<Response>;
6716
7407
  /**
6717
7408
  * @returns any Success
6718
7409
  * @throws ApiError
@@ -6833,6 +7524,104 @@ interface Credentials$1 {
6833
7524
  export type CredentialProvider = () => Credentials$1 | Promise<Credentials$1>;
6834
7525
  /** Reads only the access credential. Refresh tokens belong to the runtime. */
6835
7526
  export declare function fileCredentials(path?: string): CredentialProvider;
7527
+ export interface ClientMCPCallContext {
7528
+ sessionId: string;
7529
+ runId: string;
7530
+ toolCallId: string;
7531
+ toolName: string;
7532
+ /** Stable across redelivery, refresh, reconnect and different browser tabs. */
7533
+ idempotencyKey: string;
7534
+ signal: AbortSignal;
7535
+ }
7536
+ export interface ClientMCPTool {
7537
+ description: string;
7538
+ inputSchema: Record<string, unknown>;
7539
+ execute: (args: Record<string, unknown>, context: ClientMCPCallContext) => ClientMCPToolResult | Promise<ClientMCPToolResult>;
7540
+ }
7541
+ export type ClientMCPTools = Record<string, ClientMCPTool>;
7542
+ /** WebMCP-style tool declaration. JSON values are converted to MCP results. */
7543
+ export interface ClientMCPWebTool {
7544
+ name: string;
7545
+ description: string;
7546
+ inputSchema?: Record<string, unknown>;
7547
+ execute: (args: Record<string, unknown>, context: ClientMCPCallContext) => unknown;
7548
+ }
7549
+ export interface ClientMCPRegistrationOptions {
7550
+ /** Aborting unregisters this tool and cancels its active callback signals. */
7551
+ signal?: AbortSignal;
7552
+ }
7553
+ export interface ClientMCPOptions {
7554
+ /** Installation namespace used by registerTool. Defaults to "browser". */
7555
+ namespace?: string;
7556
+ onError?: (error: Error) => void;
7557
+ /** Optional bounded receipt cache, e.g. window.localStorage. Never stores tool arguments or results. */
7558
+ storage?: Pick<Storage, "getItem" | "setItem">;
7559
+ webSocketFactory?: (url: string) => WebSocket;
7560
+ signal?: AbortSignal;
7561
+ }
7562
+ /** One bridge per session in a client. Cross-client exactly-once side effects require business idempotency. */
7563
+ export declare class ClientMCPBridge {
7564
+ private readonly api;
7565
+ readonly sessionId: string;
7566
+ private readonly socketURL;
7567
+ private readonly options;
7568
+ private readonly controller;
7569
+ private readonly signal;
7570
+ private readonly callbacks;
7571
+ private readonly installations;
7572
+ private readonly definitions;
7573
+ private readonly registrationCleanups;
7574
+ private mutation;
7575
+ private readonly pending;
7576
+ private readonly receipts;
7577
+ private readonly storageKey;
7578
+ private socket?;
7579
+ private connection?;
7580
+ private online;
7581
+ private cursor;
7582
+ private buffer;
7583
+ private syncing?;
7584
+ private catchUp;
7585
+ constructor(api: ApiClient["default"], sessionId: string, socketURL: () => Promise<string>, options?: ClientMCPOptions);
7586
+ /** Registers one named tool in this bridge's namespace, following WebMCP's declaration shape. */
7587
+ registerTool(tool: ClientMCPWebTool, options?: ClientMCPRegistrationOptions): Promise<void>;
7588
+ install(namespace: string, tools: ClientMCPTools): Promise<ClientMCPInstallation>;
7589
+ private installTools;
7590
+ uninstall(namespace: string): Promise<void>;
7591
+ private uninstallTools;
7592
+ private mutate;
7593
+ /** Resolves after subscription ACK and canonical history catch-up. Reconnects automatically thereafter. */
7594
+ connect(): Promise<void>;
7595
+ /** Stops communication and aborts callback signals. Installations remain for refresh/reconnect. */
7596
+ close(): void;
7597
+ private report;
7598
+ private run;
7599
+ private openSocket;
7600
+ private synchronize;
7601
+ private loadHistory;
7602
+ private consume;
7603
+ private complete;
7604
+ private dispatch;
7605
+ private execute;
7606
+ }
7607
+ export interface ClientOptions {
7608
+ /** Main API URL including /api/v1. */
7609
+ apiUrl?: string;
7610
+ credentials?: CredentialProvider;
7611
+ /** Node entry only: defaults to /run/brazosd/identity/credentials.json. */
7612
+ credentialsFile?: string;
7613
+ headers?: HeadersInit;
7614
+ signal?: AbortSignal;
7615
+ }
7616
+ declare class BrazosdClient {
7617
+ readonly api: ApiClient["default"];
7618
+ readonly anclax: AnclaxClient["default"];
7619
+ readonly serverless: ServerlessClient["default"];
7620
+ private readonly socketURL;
7621
+ private readonly signal?;
7622
+ constructor(options?: ClientOptions);
7623
+ clientMCP(sessionId: string, options?: ClientMCPOptions): ClientMCPBridge;
7624
+ }
6836
7625
  export interface SSOIdentity {
6837
7626
  iss: string;
6838
7627
  aud: string;
@@ -6939,7 +7728,7 @@ export declare class BrazosdSSO {
6939
7728
  userClient(session: {
6940
7729
  getTokens(): Promise<SSOUserTokens>;
6941
7730
  saveTokens(tokens: SSOUserTokens, expectedRefreshToken: string): Promise<void>;
6942
- }): BrazosdClient;
7731
+ }): BrazosdClient$1;
6943
7732
  /** Also delete the application's own session/cookie after revoking this grant. */
6944
7733
  revoke(tokens: SSOUserTokens): Promise<void>;
6945
7734
  }
@@ -6949,24 +7738,13 @@ export declare class BrazosdError extends Error {
6949
7738
  readonly body: string;
6950
7739
  constructor(status: number, message: string, body: string);
6951
7740
  }
6952
- export interface ClientOptions {
6953
- /** Main API URL including /api/v1. Discovered from the identity file by default. */
6954
- apiUrl?: string;
6955
- credentials?: CredentialProvider;
6956
- credentialsFile?: string;
6957
- /** Extra HTTP headers, for example Range for a download. */
6958
- headers?: HeadersInit;
6959
- signal?: AbortSignal;
6960
- }
6961
- export declare class BrazosdClient {
6962
- readonly api: ApiClient["default"];
6963
- readonly anclax: AnclaxClient["default"];
6964
- readonly serverless: ServerlessClient["default"];
7741
+ declare class BrazosdClient$1 extends BrazosdClient {
6965
7742
  constructor(options?: ClientOptions);
6966
7743
  }
6967
- export declare function createClient(options?: ClientOptions): BrazosdClient;
7744
+ export declare function createClient(options?: ClientOptions): BrazosdClient$1;
6968
7745
 
6969
7746
  export {
7747
+ BrazosdClient$1 as BrazosdClient,
6970
7748
  Credentials$1 as Credentials,
6971
7749
  };
6972
7750