@inferencesh/sdk 0.38.5 → 0.38.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/types.d.ts +102 -5
- package/dist/types.js +30 -0
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -23,9 +23,11 @@ export interface InternalToolsConfig {
|
|
|
23
23
|
* (Remote on), declared as an app's credentials are (provider slug,
|
|
24
24
|
* scopes): the runner's own, as a task of theirs resolves it; a runner
|
|
25
25
|
* with none is asked to connect it and the call waits. None declared,
|
|
26
|
-
* none given. The model's arguments never add any.
|
|
26
|
+
* none given. The model's arguments never add any. Each entry's mode
|
|
27
|
+
* says when the box gets it: auto (the default) at once, ask on first
|
|
28
|
+
* use once a person approves it (SandboxCredential).
|
|
27
29
|
*/
|
|
28
|
-
sandbox_credentials?:
|
|
30
|
+
sandbox_credentials?: SandboxCredential[];
|
|
29
31
|
}
|
|
30
32
|
/**
|
|
31
33
|
* AgentPermissions is what an agent's new chats in its own workspace may do
|
|
@@ -1692,6 +1694,7 @@ export interface AppUIRef {
|
|
|
1692
1694
|
* sandbox:
|
|
1693
1695
|
* host_network: true # share the host's network namespace
|
|
1694
1696
|
* capabilities: [SYS_PTRACE] # Linux capabilities the app's processes keep
|
|
1697
|
+
* user_namespaces: true # unprivileged user namespaces (Chromium's sandbox)
|
|
1695
1698
|
* The API reads it from the package when the version is deployed and stores
|
|
1696
1699
|
* it on the version (server-owned: no caller writes it). Engines enforce the
|
|
1697
1700
|
* copy the task dispatch carries, and store review shows it. The empty value
|
|
@@ -1709,6 +1712,13 @@ export interface AppSandbox {
|
|
|
1709
1712
|
* them.
|
|
1710
1713
|
*/
|
|
1711
1714
|
capabilities?: string[];
|
|
1715
|
+
/**
|
|
1716
|
+
* UserNamespaces lets the app's processes create unprivileged user
|
|
1717
|
+
* namespaces, which Chromium's sandbox needs. The container's seccomp
|
|
1718
|
+
* profile allows clone, unshare, setns and chroot; it gains no
|
|
1719
|
+
* capability on the host.
|
|
1720
|
+
*/
|
|
1721
|
+
user_namespaces?: boolean;
|
|
1712
1722
|
}
|
|
1713
1723
|
/**
|
|
1714
1724
|
* AppVersionDTO is the API response for an app version.
|
|
@@ -3100,7 +3110,7 @@ export interface WorkerRAM {
|
|
|
3100
3110
|
* a task lists the ones it needs (Task.Requires); the scheduler only sends
|
|
3101
3111
|
* a task to an engine that has every one it needs.
|
|
3102
3112
|
*/
|
|
3103
|
-
export type EngineCapability = "egress_gateway" | "sandboxes" | "capacity";
|
|
3113
|
+
export type EngineCapability = "egress_gateway" | "sandboxes" | "capacity" | "egress_pending";
|
|
3104
3114
|
/**
|
|
3105
3115
|
* EngineCapabilityEgressGateway: the engine runs its sandboxes behind
|
|
3106
3116
|
* the egress gateway, so it can take bound secrets (the v2 secrets
|
|
@@ -3117,6 +3127,14 @@ export declare const EngineCapabilitySandboxes: EngineCapability;
|
|
|
3117
3127
|
* (INF-1156).
|
|
3118
3128
|
*/
|
|
3119
3129
|
export declare const EngineCapabilityCapacity: EngineCapability;
|
|
3130
|
+
/**
|
|
3131
|
+
* EngineCapabilityEgressPending: the engine's gateway takes pending
|
|
3132
|
+
* bound secrets (BoundSecret.Pending: no value) and fetches each value
|
|
3133
|
+
* on first use through POST /engines/{id}/egress/resolve, with the
|
|
3134
|
+
* triggers EgressTrigger names; it also reports the hosts its boxes
|
|
3135
|
+
* reach (POST /engines/{id}/egress/hosts) (INF-1173).
|
|
3136
|
+
*/
|
|
3137
|
+
export declare const EngineCapabilityEgressPending: EngineCapability;
|
|
3120
3138
|
/**
|
|
3121
3139
|
* EngineCapabilities is a set of capabilities, kept as a list. Nil and
|
|
3122
3140
|
* empty are the same: nothing beyond the base contract.
|
|
@@ -5110,7 +5128,76 @@ export interface CreateSandboxRequest {
|
|
|
5110
5128
|
* engine's gateway places the values toward those hosts and renews
|
|
5111
5129
|
* the ones that expire, always from the login chosen here.
|
|
5112
5130
|
*/
|
|
5113
|
-
credentials?:
|
|
5131
|
+
credentials?: SandboxCredential[];
|
|
5132
|
+
}
|
|
5133
|
+
/**
|
|
5134
|
+
* SandboxCredentialMode is when a sandbox's login is given to its box.
|
|
5135
|
+
*/
|
|
5136
|
+
export type SandboxCredentialMode = "auto" | "ask";
|
|
5137
|
+
/**
|
|
5138
|
+
* SandboxCredentialAuto (the default): the login is chosen when the
|
|
5139
|
+
* sandbox is made and given without asking.
|
|
5140
|
+
*/
|
|
5141
|
+
export declare const SandboxCredentialAuto: SandboxCredentialMode;
|
|
5142
|
+
/**
|
|
5143
|
+
* SandboxCredentialAsk: the box gets the login on first use, once a
|
|
5144
|
+
* person approves it on the tool call running there; a run nobody
|
|
5145
|
+
* watches (a trigger, a schedule) never gets it (INF-1173). Needs an
|
|
5146
|
+
* engine with EngineCapabilityEgressPending.
|
|
5147
|
+
*/
|
|
5148
|
+
export declare const SandboxCredentialAsk: SandboxCredentialMode;
|
|
5149
|
+
/**
|
|
5150
|
+
* SandboxCredential is a login a sandbox's box gets: a requirement by
|
|
5151
|
+
* provider, as an app declares one, and when it is given (Mode, auto when
|
|
5152
|
+
* unset). It reads and writes as the requirement's fields plus "mode", so
|
|
5153
|
+
* a plain requirement is an auto one.
|
|
5154
|
+
*/
|
|
5155
|
+
export interface SandboxCredential {
|
|
5156
|
+
slug?: string;
|
|
5157
|
+
capabilities?: string[];
|
|
5158
|
+
description?: string;
|
|
5159
|
+
optional?: boolean;
|
|
5160
|
+
secrets?: string[];
|
|
5161
|
+
scopes?: string[];
|
|
5162
|
+
/**
|
|
5163
|
+
* Provider describes the company the credential belongs to, for a
|
|
5164
|
+
* catalog row that does not exist yet. Its slug defaults to the
|
|
5165
|
+
* credential slug.
|
|
5166
|
+
*/
|
|
5167
|
+
provider?: CompanySeed;
|
|
5168
|
+
/**
|
|
5169
|
+
* Auth is the credential's auth provider, for a slug no row defines yet.
|
|
5170
|
+
*/
|
|
5171
|
+
auth?: AuthMethod;
|
|
5172
|
+
/**
|
|
5173
|
+
* The rest describe the platform api_key scheme a platform app's deploy
|
|
5174
|
+
* catalogues for the slug: set on the scheme it creates, and filled into
|
|
5175
|
+
* an existing one only where that is still empty (an admin's edit
|
|
5176
|
+
* stands). Any other deploy ignores them.
|
|
5177
|
+
* DisplayName is the scheme's name ("Claude Code"); at most
|
|
5178
|
+
* MaxCredentialDisplayName characters.
|
|
5179
|
+
*/
|
|
5180
|
+
display_name?: string;
|
|
5181
|
+
/**
|
|
5182
|
+
* ConnectionScope is who a connection belongs to: team (empty) or user.
|
|
5183
|
+
*/
|
|
5184
|
+
connection_scope?: CredentialScope;
|
|
5185
|
+
/**
|
|
5186
|
+
* Instructions tell a person how to get the key (markdown, at most
|
|
5187
|
+
* MaxAuthProviderInstructions characters).
|
|
5188
|
+
*/
|
|
5189
|
+
instructions?: string;
|
|
5190
|
+
/**
|
|
5191
|
+
* DocsURL is the scheme's documentation link.
|
|
5192
|
+
*/
|
|
5193
|
+
docs_url?: string;
|
|
5194
|
+
/**
|
|
5195
|
+
* ExpiresAfterDays is how long a saved key lasts: it counts as expired
|
|
5196
|
+
* this many days after it is saved. 0 is never; at most
|
|
5197
|
+
* MaxExpiresAfterDays.
|
|
5198
|
+
*/
|
|
5199
|
+
expires_after_days?: number;
|
|
5200
|
+
mode?: SandboxCredentialMode;
|
|
5114
5201
|
}
|
|
5115
5202
|
/**
|
|
5116
5203
|
* SandboxDTO is the API response for a sandbox.
|
|
@@ -7290,6 +7377,16 @@ export declare const InterruptResourceTurn: InterruptResourceType;
|
|
|
7290
7377
|
* wait call (InterruptResourceToolInvocation).
|
|
7291
7378
|
*/
|
|
7292
7379
|
export declare const InterruptReasonWait: InterruptReason;
|
|
7380
|
+
/**
|
|
7381
|
+
* InterruptReasonEgressLogin asks whether a sandbox's box gets one of its
|
|
7382
|
+
* owner's logins, on the tool call running there (a remote_exec) when the
|
|
7383
|
+
* box first reaches the login's host (INF-1173). Its resource is that call
|
|
7384
|
+
* (InterruptResourceToolInvocation), which keeps running: the engine holds
|
|
7385
|
+
* the request until the answer, and asks for it again
|
|
7386
|
+
* (POST /engines/{id}/egress/resolve). Allow gives the login, deny or no
|
|
7387
|
+
* answer in time refuses it for the sandbox. Meta is EgressLoginAskMeta.
|
|
7388
|
+
*/
|
|
7389
|
+
export declare const InterruptReasonEgressLogin: InterruptReason;
|
|
7293
7390
|
/**
|
|
7294
7391
|
* MergeStrategy defines how a delta field should be merged by consumers.
|
|
7295
7392
|
*/
|
|
@@ -8565,7 +8662,7 @@ export declare const AgentRunStateRejected: AgentRunState;
|
|
|
8565
8662
|
* InterruptReason describes why an agent run is in an interrupted state.
|
|
8566
8663
|
* Aligns with AG-UI interrupt outcome reasons.
|
|
8567
8664
|
*/
|
|
8568
|
-
export type InterruptReason = "wait" | "tool_approval" | "client_tool" | "widget" | "auth" | "confirmation" | "hook_gate" | "input";
|
|
8665
|
+
export type InterruptReason = "wait" | "egress_login" | "tool_approval" | "client_tool" | "widget" | "auth" | "confirmation" | "hook_gate" | "input";
|
|
8569
8666
|
export declare const InterruptReasonToolApproval: InterruptReason;
|
|
8570
8667
|
export declare const InterruptReasonClientTool: InterruptReason;
|
|
8571
8668
|
export declare const InterruptReasonWidget: InterruptReason;
|
package/dist/types.js
CHANGED
|
@@ -454,6 +454,14 @@ export const EngineCapabilitySandboxes = "sandboxes";
|
|
|
454
454
|
* (INF-1156).
|
|
455
455
|
*/
|
|
456
456
|
export const EngineCapabilityCapacity = "capacity";
|
|
457
|
+
/**
|
|
458
|
+
* EngineCapabilityEgressPending: the engine's gateway takes pending
|
|
459
|
+
* bound secrets (BoundSecret.Pending: no value) and fetches each value
|
|
460
|
+
* on first use through POST /engines/{id}/egress/resolve, with the
|
|
461
|
+
* triggers EgressTrigger names; it also reports the hosts its boxes
|
|
462
|
+
* reach (POST /engines/{id}/egress/hosts) (INF-1173).
|
|
463
|
+
*/
|
|
464
|
+
export const EngineCapabilityEgressPending = "egress_pending";
|
|
457
465
|
export const ErrorCodeInvalidRequest = "invalid_request";
|
|
458
466
|
export const ErrorCodeValidationError = "validation_error";
|
|
459
467
|
export const ErrorCodeUnauthorized = "unauthorized";
|
|
@@ -785,6 +793,18 @@ export const SandboxStatusFailed = "failed";
|
|
|
785
793
|
export const SandboxDesiredRunning = "running";
|
|
786
794
|
export const SandboxDesiredStopped = "stopped";
|
|
787
795
|
export const SandboxDesiredDeleted = "deleted";
|
|
796
|
+
/**
|
|
797
|
+
* SandboxCredentialAuto (the default): the login is chosen when the
|
|
798
|
+
* sandbox is made and given without asking.
|
|
799
|
+
*/
|
|
800
|
+
export const SandboxCredentialAuto = "auto";
|
|
801
|
+
/**
|
|
802
|
+
* SandboxCredentialAsk: the box gets the login on first use, once a
|
|
803
|
+
* person approves it on the tool call running there; a run nobody
|
|
804
|
+
* watches (a trigger, a schedule) never gets it (INF-1173). Needs an
|
|
805
|
+
* engine with EngineCapabilityEgressPending.
|
|
806
|
+
*/
|
|
807
|
+
export const SandboxCredentialAsk = "ask";
|
|
788
808
|
/**
|
|
789
809
|
* UpdateRequested: the request was sent and nothing has answered it yet.
|
|
790
810
|
* An engine older than engine_update_result never answers, so its update stays here.
|
|
@@ -1218,6 +1238,16 @@ export const InterruptResourceTurn = "turn";
|
|
|
1218
1238
|
* wait call (InterruptResourceToolInvocation).
|
|
1219
1239
|
*/
|
|
1220
1240
|
export const InterruptReasonWait = "wait";
|
|
1241
|
+
/**
|
|
1242
|
+
* InterruptReasonEgressLogin asks whether a sandbox's box gets one of its
|
|
1243
|
+
* owner's logins, on the tool call running there (a remote_exec) when the
|
|
1244
|
+
* box first reaches the login's host (INF-1173). Its resource is that call
|
|
1245
|
+
* (InterruptResourceToolInvocation), which keeps running: the engine holds
|
|
1246
|
+
* the request until the answer, and asks for it again
|
|
1247
|
+
* (POST /engines/{id}/egress/resolve). Allow gives the login, deny or no
|
|
1248
|
+
* answer in time refuses it for the sandbox. Meta is EgressLoginAskMeta.
|
|
1249
|
+
*/
|
|
1250
|
+
export const InterruptReasonEgressLogin = "egress_login";
|
|
1221
1251
|
export const MergeStrategyConcat = "concat";
|
|
1222
1252
|
export const MergeStrategyReplace = "replace";
|
|
1223
1253
|
export const MergeStrategyIndexed = "indexed";
|