@avallon-labs/mcp 22.2.0-staging.492 → 22.3.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/dist/index.js
CHANGED
|
@@ -138,6 +138,40 @@ var getVoiceAgentPlaceholders = async (voiceAgentId, options) => {
|
|
|
138
138
|
headers: res.headers
|
|
139
139
|
};
|
|
140
140
|
};
|
|
141
|
+
var getGetVoiceAgentPromptUrl = (voiceAgentId) => {
|
|
142
|
+
return `/v1/voice-agents/${voiceAgentId}/prompt`;
|
|
143
|
+
};
|
|
144
|
+
var getVoiceAgentPrompt = async (voiceAgentId, options) => {
|
|
145
|
+
const res = await fetch(getGetVoiceAgentPromptUrl(voiceAgentId), {
|
|
146
|
+
...options,
|
|
147
|
+
method: "GET"
|
|
148
|
+
});
|
|
149
|
+
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
150
|
+
const data = body ? JSON.parse(body) : {};
|
|
151
|
+
return {
|
|
152
|
+
data,
|
|
153
|
+
status: res.status,
|
|
154
|
+
headers: res.headers
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
var getUpdateVoiceAgentPromptUrl = (voiceAgentId) => {
|
|
158
|
+
return `/v1/voice-agents/${voiceAgentId}/prompt`;
|
|
159
|
+
};
|
|
160
|
+
var updateVoiceAgentPrompt = async (voiceAgentId, updateVoiceAgentPromptBody, options) => {
|
|
161
|
+
const res = await fetch(getUpdateVoiceAgentPromptUrl(voiceAgentId), {
|
|
162
|
+
...options,
|
|
163
|
+
method: "PATCH",
|
|
164
|
+
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
165
|
+
body: JSON.stringify(updateVoiceAgentPromptBody)
|
|
166
|
+
});
|
|
167
|
+
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
168
|
+
const data = body ? JSON.parse(body) : {};
|
|
169
|
+
return {
|
|
170
|
+
data,
|
|
171
|
+
status: res.status,
|
|
172
|
+
headers: res.headers
|
|
173
|
+
};
|
|
174
|
+
};
|
|
141
175
|
var getUpdateVoiceAgentModelsUrl = (voiceAgentId) => {
|
|
142
176
|
return `/v1/voice-agents/${voiceAgentId}/models`;
|
|
143
177
|
};
|
|
@@ -2055,6 +2089,31 @@ var getVoiceAgentPlaceholdersHandler = async (args) => {
|
|
|
2055
2089
|
]
|
|
2056
2090
|
};
|
|
2057
2091
|
};
|
|
2092
|
+
var getVoiceAgentPromptHandler = async (args) => {
|
|
2093
|
+
const res = await getVoiceAgentPrompt(args.pathParams.voiceAgentId);
|
|
2094
|
+
return {
|
|
2095
|
+
content: [
|
|
2096
|
+
{
|
|
2097
|
+
type: "text",
|
|
2098
|
+
text: JSON.stringify(res)
|
|
2099
|
+
}
|
|
2100
|
+
]
|
|
2101
|
+
};
|
|
2102
|
+
};
|
|
2103
|
+
var updateVoiceAgentPromptHandler = async (args) => {
|
|
2104
|
+
const res = await updateVoiceAgentPrompt(
|
|
2105
|
+
args.pathParams.voiceAgentId,
|
|
2106
|
+
args.bodyParams
|
|
2107
|
+
);
|
|
2108
|
+
return {
|
|
2109
|
+
content: [
|
|
2110
|
+
{
|
|
2111
|
+
type: "text",
|
|
2112
|
+
text: JSON.stringify(res)
|
|
2113
|
+
}
|
|
2114
|
+
]
|
|
2115
|
+
};
|
|
2116
|
+
};
|
|
2058
2117
|
var updateVoiceAgentModelsHandler = async (args) => {
|
|
2059
2118
|
const res = await updateVoiceAgentModels(
|
|
2060
2119
|
args.pathParams.voiceAgentId,
|
|
@@ -3725,6 +3784,24 @@ var GetVoiceAgentPlaceholdersParams = zod.object({
|
|
|
3725
3784
|
var GetVoiceAgentPlaceholdersResponse = zod.object({
|
|
3726
3785
|
placeholders: zod.array(zod.string()).describe("Available placeholder variables")
|
|
3727
3786
|
});
|
|
3787
|
+
var GetVoiceAgentPromptParams = zod.object({
|
|
3788
|
+
voiceAgentId: zod.string().uuid()
|
|
3789
|
+
});
|
|
3790
|
+
var GetVoiceAgentPromptResponse = zod.object({
|
|
3791
|
+
prompt: zod.string().optional(),
|
|
3792
|
+
greeting: zod.string().optional()
|
|
3793
|
+
});
|
|
3794
|
+
var UpdateVoiceAgentPromptParams = zod.object({
|
|
3795
|
+
voiceAgentId: zod.string().uuid()
|
|
3796
|
+
});
|
|
3797
|
+
var UpdateVoiceAgentPromptBody = zod.object({
|
|
3798
|
+
prompt: zod.string().min(1).optional(),
|
|
3799
|
+
greeting: zod.union([zod.string().min(1), zod.null()]).optional()
|
|
3800
|
+
});
|
|
3801
|
+
var UpdateVoiceAgentPromptResponse = zod.object({
|
|
3802
|
+
id: zod.string(),
|
|
3803
|
+
updated_at: zod.string().datetime({})
|
|
3804
|
+
});
|
|
3728
3805
|
var UpdateVoiceAgentModelsParams = zod.object({
|
|
3729
3806
|
voiceAgentId: zod.string().uuid()
|
|
3730
3807
|
});
|
|
@@ -5944,6 +6021,23 @@ server.tool(
|
|
|
5944
6021
|
},
|
|
5945
6022
|
getVoiceAgentPlaceholdersHandler
|
|
5946
6023
|
);
|
|
6024
|
+
server.tool(
|
|
6025
|
+
"getVoiceAgentPrompt",
|
|
6026
|
+
"Get voice agent prompt",
|
|
6027
|
+
{
|
|
6028
|
+
pathParams: GetVoiceAgentPromptParams
|
|
6029
|
+
},
|
|
6030
|
+
getVoiceAgentPromptHandler
|
|
6031
|
+
);
|
|
6032
|
+
server.tool(
|
|
6033
|
+
"updateVoiceAgentPrompt",
|
|
6034
|
+
"Update voice agent prompt",
|
|
6035
|
+
{
|
|
6036
|
+
pathParams: UpdateVoiceAgentPromptParams,
|
|
6037
|
+
bodyParams: UpdateVoiceAgentPromptBody
|
|
6038
|
+
},
|
|
6039
|
+
updateVoiceAgentPromptHandler
|
|
6040
|
+
);
|
|
5947
6041
|
server.tool(
|
|
5948
6042
|
"updateVoiceAgentModels",
|
|
5949
6043
|
"Update voice agent models",
|
|
@@ -6680,4 +6774,4 @@ var transport = new StdioServerTransport();
|
|
|
6680
6774
|
server.connect(transport).then(() => {
|
|
6681
6775
|
console.error("MCP server running on stdio");
|
|
6682
6776
|
}).catch(console.error);
|
|
6683
|
-
//# sourceMappingURL=server-
|
|
6777
|
+
//# sourceMappingURL=server-4RWELTDP.js.map
|