@inferencesh/sdk 0.6.0 → 0.6.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.
- package/dist/types.d.ts +43 -2
- package/dist/types.js +1 -1
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -114,6 +114,11 @@ export interface ToolAuthConfig {
|
|
|
114
114
|
*/
|
|
115
115
|
header?: string;
|
|
116
116
|
}
|
|
117
|
+
/**
|
|
118
|
+
* CallToolConfig is the preferred name for HTTPToolConfig.
|
|
119
|
+
* "call" is the user-facing type; "http" is kept for backward compatibility.
|
|
120
|
+
*/
|
|
121
|
+
export type CallToolConfig = HTTPToolConfig;
|
|
117
122
|
/**
|
|
118
123
|
* HTTPToolConfig contains configuration for an authenticated HTTP tool
|
|
119
124
|
*/
|
|
@@ -159,6 +164,7 @@ export interface AgentTool {
|
|
|
159
164
|
agent?: AgentToolConfig;
|
|
160
165
|
hook?: HookToolConfig;
|
|
161
166
|
http?: HTTPToolConfig;
|
|
167
|
+
call?: CallToolConfig;
|
|
162
168
|
mcp?: MCPToolConfig;
|
|
163
169
|
client?: ClientToolConfig;
|
|
164
170
|
internal?: InternalToolConfig;
|
|
@@ -186,6 +192,7 @@ export interface AgentToolDTO {
|
|
|
186
192
|
agent?: AgentToolConfigDTO;
|
|
187
193
|
hook?: HookToolConfigDTO;
|
|
188
194
|
http?: HTTPToolConfigDTO;
|
|
195
|
+
call?: HTTPToolConfigDTO;
|
|
189
196
|
mcp?: MCPToolConfigDTO;
|
|
190
197
|
client?: ClientToolConfigDTO;
|
|
191
198
|
}
|
|
@@ -303,6 +310,17 @@ export interface SkillConfig {
|
|
|
303
310
|
version_id?: string;
|
|
304
311
|
url?: string;
|
|
305
312
|
content?: string;
|
|
313
|
+
preload?: boolean;
|
|
314
|
+
}
|
|
315
|
+
/**
|
|
316
|
+
* ContextField declares a context parameter expected by the agent.
|
|
317
|
+
* Context is caller-provided at chat creation, stored on Chat, and available in tool URL templates.
|
|
318
|
+
*/
|
|
319
|
+
export interface ContextField {
|
|
320
|
+
name: string;
|
|
321
|
+
description?: string;
|
|
322
|
+
required?: boolean;
|
|
323
|
+
default?: string;
|
|
306
324
|
}
|
|
307
325
|
/**
|
|
308
326
|
* AgentConfig contains the shared configuration fields for agent execution.
|
|
@@ -330,6 +348,10 @@ export interface AgentConfig {
|
|
|
330
348
|
* Skills available to this agent (loaded on-demand via skill_get tool)
|
|
331
349
|
*/
|
|
332
350
|
skills?: SkillConfig[];
|
|
351
|
+
/**
|
|
352
|
+
* Context declares expected context parameters (resolved in tool URL templates via {{context.X}})
|
|
353
|
+
*/
|
|
354
|
+
context?: ContextField[];
|
|
333
355
|
/**
|
|
334
356
|
* Internal tools configuration (plan, memory, widget, finish, skills)
|
|
335
357
|
*/
|
|
@@ -373,6 +395,10 @@ export interface AgentVersionDTO extends BaseModel, PermissionModelDTO {
|
|
|
373
395
|
* Skills available to this agent (loaded on-demand via skill_get tool)
|
|
374
396
|
*/
|
|
375
397
|
skills: SkillConfig[];
|
|
398
|
+
/**
|
|
399
|
+
* Context declarations
|
|
400
|
+
*/
|
|
401
|
+
context?: ContextField[];
|
|
376
402
|
/**
|
|
377
403
|
* Internal tools configuration (plan, memory, widget, finish, skills)
|
|
378
404
|
*/
|
|
@@ -484,6 +510,12 @@ export interface ApiAgentRunRequest {
|
|
|
484
510
|
* The message to send
|
|
485
511
|
*/
|
|
486
512
|
input: ChatTaskInput;
|
|
513
|
+
/**
|
|
514
|
+
* Context values for this chat session (used in tool URL templates)
|
|
515
|
+
*/
|
|
516
|
+
context?: {
|
|
517
|
+
[key: string]: string;
|
|
518
|
+
};
|
|
487
519
|
/**
|
|
488
520
|
* If true, returns SSE stream instead of JSON response
|
|
489
521
|
*/
|
|
@@ -516,6 +548,12 @@ export interface CreateAgentMessageRequest {
|
|
|
516
548
|
* Optional name for the adhoc agent (used for deduplication and display)
|
|
517
549
|
*/
|
|
518
550
|
agent_name?: string;
|
|
551
|
+
/**
|
|
552
|
+
* Context values for this chat session (used in tool URL templates)
|
|
553
|
+
*/
|
|
554
|
+
context?: {
|
|
555
|
+
[key: string]: string;
|
|
556
|
+
};
|
|
519
557
|
}
|
|
520
558
|
export interface CreateAgentMessageResponse {
|
|
521
559
|
user_message?: ChatMessageDTO;
|
|
@@ -967,7 +1005,7 @@ export interface App extends BaseModel, PermissionModel {
|
|
|
967
1005
|
}
|
|
968
1006
|
/**
|
|
969
1007
|
* AppPricing configures all pricing using CEL expressions
|
|
970
|
-
* Empty expressions use defaults. All values in
|
|
1008
|
+
* Empty expressions use defaults. All values in microcents (1 cent = 1,000,000; 1 dollar = 100,000,000)
|
|
971
1009
|
*/
|
|
972
1010
|
export interface AppPricing {
|
|
973
1011
|
prices: {
|
|
@@ -981,7 +1019,7 @@ export interface AppPricing {
|
|
|
981
1019
|
*/
|
|
982
1020
|
resource_expression: string;
|
|
983
1021
|
/**
|
|
984
|
-
* CEL expressions for each fee type (result in
|
|
1022
|
+
* CEL expressions for each fee type (result in microcents)
|
|
985
1023
|
* Available variables: inputs, outputs, prices, resource_fee, usage_seconds
|
|
986
1024
|
*/
|
|
987
1025
|
inference_expression: string;
|
|
@@ -1338,6 +1376,9 @@ export interface ChatDTO extends BaseModel, PermissionModelDTO {
|
|
|
1338
1376
|
children: (ChatDTO | undefined)[];
|
|
1339
1377
|
status: ChatStatus;
|
|
1340
1378
|
output?: any;
|
|
1379
|
+
context?: {
|
|
1380
|
+
[key: string]: string;
|
|
1381
|
+
};
|
|
1341
1382
|
/**
|
|
1342
1383
|
* Agent version reference
|
|
1343
1384
|
*/
|
package/dist/types.js
CHANGED
|
@@ -3,7 +3,7 @@ export const ToolTypeApp = "app"; // App tools - creates a Task
|
|
|
3
3
|
export const ToolTypeAgent = "agent"; // Sub-agent tools - creates a sub-Chat
|
|
4
4
|
export const ToolTypeHook = "hook"; // Webhook tools - HTTP POST to external URL (legacy)
|
|
5
5
|
export const ToolTypeHTTP = "http"; // HTTP tools - authenticated HTTP request/response
|
|
6
|
-
export const ToolTypeCall = "call"; // Call tools -
|
|
6
|
+
export const ToolTypeCall = "call"; // Call tools - authenticated HTTP request/response (preferred over "http")
|
|
7
7
|
export const ToolTypeMCP = "mcp"; // MCP tools - calls remote MCP server
|
|
8
8
|
export const ToolTypeClient = "client"; // Client tools - executed by frontend
|
|
9
9
|
export const ToolTypeInternal = "internal"; // Internal/built-in tools (plan, memory, widget, finish)
|