@inferencesh/sdk 0.20.1 → 0.22.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.
Files changed (61) hide show
  1. package/CHANGELOG.md +104 -0
  2. package/dist/agent/actions.js +1 -4
  3. package/dist/agent/api.d.ts +37 -6
  4. package/dist/agent/api.js +37 -3
  5. package/dist/agent/reducer.js +23 -7
  6. package/dist/agent/types.d.ts +30 -5
  7. package/dist/api/agents.d.ts +9 -3
  8. package/dist/api/agents.js +87 -65
  9. package/dist/api/api-keys.d.ts +2 -5
  10. package/dist/api/apps.d.ts +9 -2
  11. package/dist/api/apps.js +9 -1
  12. package/dist/api/chats.d.ts +13 -3
  13. package/dist/api/chats.js +13 -2
  14. package/dist/api/engines.d.ts +4 -2
  15. package/dist/api/engines.js +3 -2
  16. package/dist/api/flow-runs.d.ts +7 -2
  17. package/dist/api/flow-runs.js +7 -2
  18. package/dist/api/flows.d.ts +13 -2
  19. package/dist/api/flows.js +15 -1
  20. package/dist/api/knowledge.d.ts +7 -4
  21. package/dist/api/knowledge.js +6 -4
  22. package/dist/api/mcp-servers.d.ts +2 -1
  23. package/dist/api/projects.d.ts +5 -3
  24. package/dist/api/projects.js +3 -2
  25. package/dist/api/secrets.d.ts +2 -2
  26. package/dist/api/tasks.js +39 -60
  27. package/dist/api/teams.d.ts +4 -2
  28. package/dist/api/teams.js +3 -2
  29. package/dist/api/write-bodies.d.ts +110 -0
  30. package/dist/api/write-bodies.js +1 -0
  31. package/dist/http/client.d.ts +68 -7
  32. package/dist/http/client.js +138 -97
  33. package/dist/http/index.d.ts +2 -2
  34. package/dist/http/loopback.d.ts +8 -0
  35. package/dist/http/loopback.js +18 -0
  36. package/dist/http/stream-until-terminal.d.ts +55 -0
  37. package/dist/http/stream-until-terminal.js +88 -0
  38. package/dist/http/stream.d.ts +1 -0
  39. package/dist/http/stream.js +7 -3
  40. package/dist/http/streamable.d.ts +25 -5
  41. package/dist/http/streamable.js +28 -40
  42. package/dist/index.d.ts +4 -2
  43. package/dist/index.js +1 -0
  44. package/dist/proxy/endpoints.json +156 -0
  45. package/dist/proxy/express.d.ts +5 -6
  46. package/dist/proxy/express.js +18 -2
  47. package/dist/proxy/hono.d.ts +5 -3
  48. package/dist/proxy/hono.js +4 -3
  49. package/dist/proxy/index.d.ts +165 -6
  50. package/dist/proxy/index.js +409 -25
  51. package/dist/proxy/nextjs.d.ts +29 -17
  52. package/dist/proxy/nextjs.js +72 -62
  53. package/dist/proxy/remix.d.ts +5 -3
  54. package/dist/proxy/remix.js +4 -3
  55. package/dist/proxy/svelte.d.ts +5 -4
  56. package/dist/proxy/svelte.js +4 -4
  57. package/dist/types.d.ts +591 -271
  58. package/dist/types.js +117 -252
  59. package/dist/version.d.ts +1 -0
  60. package/dist/version.js +7 -0
  61. package/package.json +2 -1
package/dist/types.d.ts CHANGED
@@ -120,7 +120,17 @@ export interface AgentToolConfig {
120
120
  }
121
121
  export interface HookToolConfig {
122
122
  url: string;
123
+ /**
124
+ * Secret is write-only: a new value for the X-Hook-Secret header. On
125
+ * save it moves into the team's encrypted secret store and SecretRef
126
+ * names it; a stored config, and every read, has it empty.
127
+ */
123
128
  secret?: string;
129
+ /**
130
+ * SecretRef names the stored hook secret. Sending it back unchanged
131
+ * (with Secret empty) keeps it; leaving both empty removes it.
132
+ */
133
+ secret_ref?: string;
124
134
  input_schema?: any;
125
135
  output_schema?: any;
126
136
  }
@@ -162,9 +172,23 @@ export interface HTTPToolConfig {
162
172
  url: string;
163
173
  method?: string;
164
174
  auth?: ToolAuthConfig;
175
+ /**
176
+ * Headers are sent with every call. A value is either a reference to a
177
+ * team secret ("${{secrets.NAME}}"), kept as written, or a literal: on
178
+ * save a literal moves into the team's encrypted secret store and
179
+ * HeaderSecretRefs names it, so a stored config and every read carry
180
+ * the header with an empty value. An empty value whose header has a
181
+ * ref keeps the stored one.
182
+ */
165
183
  headers?: {
166
184
  [key: string]: string;
167
185
  };
186
+ /**
187
+ * HeaderSecretRefs maps a header name to its stored value.
188
+ */
189
+ header_secret_refs?: {
190
+ [key: string]: string;
191
+ };
168
192
  input_schema?: any;
169
193
  output_schema?: any;
170
194
  }
@@ -191,7 +215,11 @@ export interface AgentToolConfigDTO {
191
215
  }
192
216
  export interface HookToolConfigDTO {
193
217
  url: string;
218
+ /**
219
+ * Secret is always empty on a read; SecretRef says one is stored.
220
+ */
194
221
  secret?: string;
222
+ secret_ref?: string;
195
223
  input_schema?: any;
196
224
  output_schema?: any;
197
225
  }
@@ -203,9 +231,16 @@ export interface HTTPToolConfigDTO {
203
231
  url: string;
204
232
  method?: string;
205
233
  auth?: ToolAuthConfig;
234
+ /**
235
+ * Headers lists every header; a stored (secret) value reads as empty,
236
+ * and HeaderSecretRefs names it.
237
+ */
206
238
  headers?: {
207
239
  [key: string]: string;
208
240
  };
241
+ header_secret_refs?: {
242
+ [key: string]: string;
243
+ };
209
244
  input_schema?: any;
210
245
  output_schema?: any;
211
246
  }
@@ -273,18 +308,38 @@ export interface AgentVersionDTO extends BaseModelDTO, PermissionModelDTO {
273
308
  permissions?: AgentPermissions;
274
309
  hooks?: LifecycleHookConfig[];
275
310
  output_schema?: any;
311
+ /**
312
+ * VisitorReads is the scope groups of the team's resources (knowledge,
313
+ * files, artifacts, remotes) a visitor of an embed of this version can
314
+ * have it read by id, beyond what it configures by name. Set when the
315
+ * agent is read (get, version get); the value a publication of it
316
+ * answers. Absent elsewhere (lists, chats).
317
+ */
318
+ visitor_reads?: ScopeGroup[];
276
319
  }
277
320
  /**
278
321
  * CreateAgentRequest is the request body for POST /agents
279
322
  * For new agents: omit ID, backend generates it
280
323
  * For new version of existing agent: include ID
324
+ * A new agent's namespace is its team's; the body cannot name one.
281
325
  */
