@inferencesh/sdk 0.14.2 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/agent/actions.js +36 -0
- package/dist/agent/api.d.ts +2 -1
- package/dist/agent/api.js +4 -0
- package/dist/agent/types.d.ts +5 -1
- package/dist/types.d.ts +194 -3
- package/dist/types.js +44 -0
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.15.0] - 2026-10-02
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- `useAgentActions().updateChatSettings(settings)`: change a chat's name, visibility, `allow_all_tools` (run every tool without asking; switching it on approves the calls already waiting), `disable_hooks` and `forget_memory` (`POST /chats/{id}/settings`).
|
|
15
|
+
- `useAgentActions().switchAgent(agentRef)`: hand the chat to another agent our loop runs; the next message goes to it. A harness agent is refused.
|
|
16
|
+
- Types: `ChatSettingsRequest`; `ChatData.allow_all_tools` and `disable_hooks`; per-server MCP headers; API key scope and an optional `last_used_at`; engine-picker provider options.
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
20
|
+
- The `inference-src` export condition is listed before `types`, so a bundler that sets it resolves the TypeScript source.
|
|
21
|
+
|
|
10
22
|
## [0.14.2] - 2026-10-01
|
|
11
23
|
|
|
12
24
|
### Added
|
package/dist/agent/actions.js
CHANGED
|
@@ -386,6 +386,42 @@ export function createActions(ctx) {
|
|
|
386
386
|
throw error;
|
|
387
387
|
}
|
|
388
388
|
},
|
|
389
|
+
updateChatSettings: async (settings) => {
|
|
390
|
+
const chatId = getChatId();
|
|
391
|
+
if (!chatId) {
|
|
392
|
+
console.error('[AgentSDK] Cannot change chat settings without a chatId');
|
|
393
|
+
return;
|
|
394
|
+
}
|
|
395
|
+
try {
|
|
396
|
+
// The response carries the chat without its messages: update the
|
|
397
|
+
// chat and keep the conversation on screen.
|
|
398
|
+
dispatch({ type: 'UPDATE_CHAT', payload: await api.updateChatSettings(client, chatId, settings) });
|
|
399
|
+
}
|
|
400
|
+
catch (error) {
|
|
401
|
+
console.error('[AgentSDK] Failed to change chat settings:', error);
|
|
402
|
+
const err = error instanceof Error ? error : new Error('Failed to change chat settings');
|
|
403
|
+
dispatch({ type: 'SET_ERROR', payload: err.message });
|
|
404
|
+
callbacks.onError?.(err);
|
|
405
|
+
throw error;
|
|
406
|
+
}
|
|
407
|
+
},
|
|
408
|
+
switchAgent: async (agentRef) => {
|
|
409
|
+
const chatId = getChatId();
|
|
410
|
+
if (!chatId) {
|
|
411
|
+
console.error('[AgentSDK] Cannot switch the agent without a chatId');
|
|
412
|
+
return;
|
|
413
|
+
}
|
|
414
|
+
try {
|
|
415
|
+
dispatch({ type: 'UPDATE_CHAT', payload: await api.setAgent(client, chatId, agentRef) });
|
|
416
|
+
}
|
|
417
|
+
catch (error) {
|
|
418
|
+
console.error('[AgentSDK] Failed to switch the agent:', error);
|
|
419
|
+
const err = error instanceof Error ? error : new Error('Failed to switch the agent');
|
|
420
|
+
dispatch({ type: 'SET_ERROR', payload: err.message });
|
|
421
|
+
callbacks.onError?.(err);
|
|
422
|
+
throw error;
|
|
423
|
+
}
|
|
424
|
+
},
|
|
389
425
|
cancelMessage: async (messageId) => {
|
|
390
426
|
try {
|
|
391
427
|
await api.cancelMessage(client, messageId);
|
package/dist/agent/api.d.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* /agents/run stays for A2A/programmatic use.
|
|
9
9
|
*/
|
|
10
|
-
import type { ChatDTO, ChatMessageDTO, InterruptDTO } from '../types';
|
|
10
|
+
import type { ChatDTO, ChatMessageDTO, ChatSettingsRequest, InterruptDTO } from '../types';
|
|
11
11
|
import type { AgentOptions, AgentClient, AgentInfo, FileRef } from './types';
|
|
12
12
|
export interface SendResult {
|
|
13
13
|
chatId: string;
|
|
@@ -47,6 +47,7 @@ export declare function submitToolResult(client: AgentClient, toolInvocationId:
|
|
|
47
47
|
export declare function approveTool(client: AgentClient, toolInvocationId: string): Promise<void>;
|
|
48
48
|
export declare function rejectTool(client: AgentClient, toolInvocationId: string, reason?: string): Promise<void>;
|
|
49
49
|
export declare function alwaysAllowTool(client: AgentClient, chatId: string, toolInvocationId: string, toolName: string): Promise<void>;
|
|
50
|
+
export declare function updateChatSettings(client: AgentClient, chatId: string, settings: ChatSettingsRequest): Promise<ChatDTO>;
|
|
50
51
|
export declare function resolveInterrupt(client: AgentClient, interruptId: string, decision: 'allow' | 'deny'): Promise<InterruptDTO>;
|
|
51
52
|
export declare function listRunInterrupts(client: AgentClient, runId: string): Promise<InterruptDTO[]>;
|
|
52
53
|
export declare function uploadFile(client: AgentClient, file: globalThis.File): Promise<FileRef>;
|
package/dist/agent/api.js
CHANGED
|
@@ -156,6 +156,10 @@ export async function alwaysAllowTool(client, chatId, toolInvocationId, toolName
|
|
|
156
156
|
data: { tool_name: toolName }
|
|
157
157
|
});
|
|
158
158
|
}
|
|
159
|
+
export async function updateChatSettings(client, chatId, settings) {
|
|
160
|
+
const resp = await client.http.request('post', `/chats/${chatId}/settings`, { data: settings });
|
|
161
|
+
return resp.data;
|
|
162
|
+
}
|
|
159
163
|
// =========================================================================
|
|
160
164
|
// Interrupt operations
|
|
161
165
|
// =========================================================================
|
package/dist/agent/types.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Public types for the Agent chat module.
|
|
5
5
|
*/
|
|
6
6
|
import type { Dispatch } from 'react';
|
|
7
|
-
import type { AgentRunDTO, AgentVersionDTO, ChatDTO, ChatMessageDTO, AgentTool, AgentConfigInput as GeneratedAgentConfig, CoreAppConfigInput as CoreAppConfig, FileRef, ElicitResult } from '../types';
|
|
7
|
+
import type { AgentRunDTO, AgentVersionDTO, ChatDTO, ChatMessageDTO, ChatSettingsRequest, AgentTool, AgentConfigInput as GeneratedAgentConfig, CoreAppConfigInput as CoreAppConfig, FileRef, ElicitResult } from '../types';
|
|
8
8
|
import type { HttpClient } from '../http/client';
|
|
9
9
|
import type { StreamableManager } from '../http/streamable';
|
|
10
10
|
import type { PollManager } from '../http/poll';
|
|
@@ -134,6 +134,10 @@ export interface AgentChatActions {
|
|
|
134
134
|
rejectTool: (toolInvocationId: string, reason?: string) => Promise<void>;
|
|
135
135
|
/** Always allow a tool for this chat (approves + auto-approves future invocations) */
|
|
136
136
|
alwaysAllowTool: (toolInvocationId: string, toolName: string) => Promise<void>;
|
|
137
|
+
/** Change this chat's settings, e.g. allow_all_tools (switching it on approves the calls waiting) */
|
|
138
|
+
updateChatSettings: (settings: ChatSettingsRequest) => Promise<void>;
|
|
139
|
+
/** Hand this chat to another agent (namespace/name); the next message goes to it. Agents our loop runs only. */
|
|
140
|
+
switchAgent: (agentRef: string) => Promise<void>;
|
|
137
141
|
/** Cancel a queued message before the agent processes it */
|
|
138
142
|
cancelMessage: (messageId: string) => Promise<void>;
|
|
139
143
|
/** Resolve an interrupt gate (allow or deny) */
|
package/dist/types.d.ts
CHANGED
|
@@ -552,6 +552,18 @@ export interface MeResponse {
|
|
|
552
552
|
*/
|
|
553
553
|
team_view?: TeamViewDTO;
|
|
554
554
|
diagnostics?: DiagnosticsConfig;
|
|
555
|
+
/**
|
|
556
|
+
* PersonalTeamID is the caller's personal workspace, empty for a managed
|
|
557
|
+
* account, which has none.
|
|
558
|
+
*/
|
|
559
|
+
personal_team_id?: string;
|
|
560
|
+
/**
|
|
561
|
+
* NeedsUsername: the caller has not chosen a username yet (their
|
|
562
|
+
* personal workspace's setup is incomplete). Every new account picks one
|
|
563
|
+
* before landing, whichever team it lands in (an invite's included), via
|
|
564
|
+
* POST /teams/{personal_team_id}/complete-setup.
|
|
565
|
+
*/
|
|
566
|
+
needs_username: boolean;
|
|
555
567
|
}
|
|
556
568
|
export interface TeamCreateRequest {
|
|
557
569
|
name: string;
|
|
@@ -666,6 +678,11 @@ export interface CreateApiKeyRequest {
|
|
|
666
678
|
name: string;
|
|
667
679
|
expires_at?: string;
|
|
668
680
|
scopes?: string[];
|
|
681
|
+
/**
|
|
682
|
+
* Scope is who the key acts as. Empty means user (a personal key);
|
|
683
|
+
* workspace requires manage_keys.
|
|
684
|
+
*/
|
|
685
|
+
scope?: ApiKeyScope;
|
|
669
686
|
}
|
|
670
687
|
/**
|
|
671
688
|
* EstimateCostRequest is the request for POST /store/apps/{appId}/estimate.
|
|
@@ -1042,10 +1059,24 @@ export interface ScopePreset {
|
|
|
1042
1059
|
export interface ApiKeyDTO extends BaseModelDTO, PermissionModelDTO {
|
|
1043
1060
|
name: string;
|
|
1044
1061
|
key: string;
|
|
1045
|
-
|
|
1062
|
+
/**
|
|
1063
|
+
* LastUsedAt is absent for a key that has never been used.
|
|
1064
|
+
*/
|
|
1065
|
+
last_used_at?: string;
|
|
1046
1066
|
expires_at?: string;
|
|
1047
1067
|
scopes: Scope[];
|
|
1048
1068
|
source?: string;
|
|
1069
|
+
/**
|
|
1070
|
+
* Scope is who the key acts as: its creator (user) or the workspace.
|
|
1071
|
+
*/
|
|
1072
|
+
scope: ApiKeyScope;
|
|
1073
|
+
/**
|
|
1074
|
+
* CreatedBy is the person who created the key; Creator is that person,
|
|
1075
|
+
* set on lists. On a workspace key user_id is the workspace's service
|
|
1076
|
+
* account, so these are what show who made it.
|
|
1077
|
+
*/
|
|
1078
|
+
created_by: string;
|
|
1079
|
+
creator?: TeamMemberUserDTO;
|
|
1049
1080
|
}
|
|
1050
1081
|
/**
|
|
1051
1082
|
* AppPricing configures all pricing using CEL expressions.
|
|
@@ -1716,6 +1747,36 @@ export interface SubmitBountyResponse {
|
|
|
1716
1747
|
submission: BountySubmissionDTO;
|
|
1717
1748
|
granted_amount?: number;
|
|
1718
1749
|
}
|
|
1750
|
+
/**
|
|
1751
|
+
* ChatSettingsRequest changes a chat's settings. A field left out is left as
|
|
1752
|
+
* it is.
|
|
1753
|
+
*/
|
|
1754
|
+
export interface ChatSettingsRequest {
|
|
1755
|
+
/**
|
|
1756
|
+
* Name renames the chat. It cannot be empty.
|
|
1757
|
+
*/
|
|
1758
|
+
name?: string;
|
|
1759
|
+
/**
|
|
1760
|
+
* Visibility is who can open the chat: private (only you), team (your
|
|
1761
|
+
* workspace) or public (anyone with the link).
|
|
1762
|
+
*/
|
|
1763
|
+
visibility?: Visibility;
|
|
1764
|
+
/**
|
|
1765
|
+
* AllowAllTools runs every tool call without asking. Switching it on also
|
|
1766
|
+
* approves the calls already waiting.
|
|
1767
|
+
*/
|
|
1768
|
+
allow_all_tools?: boolean;
|
|
1769
|
+
/**
|
|
1770
|
+
* DisableHooks stops the agent's lifecycle hooks (suggest, learn,
|
|
1771
|
+
* webhooks, gates) firing in this chat.
|
|
1772
|
+
*/
|
|
1773
|
+
disable_hooks?: boolean;
|
|
1774
|
+
/**
|
|
1775
|
+
* ForgetMemory removes these keys from the chat's memory, the notes the
|
|
1776
|
+
* agent keeps for this conversation. A key that is not there is ignored.
|
|
1777
|
+
*/
|
|
1778
|
+
forget_memory?: string[];
|
|
1779
|
+
}
|
|
1719
1780
|
/**
|
|
1720
1781
|
* ChatDTO for API responses
|
|
1721
1782
|
*/
|
|
@@ -2069,7 +2130,7 @@ export interface EntitlementErrorMeta {
|
|
|
2069
2130
|
* and APIError.Code on the legacy envelope. Clients branch on these, so a
|
|
2070
2131
|
* code is a named const here, where it generates into models and the SDKs.
|
|
2071
2132
|
*/
|
|
2072
|
-
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" | "otp_required" | "mcp_auth_expired" | "limit_exceeded" | "feature_not_available" | "entitlement_unavailable" | "payment_required" | "payment_method_required" | "agents_disabled" | "remote_offline" | "remote_timeout" | "harness_not_drivable" | "harness_too_old";
|
|
2133
|
+
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" | "agents_disabled" | "remote_offline" | "remote_timeout" | "harness_not_drivable" | "harness_too_old";
|
|
2073
2134
|
export declare const ErrorCodeInvalidRequest: ErrorCode;
|
|
2074
2135
|
export declare const ErrorCodeValidationError: ErrorCode;
|
|
2075
2136
|
export declare const ErrorCodeUnauthorized: ErrorCode;
|
|
@@ -2093,6 +2154,25 @@ export declare const ErrorCodeTeamRoleRequired: ErrorCode;
|
|
|
2093
2154
|
* usage policy. The message names who to ask.
|
|
2094
2155
|
*/
|
|
2095
2156
|
export declare const ErrorCodeBlockedByUsagePolicy: ErrorCode;
|
|
2157
|
+
/**
|
|
2158
|
+
* ErrorCodeLastOwner (400): the change would leave a team (or an org's
|
|
2159
|
+
* workspace) without an owner.
|
|
2160
|
+
*/
|
|
2161
|
+
export declare const ErrorCodeLastOwner: ErrorCode;
|
|
2162
|
+
/**
|
|
2163
|
+
* ErrorCodeAccountDeactivated (403): an org deactivated this managed
|
|
2164
|
+
* account; sign-in and every request are refused until an org admin
|
|
2165
|
+
* reactivates it. ErrorCodeAccountBanned (403): the platform suspended
|
|
2166
|
+
* the account.
|
|
2167
|
+
*/
|
|
2168
|
+
export declare const ErrorCodeAccountDeactivated: ErrorCode;
|
|
2169
|
+
export declare const ErrorCodeAccountBanned: ErrorCode;
|
|
2170
|
+
/**
|
|
2171
|
+
* ErrorCodePersonRequired (403): only a person may do this, and the
|
|
2172
|
+
* caller is a workspace's service account (a workspace API key), or the
|
|
2173
|
+
* account is one and cannot sign in.
|
|
2174
|
+
*/
|
|
2175
|
+
export declare const ErrorCodePersonRequired: ErrorCode;
|
|
2096
2176
|
export declare const ErrorCodeOTPRequired: ErrorCode;
|
|
2097
2177
|
export declare const ErrorCodeMCPAuthExpired: ErrorCode;
|
|
2098
2178
|
/**
|
|
@@ -2529,6 +2609,11 @@ export interface InstanceTypeDTO extends BaseModelDTO, PermissionModelDTO {
|
|
|
2529
2609
|
* for this rental type. Empty on the raw catalog.
|
|
2530
2610
|
*/
|
|
2531
2611
|
rental_type?: InstanceRentalType;
|
|
2612
|
+
/**
|
|
2613
|
+
* Options lists every in-stock provider for an engine-picker offer,
|
|
2614
|
+
* cheapest first; the offer itself is the first one. Empty on the raw catalog.
|
|
2615
|
+
*/
|
|
2616
|
+
options?: InstanceTypeOptionDTO[];
|
|
2532
2617
|
configuration?: InstanceTypeConfiguration;
|
|
2533
2618
|
availability: InstanceTypeAvailability[];
|
|
2534
2619
|
boot_time?: InstanceTypeBootTime;
|
|
@@ -2554,6 +2639,28 @@ export interface InstanceTypeAvailability {
|
|
|
2554
2639
|
*/
|
|
2555
2640
|
hourly_price?: number;
|
|
2556
2641
|
}
|
|
2642
|
+
/**
|
|
2643
|
+
* InstanceTypeOptionDTO is one launchable provider behind an engine-picker
|
|
2644
|
+
* offer. Launch with its cloud and shade_instance_type, one of its regions and
|
|
2645
|
+
* the offer's rental_type.
|
|
2646
|
+
*/
|
|
2647
|
+
export interface InstanceTypeOptionDTO {
|
|
2648
|
+
cloud: InstanceCloudProvider;
|
|
2649
|
+
cloud_logo_url?: string;
|
|
2650
|
+
shade_instance_type: string;
|
|
2651
|
+
cloud_instance_type: string;
|
|
2652
|
+
hourly_price: number;
|
|
2653
|
+
configuration?: InstanceTypeConfiguration;
|
|
2654
|
+
regions: InstanceTypeOptionRegion[];
|
|
2655
|
+
}
|
|
2656
|
+
/**
|
|
2657
|
+
* InstanceTypeOptionRegion is an in-stock region and its hourly price in
|
|
2658
|
+
* cents. Spot prices can differ by region.
|
|
2659
|
+
*/
|
|
2660
|
+
export interface InstanceTypeOptionRegion {
|
|
2661
|
+
region: string;
|
|
2662
|
+
hourly_price: number;
|
|
2663
|
+
}
|
|
2557
2664
|
export interface InstanceTypeBootTime {
|
|
2558
2665
|
average_seconds: number;
|
|
2559
2666
|
updated_at: string;
|
|
@@ -2914,6 +3021,17 @@ export interface MCPServerDTO {
|
|
|
2914
3021
|
auth_type: MCPServerAuthType;
|
|
2915
3022
|
oauth_client_id?: string;
|
|
2916
3023
|
default_scopes: StringSlice;
|
|
3024
|
+
/**
|
|
3025
|
+
* Headers are static HTTP headers sent on every request to the server,
|
|
3026
|
+
* set by the team's admins (e.g. X-MCP-Toolsets, X-MCP-Readonly).
|
|
3027
|
+
*/
|
|
3028
|
+
headers?: {
|
|
3029
|
+
[key: string]: string;
|
|
3030
|
+
};
|
|
3031
|
+
/**
|
|
3032
|
+
* Setup is what the server's directory entry knows about setting it up.
|
|
3033
|
+
*/
|
|
3034
|
+
setup?: MCPServerSetup;
|
|
2917
3035
|
documentation_url: string;
|
|
2918
3036
|
connection_status?: string;
|
|
2919
3037
|
/**
|
|
@@ -2922,6 +3040,27 @@ export interface MCPServerDTO {
|
|
|
2922
3040
|
*/
|
|
2923
3041
|
connection_scope?: CredentialScope;
|
|
2924
3042
|
}
|
|
3043
|
+
/**
|
|
3044
|
+
* MCPServerSetup is what a server's directory entry knows about setting the
|
|
3045
|
+
* server up, as data: shown to whoever connects a server on the same host,
|
|
3046
|
+
* so no server's specifics live in code.
|
|
3047
|
+
*/
|
|
3048
|
+
export interface MCPServerSetup {
|
|
3049
|
+
/**
|
|
3050
|
+
* ResourceAppID is the id the server's API has at its authorization
|
|
3051
|
+
* server, which an organization must know before it can approve access
|
|
3052
|
+
* (for a Microsoft Entra resource: the application id a tenant needs a
|
|
3053
|
+
* service principal for).
|
|
3054
|
+
*/
|
|
3055
|
+
resource_app_id?: string;
|
|
3056
|
+
/**
|
|
3057
|
+
* RecommendedHeaders are the least-privilege static headers the server
|
|
3058
|
+
* documents (e.g. X-MCP-Toolsets), offered by the headers editor.
|
|
3059
|
+
*/
|
|
3060
|
+
recommended_headers?: {
|
|
3061
|
+
[key: string]: string;
|
|
3062
|
+
};
|
|
3063
|
+
}
|
|
2925
3064
|
/**
|
|
2926
3065
|
* NotificationDTO is the data transfer object
|
|
2927
3066
|
*/
|
|
@@ -3793,6 +3932,12 @@ export interface TeamDTO extends BaseModelDTO {
|
|
|
3793
3932
|
* OrgID of the org this team belongs to ('' = standalone team).
|
|
3794
3933
|
*/
|
|
3795
3934
|
org_id?: string;
|
|
3935
|
+
/**
|
|
3936
|
+
* OrgName is that org's display name (its workspace's name), set on the
|
|
3937
|
+
* caller's team list (/teams) so a member of one of its teams sees whose
|
|
3938
|
+
* org it is without belonging to the org workspace.
|
|
3939
|
+
*/
|
|
3940
|
+
org_name?: string;
|
|
3796
3941
|
/**
|
|
3797
3942
|
* UsagePolicyID of the team's own usage policy ('' = inherit the org's,
|
|
3798
3943
|
* or ungoverned when standalone, INF-808).
|
|
@@ -3987,6 +4132,11 @@ export interface UserDTO extends BaseModelDTO {
|
|
|
3987
4132
|
* cannot create teams/orgs).
|
|
3988
4133
|
*/
|
|
3989
4134
|
managed_by_org_id?: string;
|
|
4135
|
+
/**
|
|
4136
|
+
* ServiceTeamID: set on a workspace's service account, the principal its
|
|
4137
|
+
* workspace API keys act as.
|
|
4138
|
+
*/
|
|
4139
|
+
service_team_id?: string;
|
|
3990
4140
|
email: string;
|
|
3991
4141
|
name: string;
|
|
3992
4142
|
full_name: string;
|
|
@@ -4197,6 +4347,23 @@ export interface A2UISurface {
|
|
|
4197
4347
|
components: A2UIComponent[];
|
|
4198
4348
|
dataModel?: any;
|
|
4199
4349
|
}
|
|
4350
|
+
/**
|
|
4351
|
+
* ApiKeyScope is who an API key acts as, chosen when it is created, the way a
|
|
4352
|
+
* credential's scope says who owns it.
|
|
4353
|
+
*/
|
|
4354
|
+
export type ApiKeyScope = "user" | "workspace";
|
|
4355
|
+
/**
|
|
4356
|
+
* ApiKeyScopeUser is a personal key: it acts as the person who created it,
|
|
4357
|
+
* in the workspace it was created in, and ends when they can no longer
|
|
4358
|
+
* act there. Device-auth, `belt auth token`, OAuth and engine keys are
|
|
4359
|
+
* always personal.
|
|
4360
|
+
*/
|
|
4361
|
+
export declare const ApiKeyScopeUser: ApiKeyScope;
|
|
4362
|
+
/**
|
|
4363
|
+
* ApiKeyScopeWorkspace is a workspace key: it acts as the workspace's
|
|
4364
|
+
* service account, not a person, and outlives the admin who created it.
|
|
4365
|
+
*/
|
|
4366
|
+
export declare const ApiKeyScopeWorkspace: ApiKeyScope;
|
|
4200
4367
|
export type AppCategory = "image" | "video" | "audio" | "text" | "chat" | "3d" | "other" | "flow";
|
|
4201
4368
|
export declare const AppCategoryImage: AppCategory;
|
|
4202
4369
|
export declare const AppCategoryVideo: AppCategory;
|
|
@@ -4330,6 +4497,17 @@ export interface ChatData {
|
|
|
4330
4497
|
plan_steps: PlanStep[];
|
|
4331
4498
|
memory: StringEncodedMap;
|
|
4332
4499
|
always_allowed_tools: string[];
|
|
4500
|
+
/**
|
|
4501
|
+
* AllowAllTools runs every tool call in this chat without asking. The
|
|
4502
|
+
* person switches it in the chat's settings, and off again at any time.
|
|
4503
|
+
*/
|
|
4504
|
+
allow_all_tools: boolean;
|
|
4505
|
+
/**
|
|
4506
|
+
* DisableHooks stops the agent's lifecycle hooks firing in this chat. A
|
|
4507
|
+
* review branch is opened with it set, so a review cannot fire the hook
|
|
4508
|
+
* that reviews it.
|
|
4509
|
+
*/
|
|
4510
|
+
disable_hooks?: boolean;
|
|
4333
4511
|
}
|
|
4334
4512
|
/**
|
|
4335
4513
|
* PlanStep represents a step in an agent's execution plan
|
|
@@ -5326,11 +5504,24 @@ export declare const TeamKindOrg: TeamKind;
|
|
|
5326
5504
|
* TeamCapability is one thing a caller may do to a team's settings. The set is
|
|
5327
5505
|
* closed; team.Subject.Can is the only place that grants them.
|
|
5328
5506
|
*/
|
|
5329
|
-
export type TeamCapability = "edit_profile" | "manage_members" | "view_members" | "manage_keys" | "manage_vault" | "view_billing" | "manage_billing" | "view_policy" | "manage_policy" | "manage_org" | "manage_sso" | "archive" | "create_team" | "create_org" | "connect_org_credential" | "connect_platform_credential";
|
|
5507
|
+
export type TeamCapability = "edit_profile" | "manage_members" | "manage_admins" | "view_members" | "manage_keys" | "create_keys" | "manage_vault" | "view_billing" | "manage_billing" | "view_policy" | "manage_policy" | "manage_org" | "manage_sso" | "archive" | "create_team" | "create_org" | "connect_org_credential" | "connect_platform_credential";
|
|
5330
5508
|
export declare const TeamCapabilityEditProfile: TeamCapability;
|
|
5331
5509
|
export declare const TeamCapabilityManageMembers: TeamCapability;
|
|
5510
|
+
/**
|
|
5511
|
+
* ManageAdmins: granting, changing and removing the admin and owner
|
|
5512
|
+
* roles. Owners only; admins manage plain members.
|
|
5513
|
+
*/
|
|
5514
|
+
export declare const TeamCapabilityManageAdmins: TeamCapability;
|
|
5332
5515
|
export declare const TeamCapabilityViewMembers: TeamCapability;
|
|
5516
|
+
/**
|
|
5517
|
+
* ManageKeys: the workspace's keys. Creating workspace keys, and listing
|
|
5518
|
+
* and revoking every key of the workspace, whoever created it.
|
|
5519
|
+
*/
|
|
5333
5520
|
export declare const TeamCapabilityManageKeys: TeamCapability;
|
|
5521
|
+
/**
|
|
5522
|
+
* CreateKeys: creating, listing and revoking your own personal keys.
|
|
5523
|
+
*/
|
|
5524
|
+
export declare const TeamCapabilityCreateKeys: TeamCapability;
|
|
5334
5525
|
export declare const TeamCapabilityManageVault: TeamCapability;
|
|
5335
5526
|
export declare const TeamCapabilityViewBilling: TeamCapability;
|
|
5336
5527
|
export declare const TeamCapabilityManageBilling: TeamCapability;
|
package/dist/types.js
CHANGED
|
@@ -325,6 +325,25 @@ export const ErrorCodeTeamRoleRequired = "team_role_required";
|
|
|
325
325
|
* usage policy. The message names who to ask.
|
|
326
326
|
*/
|
|
327
327
|
export const ErrorCodeBlockedByUsagePolicy = "blocked_by_usage_policy";
|
|
328
|
+
/**
|
|
329
|
+
* ErrorCodeLastOwner (400): the change would leave a team (or an org's
|
|
330
|
+
* workspace) without an owner.
|
|
331
|
+
*/
|
|
332
|
+
export const ErrorCodeLastOwner = "last_owner";
|
|
333
|
+
/**
|
|
334
|
+
* ErrorCodeAccountDeactivated (403): an org deactivated this managed
|
|
335
|
+
* account; sign-in and every request are refused until an org admin
|
|
336
|
+
* reactivates it. ErrorCodeAccountBanned (403): the platform suspended
|
|
337
|
+
* the account.
|
|
338
|
+
*/
|
|
339
|
+
export const ErrorCodeAccountDeactivated = "account_deactivated";
|
|
340
|
+
export const ErrorCodeAccountBanned = "account_banned";
|
|
341
|
+
/**
|
|
342
|
+
* ErrorCodePersonRequired (403): only a person may do this, and the
|
|
343
|
+
* caller is a workspace's service account (a workspace API key), or the
|
|
344
|
+
* account is one and cannot sign in.
|
|
345
|
+
*/
|
|
346
|
+
export const ErrorCodePersonRequired = "person_required";
|
|
328
347
|
export const ErrorCodeOTPRequired = "otp_required";
|
|
329
348
|
export const ErrorCodeMCPAuthExpired = "mcp_auth_expired";
|
|
330
349
|
/**
|
|
@@ -500,6 +519,18 @@ export const A2UIForm = "Form";
|
|
|
500
519
|
* the viewer. Rendered from the artifact's /render endpoint.
|
|
501
520
|
*/
|
|
502
521
|
export const A2UIArtifact = "Artifact";
|
|
522
|
+
/**
|
|
523
|
+
* ApiKeyScopeUser is a personal key: it acts as the person who created it,
|
|
524
|
+
* in the workspace it was created in, and ends when they can no longer
|
|
525
|
+
* act there. Device-auth, `belt auth token`, OAuth and engine keys are
|
|
526
|
+
* always personal.
|
|
527
|
+
*/
|
|
528
|
+
export const ApiKeyScopeUser = "user";
|
|
529
|
+
/**
|
|
530
|
+
* ApiKeyScopeWorkspace is a workspace key: it acts as the workspace's
|
|
531
|
+
* service account, not a person, and outlives the admin who created it.
|
|
532
|
+
*/
|
|
533
|
+
export const ApiKeyScopeWorkspace = "workspace";
|
|
503
534
|
export const AppCategoryImage = "image";
|
|
504
535
|
export const AppCategoryVideo = "video";
|
|
505
536
|
export const AppCategoryAudio = "audio";
|
|
@@ -1094,8 +1125,21 @@ export const TeamKindOrgMember = "org_member";
|
|
|
1094
1125
|
export const TeamKindOrg = "org";
|
|
1095
1126
|
export const TeamCapabilityEditProfile = "edit_profile";
|
|
1096
1127
|
export const TeamCapabilityManageMembers = "manage_members";
|
|
1128
|
+
/**
|
|
1129
|
+
* ManageAdmins: granting, changing and removing the admin and owner
|
|
1130
|
+
* roles. Owners only; admins manage plain members.
|
|
1131
|
+
*/
|
|
1132
|
+
export const TeamCapabilityManageAdmins = "manage_admins";
|
|
1097
1133
|
export const TeamCapabilityViewMembers = "view_members";
|
|
1134
|
+
/**
|
|
1135
|
+
* ManageKeys: the workspace's keys. Creating workspace keys, and listing
|
|
1136
|
+
* and revoking every key of the workspace, whoever created it.
|
|
1137
|
+
*/
|
|
1098
1138
|
export const TeamCapabilityManageKeys = "manage_keys";
|
|
1139
|
+
/**
|
|
1140
|
+
* CreateKeys: creating, listing and revoking your own personal keys.
|
|
1141
|
+
*/
|
|
1142
|
+
export const TeamCapabilityCreateKeys = "create_keys";
|
|
1099
1143
|
export const TeamCapabilityManageVault = "manage_vault";
|
|
1100
1144
|
export const TeamCapabilityViewBilling = "view_billing";
|
|
1101
1145
|
export const TeamCapabilityManageBilling = "manage_billing";
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inferencesh/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
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",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
8
|
"exports": {
|
|
9
9
|
".": {
|
|
10
|
-
"types": "./dist/index.d.ts",
|
|
11
10
|
"inference-src": "./src/index.ts",
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
12
|
"default": "./dist/index.js"
|
|
13
13
|
},
|
|
14
14
|
"./proxy": {
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"default": "./dist/proxy/hono.js"
|
|
29
29
|
},
|
|
30
30
|
"./proxy/remix": {
|
|
31
|
-
"types": "./dist/proxy/remix.d.ts",
|
|
32
31
|
"inference-src": "./src/proxy/remix.ts",
|
|
32
|
+
"types": "./dist/proxy/remix.d.ts",
|
|
33
33
|
"default": "./dist/proxy/remix.js"
|
|
34
34
|
},
|
|
35
35
|
"./proxy/svelte": {
|
|
@@ -37,13 +37,13 @@
|
|
|
37
37
|
"default": "./dist/proxy/svelte.js"
|
|
38
38
|
},
|
|
39
39
|
"./agent": {
|
|
40
|
-
"types": "./dist/agent/index.d.ts",
|
|
41
40
|
"inference-src": "./src/agent/index.ts",
|
|
41
|
+
"types": "./dist/agent/index.d.ts",
|
|
42
42
|
"default": "./dist/agent/index.js"
|
|
43
43
|
},
|
|
44
44
|
"./internal/upload": {
|
|
45
|
-
"types": "./dist/api/files.d.ts",
|
|
46
45
|
"inference-src": "./src/api/files.ts",
|
|
46
|
+
"types": "./dist/api/files.d.ts",
|
|
47
47
|
"default": "./dist/api/files.js"
|
|
48
48
|
}
|
|
49
49
|
},
|