@inferencesh/sdk 0.38.0 → 0.38.1

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.
@@ -48,4 +48,4 @@ export { useAgentChat, useAgentActions, useAgentClient, useAgentChatContext, use
48
48
  export { AgentChatContext, type AgentChatContextValue } from './context.js';
49
49
  export type { AgentClient, FileRef, AdHocAgentConfig, TemplateAgentConfig, AgentOptions, AgentChatState, AgentChatActions, AlwaysAllowChoice, ChatStatus, AgentChatProviderProps, ClientTool, ClientToolHandlerFn, ClientToolResult, } from './types.js';
50
50
  export { isAdHocConfig, isTemplateConfig, isClientTool, extractToolSchemas, extractClientToolHandlers, } from './types.js';
51
- export { MCPMethodElicitationCreate, parseMCPInputState, elicitParams, isURLElicitation, buildMCPInputResult, type MCPInputState, type ElicitRequestParams, type ElicitRequestedSchema, type ElicitPropertySchema, } from './mcp-input.js';
51
+ export { MCPMethodElicitationCreate, parseMCPInputState, elicitParams, isURLElicitation, buildMCPInputResult, type MCPInputState, type ElicitRequestParams, type ElicitRequestedSchema, type ElicitPropertySchema, type ElicitChoice, } from './mcp-input.js';
@@ -17,9 +17,20 @@ export interface MCPInputState {
17
17
  /** 1 for the first request; goes up each time the server asks again. */
18
18
  round: number;
19
19
  }
20
- /** One property of a form-mode requestedSchema (MCP restricts these to flat primitives). */
20
+ /** A choice of a single- or multi-select property: its value and label. */
21
+ export interface ElicitChoice {
22
+ const: string;
23
+ title?: string;
24
+ /** Not in MCP's schema; agents' questions carry one per choice. */
25
+ description?: string;
26
+ }
27
+ /**
28
+ * One property of a form-mode requestedSchema. MCP restricts these to flat
29
+ * primitives, single-select strings (enum or oneOf) and, since 2025-11-25,
30
+ * multi-select arrays whose items are an enum or anyOf.
31
+ */
21
32
  export interface ElicitPropertySchema {
22
- type?: 'string' | 'number' | 'integer' | 'boolean';
33
+ type?: 'string' | 'number' | 'integer' | 'boolean' | 'array';
23
34
  title?: string;
24
35
  description?: string;
25
36
  default?: unknown;
@@ -30,10 +41,15 @@ export interface ElicitPropertySchema {
30
41
  maximum?: number;
31
42
  enum?: string[];
32
43
  enumNames?: string[];
33
- oneOf?: {
34
- const: string;
35
- title?: string;
36
- }[];
44
+ oneOf?: ElicitChoice[];
45
+ /** A multi-select's choices (type array). */
46
+ items?: {
47
+ type?: 'string';
48
+ enum?: string[];
49
+ anyOf?: ElicitChoice[];
50
+ };
51
+ minItems?: number;
52
+ maxItems?: number;
37
53
  }
38
54
  export interface ElicitRequestedSchema {
39
55
  type?: 'object';
package/dist/types.d.ts CHANGED
@@ -931,7 +931,7 @@ export interface EstimateCostResponse {
931
931
  /**
932
932
  * Scope represents an API key permission scope string.
933
933
  */
934
- 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" | "store:pricing" | "store:submit" | "content:write";
934
+ export type Scope = "*" | "agents" | "apps" | "conversations" | "files" | "datastores" | "templates" | "flows" | "projects" | "teams" | "billing" | "artifacts" | "forms" | "bounties" | "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" | "sandboxes:read" | "sandboxes:write" | "apikeys:read" | "apikeys:write" | "knowledge:read" | "knowledge:write" | "artifacts:read" | "artifacts:write" | "forms:read" | "forms:write" | "forms:execute" | "bounties:read" | "bounties:execute" | "user:read" | "user:write" | "settings:read" | "settings:write" | "approvals:write" | "admin:read" | "admin:write" | "store:pricing" | "store:submit" | "content:write";
935
935
  /**
936
936
  * API Key Scopes - hierarchical permission system.
937
937
  * Resource-level scopes (e.g., "agents") imply all action-level scopes (e.g., "agents:read").
@@ -1002,6 +1002,18 @@ export declare const ScopeBilling: Scope;
1002
1002
  * Empty scopes = full access (for backwards compatibility with existing keys).
1003
1003
  */
1004
1004
  export declare const ScopeArtifacts: Scope;
1005
+ /**
1006
+ * API Key Scopes - hierarchical permission system.
1007
+ * Resource-level scopes (e.g., "agents") imply all action-level scopes (e.g., "agents:read").
1008
+ * Empty scopes = full access (for backwards compatibility with existing keys).
1009
+ */
1010
+ export declare const ScopeForms: Scope;
1011
+ /**
1012
+ * API Key Scopes - hierarchical permission system.
1013
+ * Resource-level scopes (e.g., "agents") imply all action-level scopes (e.g., "agents:read").
1014
+ * Empty scopes = full access (for backwards compatibility with existing keys).
1015
+ */
1016
+ export declare const ScopeBounties: Scope;
1005
1017
  /**
1006
1018
  * Action-level scopes for Agents
1007
1019
  */
@@ -1157,6 +1169,16 @@ export declare const ScopeRemotesRead: Scope;
1157
1169
  * Empty scopes = full access (for backwards compatibility with existing keys).
1158
1170
  */
1159
1171
  export declare const ScopeRemotesWrite: Scope;
1172
+ /**
1173
+ * Action-level scopes for Sandboxes (managed boxes that run a remote)
1174
+ */
1175
+ export declare const ScopeSandboxesRead: Scope;
1176
+ /**
1177
+ * API Key Scopes - hierarchical permission system.
1178
+ * Resource-level scopes (e.g., "agents") imply all action-level scopes (e.g., "agents:read").
1179
+ * Empty scopes = full access (for backwards compatibility with existing keys).
1180
+ */
1181
+ export declare const ScopeSandboxesWrite: Scope;
1160
1182
  /**
1161
1183
  * Action-level scopes for API Keys
1162
1184
  */
@@ -1187,6 +1209,34 @@ export declare const ScopeArtifactsRead: Scope;
1187
1209
  * Empty scopes = full access (for backwards compatibility with existing keys).
1188
1210
  */
1189
1211
  export declare const ScopeArtifactsWrite: Scope;
1212
+ /**
1213
+ * Action-level scopes for Forms: read sees forms, write creates and
1214
+ * manages them and reads their answers, execute submits answers.
1215
+ */
1216
+ export declare const ScopeFormsRead: Scope;
1217
+ /**
1218
+ * API Key Scopes - hierarchical permission system.
1219
+ * Resource-level scopes (e.g., "agents") imply all action-level scopes (e.g., "agents:read").
1220
+ * Empty scopes = full access (for backwards compatibility with existing keys).
1221
+ */
1222
+ export declare const ScopeFormsWrite: Scope;
1223
+ /**
1224
+ * API Key Scopes - hierarchical permission system.
1225
+ * Resource-level scopes (e.g., "agents") imply all action-level scopes (e.g., "agents:read").
1226
+ * Empty scopes = full access (for backwards compatibility with existing keys).
1227
+ */
1228
+ export declare const ScopeFormsExecute: Scope;
1229
+ /**
1230
+ * Action-level scopes for Bounties: read lists the programs, execute
1231
+ * claims one (only the account holder's own sign-in).
1232
+ */
1233
+ export declare const ScopeBountiesRead: Scope;
1234
+ /**
1235
+ * API Key Scopes - hierarchical permission system.
1236
+ * Resource-level scopes (e.g., "agents") imply all action-level scopes (e.g., "agents:read").
1237
+ * Empty scopes = full access (for backwards compatibility with existing keys).
1238
+ */
1239
+ export declare const ScopeBountiesExecute: Scope;
1190
1240
  /**
1191
1241
  * Action-level scopes for User profile
1192
1242
  */
@@ -1249,7 +1299,7 @@ export declare const ScopeContentWrite: Scope;
1249
1299
  /**
1250
1300
  * ScopeGroup identifies a category of scopes for UI grouping
1251
1301
  */
1252
- export type ScopeGroup = "agents" | "apps" | "conversations" | "files" | "datastores" | "flows" | "projects" | "teams" | "billing" | "secrets" | "credentials" | "engines" | "remotes" | "apikeys" | "knowledge" | "artifacts" | "user" | "settings" | "approvals" | "admin" | "store" | "content";
1302
+ export type ScopeGroup = "agents" | "apps" | "conversations" | "files" | "datastores" | "flows" | "projects" | "teams" | "billing" | "secrets" | "credentials" | "engines" | "remotes" | "sandboxes" | "apikeys" | "knowledge" | "artifacts" | "forms" | "bounties" | "user" | "settings" | "approvals" | "admin" | "store" | "content";
1253
1303
  export declare const ScopeGroupAgents: ScopeGroup;
1254
1304
  export declare const ScopeGroupApps: ScopeGroup;
1255
1305
  export declare const ScopeGroupConversations: ScopeGroup;
@@ -1263,9 +1313,12 @@ export declare const ScopeGroupSecrets: ScopeGroup;
1263
1313
  export declare const ScopeGroupCredentials: ScopeGroup;
1264
1314
  export declare const ScopeGroupEngines: ScopeGroup;
1265
1315
  export declare const ScopeGroupRemotes: ScopeGroup;
1316
+ export declare const ScopeGroupSandboxes: ScopeGroup;
1266
1317
  export declare const ScopeGroupApiKeys: ScopeGroup;
1267
1318
  export declare const ScopeGroupKnowledge: ScopeGroup;
1268
1319
  export declare const ScopeGroupArtifacts: ScopeGroup;
1320
+ export declare const ScopeGroupForms: ScopeGroup;
1321
+ export declare const ScopeGroupBounties: ScopeGroup;
1269
1322
  export declare const ScopeGroupUser: ScopeGroup;
1270
1323
  export declare const ScopeGroupSettings: ScopeGroup;
1271
1324
  export declare const ScopeGroupApprovals: ScopeGroup;
@@ -2894,6 +2947,11 @@ export interface EngineDTO extends BaseModelDTO, PermissionModelDTO {
2894
2947
  * Capabilities are what the engine last reported it can do.
2895
2948
  */
2896
2949
  capabilities?: EngineCapabilities;
2950
+ /**
2951
+ * LastUpdate is the last update the engine was asked for and how it
2952
+ * went; nil when it was never asked.
2953
+ */
2954
+ last_update?: UpdateStatus;
2897
2955
  system_info?: SystemInfo;
2898
2956
  workers: (WorkerDTO | undefined)[];
2899
2957
  }
@@ -3002,8 +3060,18 @@ export interface WorkerRAM {
3002
3060
  * a task lists the ones it needs (Task.Requires); the scheduler only sends
3003
3061
  * a task to an engine that has every one it needs.
3004
3062
  */
3005
- export type EngineCapability = "egress_gateway";
3063
+ export type EngineCapability = "egress_gateway" | "sandboxes";
3064
+ /**
3065
+ * EngineCapabilityEgressGateway: the engine runs its sandboxes behind
3066
+ * the egress gateway, so it can take bound secrets (the v2 secrets
3067
+ * envelope) and place each value only toward its hosts (INF-1076).
3068
+ */
3006
3069
  export declare const EngineCapabilityEgressGateway: EngineCapability;
3070
+ /**
3071
+ * EngineCapabilitySandboxes: the engine has boxd connected and a VM
3072
+ * space up, so it can take sandbox_start (INF-833).
3073
+ */
3074
+ export declare const EngineCapabilitySandboxes: EngineCapability;
3007
3075
  /**
3008
3076
  * EngineCapabilities is a set of capabilities, kept as a list. Nil and
3009
3077
  * empty are the same: nothing beyond the base contract.
@@ -3092,7 +3160,7 @@ export interface DecideEntitlementRequestRequest {
3092
3160
  * and APIError.Code on the legacy envelope. Clients branch on these, so a
3093
3161
  * code is a named const here, where it generates into models and the SDKs.
3094
3162
  */
3095
- 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" | "requirements_not_met" | "team_role_required" | "blocked_by_usage_policy" | "last_owner" | "account_deactivated" | "account_banned" | "person_required" | "otp_required" | "requires_sign_in" | "insufficient_scope" | "invalid_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" | "last_authenticator" | "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" | "code_confirmation_required" | "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";
3163
+ 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" | "requirements_not_met" | "team_role_required" | "in_other_workspace" | "blocked_by_usage_policy" | "last_owner" | "account_deactivated" | "account_banned" | "person_required" | "otp_required" | "requires_sign_in" | "insufficient_scope" | "invalid_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" | "last_authenticator" | "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" | "code_confirmation_required" | "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";
3096
3164
  export declare const ErrorCodeInvalidRequest: ErrorCode;
3097
3165
  export declare const ErrorCodeValidationError: ErrorCode;
3098
3166
  export declare const ErrorCodeUnauthorized: ErrorCode;
@@ -3117,6 +3185,11 @@ export declare const ErrorCodeRequirementsNotMet: ErrorCode;
3117
3185
  * capability gate refused it.
3118
3186
  */
3119
3187
  export declare const ErrorCodeTeamRoleRequired: ErrorCode;
3188
+ /**
3189
+ * ErrorCodeInOtherWorkspace: the resource lives in another workspace
3190
+ * the caller belongs to and could open there (InOtherWorkspaceMeta).
3191
+ */
3192
+ export declare const ErrorCodeInOtherWorkspace: ErrorCode;
3120
3193
  /**
3121
3194
  * ErrorCodeBlockedByUsagePolicy: the resource is outside the team or org
3122
3195
  * usage policy. The message names who to ask.
@@ -3292,6 +3365,13 @@ export interface TeamRoleRequiredMeta {
3292
3365
  required_role?: TeamRole;
3293
3366
  requires_org_admin?: boolean;
3294
3367
  }
3368
+ /**
3369
+ * InOtherWorkspaceMeta is the meta of an in_other_workspace error: the
3370
+ * workspace to switch to.
3371
+ */
3372
+ export interface InOtherWorkspaceMeta {
3373
+ team_id: string;
3374
+ }
3295
3375
  /**
3296
3376
  * ScopeRefusedMeta is the meta of an insufficient_scope or
3297
3377
  * requires_sign_in error: the scope the operation declares and the
@@ -4854,28 +4934,94 @@ export interface CheckRequirementsResponse {
4854
4934
  satisfied: boolean;
4855
4935
  errors?: RequirementError[];
4856
4936
  }
4937
+ /**
4938
+ * ResourceShareDTO is one share: an acl_entries row naming a person, a team
4939
+ * or an org (INF-1133). UserID, TeamID or OrgID repeats the grantee for
4940
+ * clients that read those.
4941
+ */
4857
4942
  export interface ResourceShareDTO extends BaseModelDTO {
4858
4943
  resource_id: string;
4859
4944
  resource_type: string;
4860
- /**
4861
- * UserID names the person a share is to; TeamID, with UserID empty,
4862
- * the resource's whole team.
4863
- */
4945
+ grantee_type: ACLGrantee;
4946
+ grantee_id: string;
4864
4947
  user_id: string;
4865
4948
  team_id?: string;
4949
+ org_id?: string;
4866
4950
  user?: UserRelationDTO;
4867
4951
  permission: Permission;
4868
4952
  }
4869
4953
  /**
4870
4954
  * ShareRequest is POST /{resource}/{id}/share: a share to one person
4871
- * (user_id) or to the resource's whole team (team: true), at a permission
4872
- * (read when empty).
4955
+ * (user_id), to a team (team: true for the resource's own team, or team_id
4956
+ * for another team of its org) or to the resource's whole org (org: true),
4957
+ * at a permission (read when empty).
4873
4958
  */
4874
4959
  export interface ShareRequest {
4875
4960
  user_id?: string;
4876
4961
  team?: boolean;
4962
+ team_id?: string;
4963
+ org?: boolean;
4877
4964
  permission: Permission;
4878
4965
  }
4966
+ /**
4967
+ * SandboxStatus is where the API's record of a sandbox stands. A sandbox is
4968
+ * a Firecracker box on one of our engines that runs `belt remote start` and
4969
+ * connects back as an ordinary Remote.
4970
+ */
4971
+ export type SandboxStatus = "pending" | "starting" | "running" | "stopping" | "stopped" | "failed";
4972
+ export declare const SandboxStatusPending: SandboxStatus;
4973
+ export declare const SandboxStatusStarting: SandboxStatus;
4974
+ export declare const SandboxStatusRunning: SandboxStatus;
4975
+ export declare const SandboxStatusStopping: SandboxStatus;
4976
+ export declare const SandboxStatusStopped: SandboxStatus;
4977
+ export declare const SandboxStatusFailed: SandboxStatus;
4978
+ /**
4979
+ * SandboxDesiredState is what the owner asked for; the reconciler moves the
4980
+ * status toward it.
4981
+ */
4982
+ export type SandboxDesiredState = "running" | "stopped" | "deleted";
4983
+ export declare const SandboxDesiredRunning: SandboxDesiredState;
4984
+ export declare const SandboxDesiredStopped: SandboxDesiredState;
4985
+ export declare const SandboxDesiredDeleted: SandboxDesiredState;
4986
+ /**
4987
+ * CreateSandboxRequest is POST /sandboxes. Sizes left at zero take the
4988
+ * defaults.
4989
+ */
4990
+ export interface CreateSandboxRequest {
4991
+ name: string;
4992
+ vcpus?: number;
4993
+ memory_mib?: number;
4994
+ disk_mib?: number;
4995
+ }
4996
+ /**
4997
+ * SandboxDTO is the API response for a sandbox.
4998
+ */
4999
+ export interface SandboxDTO extends BaseModelDTO, PermissionModelDTO {
5000
+ name: string;
5001
+ image: string;
5002
+ vcpus: number;
5003
+ memory_mib: number;
5004
+ disk_mib: number;
5005
+ desired_state: SandboxDesiredState;
5006
+ status: SandboxStatus;
5007
+ status_reason?: string;
5008
+ /**
5009
+ * Generation counts starts, restarts included.
5010
+ */
5011
+ generation: number;
5012
+ /**
5013
+ * EngineID and WorkerID place the current generation; empty while
5014
+ * pending or stopped.
5015
+ */
5016
+ engine_id?: string;
5017
+ worker_id?: string;
5018
+ /**
5019
+ * RemoteID is the Remote the box connects as; the same across restarts.
5020
+ */
5021
+ remote_id?: string;
5022
+ started_at?: string;
5023
+ stopped_at?: string;
5024
+ }
4879
5025
  /**
4880
5026
  * SDKTypes is a phantom type for gotypegen dependency tracing.
4881
5027
  * Types listed here (and their transitive dependencies) are included
@@ -5451,6 +5597,64 @@ export interface ToolInvocationDTO extends BaseModelDTO, PermissionModelDTO {
5451
5597
  data?: any;
5452
5598
  widget?: Widget;
5453
5599
  }
5600
+ /**
5601
+ * UpdateState is where the last update a remote or an engine was asked for
5602
+ * stands.
5603
+ */
5604
+ export type UpdateState = "requested" | "installing" | "installed" | "current" | "refused" | "failed";
5605
+ /**
5606
+ * UpdateRequested: the request was sent and nothing has answered it yet.
5607
+ * An engine older than engine_update_result never answers, so its update stays here.
5608
+ */
5609
+ export declare const UpdateRequested: UpdateState;
5610
+ /**
5611
+ * UpdateInstalling: a different release is being installed. The machine
5612
+ * finishes its running work and restarts on it.
5613
+ */
5614
+ export declare const UpdateInstalling: UpdateState;
5615
+ /**
5616
+ * UpdateInstalled: the machine reconnected on To.
5617
+ */
5618
+ export declare const UpdateInstalled: UpdateState;
5619
+ /**
5620
+ * UpdateCurrent: the machine already runs To; nothing was installed.
5621
+ */
5622
+ export declare const UpdateCurrent: UpdateState;
5623
+ /**
5624
+ * UpdateRefused: the binary cannot replace itself (a development build,
5625
+ * an install a package manager owns, or a directory the machine's user
5626
+ * cannot write to). Error says what to do on the machine.
5627
+ */
5628
+ export declare const UpdateRefused: UpdateState;
5629
+ /**
5630
+ * UpdateFailed: the release could not be checked, downloaded or
5631
+ * installed. Error says why. The machine keeps the version it has.
5632
+ */
5633
+ export declare const UpdateFailed: UpdateState;
5634
+ /**
5635
+ * UpdateStatus is the last update a remote or an engine was asked for and
5636
+ * what came of it. An engine restarts after every update request, whatever
5637
+ * the outcome; a remote restarts only once its install succeeded.
5638
+ */
5639
+ export interface UpdateStatus {
5640
+ state: UpdateState;
5641
+ /**
5642
+ * Target is what was asked for: stable, canary or a version (engines).
5643
+ * Remotes always update to the latest release and leave it empty.
5644
+ */
5645
+ target?: string;
5646
+ /**
5647
+ * From is the version the machine ran when asked; To the version it
5648
+ * installs or found itself already on.
5649
+ */
5650
+ from?: string;
5651
+ to?: string;
5652
+ error?: string;
5653
+ /**
5654
+ * At is when State was reached.
5655
+ */
5656
+ at: string;
5657
+ }
5454
5658
  /**
5455
5659
  * MetaItem represents metadata about an input or output item
5456
5660
  */
@@ -6280,6 +6484,18 @@ export declare const PermInteract: Permission;
6280
6484
  * governed by their team/org usage policy (reach, INF-808).
6281
6485
  */
6282
6486
  export declare const PermUse: Permission;
6487
+ /**
6488
+ * ACLGrantee is who an ACL entry is for (models.ACLEntry, INF-1130).
6489
+ */
6490
+ export type ACLGrantee = "user" | "team" | "org" | "everyone";
6491
+ export declare const ACLGranteeUser: ACLGrantee;
6492
+ export declare const ACLGranteeTeam: ACLGrantee;
6493
+ export declare const ACLGranteeOrg: ACLGrantee;
6494
+ /**
6495
+ * ACLGranteeEveryone: every caller. Only a platform-scope credential
6496
+ * may carry one (the acl service's rule).
6497
+ */
6498
+ export declare const ACLGranteeEveryone: ACLGrantee;
6283
6499
  export type SubscriptionStatus = "trialing" | "active" | "past_due" | "canceled" | "paused";
6284
6500
  export declare const SubscriptionStatusTrialing: SubscriptionStatus;
6285
6501
  export declare const SubscriptionStatusActive: SubscriptionStatus;
@@ -6466,7 +6682,7 @@ export interface ChatMessageContent {
6466
6682
  tool_calls?: ToolCall[];
6467
6683
  event?: ChatEvent;
6468
6684
  }
6469
- export type ChatEventType = "hook" | "run_failed" | "run_ended";
6685
+ export type ChatEventType = "hook" | "run_failed" | "run_ended" | "background";
6470
6686
  export declare const ChatEventTypeHook: ChatEventType;
6471
6687
  /**
6472
6688
  * ChatEventTypeRunFailed marks the point a run ended in failure; the
@@ -6478,11 +6694,31 @@ export declare const ChatEventTypeRunFailed: ChatEventType;
6478
6694
  * the event's run says how, and the content's text, when set, why.
6479
6695
  */
6480
6696
  export declare const ChatEventTypeRunEnded: ChatEventType;
6697
+ /**
6698
+ * ChatEventTypeBackground marks background work a harness left running
6699
+ * ending; the event's background says what and how. A turn the harness
6700
+ * then starts about it answers this message.
6701
+ */
6702
+ export declare const ChatEventTypeBackground: ChatEventType;
6703
+ /**
6704
+ * ChatBackgroundEvent is background work ending, on a background event.
6705
+ */
6706
+ export interface ChatBackgroundEvent {
6707
+ task_id: string;
6708
+ kind?: BackgroundKind;
6709
+ command?: string;
6710
+ status: BackgroundStatus;
6711
+ exit_code?: number;
6712
+ /**
6713
+ * ToolInvocationID is the tool call that started it.
6714
+ */
6715
+ tool_invocation_id?: string;
6716
+ }
6481
6717
  /**
6482
6718
  * RunEndReason is why a run that completed ended the way it did, when its
6483
6719
  * last turn did not end with a reply.
6484
6720
  */
6485
- export type RunEndReason = "output_limit" | "no_reply";
6721
+ export type RunEndReason = "output_limit" | "no_reply" | "refusal";
6486
6722
  /**
6487
6723
  * RunEndReasonOutputLimit: the model's last turn hit its output limit
6488
6724
  * (max_tokens) before it replied or called a tool.
@@ -6493,6 +6729,13 @@ export declare const RunEndReasonOutputLimit: RunEndReason;
6493
6729
  * no tool call.
6494
6730
  */
6495
6731
  export declare const RunEndReasonNoReply: RunEndReason;
6732
+ /**
6733
+ * RunEndReasonRefusal: the provider's safety system ended the model's
6734
+ * last turn. The run's messages stay in the chat and are left out of
6735
+ * the context every later turn sends (BuildContext), so the next
6736
+ * message is not refused for what this run held.
6737
+ */
6738
+ export declare const RunEndReasonRefusal: RunEndReason;
6496
6739
  /**
6497
6740
  * ChatRunEvent is how a run ended, on a run_ended event.
6498
6741
  */
@@ -6514,6 +6757,10 @@ export interface ChatEvent {
6514
6757
  type: ChatEventType;
6515
6758
  hook?: ChatHookEvent;
6516
6759
  run?: ChatRunEvent;
6760
+ /**
6761
+ * Background is set on a background event.
6762
+ */
6763
+ background?: ChatBackgroundEvent;
6517
6764
  }
6518
6765
  /**
6519
6766
  * ChatHookEvent records one lifecycle hook handler run.
@@ -7347,7 +7594,7 @@ export declare const DeviceTokenKindSession: DeviceTokenKind;
7347
7594
  * TODO: retire once CLIs older than the session-token release are gone.
7348
7595
  */
7349
7596
  export declare const DeviceTokenKindAPIKey: DeviceTokenKind;
7350
- export type EntitlementResource = "api_keys" | "connectors" | "knowledge_bases" | "storage_mb" | "concurrency" | "rate_per_min" | "seats" | "triggers" | "retention_days" | "private_apps" | "task_executions" | "feature:byok" | "feature:seedance" | "feature:marketplace_publish" | "feature:forms" | "feature:scopes" | "feature:webhooks" | "feature:team_billing" | "feature:auto_recharge" | "feature:invoices" | "feature:publish_apps";
7597
+ export type EntitlementResource = "api_keys" | "connectors" | "knowledge_bases" | "storage_mb" | "concurrency" | "rate_per_min" | "seats" | "triggers" | "retention_days" | "private_apps" | "task_executions" | "feature:byok" | "feature:seedance" | "feature:marketplace_publish" | "feature:forms" | "feature:sandboxes" | "feature:scopes" | "feature:webhooks" | "feature:team_billing" | "feature:auto_recharge" | "feature:invoices" | "feature:publish_apps";
7351
7598
  /**
7352
7599
  * Capacity limits — scale with tier
7353
7600
  */
@@ -7378,6 +7625,11 @@ export declare const ResourceFeatureMarketplacePublish: EntitlementResource;
7378
7625
  * Granted per team: creating forms is by invitation for now.
7379
7626
  */
7380
7627
  export declare const ResourceFeatureForms: EntitlementResource;
7628
+ /**
7629
+ * Managed sandboxes (INF-833): open to every team; a row with enabled
7630
+ * false shuts one team out.
7631
+ */
7632
+ export declare const ResourceFeatureSandboxes: EntitlementResource;
7381
7633
  /**
7382
7634
  * Legacy feature gates — kept for DB compatibility, no longer gated
7383
7635
  */
@@ -7467,18 +7719,18 @@ export declare const CredentialStatusError: CredentialStatus;
7467
7719
  /**
7468
7720
  * CredentialScope controls resolution priority and ownership.
7469
7721
  */
7470
- export type CredentialScope = "platform" | "org" | "team" | "user" | "agent";
7722
+ export type CredentialScope = "platform" | "org" | "team" | "user";
7471
7723
  export declare const CredentialScopePlatform: CredentialScope;
7472
7724
  /**
7473
7725
  * CredentialScopeOrg: shared across all teams of an org. In the enum for
7474
7726
  * end-to-end typing (connect-level pickers); connects with it are refused
7475
7727
  * until the org domain lands (INF-795 Phase 2). Resolution order once
7476
- * live: agent > user > team > org > platform.
7728
+ * live: user > team > org > platform. Credentials an agent uses are
7729
+ * composed by vaults (INF-737), not by a scope.
7477
7730
  */
7478
7731
  export declare const CredentialScopeOrg: CredentialScope;
7479
7732
  export declare const CredentialScopeTeam: CredentialScope;
7480
7733
  export declare const CredentialScopeUser: CredentialScope;
7481
- export declare const CredentialScopeAgent: CredentialScope;
7482
7734
  /**
7483
7735
  * CredentialGrant is which layer a credential row is. OAuth has two: the
7484
7736
  * app (client id and secret, owned by the platform, an org or a team) and
@@ -7760,17 +8012,10 @@ export declare const TaskStatusRejected: TaskStatus;
7760
8012
  /**
7761
8013
  * Infra defines where a task should run.
7762
8014
  */
7763
- export type Infra = "private" | "cloud" | "private_first" | "remote";
8015
+ export type Infra = "private" | "cloud" | "private_first";
7764
8016
  export declare const InfraPrivate: Infra;
7765
8017
  export declare const InfraCloud: Infra;
7766
8018
  export declare const InfraPrivateFirst: Infra;
7767
- /**
7768
- * InfraRemote is a model call a harness on the caller's own remote
7769
- * answers (an agent whose model app is a harness model app). The
7770
- * scheduler never takes it: the remote model service sends it to the
7771
- * remote's daemon, whose frames end it.
7772
- */
7773
- export declare const InfraRemote: Infra;
7774
8019
  /**
7775
8020
  * TaskLogType defines the type of task log.
7776
8021
  */
@@ -7903,7 +8148,7 @@ export interface UtilityConfig {
7903
8148
  * These are the backbone protocol events — every consumer (A2A, SDK, frontend)
7904
8149
  * projects from this set.
7905
8150
  */
7906
- export type AgentEventType = "run.started" | "run.state_changed" | "turn.started" | "turn.completed" | "content.delta" | "tool.started" | "tool.completed" | "approval.required" | "approval.resolved" | "hook.executed" | "usage.updated" | "context.updated" | "limits.updated" | "account.updated" | "context.compacted" | "error" | "subagent.started" | "subagent.updated" | "subagent.completed";
8151
+ export type AgentEventType = "run.started" | "run.state_changed" | "turn.started" | "turn.completed" | "content.delta" | "tool.started" | "tool.completed" | "approval.required" | "approval.resolved" | "hook.executed" | "usage.updated" | "context.updated" | "limits.updated" | "account.updated" | "context.compacted" | "error" | "background.started" | "background.completed" | "subagent.started" | "subagent.updated" | "subagent.completed";
7907
8152
  /**
7908
8153
  * Run lifecycle
7909
8154
  */
@@ -7976,7 +8221,23 @@ export interface RunStateChangedPayload {
7976
8221
  export interface TurnStartedPayload {
7977
8222
  turn_index: number;
7978
8223
  model?: string;
8224
+ /**
8225
+ * Origin is what started the turn: empty for a prompt, TurnOriginBackground
8226
+ * for one the agent started itself when background work it left running
8227
+ * finished (TaskID names it).
8228
+ */
8229
+ origin?: TurnOrigin;
8230
+ task_id?: string;
7979
8231
  }
8232
+ /**
8233
+ * TurnOrigin is what started a turn.
8234
+ */
8235
+ export type TurnOrigin = "background";
8236
+ /**
8237
+ * TurnOriginBackground is a turn the agent started on its own, with no
8238
+ * prompt, because background work it left running finished.
8239
+ */
8240
+ export declare const TurnOriginBackground: TurnOrigin;
7980
8241
  export interface TurnCompletedPayload {
7981
8242
  turn_index: number;
7982
8243
  tool_count: number;
@@ -8021,6 +8282,12 @@ export interface ApprovalRequiredPayload {
8021
8282
  tool_name: string;
8022
8283
  arguments?: StringEncodedMap;
8023
8284
  reason: InterruptReason;
8285
+ /**
8286
+ * Input is set when the agent asks the person questions rather than
8287
+ * for permission (Reason is then input). The answer is the resolution's
8288
+ * values, one per Input.Schema property; a deny declines to answer.
8289
+ */
8290
+ input?: InputForm;
8024
8291
  /**
8025
8292
  * SubagentID is set when a subagent asks: its tool call, not the
8026
8293
  * agent's.
@@ -8082,16 +8349,60 @@ export declare const AgentRunStateRejected: AgentRunState;
8082
8349
  * InterruptReason describes why an agent run is in an interrupted state.
8083
8350
  * Aligns with AG-UI interrupt outcome reasons.
8084
8351
  */
8085
- export type InterruptReason = "wait" | "tool_approval" | "client_tool" | "widget" | "auth" | "confirmation" | "hook_gate";
8352
+ export type InterruptReason = "wait" | "tool_approval" | "client_tool" | "widget" | "auth" | "confirmation" | "hook_gate" | "input";
8086
8353
  export declare const InterruptReasonToolApproval: InterruptReason;
8087
8354
  export declare const InterruptReasonClientTool: InterruptReason;
8088
8355
  export declare const InterruptReasonWidget: InterruptReason;
8089
8356
  export declare const InterruptReasonAuth: InterruptReason;
8090
8357
  export declare const InterruptReasonConfirmation: InterruptReason;
8091
8358
  export declare const InterruptReasonHookGate: InterruptReason;
8359
+ export declare const InterruptReasonInput: InterruptReason;
8360
+ export declare const AgentEventBackgroundStarted: AgentEventType;
8361
+ export declare const AgentEventBackgroundCompleted: AgentEventType;
8362
+ /**
8363
+ * BackgroundKind is what kind of background work a task is.
8364
+ */
8365
+ export type BackgroundKind = "command" | "monitor";
8366
+ /**
8367
+ * BackgroundCommand is a shell command left running.
8368
+ */
8369
+ export declare const BackgroundCommand: BackgroundKind;
8370
+ /**
8371
+ * BackgroundMonitor watches something (a command's output, a file) and
8372
+ * reports what it sees until it is stopped or times out.
8373
+ */
8374
+ export declare const BackgroundMonitor: BackgroundKind;
8375
+ /**
8376
+ * BackgroundStatus is how background work ended.
8377
+ */
8378
+ export type BackgroundStatus = "completed" | "failed" | "cancelled" | "timed_out";
8379
+ export declare const BackgroundCompleted: BackgroundStatus;
8380
+ export declare const BackgroundFailed: BackgroundStatus;
8381
+ export declare const BackgroundCancelled: BackgroundStatus;
8382
+ export declare const BackgroundTimedOut: BackgroundStatus;
8092
8383
  export type StringEncodedMap = {
8093
8384
  [key: string]: any;
8094
8385
  };
8386
+ /**
8387
+ * InputForm is a set of questions an agent asks the person, as a form:
8388
+ * form-mode elicitation as MCP and ACP define it. Schema is a flat JSON
8389
+ * object schema whose properties are the questions:
8390
+ * - a string, number, integer or boolean field;
8391
+ * - a single choice: a string with enum (and enumNames) or oneOf
8392
+ * ({const, title}) for the choices;
8393
+ * - several choices: an array whose items have enum or anyOf.
8394
+ * A property's title is the question's short label and its description the
8395
+ * question itself. The answer is an object with a value per property; one
8396
+ * left out was not answered.
8397
+ * Agents ask in their own shapes (Claude Code's AskUserQuestion, Grok's
8398
+ * x.ai/ask_user_question, ACP's elicitation/create); a driver turns each into
8399
+ * an InputForm and the answer back into the agent's shape, so a person
8400
+ * answers every agent the same way.
8401
+ */
8402
+ export interface InputForm {
8403
+ message?: string;
8404
+ requested_schema: any;
8405
+ }
8095
8406
  /**
8096
8407
  * InterruptStatus tracks the lifecycle of an interrupt gate.
8097
8408
  */
package/dist/types.js CHANGED
@@ -85,6 +85,18 @@ export const ScopeBilling = "billing";
85
85
  * Empty scopes = full access (for backwards compatibility with existing keys).
86
86
  */
87
87
  export const ScopeArtifacts = "artifacts";
88
+ /**
89
+ * API Key Scopes - hierarchical permission system.
90
+ * Resource-level scopes (e.g., "agents") imply all action-level scopes (e.g., "agents:read").
91
+ * Empty scopes = full access (for backwards compatibility with existing keys).
92
+ */
93
+ export const ScopeForms = "forms";
94
+ /**
95
+ * API Key Scopes - hierarchical permission system.
96
+ * Resource-level scopes (e.g., "agents") imply all action-level scopes (e.g., "agents:read").
97
+ * Empty scopes = full access (for backwards compatibility with existing keys).
98
+ */
99
+ export const ScopeBounties = "bounties";
88
100
  /**
89
101
  * Action-level scopes for Agents
90
102
  */
@@ -240,6 +252,16 @@ export const ScopeRemotesRead = "remotes:read";
240
252
  * Empty scopes = full access (for backwards compatibility with existing keys).
241
253
  */
242
254
  export const ScopeRemotesWrite = "remotes:write";
255
+ /**
256
+ * Action-level scopes for Sandboxes (managed boxes that run a remote)
257
+ */
258
+ export const ScopeSandboxesRead = "sandboxes:read";
259
+ /**
260
+ * API Key Scopes - hierarchical permission system.
261
+ * Resource-level scopes (e.g., "agents") imply all action-level scopes (e.g., "agents:read").
262
+ * Empty scopes = full access (for backwards compatibility with existing keys).
263
+ */
264
+ export const ScopeSandboxesWrite = "sandboxes:write";
243
265
  /**
244
266
  * Action-level scopes for API Keys
245
267
  */
@@ -270,6 +292,34 @@ export const ScopeArtifactsRead = "artifacts:read";
270
292
  * Empty scopes = full access (for backwards compatibility with existing keys).
271
293
  */
272
294
  export const ScopeArtifactsWrite = "artifacts:write";
295
+ /**
296
+ * Action-level scopes for Forms: read sees forms, write creates and
297
+ * manages them and reads their answers, execute submits answers.
298
+ */
299
+ export const ScopeFormsRead = "forms:read";
300
+ /**
301
+ * API Key Scopes - hierarchical permission system.
302
+ * Resource-level scopes (e.g., "agents") imply all action-level scopes (e.g., "agents:read").
303
+ * Empty scopes = full access (for backwards compatibility with existing keys).
304
+ */
305
+ export const ScopeFormsWrite = "forms:write";
306
+ /**
307
+ * API Key Scopes - hierarchical permission system.
308
+ * Resource-level scopes (e.g., "agents") imply all action-level scopes (e.g., "agents:read").
309
+ * Empty scopes = full access (for backwards compatibility with existing keys).
310
+ */
311
+ export const ScopeFormsExecute = "forms:execute";
312
+ /**
313
+ * Action-level scopes for Bounties: read lists the programs, execute
314
+ * claims one (only the account holder's own sign-in).
315
+ */
316
+ export const ScopeBountiesRead = "bounties:read";
317
+ /**
318
+ * API Key Scopes - hierarchical permission system.
319
+ * Resource-level scopes (e.g., "agents") imply all action-level scopes (e.g., "agents:read").
320
+ * Empty scopes = full access (for backwards compatibility with existing keys).
321
+ */
322
+ export const ScopeBountiesExecute = "bounties:execute";
273
323
  /**
274
324
  * Action-level scopes for User profile
275
325
  */
@@ -342,9 +392,12 @@ export const ScopeGroupSecrets = "secrets";
342
392
  export const ScopeGroupCredentials = "credentials";
343
393
  export const ScopeGroupEngines = "engines";
344
394
  export const ScopeGroupRemotes = "remotes";
395
+ export const ScopeGroupSandboxes = "sandboxes";
345
396
  export const ScopeGroupApiKeys = "apikeys";
346
397
  export const ScopeGroupKnowledge = "knowledge";
347
398
  export const ScopeGroupArtifacts = "artifacts";
399
+ export const ScopeGroupForms = "forms";
400
+ export const ScopeGroupBounties = "bounties";
348
401
  export const ScopeGroupUser = "user";
349
402
  export const ScopeGroupSettings = "settings";
350
403
  export const ScopeGroupApprovals = "approvals";
@@ -385,7 +438,17 @@ export const ToolRiskMedium = "medium";
385
438
  * ToolRiskHigh: dangerous or irreversible changes.
386
439
  */
387
440
  export const ToolRiskHigh = "high";
441
+ /**
442
+ * EngineCapabilityEgressGateway: the engine runs its sandboxes behind
443
+ * the egress gateway, so it can take bound secrets (the v2 secrets
444
+ * envelope) and place each value only toward its hosts (INF-1076).
445
+ */
388
446
  export const EngineCapabilityEgressGateway = "egress_gateway";
447
+ /**
448
+ * EngineCapabilitySandboxes: the engine has boxd connected and a VM
449
+ * space up, so it can take sandbox_start (INF-833).
450
+ */
451
+ export const EngineCapabilitySandboxes = "sandboxes";
389
452
  export const ErrorCodeInvalidRequest = "invalid_request";
390
453
  export const ErrorCodeValidationError = "validation_error";
391
454
  export const ErrorCodeUnauthorized = "unauthorized";
@@ -410,6 +473,11 @@ export const ErrorCodeRequirementsNotMet = "requirements_not_met";
410
473
  * capability gate refused it.
411
474
  */
412
475
  export const ErrorCodeTeamRoleRequired = "team_role_required";
476
+ /**
477
+ * ErrorCodeInOtherWorkspace: the resource lives in another workspace
478
+ * the caller belongs to and could open there (InOtherWorkspaceMeta).
479
+ */
480
+ export const ErrorCodeInOtherWorkspace = "in_other_workspace";
413
481
  /**
414
482
  * ErrorCodeBlockedByUsagePolicy: the resource is outside the team or org
415
483
  * usage policy. The message names who to ask.
@@ -697,6 +765,44 @@ export const RequirementTypeScope = "scope";
697
765
  export const SetupActionAddSecret = "add_secret";
698
766
  export const SetupActionConnect = "connect";
699
767
  export const SetupActionAddScopes = "add_scopes";
768
+ export const SandboxStatusPending = "pending";
769
+ export const SandboxStatusStarting = "starting";
770
+ export const SandboxStatusRunning = "running";
771
+ export const SandboxStatusStopping = "stopping";
772
+ export const SandboxStatusStopped = "stopped";
773
+ export const SandboxStatusFailed = "failed";
774
+ export const SandboxDesiredRunning = "running";
775
+ export const SandboxDesiredStopped = "stopped";
776
+ export const SandboxDesiredDeleted = "deleted";
777
+ /**
778
+ * UpdateRequested: the request was sent and nothing has answered it yet.
779
+ * An engine older than engine_update_result never answers, so its update stays here.
780
+ */
781
+ export const UpdateRequested = "requested";
782
+ /**
783
+ * UpdateInstalling: a different release is being installed. The machine
784
+ * finishes its running work and restarts on it.
785
+ */
786
+ export const UpdateInstalling = "installing";
787
+ /**
788
+ * UpdateInstalled: the machine reconnected on To.
789
+ */
790
+ export const UpdateInstalled = "installed";
791
+ /**
792
+ * UpdateCurrent: the machine already runs To; nothing was installed.
793
+ */
794
+ export const UpdateCurrent = "current";
795
+ /**
796
+ * UpdateRefused: the binary cannot replace itself (a development build,
797
+ * an install a package manager owns, or a directory the machine's user
798
+ * cannot write to). Error says what to do on the machine.
799
+ */
800
+ export const UpdateRefused = "refused";
801
+ /**
802
+ * UpdateFailed: the release could not be checked, downloaded or
803
+ * installed. Error says why. The machine keeps the version it has.
804
+ */
805
+ export const UpdateFailed = "failed";
700
806
  export const A2UIRow = "Row";
701
807
  export const A2UIColumn = "Column";
702
808
  export const A2UIList = "List";
@@ -858,6 +964,14 @@ export const PermInteract = "interact";
858
964
  * governed by their team/org usage policy (reach, INF-808).
859
965
  */
860
966
  export const PermUse = "use";
967
+ export const ACLGranteeUser = "user";
968
+ export const ACLGranteeTeam = "team";
969
+ export const ACLGranteeOrg = "org";
970
+ /**
971
+ * ACLGranteeEveryone: every caller. Only a platform-scope credential
972
+ * may carry one (the acl service's rule).
973
+ */
974
+ export const ACLGranteeEveryone = "everyone";
861
975
  export const SubscriptionStatusTrialing = "trialing";
862
976
  export const SubscriptionStatusActive = "active";
863
977
  export const SubscriptionStatusPastDue = "past_due";
@@ -978,6 +1092,12 @@ export const ChatEventTypeRunFailed = "run_failed";
978
1092
  * the event's run says how, and the content's text, when set, why.
979
1093
  */
980
1094
  export const ChatEventTypeRunEnded = "run_ended";
1095
+ /**
1096
+ * ChatEventTypeBackground marks background work a harness left running
1097
+ * ending; the event's background says what and how. A turn the harness
1098
+ * then starts about it answers this message.
1099
+ */
1100
+ export const ChatEventTypeBackground = "background";
981
1101
  /**
982
1102
  * RunEndReasonOutputLimit: the model's last turn hit its output limit
983
1103
  * (max_tokens) before it replied or called a tool.
@@ -988,6 +1108,13 @@ export const RunEndReasonOutputLimit = "output_limit";
988
1108
  * no tool call.
989
1109
  */
990
1110
  export const RunEndReasonNoReply = "no_reply";
1111
+ /**
1112
+ * RunEndReasonRefusal: the provider's safety system ended the model's
1113
+ * last turn. The run's messages stay in the chat and are left out of
1114
+ * the context every later turn sends (BuildContext), so the next
1115
+ * message is not refused for what this run held.
1116
+ */
1117
+ export const RunEndReasonRefusal = "refusal";
991
1118
  /**
992
1119
  * DescriptionLimitListing bounds the description of an app, agent, flow,
993
1120
  * MCP server or knowledge entry. A description is shown in listings and
@@ -1309,6 +1436,11 @@ export const ResourceFeatureMarketplacePublish = "feature:marketplace_publish";
1309
1436
  * Granted per team: creating forms is by invitation for now.
1310
1437
  */
1311
1438
  export const ResourceFeatureForms = "feature:forms";
1439
+ /**
1440
+ * Managed sandboxes (INF-833): open to every team; a row with enabled
1441
+ * false shuts one team out.
1442
+ */
1443
+ export const ResourceFeatureSandboxes = "feature:sandboxes";
1312
1444
  /**
1313
1445
  * Legacy feature gates — kept for DB compatibility, no longer gated
1314
1446
  */
@@ -1387,12 +1519,12 @@ export const CredentialScopePlatform = "platform";
1387
1519
  * CredentialScopeOrg: shared across all teams of an org. In the enum for
1388
1520
  * end-to-end typing (connect-level pickers); connects with it are refused
1389
1521
  * until the org domain lands (INF-795 Phase 2). Resolution order once
1390
- * live: agent > user > team > org > platform.
1522
+ * live: user > team > org > platform. Credentials an agent uses are
1523
+ * composed by vaults (INF-737), not by a scope.
1391
1524
  */
1392
1525
  export const CredentialScopeOrg = "org";
1393
1526
  export const CredentialScopeTeam = "team";
1394
1527
  export const CredentialScopeUser = "user";
1395
- export const CredentialScopeAgent = "agent";
1396
1528
  /**
1397
1529
  * CredentialGrantCredentials: an OAuth app. Never a connection.
1398
1530
  */
@@ -1588,13 +1720,6 @@ export const TaskStatusRejected = 13;
1588
1720
  export const InfraPrivate = "private";
1589
1721
  export const InfraCloud = "cloud";
1590
1722
  export const InfraPrivateFirst = "private_first";
1591
- /**
1592
- * InfraRemote is a model call a harness on the caller's own remote
1593
- * answers (an agent whose model app is a harness model app). The
1594
- * scheduler never takes it: the remote model service sends it to the
1595
- * remote's daemon, whose frames end it.
1596
- */
1597
- export const InfraRemote = "remote";
1598
1723
  export const TaskLogTypeBuild = 0;
1599
1724
  export const TaskLogTypeRun = 1;
1600
1725
  export const TaskLogTypeServe = 2;
@@ -1721,6 +1846,11 @@ export const AgentEventContextCompacted = "context.compacted";
1721
1846
  * Errors
1722
1847
  */
1723
1848
  export const AgentEventError = "error";
1849
+ /**
1850
+ * TurnOriginBackground is a turn the agent started on its own, with no
1851
+ * prompt, because background work it left running finished.
1852
+ */
1853
+ export const TurnOriginBackground = "background";
1724
1854
  export const ContentDeltaText = "text";
1725
1855
  export const ContentDeltaReasoning = "reasoning";
1726
1856
  export const AgentRunStateSubmitted = "submitted";
@@ -1737,6 +1867,22 @@ export const InterruptReasonWidget = "widget";
1737
1867
  export const InterruptReasonAuth = "auth";
1738
1868
  export const InterruptReasonConfirmation = "confirmation";
1739
1869
  export const InterruptReasonHookGate = "hook_gate";
1870
+ export const InterruptReasonInput = "input";
1871
+ export const AgentEventBackgroundStarted = "background.started";
1872
+ export const AgentEventBackgroundCompleted = "background.completed";
1873
+ /**
1874
+ * BackgroundCommand is a shell command left running.
1875
+ */
1876
+ export const BackgroundCommand = "command";
1877
+ /**
1878
+ * BackgroundMonitor watches something (a command's output, a file) and
1879
+ * reports what it sees until it is stopped or times out.
1880
+ */
1881
+ export const BackgroundMonitor = "monitor";
1882
+ export const BackgroundCompleted = "completed";
1883
+ export const BackgroundFailed = "failed";
1884
+ export const BackgroundCancelled = "cancelled";
1885
+ export const BackgroundTimedOut = "timed_out";
1740
1886
  export const InterruptStatusPending = "pending";
1741
1887
  export const InterruptStatusResolved = "resolved";
1742
1888
  export const InterruptStatusExpired = "expired";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inferencesh/sdk",
3
- "version": "0.38.0",
3
+ "version": "0.38.1",
4
4
  "description": "Official JavaScript/TypeScript SDK for inference.sh - Run AI models with a simple API",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -86,8 +86,8 @@
86
86
  "@types/node": "^26.1.1",
87
87
  "@types/react": "^19.1.12",
88
88
  "@eslint/js": "^10.0.1",
89
- "@typescript-eslint/eslint-plugin": "^8.65.0",
90
- "@typescript-eslint/parser": "^8.65.0",
89
+ "@typescript-eslint/eslint-plugin": "^8.72.1",
90
+ "@typescript-eslint/parser": "^8.72.1",
91
91
  "eslint": "^10.10.0",
92
92
  "eslint-config-prettier": "^10.1.8",
93
93
  "globals": "^17.12.0",