282
326
  export interface CreateAgentRequest {
283
327
  id?: string;
284
328
  name: string;
285
329
  title?: string;
286
- namespace?: string;
287
330
  images?: AgentImages;
331
+ visibility?: Visibility;
332
+ /**
333
+ * Harness runs the agent: "inference" (ours) or an external harness.
334
+ */
335
+ harness?: string;
336
+ /**
337
+ * ProfileID and RemoteID place the agent on one of the caller's
338
+ * machines; ProjectID files it in a project.
339
+ */
340
+ profile_id?: string;
341
+ remote_id?: string;
342
+ project_id?: string;
288
343
  /**
289
344
  * Version config (embedded - backend generates version ID, timestamps, etc)
290
345
  */
@@ -557,6 +612,49 @@ export interface DeviceAuthPollResponse {
557
612
  */
558
613
  session_token?: string;
559
614
  team_id?: string;
615
+ /**
616
+ * AdminUntil is set when an admin elevation request was approved: the
617
+ * CLI login that asked now carries admin power until then. No
618
+ * credential comes with it.
619
+ */
620
+ admin_until?: string;
621
+ }
622
+ /**
623
+ * AdminElevateRequest is the body of POST /device/auth/elevate: a platform
624
+ * admin's CLI login asking to carry admin power for TTLSeconds (default one
625
+ * hour, at most eight).
626
+ */
627
+ export interface AdminElevateRequest {
628
+ ttl_seconds?: number;
629
+ }
630
+ /**
631
+ * AdminElevateResponse is a pending elevation request: the admin approves
632
+ * UserCode at ApproveURL in their browser and the CLI polls PollURL.
633
+ */
634
+ export interface AdminElevateResponse {
635
+ user_code: string;
636
+ device_code: string;
637
+ poll_url: string;
638
+ approve_url: string;
639
+ expires_in: number;
640
+ interval: number;
641
+ ttl_seconds: number;
642
+ }
643
+ /**
644
+ * AdminElevationStatus is GET /device/auth/elevate: whether the calling
645
+ * session carries an admin elevation, and until when.
646
+ */
647
+ export interface AdminElevationStatus {
648
+ elevated: boolean;
649
+ admin_until?: string;
650
+ }
651
+ /**
652
+ * AdminElevationDropResponse is DELETE /device/auth/elevate. Dropped is
653
+ * false when the session held no elevation.
654
+ */
655
+ export interface AdminElevationDropResponse {
656
+ elevated: boolean;
657
+ dropped: boolean;
560
658
  }
561
659
  export interface MeResponse {
562
660
  user?: UserDTO;
@@ -585,6 +683,19 @@ export interface MeResponse {
585
683
  * POST /teams/{personal_team_id}/complete-setup.
586
684
  */
587
685
  needs_username: boolean;
686
+ /**
687
+ * PlatformPower: the credential carries platform administration
688
+ * (admin:read): an admin's own browser sign-in that proved their
689
+ * authenticator, or an elevated CLI login. The admin role alone is not
690
+ * it.
691
+ */
692
+ platform_power: boolean;
693
+ /**
694
+ * Scopes is every scope the request's credential holds
695
+ * (AuthContext.HeldScopes): what a client asks before it calls a route
696
+ * it may not reach (an API key holds no sign-in-only scope).
697
+ */
698
+ scopes: Scope[];
588
699
  }
589
700
  export interface TeamCreateRequest {
590
701
  name: string;
@@ -650,6 +761,12 @@ export interface CredentialConnectRequest {
650
761
  * are OAuth permission scopes.
651
762
  */
652
763
  connection_scope?: CredentialScope;
764
+ /**
765
+ * AnotherAccount connects an account next to the ones already
766
+ * connected: the provider is asked to let the user choose the account
767
+ * rather than reuse the one it remembers.
768
+ */
769
+ another_account?: boolean;
653
770
  }
654
771
  /**
655
772
  * CredentialCompleteOAuthRequest is what the provider's redirect delivered:
@@ -746,7 +863,7 @@ export interface EstimateCostResponse {
746
863
  /**
747
864
  * Scope represents an API key permission scope string.
748
865
  */
749
- export type Scope = "*" | "agents" | "apps" | "conversations" | "files" | "datastores" | "templates" | "flows" | "projects" | "teams" | "billing" | "artifacts" | "agents:read" | "agents:write" | "agents:execute" | "apps:read" | "apps:write" | "apps:execute" | "conversations:read" | "conversations:write" | "files:read" | "files:write" | "datastores:read" | "datastores:write" | "flows:read" | "flows:write" | "flows:execute" | "projects:read" | "projects:write" | "teams:read" | "teams:write" | "billing:read" | "billing:write" | "secrets:read" | "secrets:write" | "credentials:read" | "credentials:write" | "engines:read" | "engines:write" | "remotes:read" | "remotes:write" | "apikeys:read" | "apikeys:write" | "knowledge:read" | "knowledge:write" | "artifacts:read" | "artifacts:write" | "user:read" | "user:write" | "settings:read" | "settings:write";
866
+ export type Scope = "*" | "agents" | "apps" | "conversations" | "files" | "datastores" | "templates" | "flows" | "projects" | "teams" | "billing" | "artifacts" | "agents:read" | "agents:write" | "agents:execute" | "apps:read" | "apps:write" | "apps:execute" | "conversations:read" | "conversations:write" | "files:read" | "files:write" | "datastores:read" | "datastores:write" | "flows:read" | "flows:write" | "flows:execute" | "projects:read" | "projects:write" | "teams:read" | "teams:write" | "billing:read" | "billing:write" | "secrets:read" | "secrets:write" | "secrets:reveal" | "credentials:read" | "credentials:write" | "engines:read" | "engines:write" | "remotes:read" | "remotes:write" | "apikeys:read" | "apikeys:write" | "knowledge:read" | "knowledge:write" | "artifacts:read" | "artifacts:write" | "user:read" | "user:write" | "settings:read" | "settings:write" | "approvals:write" | "admin:read" | "admin:write" | "admin:pricing";
750
867
  /**
751
868
  * API Key Scopes - hierarchical permission system.
752
869
  * Resource-level scopes (e.g., "agents") imply all action-level scopes (e.g., "agents:read").
@@ -935,6 +1052,12 @@ export declare const ScopeSecretsRead: Scope;
935
1052
  * Empty scopes = full access (for backwards compatibility with existing keys).
936
1053
  */
937
1054
  export declare const ScopeSecretsWrite: Scope;
1055
+ /**
1056
+ * ScopeSecretsReveal reads a secret's plaintext value. A key holding
1057
+ * secrets:read holds it too (keys revealed with secrets:read before it
1058
+ * existed); an app's OAuth token or a bound session never does.
1059
+ */
1060
+ export declare const ScopeSecretsReveal: Scope;
938
1061
  /**
939
1062
  * Action-level scopes for credentials (connected accounts, vaults,
940
1063
  * auth schemes, MCP servers).
@@ -1016,10 +1139,36 @@ export declare const ScopeSettingsRead: Scope;
1016
1139
  * Empty scopes = full access (for backwards compatibility with existing keys).
1017
1140
  */
1018
1141
  export declare const ScopeSettingsWrite: Scope;
1142
+ /**
1143
+ * Approvals: answering a human-in-the-loop question (a tool approval, a
1144
+ * gate, a widget or MCP input request, always-allow) and widening a
1145
+ * chat's approval policy (allow every tool, skip hooks, allow rules).
1146
+ * Held only by the account holder's own sign-in.
1147
+ */
1148
+ export declare const ScopeApprovalsWrite: Scope;
1149
+ /**
1150
+ * ScopeAdminRead views platform administration (/admin GET). Held
1151
+ * only by an admin's own sign-in; the route's admin gate decides
1152
+ * whether it carries power.
1153
+ */
1154
+ export declare const ScopeAdminRead: Scope;
1155
+ /**
1156
+ * ScopeAdminWrite changes platform administration (/admin). Held only
1157
+ * by an admin's own sign-in.
1158
+ */
1159
+ export declare const ScopeAdminWrite: Scope;
1160
+ /**
1161
+ * ScopeAdminPricing reads and changes store pricing: a version's
1162
+ * terms, its draft pricing (edit, evaluate, discard, publish, apply to
1163
+ * the listing) and the sample tasks drafts are evaluated against. Held
1164
+ * by an admin's own sign-in with platform power, and by a key of the
1165
+ * platform's automation account (ScopeDefinition.Automation).
1166
+ */
1167
+ export declare const ScopeAdminPricing: Scope;
1019
1168
  /**
1020
1169
  * ScopeGroup identifies a category of scopes for UI grouping
1021
1170
  */
1022
- export type ScopeGroup = "agents" | "apps" | "conversations" | "files" | "datastores" | "flows" | "projects" | "teams" | "billing" | "secrets" | "credentials" | "engines" | "remotes" | "apikeys" | "knowledge" | "artifacts" | "user" | "settings";
1171
+ export type ScopeGroup = "agents" | "apps" | "conversations" | "files" | "datastores" | "flows" | "projects" | "teams" | "billing" | "secrets" | "credentials" | "engines" | "remotes" | "apikeys" | "knowledge" | "artifacts" | "user" | "settings" | "approvals" | "admin";
1023
1172
  export declare const ScopeGroupAgents: ScopeGroup;
1024
1173
  export declare const ScopeGroupApps: ScopeGroup;
1025
1174
  export declare const ScopeGroupConversations: ScopeGroup;
@@ -1038,6 +1187,8 @@ export declare const ScopeGroupKnowledge: ScopeGroup;
1038
1187
  export declare const ScopeGroupArtifacts: ScopeGroup;
1039
1188
  export declare const ScopeGroupUser: ScopeGroup;
1040
1189
  export declare const ScopeGroupSettings: ScopeGroup;
1190
+ export declare const ScopeGroupApprovals: ScopeGroup;
1191
+ export declare const ScopeGroupAdmin: ScopeGroup;
1041
1192
  /**
1042
1193
  * ScopeDefinition describes a single scope for UI rendering
1043
1194
  */
@@ -1046,6 +1197,30 @@ export interface ScopeDefinition {
1046
1197
  label: string;
1047
1198
  description: string;
1048
1199
  group: ScopeGroup;
1200
+ /**
1201
+ * SignInOnly: only the account holder's own sign-in (browser session,
1202
+ * CLI login) holds it. No API key, workspace key, OAuth token, bound or
1203
+ * grant session can be granted it or pass a check for it.
1204
+ */
1205
+ sign_in_only?: boolean;
1206
+ /**
1207
+ * NotForApps: an app's OAuth token, a bound session or a grant never
1208
+ * holds it, whatever it was granted; the person's sign-in and API keys
1209
+ * may.
1210
+ */
1211
+ not_for_apps?: boolean;
1212
+ /**
1213
+ * CostsCredits: using the scope spends the account's credits (running
1214
+ * apps, agents, flows).
1215
+ */
1216
+ costs_credits?: boolean;
1217
+ /**
1218
+ * Automation: a narrow platform-administration scope that a workspace
1219
+ * key of the platform's automation account (the system team's service
1220
+ * account) may hold, minted by an admin with platform power and always
1221
+ * expiring. Every other key, token and app holds no admin scope.
1222
+ */
1223
+ automation?: boolean;
1049
1224
  }
1050
1225
  /**
1051
1226
  * ScopeGroupDefinition describes a group of scopes for UI rendering
@@ -1054,6 +1229,17 @@ export interface ScopeGroupDefinition {
1054
1229
  id: ScopeGroup;
1055
1230
  label: string;
1056
1231
  description: string;
1232
+ /**
1233
+ * PublicRows: the resource's rows can be public, so a credential
1234
+ * without its read scope still reads what a signed-out caller reads
1235
+ * (its public rows) instead of being refused.
1236
+ */
1237
+ public_rows?: boolean;
1238
+ /**
1239
+ * StaffOnly: the group's scopes are offered (GET /scopes) only to staff
1240
+ * holding platform power: the platform's own engines.
1241
+ */
1242
+ staff_only?: boolean;
1057
1243
  }
1058
1244
  /**
1059
1245
  * ScopesResponse is the API response for GET /scopes
@@ -1062,6 +1248,20 @@ export interface ScopesResponse {
1062
1248
  scopes: ScopeDefinition[];
1063
1249
  groups: ScopeGroupDefinition[];
1064
1250
  presets: ScopePreset[];
1251
+ /**
1252
+ * AccountScopes are the account holder's own scopes (approvals,
1253
+ * profile and sessions, keys, billing writes) a sign-in may be approved
1254
+ * for: the device approval page offers them as their own section. No
1255
+ * key or app is ever granted one.
1256
+ */
1257
+ account_scopes: ScopeDefinition[];
1258
+ /**
1259
+ * LoginPreset is what the device approval page preselects for
1260
+ * `belt login`: the standard preset plus approvals:write (answering
1261
+ * the person's own approvals from the CLI). Its Grants is what such a
1262
+ * login holds (LoginGrants).
1263
+ */
1264
+ login_preset: ScopePreset;
1065
1265
  }
1066
1266
  /**
1067
1267
  * ScopePreset represents a predefined bundle of scopes for common use cases
@@ -1073,6 +1273,17 @@ export interface ScopePreset {
1073
1273
  scopes: Scope[];
1074
1274
  summary?: string[];
1075
1275
  hidden?: boolean;
1276
+ /**
1277
+ * Default: the preset a new key or app grant starts from.
1278
+ */
1279
+ default?: boolean;
1280
+ /**
1281
+ * Grants is every action scope the preset's key holds (Scopes expanded:
1282
+ * a resource scope's actions, the read a write implies, secrets:reveal
1283
+ * with secrets:read; never a sign-in-only scope), so a client compares a
1284
+ * key against it without re-deriving the rule (ApiKeyDTO.Grants).
1285
+ */
1286
+ grants?: Scope[];
1076
1287
  }
