@avallon-labs/mcp 27.7.0-staging.781 → 27.9.0-staging.784
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
|
@@ -86,6 +86,22 @@ var updateVoiceAgent = async (voiceAgentId, updateVoiceAgentBody, options) => {
|
|
|
86
86
|
headers: res.headers
|
|
87
87
|
};
|
|
88
88
|
};
|
|
89
|
+
var getDeleteVoiceAgentUrl = (voiceAgentId) => {
|
|
90
|
+
return `/v1/voice-agents/${voiceAgentId}`;
|
|
91
|
+
};
|
|
92
|
+
var deleteVoiceAgent = async (voiceAgentId, options) => {
|
|
93
|
+
const res = await fetch(getDeleteVoiceAgentUrl(voiceAgentId), {
|
|
94
|
+
...options,
|
|
95
|
+
method: "DELETE"
|
|
96
|
+
});
|
|
97
|
+
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
98
|
+
const data = body ? JSON.parse(body) : {};
|
|
99
|
+
return {
|
|
100
|
+
data,
|
|
101
|
+
status: res.status,
|
|
102
|
+
headers: res.headers
|
|
103
|
+
};
|
|
104
|
+
};
|
|
89
105
|
var getListVoiceAgentVersionsUrl = (voiceAgentId, params) => {
|
|
90
106
|
const normalizedParams = new URLSearchParams();
|
|
91
107
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
@@ -2163,15 +2179,13 @@ var listTools = async (params, options) => {
|
|
|
2163
2179
|
headers: res.headers
|
|
2164
2180
|
};
|
|
2165
2181
|
};
|
|
2166
|
-
var
|
|
2167
|
-
return `/v1/tools/${id}
|
|
2182
|
+
var getDeleteToolUrl = (id) => {
|
|
2183
|
+
return `/v1/tools/${id}`;
|
|
2168
2184
|
};
|
|
2169
|
-
var
|
|
2170
|
-
const res = await fetch(
|
|
2185
|
+
var deleteTool = async (id, options) => {
|
|
2186
|
+
const res = await fetch(getDeleteToolUrl(id), {
|
|
2171
2187
|
...options,
|
|
2172
|
-
method: "
|
|
2173
|
-
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
2174
|
-
body: JSON.stringify(executeCodeBody)
|
|
2188
|
+
method: "DELETE"
|
|
2175
2189
|
});
|
|
2176
2190
|
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
2177
2191
|
const data = body ? JSON.parse(body) : {};
|
|
@@ -2211,6 +2225,24 @@ var updateTool = async (id, updateToolBody, options) => {
|
|
|
2211
2225
|
headers: res.headers
|
|
2212
2226
|
};
|
|
2213
2227
|
};
|
|
2228
|
+
var getExecuteCodeUrl = (id) => {
|
|
2229
|
+
return `/v1/tools/${id}/execute`;
|
|
2230
|
+
};
|
|
2231
|
+
var executeCode = async (id, executeCodeBody, options) => {
|
|
2232
|
+
const res = await fetch(getExecuteCodeUrl(id), {
|
|
2233
|
+
...options,
|
|
2234
|
+
method: "POST",
|
|
2235
|
+
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
2236
|
+
body: JSON.stringify(executeCodeBody)
|
|
2237
|
+
});
|
|
2238
|
+
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
2239
|
+
const data = body ? JSON.parse(body) : {};
|
|
2240
|
+
return {
|
|
2241
|
+
data,
|
|
2242
|
+
status: res.status,
|
|
2243
|
+
headers: res.headers
|
|
2244
|
+
};
|
|
2245
|
+
};
|
|
2214
2246
|
var getWorkerListToolsUrl = () => {
|
|
2215
2247
|
return `/worker/v1/tools`;
|
|
2216
2248
|
};
|
|
@@ -2507,6 +2539,17 @@ var updateVoiceAgentHandler = async (args) => {
|
|
|
2507
2539
|
]
|
|
2508
2540
|
};
|
|
2509
2541
|
};
|
|
2542
|
+
var deleteVoiceAgentHandler = async (args) => {
|
|
2543
|
+
const res = await deleteVoiceAgent(args.pathParams.voiceAgentId);
|
|
2544
|
+
return {
|
|
2545
|
+
content: [
|
|
2546
|
+
{
|
|
2547
|
+
type: "text",
|
|
2548
|
+
text: JSON.stringify(res)
|
|
2549
|
+
}
|
|
2550
|
+
]
|
|
2551
|
+
};
|
|
2552
|
+
};
|
|
2510
2553
|
var listVoiceAgentVersionsHandler = async (args) => {
|
|
2511
2554
|
const res = await listVoiceAgentVersions(
|
|
2512
2555
|
args.pathParams.voiceAgentId,
|
|
@@ -3677,8 +3720,8 @@ var listToolsHandler = async (args) => {
|
|
|
3677
3720
|
]
|
|
3678
3721
|
};
|
|
3679
3722
|
};
|
|
3680
|
-
var
|
|
3681
|
-
const res = await
|
|
3723
|
+
var deleteToolHandler = async (args) => {
|
|
3724
|
+
const res = await deleteTool(args.pathParams.id);
|
|
3682
3725
|
return {
|
|
3683
3726
|
content: [
|
|
3684
3727
|
{
|
|
@@ -3710,6 +3753,17 @@ var updateToolHandler = async (args) => {
|
|
|
3710
3753
|
]
|
|
3711
3754
|
};
|
|
3712
3755
|
};
|
|
3756
|
+
var executeCodeHandler = async (args) => {
|
|
3757
|
+
const res = await executeCode(args.pathParams.id, args.bodyParams);
|
|
3758
|
+
return {
|
|
3759
|
+
content: [
|
|
3760
|
+
{
|
|
3761
|
+
type: "text",
|
|
3762
|
+
text: JSON.stringify(res)
|
|
3763
|
+
}
|
|
3764
|
+
]
|
|
3765
|
+
};
|
|
3766
|
+
};
|
|
3713
3767
|
var workerListToolsHandler = async () => {
|
|
3714
3768
|
const res = await workerListTools();
|
|
3715
3769
|
return {
|
|
@@ -4311,6 +4365,10 @@ var UpdateVoiceAgentResponse = zod.object({
|
|
|
4311
4365
|
]).describe("Inactivity timeout in seconds. null disables the feature.")
|
|
4312
4366
|
})
|
|
4313
4367
|
});
|
|
4368
|
+
var DeleteVoiceAgentParams = zod.object({
|
|
4369
|
+
voiceAgentId: zod.string().uuid().describe("Voice Agent ID")
|
|
4370
|
+
});
|
|
4371
|
+
var DeleteVoiceAgentResponse = zod.object({});
|
|
4314
4372
|
var ListVoiceAgentVersionsParams = zod.object({
|
|
4315
4373
|
voiceAgentId: zod.string().uuid()
|
|
4316
4374
|
});
|
|
@@ -6826,26 +6884,10 @@ var ListToolsResponse = zod.object({
|
|
|
6826
6884
|
})
|
|
6827
6885
|
)
|
|
6828
6886
|
});
|
|
6829
|
-
var
|
|
6887
|
+
var DeleteToolParams = zod.object({
|
|
6830
6888
|
id: zod.string().uuid()
|
|
6831
6889
|
});
|
|
6832
|
-
var
|
|
6833
|
-
var ExecuteCodeBody = zod.object({
|
|
6834
|
-
params: zod.record(zod.string(), zod.unknown()).default(executeCodeBodyParamsDefault)
|
|
6835
|
-
});
|
|
6836
|
-
var ExecuteCodeResponse = zod.object({
|
|
6837
|
-
result: zod.string().optional(),
|
|
6838
|
-
error: zod.object({
|
|
6839
|
-
name: zod.string(),
|
|
6840
|
-
message: zod.string()
|
|
6841
|
-
}).optional(),
|
|
6842
|
-
traces: zod.array(
|
|
6843
|
-
zod.object({
|
|
6844
|
-
text: zod.string(),
|
|
6845
|
-
timestamp: zod.string()
|
|
6846
|
-
})
|
|
6847
|
-
)
|
|
6848
|
-
});
|
|
6890
|
+
var DeleteToolResponse = zod.object({});
|
|
6849
6891
|
var GetToolParams = zod.object({
|
|
6850
6892
|
id: zod.string().uuid()
|
|
6851
6893
|
});
|
|
@@ -6878,6 +6920,26 @@ var UpdateToolResponse = zod.object({
|
|
|
6878
6920
|
has_api_key: zod.boolean()
|
|
6879
6921
|
})
|
|
6880
6922
|
});
|
|
6923
|
+
var ExecuteCodeParams = zod.object({
|
|
6924
|
+
id: zod.string().uuid()
|
|
6925
|
+
});
|
|
6926
|
+
var executeCodeBodyParamsDefault = {};
|
|
6927
|
+
var ExecuteCodeBody = zod.object({
|
|
6928
|
+
params: zod.record(zod.string(), zod.unknown()).default(executeCodeBodyParamsDefault)
|
|
6929
|
+
});
|
|
6930
|
+
var ExecuteCodeResponse = zod.object({
|
|
6931
|
+
result: zod.string().optional(),
|
|
6932
|
+
error: zod.object({
|
|
6933
|
+
name: zod.string(),
|
|
6934
|
+
message: zod.string()
|
|
6935
|
+
}).optional(),
|
|
6936
|
+
traces: zod.array(
|
|
6937
|
+
zod.object({
|
|
6938
|
+
text: zod.string(),
|
|
6939
|
+
timestamp: zod.string()
|
|
6940
|
+
})
|
|
6941
|
+
)
|
|
6942
|
+
});
|
|
6881
6943
|
var WorkerListToolsResponse = zod.object({
|
|
6882
6944
|
tools: zod.array(
|
|
6883
6945
|
zod.object({
|
|
@@ -7249,6 +7311,14 @@ server.tool(
|
|
|
7249
7311
|
},
|
|
7250
7312
|
updateVoiceAgentHandler
|
|
7251
7313
|
);
|
|
7314
|
+
server.tool(
|
|
7315
|
+
"deleteVoiceAgent",
|
|
7316
|
+
"Delete voice agent",
|
|
7317
|
+
{
|
|
7318
|
+
pathParams: DeleteVoiceAgentParams
|
|
7319
|
+
},
|
|
7320
|
+
deleteVoiceAgentHandler
|
|
7321
|
+
);
|
|
7252
7322
|
server.tool(
|
|
7253
7323
|
"listVoiceAgentVersions",
|
|
7254
7324
|
"List voice agent versions",
|
|
@@ -8078,13 +8148,12 @@ server.tool(
|
|
|
8078
8148
|
listToolsHandler
|
|
8079
8149
|
);
|
|
8080
8150
|
server.tool(
|
|
8081
|
-
"
|
|
8082
|
-
"
|
|
8151
|
+
"deleteTool",
|
|
8152
|
+
"Delete tool",
|
|
8083
8153
|
{
|
|
8084
|
-
pathParams:
|
|
8085
|
-
bodyParams: ExecuteCodeBody
|
|
8154
|
+
pathParams: DeleteToolParams
|
|
8086
8155
|
},
|
|
8087
|
-
|
|
8156
|
+
deleteToolHandler
|
|
8088
8157
|
);
|
|
8089
8158
|
server.tool(
|
|
8090
8159
|
"getTool",
|
|
@@ -8103,6 +8172,15 @@ server.tool(
|
|
|
8103
8172
|
},
|
|
8104
8173
|
updateToolHandler
|
|
8105
8174
|
);
|
|
8175
|
+
server.tool(
|
|
8176
|
+
"executeCode",
|
|
8177
|
+
"Execute tool",
|
|
8178
|
+
{
|
|
8179
|
+
pathParams: ExecuteCodeParams,
|
|
8180
|
+
bodyParams: ExecuteCodeBody
|
|
8181
|
+
},
|
|
8182
|
+
executeCodeHandler
|
|
8183
|
+
);
|
|
8106
8184
|
server.tool("workerListTools", "List worker tools", workerListToolsHandler);
|
|
8107
8185
|
server.tool(
|
|
8108
8186
|
"workerGetTool",
|
|
@@ -8217,4 +8295,4 @@ var transport = new StdioServerTransport();
|
|
|
8217
8295
|
server.connect(transport).then(() => {
|
|
8218
8296
|
console.error("MCP server running on stdio");
|
|
8219
8297
|
}).catch(console.error);
|
|
8220
|
-
//# sourceMappingURL=server-
|
|
8298
|
+
//# sourceMappingURL=server-7M7QKZ52.js.map
|