@onereach/step-voice 7.0.41-subagents.5 → 7.0.41-subagents.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.
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import VoiceStep from './voice';
|
|
2
2
|
type SystemInstructionMode = 'append' | 'replace' | 'off';
|
|
3
|
+
type ToolResponseMode = 'sync' | 'async' | 'none';
|
|
3
4
|
interface Tool {
|
|
4
5
|
name: string;
|
|
5
6
|
description: string;
|
|
6
7
|
parameters: string | Record<string, unknown>;
|
|
7
8
|
exitId?: string;
|
|
9
|
+
timeout_seconds?: number | string | null;
|
|
10
|
+
response_mode?: ToolResponseMode | string | null;
|
|
8
11
|
}
|
|
9
12
|
interface AgentServiceConfig {
|
|
10
13
|
provider: string;
|
|
@@ -139,12 +139,19 @@ class UpdateVoiceAgent extends voice_1.default {
|
|
|
139
139
|
else if (t.parameters && typeof t.parameters === 'object') {
|
|
140
140
|
parameters = t.parameters;
|
|
141
141
|
}
|
|
142
|
-
|
|
142
|
+
const tool = {
|
|
143
143
|
type: 'function',
|
|
144
144
|
name: lodash_1.default.trim(t.name),
|
|
145
145
|
description: t.description || '',
|
|
146
146
|
parameters,
|
|
147
147
|
};
|
|
148
|
+
if (t.timeout_seconds != null && t.timeout_seconds !== '') {
|
|
149
|
+
tool.timeout_seconds = Number(t.timeout_seconds);
|
|
150
|
+
}
|
|
151
|
+
if (t.response_mode) {
|
|
152
|
+
tool.response_mode = t.response_mode;
|
|
153
|
+
}
|
|
154
|
+
return tool;
|
|
148
155
|
});
|
|
149
156
|
}
|
|
150
157
|
buildOptionalServiceOverride(label, service) {
|
package/dst/Voice Agent.d.ts
CHANGED
|
@@ -24,17 +24,22 @@ interface SoftTimeoutConfig {
|
|
|
24
24
|
phrases: string[];
|
|
25
25
|
mode: SoftTimeoutMode;
|
|
26
26
|
}
|
|
27
|
+
type ToolResponseMode = 'sync' | 'async' | 'none';
|
|
27
28
|
interface Handler {
|
|
28
29
|
name: string;
|
|
29
30
|
description: string;
|
|
30
31
|
parameters: string;
|
|
31
32
|
feedback?: PerToolConfig;
|
|
33
|
+
timeout_seconds?: number | string | null;
|
|
34
|
+
response_mode?: ToolResponseMode | string | null;
|
|
32
35
|
}
|
|
33
36
|
interface SubagentTool {
|
|
34
37
|
name: string;
|
|
35
38
|
description: string;
|
|
36
39
|
parameters: string;
|
|
37
40
|
feedback?: PerToolConfig;
|
|
41
|
+
timeout_seconds?: number | string | null;
|
|
42
|
+
response_mode?: ToolResponseMode | string | null;
|
|
38
43
|
}
|
|
39
44
|
interface AgentServiceConfig {
|
|
40
45
|
provider: string;
|
package/dst/Voice Agent.js
CHANGED
|
@@ -190,6 +190,12 @@ class VoiceAgent extends voice_1.default {
|
|
|
190
190
|
tool.feedback = validatedFeedback;
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
|
+
if (h.timeout_seconds != null && h.timeout_seconds !== '') {
|
|
194
|
+
tool.timeout_seconds = Number(h.timeout_seconds);
|
|
195
|
+
}
|
|
196
|
+
if (h.response_mode) {
|
|
197
|
+
tool.response_mode = h.response_mode;
|
|
198
|
+
}
|
|
193
199
|
return tool;
|
|
194
200
|
}
|
|
195
201
|
serializeSubagents(subagents) {
|