1077
1288
  /**
1078
1289
  * ApiKeyDTO for API responses
@@ -1086,6 +1297,12 @@ export interface ApiKeyDTO extends BaseModelDTO, PermissionModelDTO {
1086
1297
  last_used_at?: string;
1087
1298
  expires_at?: string;
1088
1299
  scopes: Scope[];
1300
+ /**
1301
+ * Grants is every action scope the key holds: Scopes expanded the way a
1302
+ * request with the key is checked (models.KeyGrants), every key scope
1303
+ * for a key created without any.
1304
+ */
1305
+ grants: Scope[];
1089
1306
  source?: string;
1090
1307
  /**
1091
1308
  * Scope is who the key acts as: its creator (user) or the workspace.
@@ -1227,8 +1444,9 @@ export interface AppDTO extends BaseModelDTO, PermissionModelDTO {
1227
1444
  category: AppCategory;
1228
1445
  images: AppImages;
1229
1446
  /**
1230
- * Tags name what the app does and its traits, as lowercase slugs. Known
1231
- * slugs are the shared.AppTag constants; others are free-form.
1447
+ * Tags name what the app does and its traits, as lowercase slugs
1448
+ * (text-to-image, open-weights). GET /store/tags lists the ones in use
1449
+ * with their titles.
1232
1450
  */
