@inferencesh/sdk 0.4.17 → 0.4.19
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/tool-builder.d.ts +6 -0
- package/dist/tool-builder.js +15 -1
- package/dist/types.d.ts +26 -5
- package/package.json +1 -1
package/dist/tool-builder.d.ts
CHANGED
|
@@ -38,7 +38,13 @@ declare class ClientToolBuilder extends ToolBuilder {
|
|
|
38
38
|
}
|
|
39
39
|
declare class AppToolBuilder extends ToolBuilder {
|
|
40
40
|
private appRef;
|
|
41
|
+
private setupValues?;
|
|
42
|
+
private inputValues?;
|
|
41
43
|
constructor(name: string, appRef: string);
|
|
44
|
+
/** Set one-time setup values (hidden from agent, passed on every call) */
|
|
45
|
+
setup(values: Record<string, unknown>): this;
|
|
46
|
+
/** Set default input values (agent can override these) */
|
|
47
|
+
input(values: Record<string, unknown>): this;
|
|
42
48
|
build(): AgentTool;
|
|
43
49
|
}
|
|
44
50
|
declare class AgentToolBuilder extends ToolBuilder {
|
package/dist/tool-builder.js
CHANGED
|
@@ -94,6 +94,16 @@ class AppToolBuilder extends ToolBuilder {
|
|
|
94
94
|
super(name);
|
|
95
95
|
this.appRef = appRef;
|
|
96
96
|
}
|
|
97
|
+
/** Set one-time setup values (hidden from agent, passed on every call) */
|
|
98
|
+
setup(values) {
|
|
99
|
+
this.setupValues = values;
|
|
100
|
+
return this;
|
|
101
|
+
}
|
|
102
|
+
/** Set default input values (agent can override these) */
|
|
103
|
+
input(values) {
|
|
104
|
+
this.inputValues = values;
|
|
105
|
+
return this;
|
|
106
|
+
}
|
|
97
107
|
build() {
|
|
98
108
|
return {
|
|
99
109
|
name: this.name,
|
|
@@ -101,7 +111,11 @@ class AppToolBuilder extends ToolBuilder {
|
|
|
101
111
|
description: this.desc,
|
|
102
112
|
type: types_1.ToolTypeApp,
|
|
103
113
|
require_approval: this.approval || undefined,
|
|
104
|
-
app: {
|
|
114
|
+
app: {
|
|
115
|
+
ref: this.appRef,
|
|
116
|
+
setup: this.setupValues,
|
|
117
|
+
input: this.inputValues,
|
|
118
|
+
},
|
|
105
119
|
};
|
|
106
120
|
}
|
|
107
121
|
}
|
package/dist/types.d.ts
CHANGED
|
@@ -34,6 +34,11 @@ export interface AppToolConfig {
|
|
|
34
34
|
* Resolved app object (populated at runtime)
|
|
35
35
|
*/
|
|
36
36
|
app?: App;
|
|
37
|
+
/**
|
|
38
|
+
* Pre-configured values
|
|
39
|
+
*/
|
|
40
|
+
setup?: any;
|
|
41
|
+
input?: any;
|
|
37
42
|
}
|
|
38
43
|
/**
|
|
39
44
|
* AgentToolConfig contains configuration for a sub-agent tool
|
|
@@ -120,6 +125,11 @@ export interface AppToolConfigDTO {
|
|
|
120
125
|
id?: string;
|
|
121
126
|
version_id?: string;
|
|
122
127
|
app?: AppDTO;
|
|
128
|
+
/**
|
|
129
|
+
* Pre-configured values
|
|
130
|
+
*/
|
|
131
|
+
setup?: any;
|
|
132
|
+
input?: any;
|
|
123
133
|
}
|
|
124
134
|
export interface AgentToolConfigDTO {
|
|
125
135
|
ref: string;
|
|
@@ -143,6 +153,14 @@ export interface ClientToolConfigDTO {
|
|
|
143
153
|
export interface CoreAppConfig {
|
|
144
154
|
id: string;
|
|
145
155
|
version_id: string;
|
|
156
|
+
/**
|
|
157
|
+
* Setup values for the core app (one-time configuration)
|
|
158
|
+
*/
|
|
159
|
+
setup?: any;
|
|
160
|
+
/**
|
|
161
|
+
* Input default values for the core app
|
|
162
|
+
*/
|
|
163
|
+
input?: any;
|
|
146
164
|
}
|
|
147
165
|
/**
|
|
148
166
|
* AgentImages contains display images for an agent (like AppImages)
|
|
@@ -196,7 +214,6 @@ export interface AgentConfig {
|
|
|
196
214
|
*/
|
|
197
215
|
core_app_ref?: string;
|
|
198
216
|
core_app?: CoreAppConfig;
|
|
199
|
-
core_app_input?: any;
|
|
200
217
|
/**
|
|
201
218
|
* Tools (apps, agents, hooks, client tools)
|
|
202
219
|
*/
|
|
@@ -227,13 +244,20 @@ export interface CoreAppConfigDTO {
|
|
|
227
244
|
id: string;
|
|
228
245
|
version_id: string;
|
|
229
246
|
app?: AppDTO;
|
|
247
|
+
/**
|
|
248
|
+
* Setup values for the core app (one-time configuration)
|
|
249
|
+
*/
|
|
250
|
+
setup?: any;
|
|
251
|
+
/**
|
|
252
|
+
* Input default values for the core app
|
|
253
|
+
*/
|
|
254
|
+
input?: any;
|
|
230
255
|
}
|
|
231
256
|
export interface AgentVersionDTO extends BaseModel, PermissionModelDTO {
|
|
232
257
|
description: string;
|
|
233
258
|
system_prompt: string;
|
|
234
259
|
example_prompts: string[];
|
|
235
260
|
core_app?: CoreAppConfigDTO;
|
|
236
|
-
core_app_input?: any;
|
|
237
261
|
/**
|
|
238
262
|
* Unified tools array (apps, agents, hooks, client)
|
|
239
263
|
*/
|
|
@@ -843,7 +867,6 @@ export interface ChatTaskInput {
|
|
|
843
867
|
role?: ChatMessageRole;
|
|
844
868
|
text?: string;
|
|
845
869
|
reasoning?: string;
|
|
846
|
-
image?: string;
|
|
847
870
|
images?: string[];
|
|
848
871
|
files?: string[];
|
|
849
872
|
tools?: Tool[];
|
|
@@ -853,9 +876,7 @@ export interface ChatTaskContextMessage {
|
|
|
853
876
|
role: ChatMessageRole;
|
|
854
877
|
text?: string;
|
|
855
878
|
reasoning?: string;
|
|
856
|
-
image?: string;
|
|
857
879
|
images?: string[];
|
|
858
|
-
file?: string;
|
|
859
880
|
files?: string[];
|
|
860
881
|
tools?: Tool[];
|
|
861
882
|
tool_calls?: ToolCall[];
|
package/package.json
CHANGED