@onereach/step-voice 7.0.41-subagents.1 → 7.0.41-subagents.3
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/dst/Voice Agent.d.ts +10 -6
- package/dst/Voice Agent.js +18 -7
- package/package.json +1 -1
package/dst/Voice Agent.d.ts
CHANGED
|
@@ -36,10 +36,20 @@ interface SubagentTool {
|
|
|
36
36
|
parameters: string;
|
|
37
37
|
feedback?: PerToolConfig;
|
|
38
38
|
}
|
|
39
|
+
interface AgentServiceConfig {
|
|
40
|
+
provider: string;
|
|
41
|
+
model: string;
|
|
42
|
+
api_key?: string;
|
|
43
|
+
options?: Record<string, unknown>;
|
|
44
|
+
}
|
|
45
|
+
type SubagentContextMode = 'own' | 'shared';
|
|
39
46
|
interface Subagent {
|
|
40
47
|
id: string;
|
|
41
48
|
name: string;
|
|
42
49
|
system_instruction: string;
|
|
50
|
+
developer_messages?: string[];
|
|
51
|
+
context?: SubagentContextMode;
|
|
52
|
+
llm?: Partial<AgentServiceConfig> | null;
|
|
43
53
|
tools: SubagentTool[];
|
|
44
54
|
exitId?: string;
|
|
45
55
|
}
|
|
@@ -48,12 +58,6 @@ interface AgentSystemToolConfig {
|
|
|
48
58
|
description?: string;
|
|
49
59
|
parameters?: Record<string, unknown>;
|
|
50
60
|
}
|
|
51
|
-
interface AgentServiceConfig {
|
|
52
|
-
provider: string;
|
|
53
|
-
model: string;
|
|
54
|
-
api_key?: string;
|
|
55
|
-
options?: Record<string, unknown>;
|
|
56
|
-
}
|
|
57
61
|
interface INPUT {
|
|
58
62
|
handlers: Handler[];
|
|
59
63
|
subagents: Subagent[];
|
package/dst/Voice Agent.js
CHANGED
|
@@ -200,13 +200,24 @@ class VoiceAgent extends voice_1.default {
|
|
|
200
200
|
return [];
|
|
201
201
|
return subagents
|
|
202
202
|
.filter(sa => sa != null && !lodash_1.default.isEmpty(lodash_1.default.trim(sa.name)))
|
|
203
|
-
.map(sa =>
|
|
204
|
-
name
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
.
|
|
208
|
-
.
|
|
209
|
-
|
|
203
|
+
.map(sa => {
|
|
204
|
+
const name = lodash_1.default.trim(sa.name);
|
|
205
|
+
const serialized = {
|
|
206
|
+
name,
|
|
207
|
+
system_instruction: sa.system_instruction || '',
|
|
208
|
+
developer_messages: (sa.developer_messages || [])
|
|
209
|
+
.map(msg => typeof msg === 'string' ? msg : '')
|
|
210
|
+
.filter(msg => !lodash_1.default.isEmpty(lodash_1.default.trim(msg))),
|
|
211
|
+
context: sa.context === 'shared' ? 'shared' : 'own',
|
|
212
|
+
tools: (sa.tools || [])
|
|
213
|
+
.filter(t => t != null && !lodash_1.default.isEmpty(lodash_1.default.trim(t.name)))
|
|
214
|
+
.map(t => this.serializeTool(t))
|
|
215
|
+
};
|
|
216
|
+
const llm = this.buildAgentServiceConfig(`subagent "${name}" llm`, sa.llm || {});
|
|
217
|
+
if (llm)
|
|
218
|
+
serialized.llm = llm;
|
|
219
|
+
return serialized;
|
|
220
|
+
});
|
|
210
221
|
}
|
|
211
222
|
isSubagentExitLabel(label) {
|
|
212
223
|
const subagents = this.data.subagents || [];
|