1233
1451
  tags: string[];
1234
1452
  version_id: string;
@@ -1254,6 +1472,30 @@ export interface AppDTO extends BaseModelDTO, PermissionModelDTO {
1254
1472
  export interface AppUIRef {
1255
1473
  artifact: string;
1256
1474
  }
1475
+ /**
1476
+ * AppSandbox is what an app version's container may do beyond the engine's
1477
+ * default hardening, as its package's inf.yml declares it:
1478
+ * sandbox:
1479
+ * host_network: true # share the host's network namespace
1480
+ * capabilities: [SYS_PTRACE] # Linux capabilities the app's processes keep
1481
+ * The API reads it from the package when the version is deployed and stores
1482
+ * it on the version (server-owned: no caller writes it). Engines enforce the
1483
+ * copy the task dispatch carries, and store review shows it. The empty value
1484
+ * declares no exception.
1485
+ */
1486
+ export interface AppSandbox {
1487
+ /**
1488
+ * HostNetwork runs the container on the host's network: it reaches the
1489
+ * host's services and the cloud metadata service.
1490
+ */
1491
+ host_network?: boolean;
1492
+ /**
1493
+ * Capabilities are Linux capability names without the CAP_ prefix, in
1494
+ * upper case. The container is given them and the app's processes keep
1495
+ * them.
1496
+ */
1497
+ capabilities?: string[];
1498
+ }
1257
1499
  /**
1258
1500
  * AppVersionDTO is the API response for an app version.
1259
1501
  */
@@ -1282,6 +1524,12 @@ export interface AppVersionDTO extends BaseModelDTO {
1282
1524
  required_secrets?: SecretRequirement[];
1283
1525
  required_credentials?: CredentialRequirement[];
1284
1526
  resources: AppResources;
1527
+ /**
1528
+ * Sandbox is the version's declared sandbox exceptions. Absent on a
1529
+ * version deployed before the API recorded them (engines then read the
1530
+ * package's inf.yml) and on a version with no package (a flow app).
1531
+ */
1532
+ sandbox?: AppSandbox;
1285
1533
  checksum?: string;
1286
1534
  }
1287
1535
  /**
@@ -2028,6 +2276,40 @@ export interface AlwaysAllowOptionsDTO {
2028
2276
  * own rules, or no chat rule could allow this call.
2029
2277
  */
2030
2278
  unavailable?: string;
2279
+ /**
2280
+ * SecretSend is set when the call is an agent of another team sending
2281
+ * the runner's own secrets: what it sends and where. Approving the call
2282
+ * sends them; the prompt names them.
2283
+ */
2284
+ secret_send?: SecretSendDTO;
2285
+ }
2286
+ /**
2287
+ * SecretSendDTO is an agent of another team asking to send the runner's
2288
+ * secrets with a call: "alice/helper wants to send OPENAI_API_KEY to
2289
+ * alice.example". It rides on the call's approval interrupt (meta
2290
+ * secret_send) and on its always-allow options.
2291
+ */
2292
+ export interface SecretSendDTO {
2293
+ /**
2294
+ * Agent is the agent as people know it (namespace/name); AgentID is
2295
+ * its id.
2296
+ */
2297
+ agent: string;
2298
+ agent_id: string;
2299
+ /**
2300
+ * AgentVersionID is the agent version making the call: approving the
2301
+ * prompt approves this version's send only.
2302
+ */
2303
+ agent_version_id: string;
2304
+ /**
2305
+ * Host is where the call sends them.
2306
+ */
2307
+ host: string;
2308
+ /**
2309
+ * Secrets are the runner's secrets the call sends, by name: secret
2310
+ * keys (OPENAI_API_KEY) and logins (credential:github).
2311
+ */
2312
+ secrets: string[];
2031
2313
  }
2032
2314
  /**
2033
2315
  * AlwaysAllowRequest is POST /chats/{id}/tools/{toolId}/always-allow. The
@@ -2108,6 +2390,12 @@ export interface CredentialDTO extends BaseModelDTO, PermissionModelDTO {
2108
2390
  status: CredentialStatus;
2109
2391
  display_name: string;
2110
2392
  icon_url?: string;
2393
+ /**
2394
+ * AccountID is the provider's own, unchanging id for the account; what
2395
+ * an account is named by when choosing one. AccountIdentifier is its
2396
+ * label (an email, an @handle).
2397
+ */
2398
+ account_id?: string;
2111
2399
  account_identifier?: string;
2112
2400
  account_name?: string;
2113
2401
  scopes: StringSlice;
@@ -2154,7 +2442,17 @@ export interface CredentialConfigDTO {
2154
2442
  * itself (models.AuthScheme), so the UI can offer edit and remove.
2155
2443
  */
2156
2444
  auth_scheme_id?: string;
2445
+ /**
2446
+ * Credential is the login used where no account is named: the caller's
2447
+ * own, else the workspace's default account.
2448
+ */
2157
2449
  credential?: CredentialDTO;
2450
+ /**
2451
+ * Accounts is every login to this provider the caller can use, in that
2452
+ * order (Credential first). More than one when several accounts are
2453
+ * connected.
2454
+ */
2455
+ accounts?: (CredentialDTO | undefined)[];
2158
2456
  }
2159
2457
  /**
2160
2458
  * SecretFieldConfig defines a secret field for the UI
@@ -2438,7 +2736,7 @@ export interface DecideEntitlementRequestRequest {
2438
2736
  * and APIError.Code on the legacy envelope. Clients branch on these, so a
2439
2737
  * code is a named const here, where it generates into models and the SDKs.
2440
2738
  */
2441
- export type ErrorCode = "invalid_request" | "validation_error" | "unauthorized" | "forbidden" | "not_found" | "conflict" | "name_conflict" | "already_exists" | "not_configured" | "method_not_allowed" | "rate_limited" | "internal_error" | "team_role_required" | "blocked_by_usage_policy" | "last_owner" | "account_deactivated" | "account_banned" | "person_required" | "otp_required" | "mcp_auth_expired" | "limit_exceeded" | "feature_not_available" | "entitlement_unavailable" | "payment_required" | "payment_method_required" | "form_closed" | "already_submitted" | "already_claimed" | "already_entitled" | "request_open" | "agents_disabled" | "remote_offline" | "remote_timeout" | "harness_not_drivable" | "harness_too_old";
2739
+ export type ErrorCode = "invalid_request" | "validation_error" | "unauthorized" | "forbidden" | "not_found" | "conflict" | "name_conflict" | "already_exists" | "not_configured" | "method_not_allowed" | "rate_limited" | "internal_error" | "team_role_required" | "blocked_by_usage_policy" | "last_owner" | "account_deactivated" | "account_banned" | "person_required" | "otp_required" | "requires_sign_in" | "insufficient_scope" | "impersonation_reason_required" | "mcp_auth_expired" | "admin_session_required" | "admin_scopes_not_approved" | "cli_session_required" | "admin_required" | "same_admin_required" | "browser_session_required" | "invalid_ttl" | "admin_authenticator_required" | "limit_exceeded" | "feature_not_available" | "entitlement_unavailable" | "payment_required" | "payment_method_required" | "form_closed" | "already_submitted" | "already_claimed" | "already_entitled" | "request_open" | "invalid_code" | "already_processed" | "expired" | "app_retired" | "app_maintenance" | "invalid_transition" | "SESSION_NOT_FOUND" | "SESSION_EXPIRED" | "SESSION_ENDED" | "WORKER_LEASED" | "APP_MISMATCH" | "VERSION_MISMATCH" | "agents_disabled" | "remote_offline" | "remote_timeout" | "harness_not_drivable" | "harness_too_old";
2442
2740
  export declare const ErrorCodeInvalidRequest: ErrorCode;
2443
2741
  export declare const ErrorCodeValidationError: ErrorCode;
2444
2742
  export declare const ErrorCodeUnauthorized: ErrorCode;
@@ -2482,7 +2780,59 @@ export declare const ErrorCodeAccountBanned: ErrorCode;
2482
2780
  */
2483
2781
  export declare const ErrorCodePersonRequired: ErrorCode;
2484
2782
  export declare const ErrorCodeOTPRequired: ErrorCode;
2783
+ /**
2784
+ * ErrorCodeRequiresSignIn (403): the action needs a scope only the
2785
+ * account holder's own sign-in holds (answering an approval, widening a
2786
+ * chat's approval policy, the account, API keys, billing changes,
2787
+ * admin), and the request carried an API key, an app's OAuth token or
2788
+ * another delegated credential. Sign in on the web app or with `belt
2789
+ * login` to do it.
2790
+ */
2791
+ export declare const ErrorCodeRequiresSignIn: ErrorCode;
2792
+ /**
2793
+ * ErrorCodeInsufficientScope (403): the credential does not hold the
2794
+ * scope the operation takes (an API key, an app's OAuth token or a
2795
+ * narrowed login granted less). The detail names the scope.
2796
+ */
2797
+ export declare const ErrorCodeInsufficientScope: ErrorCode;
2798
+ /**
2799
+ * ErrorCodeImpersonationReasonRequired (403): a platform admin named a
2800
+ * team they are not a member of without a live impersonation grant.
2801
+ * Clients stop viewing as the team on it.
2802
+ */
2803
+ export declare const ErrorCodeImpersonationReasonRequired: ErrorCode;
2485
2804
  export declare const ErrorCodeMCPAuthExpired: ErrorCode;
2805
+ /**
2806
+ * Admin elevation ("belt admin elevate"). AdminSessionRequired (403): a
2807
+ * platform admin's credential that carries no admin power reached an
2808
+ * admin route; a CLI login gets it by elevating. CLISessionRequired
2809
+ * (403): only a CLI login may ask to be elevated. AdminRequired (403):
2810
+ * only a platform admin may ask for or grant one. SameAdminRequired
2811
+ * (403): the elevation was asked for by another account.
2812
+ * BrowserSessionRequired (403): only the admin's own browser sign-in
2813
+ * grants one, and only the person's own browser sign-in changes how the
2814
+ * account is signed into (authenticator enrollment, RequireBrowserSession).
2815
+ * InvalidTTL (400): the elevation asked for a window outside
2816
+ * models.AdminElevationMinTTL..AdminElevationMaxTTL.
2817
+ * AdminScopesNotApproved (403): a platform admin's CLI login was approved
2818
+ * with a scope list that does not name the admin scopes, so it can't be
2819
+ * elevated: log in again approving them, then elevate.
2820
+ */
2821
+ export declare const ErrorCodeAdminSessionRequired: ErrorCode;
2822
+ export declare const ErrorCodeAdminScopesNotApproved: ErrorCode;
2823
+ export declare const ErrorCodeCLISessionRequired: ErrorCode;
2824
+ export declare const ErrorCodeAdminRequired: ErrorCode;
2825
+ export declare const ErrorCodeSameAdminRequired: ErrorCode;
2826
+ export declare const ErrorCodeBrowserSessionRequired: ErrorCode;
2827
+ export declare const ErrorCodeInvalidTTL: ErrorCode;
2828
+ /**
2829
+ * AdminAuthenticatorRequired (403): a platform admin without an
2830
+ * authenticator app (TOTP) enrolled. Admin power needs one; until it is
2831
+ * enrolled (POST /auth/totp/enroll, then /auth/totp/confirm) the admin
2832
+ * works as an ordinary member. An admin who has one but whose session
2833
+ * has not proved it gets otp_required instead: re-authenticate with it.
2834
+ */
2835
+ export declare const ErrorCodeAdminAuthenticatorRequired: ErrorCode;
2486
2836
  /**
2487
2837
  * Entitlements. LimitExceeded (402) and FeatureNotAvailable (403) carry
2488
2838
  * EntitlementErrorMeta. EntitlementUnavailable (500) means the plan could
@@ -2515,6 +2865,32 @@ export declare const ErrorCodeAlreadyClaimed: ErrorCode;
2515
2865
  */
2516
2866
  export declare const ErrorCodeAlreadyEntitled: ErrorCode;
2517
2867
  export declare const ErrorCodeRequestOpen: ErrorCode;
2868
+ /**
2869
+ * Authorization codes (device sign-in, admin elevation) (400): the code
2870
+ * is unknown, already approved or denied, or past its expiry.
2871
+ */
2872
+ export declare const ErrorCodeInvalidCode: ErrorCode;
2873
+ export declare const ErrorCodeAlreadyProcessed: ErrorCode;
2874
+ export declare const ErrorCodeExpired: ErrorCode;
2875
+ /**
2876
+ * Run-time refusals. AppRetired (410): the app no longer runs.
2877
+ * AppMaintenance (503, Retry-After): the owner paused it; the message is
2878
+ * theirs. InvalidTransition (409): the task already moved on.
2879
+ */
2880
+ export declare const ErrorCodeAppRetired: ErrorCode;
2881
+ export declare const ErrorCodeAppMaintenance: ErrorCode;
2882
+ export declare const ErrorCodeInvalidTransition: ErrorCode;
2883
+ /**
2884
+ * Session-bound runs. SessionNotFound (404), SessionExpired and
2885
+ * SessionEnded (410), WorkerLeased, AppMismatch and VersionMismatch
2886
+ * (409). The SDKs match these upper-case strings.
2887
+ */
2888
+ export declare const ErrorCodeSessionNotFound: ErrorCode;
2889
+ export declare const ErrorCodeSessionExpired: ErrorCode;
2890
+ export declare const ErrorCodeSessionEnded: ErrorCode;
2891
+ export declare const ErrorCodeWorkerLeased: ErrorCode;
2892
+ export declare const ErrorCodeAppMismatch: ErrorCode;
2893
+ export declare const ErrorCodeVersionMismatch: ErrorCode;
2518
2894
  /**
2519
2895
  * Remote harness refusals.
2520
2896
  */
@@ -2535,6 +2911,14 @@ export interface TeamRoleRequiredMeta {
2535
2911
  required_role?: TeamRole;
2536
2912
  requires_org_admin?: boolean;
2537
2913
  }
2914
+ /**
2915
+ * ScopeRefusedMeta is the meta of an insufficient_scope or
2916
+ * requires_sign_in error: the scope the operation declares and the
2917
+ * credential does not hold. The detail says what would hold it.
2918
+ */
2919
+ export interface ScopeRefusedMeta {
2920
+ required_scope: Scope;
2921
+ }
2538
2922
  /**
2539
2923
  * PaymentMethodRequiredMeta is the meta of a payment_method_required error.
2540
2924
  */
@@ -4010,12 +4394,23 @@ export interface CheckRequirementsResponse {
4010
4394
  export interface ResourceShareDTO extends BaseModelDTO {
4011
4395
  resource_id: string;
4012
4396
  resource_type: string;
4397
+ /**
4398
+ * UserID names the person a share is to; TeamID, with UserID empty,
4399
+ * the resource's whole team.
4400
+ */
4013
4401
  user_id: string;
4402
+ team_id?: string;
4014
4403
  user?: UserRelationDTO;
4015
4404
  permission: Permission;
4016
4405
  }
4406
+ /**
4407
+ * ShareRequest is POST /{resource}/{id}/share: a share to one person
4408
+ * (user_id) or to the resource's whole team (team: true), at a permission
4409
+ * (read when empty).
4410
+ */
4017
4411
  export interface ShareRequest {
4018
- user_id: string;
4412
+ user_id?: string;
4413
+ team?: boolean;
4019
4414
  permission: Permission;
4020
4415
  }
4021
4416
  /**
@@ -4088,6 +4483,23 @@ export interface StatBuckets {
4088
4483
  this_week: number;
4089
4484
  all_time: number;
4090
4485
  }
4486
+ export interface StoreCategoryDTO {
4487
+ slug: string;
4488
+ name: string;
4489
+ description: string;
4490
+ icon: string;
4491
+ rank: number;
4492
+ count: number;
4493
+ }
4494
+ /**
4495
+ * StoreTagDTO is one app tag the store lists: a tag at least
4496
+ * shared.MinAppsPerListedTag public apps carry.
4497
+ */
4498
+ export interface StoreTagDTO {
4499
+ slug: string;
4500
+ title: string;
4501
+ count: number;
4502
+ }
4091
4503
  /**
4092
4504
  * SubscriptionDTO for API responses
4093
4505
  */
@@ -4471,10 +4883,34 @@ export interface TelemetryReportDTO extends BaseModelDTO, PermissionModelDTO {
4471
4883
  [key: string]: any;
4472
4884
  };
4473
4885
  }
4886
+ /**
4887
+ * SubmitTelemetryRequest is the CLI's diagnostics report for an account the
4888
+ * abuse redlist flags. Payload is the host report (platform, locale,
4889
+ * network); Device carries the identifiers that recognise the same machine
4890
+ * across accounts. The API stores Device's hashes for matching and its
4891
+ * readable names encrypted, apart from the payload.
4892
+ */
4474
4893
  export interface SubmitTelemetryRequest {
4475
4894
  payload: {
4476
4895
  [key: string]: any;
4477
4896
  };
4897
+ device?: DeviceEvidence;
4898
+ }
4899
+ /**
4900
+ * DeviceEvidence is what a flagged account's CLI sends about its machine:
4901
+ * salted hashes of the hostname, OS user, git user.name, MAC addresses and
4902
+ * SSH key fingerprints, and the hostname, OS user and git user.name readable.
4903
+ */
4904
+ export interface DeviceEvidence {
4905
+ scheme: string;
4906
+ hostname_hash?: string;
4907
+ username_hash?: string;
4908
+ git_user_name_hash?: string;
4909
+ mac_hashes?: string[];
4910
+ ssh_key_fingerprint_hashes?: string[];
4911
+ hostname?: string;
4912
+ username?: string;
4913
+ git_user_name?: string;
4478
4914
  }
4479
4915
  /**
4480
4916
  * ToolInvocationFunction contains the function details for a tool invocation
@@ -4857,269 +5293,6 @@ export declare const AppCategoryFlow: AppCategory;
4857
5293
  * Decision models: typed questions in, a probability for every answer out, no generation.
4858
5294
  */
4859
5295
  export declare const AppCategoryDecision: AppCategory;
4860
- /**
4861
- * AppTag is a known app tag: a lowercase slug naming a task an app performs
4862
- * (text-to-image) or a trait it has (open-weights). An app's tags are free
4863
- * strings; the ones listed here are the tags clients present by title and
4864
- * build pages for. Each has an AppTagTitle constant with the same suffix.
4865
- */
4866
- export type AppTag = "text-to-image" | "image-to-image" | "image-editing" | "image-upscaling" | "background-removal" | "training" | "lora" | "pbr-materials" | "text-to-video" | "image-to-video" | "reference-to-video" | "video-to-video" | "video-upscaling" | "video-extension" | "video-enhancement" | "lip-sync" | "talking-avatar" | "native-audio" | "text-to-speech" | "speech-to-text" | "voice-cloning" | "voice-design" | "music-generation" | "sound-effects" | "realtime" | "reasoning" | "vision" | "coding" | "open-weights" | "classification" | "moderation" | "routing" | "web-search" | "web-scraping" | "deep-research" | "research-papers" | "social-media" | "messaging" | "productivity" | "media-utilities" | "rendering" | "evaluation";
4867
- /**
4868
- * The list holds tags that at least three public apps carry, so each one
4869
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
4870
- */
4871
- export declare const AppTagTextToImage: AppTag;
4872
- /**
4873
- * The list holds tags that at least three public apps carry, so each one
4874
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
4875
- */
4876
- export declare const AppTagImageToImage: AppTag;
4877
- /**
4878
- * The list holds tags that at least three public apps carry, so each one
4879
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
4880
- */
4881
- export declare const AppTagImageEditing: AppTag;
4882
- /**
4883
- * The list holds tags that at least three public apps carry, so each one
4884
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
4885
- */
4886
- export declare const AppTagImageUpscaling: AppTag;
4887
- /**
4888
- * The list holds tags that at least three public apps carry, so each one
4889
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
4890
- */
4891
- export declare const AppTagBackgroundRemoval: AppTag;
4892
- /**
4893
- * The list holds tags that at least three public apps carry, so each one
4894
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
4895
- */
4896
- export declare const AppTagTraining: AppTag;
4897
- /**
4898
- * The list holds tags that at least three public apps carry, so each one
4899
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
4900
- */
4901
- export declare const AppTagLoRA: AppTag;
4902
- /**
4903
- * The list holds tags that at least three public apps carry, so each one
4904
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
4905
- */
4906
- export declare const AppTagPBRMaterials: AppTag;
4907
- /**
4908
- * The list holds tags that at least three public apps carry, so each one
4909
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
4910
- */
4911
- export declare const AppTagTextToVideo: AppTag;
4912
- /**
4913
- * The list holds tags that at least three public apps carry, so each one
4914
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
4915
- */
4916
- export declare const AppTagImageToVideo: AppTag;
4917
- /**
4918
- * The list holds tags that at least three public apps carry, so each one
4919
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
4920
- */
4921
- export declare const AppTagReferenceToVideo: AppTag;
4922
- /**
4923
- * The list holds tags that at least three public apps carry, so each one
4924
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
4925
- */
4926
- export declare const AppTagVideoToVideo: AppTag;
4927
- /**
4928
- * The list holds tags that at least three public apps carry, so each one
4929
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
4930
- */
4931
- export declare const AppTagVideoUpscaling: AppTag;
4932
- /**
4933
- * The list holds tags that at least three public apps carry, so each one
4934
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
4935
- */
4936
- export declare const AppTagVideoExtension: AppTag;
4937
- /**
4938
- * The list holds tags that at least three public apps carry, so each one
4939
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
4940
- */
4941
- export declare const AppTagVideoEnhancement: AppTag;
4942
- /**
4943
- * The list holds tags that at least three public apps carry, so each one
4944
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
4945
- */
4946
- export declare const AppTagLipSync: AppTag;
4947
- /**
4948
- * The list holds tags that at least three public apps carry, so each one
4949
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
4950
- */
4951
- export declare const AppTagTalkingAvatar: AppTag;
4952
- /**
4953
- * The list holds tags that at least three public apps carry, so each one
4954
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
4955
- */
4956
- export declare const AppTagNativeAudio: AppTag;
4957
- /**
4958
- * The list holds tags that at least three public apps carry, so each one
4959
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
4960
- */
4961
- export declare const AppTagTextToSpeech: AppTag;
4962
- /**
4963
- * The list holds tags that at least three public apps carry, so each one
4964
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
4965
- */
4966
- export declare const AppTagSpeechToText: AppTag;
4967
- /**
4968
- * The list holds tags that at least three public apps carry, so each one
4969
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
4970
- */
4971
- export declare const AppTagVoiceCloning: AppTag;
4972
- /**
4973
- * The list holds tags that at least three public apps carry, so each one
4974
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
4975
- */
4976
- export declare const AppTagVoiceDesign: AppTag;
4977
- /**
4978
- * The list holds tags that at least three public apps carry, so each one
4979
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
4980
- */
4981
- export declare const AppTagMusicGeneration: AppTag;
4982
- /**
4983
- * The list holds tags that at least three public apps carry, so each one
4984
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
4985
- */
4986
- export declare const AppTagSoundEffects: AppTag;
4987
- /**
4988
- * The list holds tags that at least three public apps carry, so each one
4989
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
4990
- */
4991
- export declare const AppTagRealtime: AppTag;
4992
- /**
4993
- * The list holds tags that at least three public apps carry, so each one
4994
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
4995
- */
4996
- export declare const AppTagReasoning: AppTag;
4997
- /**
4998
- * The list holds tags that at least three public apps carry, so each one
4999
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
5000
- */
5001
- export declare const AppTagVision: AppTag;
5002
- /**
5003
- * The list holds tags that at least three public apps carry, so each one
5004
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
5005
- */
5006
- export declare const AppTagCoding: AppTag;
5007
- /**
5008
- * The list holds tags that at least three public apps carry, so each one
5009
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
5010
- */
5011
- export declare const AppTagOpenWeights: AppTag;
5012
- /**
5013
- * The list holds tags that at least three public apps carry, so each one
5014
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
5015
- */
5016
- export declare const AppTagClassification: AppTag;
5017
- /**
5018
- * The list holds tags that at least three public apps carry, so each one
5019
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
5020
- */
5021
- export declare const AppTagModeration: AppTag;
5022
- /**
5023
- * The list holds tags that at least three public apps carry, so each one
5024
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
5025
- */
5026
- export declare const AppTagRouting: AppTag;
5027
- /**
5028
- * The list holds tags that at least three public apps carry, so each one
5029
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
5030
- */
5031
- export declare const AppTagWebSearch: AppTag;
5032
- /**
5033
- * The list holds tags that at least three public apps carry, so each one
5034
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
5035
- */
5036
- export declare const AppTagWebScraping: AppTag;
5037
- /**
5038
- * The list holds tags that at least three public apps carry, so each one
5039
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
5040
- */
5041
- export declare const AppTagDeepResearch: AppTag;
5042
- /**
5043
- * The list holds tags that at least three public apps carry, so each one
5044
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
5045
- */
5046
- export declare const AppTagResearchPapers: AppTag;
5047
- /**
5048
- * The list holds tags that at least three public apps carry, so each one
5049
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
5050
- */
5051
- export declare const AppTagSocialMedia: AppTag;
5052
- /**
5053
- * The list holds tags that at least three public apps carry, so each one
5054
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
5055
- */
5056
- export declare const AppTagMessaging: AppTag;
5057
- /**
5058
- * The list holds tags that at least three public apps carry, so each one
5059
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
5060
- */
5061
- export declare const AppTagProductivity: AppTag;
5062
- /**
5063
- * The list holds tags that at least three public apps carry, so each one
5064
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
5065
- */
5066
- export declare const AppTagMediaUtilities: AppTag;
5067
- /**
5068
- * The list holds tags that at least three public apps carry, so each one
5069
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
5070
- */
5071
- export declare const AppTagRendering: AppTag;
5072
- /**
5073
- * The list holds tags that at least three public apps carry, so each one
5074
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
5075
- */
5076
- export declare const AppTagEvaluation: AppTag;
5077
- /**
5078
- * AppTagTitle is the display title of a known AppTag.
5079
- */
5080
- export type AppTagTitle = "Text to Image" | "Image to Image" | "Image Editing" | "Image Upscaling" | "Background Removal" | "Model Training" | "LoRA" | "PBR Materials" | "Text to Video" | "Image to Video" | "Reference to Video" | "Video to Video" | "Video Upscaling" | "Video Extension" | "Video Enhancement" | "Lip Sync" | "Talking Avatar" | "Native Audio" | "Text to Speech" | "Speech to Text" | "Voice Cloning" | "Voice Design" | "Music Generation" | "Sound Effects" | "Realtime" | "Reasoning" | "Vision" | "Coding" | "Open Weights" | "Classification" | "Moderation" | "Routing" | "Web Search" | "Web Scraping" | "Deep Research" | "Research Papers" | "Social Media" | "Messaging" | "Productivity" | "Media Utilities" | "Rendering" | "Evaluation";
5081
- export declare const AppTagTitleTextToImage: AppTagTitle;
5082
- export declare const AppTagTitleImageToImage: AppTagTitle;
5083
- export declare const AppTagTitleImageEditing: AppTagTitle;
5084
- export declare const AppTagTitleImageUpscaling: AppTagTitle;
5085
- export declare const AppTagTitleBackgroundRemoval: AppTagTitle;
5086
- export declare const AppTagTitleTraining: AppTagTitle;
5087
- export declare const AppTagTitleLoRA: AppTagTitle;
5088
- export declare const AppTagTitlePBRMaterials: AppTagTitle;
5089
- export declare const AppTagTitleTextToVideo: AppTagTitle;
5090
- export declare const AppTagTitleImageToVideo: AppTagTitle;
5091
- export declare const AppTagTitleReferenceToVideo: AppTagTitle;
5092
- export declare const AppTagTitleVideoToVideo: AppTagTitle;
5093
- export declare const AppTagTitleVideoUpscaling: AppTagTitle;
5094
- export declare const AppTagTitleVideoExtension: AppTagTitle;
5095
- export declare const AppTagTitleVideoEnhancement: AppTagTitle;
5096
- export declare const AppTagTitleLipSync: AppTagTitle;
5097
- export declare const AppTagTitleTalkingAvatar: AppTagTitle;
5098
- export declare const AppTagTitleNativeAudio: AppTagTitle;
5099
- export declare const AppTagTitleTextToSpeech: AppTagTitle;
5100
- export declare const AppTagTitleSpeechToText: AppTagTitle;
5101
- export declare const AppTagTitleVoiceCloning: AppTagTitle;
5102
- export declare const AppTagTitleVoiceDesign: AppTagTitle;
5103
- export declare const AppTagTitleMusicGeneration: AppTagTitle;
5104
- export declare const AppTagTitleSoundEffects: AppTagTitle;
5105
- export declare const AppTagTitleRealtime: AppTagTitle;
5106
- export declare const AppTagTitleReasoning: AppTagTitle;
5107
- export declare const AppTagTitleVision: AppTagTitle;
5108
- export declare const AppTagTitleCoding: AppTagTitle;
5109
- export declare const AppTagTitleOpenWeights: AppTagTitle;
5110
- export declare const AppTagTitleClassification: AppTagTitle;
5111
- export declare const AppTagTitleModeration: AppTagTitle;
5112
- export declare const AppTagTitleRouting: AppTagTitle;
5113
- export declare const AppTagTitleWebSearch: AppTagTitle;
5114
- export declare const AppTagTitleWebScraping: AppTagTitle;
5115
- export declare const AppTagTitleDeepResearch: AppTagTitle;
5116
- export declare const AppTagTitleResearchPapers: AppTagTitle;
5117
- export declare const AppTagTitleSocialMedia: AppTagTitle;
5118
- export declare const AppTagTitleMessaging: AppTagTitle;
5119
- export declare const AppTagTitleProductivity: AppTagTitle;
5120
- export declare const AppTagTitleMediaUtilities: AppTagTitle;
5121
- export declare const AppTagTitleRendering: AppTagTitle;
5122
- export declare const AppTagTitleEvaluation: AppTagTitle;
5123
5296
  export type AppStatus = "active" | "maintenance" | "deprecated" | "retired";
5124
5297
  export declare const AppStatusActive: AppStatus;
5125
5298
  export declare const AppStatusMaintenance: AppStatus;
@@ -5323,6 +5496,148 @@ export interface ChannelContext {
5323
5496
  channel_type?: ChannelType;
5324
5497
  channel_metadata?: any;
5325
5498
  }
5499
+ /**
5500
+ * DecisionChoiceOption is one answer option of a choice question.
5501
+ */
5502
+ export interface DecisionChoiceOption {
5503
+ /**
5504
+ * Name is returned as the choice and keys the probabilities.
5505
+ */
5506
+ name: string;
5507
+ /**
5508
+ * Description says what the option covers.
5509
+ */
5510
+ description?: any;
5511
+ }
5512
+ /**
5513
+ * DecisionChoiceQuestion asks which one of a fixed set of options holds.
5514
+ */
5515
+ export interface DecisionChoiceQuestion {
5516
+ /**
5517
+ * ID is the caller's key for the question; its answer comes back under it.
5518
+ */
5519
+ id: string;
5520
+ instructions: any;
5521
+ options: DecisionChoiceOption[];
5522
+ }
5523
+ /**
5524
+ * DecisionScoreQuestion asks where the state sits on ordered levels.
5525
+ */
5526
+ export interface DecisionScoreQuestion {
5527
+ id: string;
5528
+ instructions: any;
5529
+ /**
5530
+ * Levels are described low end to high end; a level's number is its index.
5531
+ */
5532
+ levels: any[];
5533
+ }
5534
+ /**
5535
+ * DecisionNoulCriteria pins down what yes and no mean for a noul question.
5536
+ */
5537
+ export interface DecisionNoulCriteria {
5538
+ true?: any;
5539
+ false?: any;
5540
+ }
5541
+ /**
5542
+ * DecisionNoulQuestion asks for the probability that something is true.
5543
+ */
5544
+ export interface DecisionNoulQuestion {
5545
+ id: string;
5546
+ instructions: any;
5547
+ criteria?: DecisionNoulCriteria;
5548
+ }
5549
+ /**
5550
+ * DecisionInput is one state and the questions asked of it.
5551
+ */
5552
+ export interface DecisionInput {
5553
+ state: any;
5554
+ choices?: DecisionChoiceQuestion[];
5555
+ scores?: DecisionScoreQuestion[];
5556
+ nouls?: DecisionNoulQuestion[];
5557
+ }
5558
+ /**
5559
+ * DecisionVisionInput is the input of a decision model that also sees
5560
+ * images: a DecisionInput plus the images the questions are about.
5561
+ */
5562
+ export interface DecisionVisionInput extends DecisionInput {
5563
+ /**
5564
+ * Images are file URIs. Every question sees them.
5565
+ */
5566
+ images?: string[];
5567
+ }
5568
+ /**
5569
+ * DecisionChoiceAnswer is the answer to a choice question.
5570
+ */
5571
+ export interface DecisionChoiceAnswer {
5572
+ /**
5573
+ * Choice is the highest-probability option.
5574
+ */
5575
+ choice: string;
5576
+ confidence: number;
5577
+ /**
5578
+ * Probabilities maps every option name to its probability.
5579
+ */
5580
+ probabilities: {
5581
+ [key: string]: number;
5582
+ };
5583
+ }
5584
+ /**
5585
+ * DecisionScoreAnswer is the answer to a score question.
5586
+ */
5587
+ export interface DecisionScoreAnswer {
5588
+ /**
5589
+ * Score is the probability-weighted level, 0 to the top level number.
5590
+ */
5591
+ score: number;
5592
+ /**
5593
+ * Normalized is Score over the top level number: 0 to 1.
5594
+ */
5595
+ normalized: number;
5596
+ confidence: number;
5597
+ /**
5598
+ * Probabilities maps each level number, as a string, to its probability.
5599
+ */
5600
+ probabilities: {
5601
+ [key: string]: number;
5602
+ };
5603
+ /**
5604
+ * Legend maps each level number back to its description.
5605
+ */
5606
+ legend: {
5607
+ [key: string]: any;
5608
+ };
5609
+ }
5610
+ /**
5611
+ * DecisionNoulAnswer is the answer to a noul question.
5612
+ */
5613
+ export interface DecisionNoulAnswer {
5614
+ /**
5615
+ * Noul is the probability that the answer is yes.
5616
+ */
5617
+ noul: number;
5618
+ }
5619
+ /**
5620
+ * DecisionOutput is the answers, keyed by question id within each kind.
5621
+ */
5622
+ export interface DecisionOutput {
5623
+ choices: {
5624
+ [key: string]: DecisionChoiceAnswer;
5625
+ };
5626
+ scores: {
5627
+ [key: string]: DecisionScoreAnswer;
5628
+ };
5629
+ nouls: {
5630
+ [key: string]: DecisionNoulAnswer;
5631
+ };
5632
+ /**
5633
+ * Model is the model that answered.
5634
+ */
5635
+ model: string;
5636
+ /**
5637
+ * InputTokens is what the model read; decision models write none.
5638
+ */
5639
+ input_tokens: number;
5640
+ }
5326
5641
  /**
5327
5642
  * DescriptionLimit is the most characters a resource's description may have.
5328
5643
  */
@@ -6170,7 +6485,7 @@ export declare const PolicyEnforcementDisabled: PolicyEnforcement;
6170
6485
  /**
6171
6486
  * PolicyKind names what a rule governs; each kind has one matcher.
6172
6487
  */
6173
- export type PolicyKind = "RemoteExec" | "Workspace" | "Harness" | "Tool" | "App" | "Agent" | "Knowledge" | "Mcp" | "Flow" | "WebFetch";
6488
+ export type PolicyKind = "RemoteExec" | "Workspace" | "Harness" | "Tool" | "App" | "Agent" | "Knowledge" | "Mcp" | "Flow" | "WebFetch" | "SecretSend";
6174
6489
  /**
6175
6490
  * PolicyKindRemoteExec: shell commands run on a remote.
6176
6491
  */
@@ -6200,6 +6515,11 @@ export declare const PolicyKindFlow: PolicyKind;
6200
6515
  * PolicyKindWebFetch: fetched domains.
6201
6516
  */
6202
6517
  export declare const PolicyKindWebFetch: PolicyKind;
6518
+ /**
6519
+ * PolicyKindSecretSend: an agent of another team sending the runner's
6520
+ * secrets to a host.
6521
+ */
6522
+ export declare const PolicyKindSecretSend: PolicyKind;
6203
6523
  /**
6204
6524
  * FunctionKind is how an app function talks to its caller.
6205
6525
  */