@avallon-labs/mcp 45.0.0-staging.1053 → 46.0.0-staging.1054
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
|
@@ -2785,56 +2785,6 @@ var executeCode = async (id, executeCodeBody, options) => {
|
|
|
2785
2785
|
headers: res.headers
|
|
2786
2786
|
};
|
|
2787
2787
|
};
|
|
2788
|
-
var getWorkerListToolsUrl = () => {
|
|
2789
|
-
return `/worker/v1/tools`;
|
|
2790
|
-
};
|
|
2791
|
-
var workerListTools = async (options) => {
|
|
2792
|
-
const res = await fetch(getWorkerListToolsUrl(), {
|
|
2793
|
-
...options,
|
|
2794
|
-
method: "GET"
|
|
2795
|
-
});
|
|
2796
|
-
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
2797
|
-
const data = body ? JSON.parse(body) : {};
|
|
2798
|
-
return {
|
|
2799
|
-
data,
|
|
2800
|
-
status: res.status,
|
|
2801
|
-
headers: res.headers
|
|
2802
|
-
};
|
|
2803
|
-
};
|
|
2804
|
-
var getWorkerGetToolUrl = (id) => {
|
|
2805
|
-
return `/worker/v1/tools/${id}`;
|
|
2806
|
-
};
|
|
2807
|
-
var workerGetTool = async (id, options) => {
|
|
2808
|
-
const res = await fetch(getWorkerGetToolUrl(id), {
|
|
2809
|
-
...options,
|
|
2810
|
-
method: "GET"
|
|
2811
|
-
});
|
|
2812
|
-
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
2813
|
-
const data = body ? JSON.parse(body) : {};
|
|
2814
|
-
return {
|
|
2815
|
-
data,
|
|
2816
|
-
status: res.status,
|
|
2817
|
-
headers: res.headers
|
|
2818
|
-
};
|
|
2819
|
-
};
|
|
2820
|
-
var getWorkerExecuteToolUrl = (id) => {
|
|
2821
|
-
return `/worker/v1/tools/${id}/execute`;
|
|
2822
|
-
};
|
|
2823
|
-
var workerExecuteTool = async (id, workerExecuteToolBody, options) => {
|
|
2824
|
-
const res = await fetch(getWorkerExecuteToolUrl(id), {
|
|
2825
|
-
...options,
|
|
2826
|
-
method: "POST",
|
|
2827
|
-
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
2828
|
-
body: JSON.stringify(workerExecuteToolBody)
|
|
2829
|
-
});
|
|
2830
|
-
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
2831
|
-
const data = body ? JSON.parse(body) : {};
|
|
2832
|
-
return {
|
|
2833
|
-
data,
|
|
2834
|
-
status: res.status,
|
|
2835
|
-
headers: res.headers
|
|
2836
|
-
};
|
|
2837
|
-
};
|
|
2838
2788
|
var getNotifyAdminUrl = () => {
|
|
2839
2789
|
return `/worker/v1/notifications`;
|
|
2840
2790
|
};
|
|
@@ -4693,39 +4643,6 @@ var executeCodeHandler = async (args) => {
|
|
|
4693
4643
|
]
|
|
4694
4644
|
};
|
|
4695
4645
|
};
|
|
4696
|
-
var workerListToolsHandler = async () => {
|
|
4697
|
-
const res = await workerListTools();
|
|
4698
|
-
return {
|
|
4699
|
-
content: [
|
|
4700
|
-
{
|
|
4701
|
-
type: "text",
|
|
4702
|
-
text: JSON.stringify(res)
|
|
4703
|
-
}
|
|
4704
|
-
]
|
|
4705
|
-
};
|
|
4706
|
-
};
|
|
4707
|
-
var workerGetToolHandler = async (args) => {
|
|
4708
|
-
const res = await workerGetTool(args.pathParams.id);
|
|
4709
|
-
return {
|
|
4710
|
-
content: [
|
|
4711
|
-
{
|
|
4712
|
-
type: "text",
|
|
4713
|
-
text: JSON.stringify(res)
|
|
4714
|
-
}
|
|
4715
|
-
]
|
|
4716
|
-
};
|
|
4717
|
-
};
|
|
4718
|
-
var workerExecuteToolHandler = async (args) => {
|
|
4719
|
-
const res = await workerExecuteTool(args.pathParams.id, args.bodyParams);
|
|
4720
|
-
return {
|
|
4721
|
-
content: [
|
|
4722
|
-
{
|
|
4723
|
-
type: "text",
|
|
4724
|
-
text: JSON.stringify(res)
|
|
4725
|
-
}
|
|
4726
|
-
]
|
|
4727
|
-
};
|
|
4728
|
-
};
|
|
4729
4646
|
var notifyAdminHandler = async (args) => {
|
|
4730
4647
|
const res = await notifyAdmin(args.bodyParams);
|
|
4731
4648
|
return {
|
|
@@ -9628,7 +9545,7 @@ var ListToolsResponse = zod.object({
|
|
|
9628
9545
|
zod.object({
|
|
9629
9546
|
id: zod.string(),
|
|
9630
9547
|
name: zod.string(),
|
|
9631
|
-
description: zod.string()
|
|
9548
|
+
description: zod.string().optional()
|
|
9632
9549
|
})
|
|
9633
9550
|
)
|
|
9634
9551
|
}),
|
|
@@ -9649,7 +9566,7 @@ var GetToolResponse = zod.object({
|
|
|
9649
9566
|
tool: zod.object({
|
|
9650
9567
|
id: zod.string(),
|
|
9651
9568
|
name: zod.string(),
|
|
9652
|
-
description: zod.string(),
|
|
9569
|
+
description: zod.string().optional(),
|
|
9653
9570
|
code: zod.string(),
|
|
9654
9571
|
schema: zod.record(zod.string(), zod.unknown()),
|
|
9655
9572
|
secret_ids: zod.array(zod.string()).describe(
|
|
@@ -9675,7 +9592,7 @@ var UpdateToolResponse = zod.object({
|
|
|
9675
9592
|
tool: zod.object({
|
|
9676
9593
|
id: zod.string(),
|
|
9677
9594
|
name: zod.string(),
|
|
9678
|
-
description: zod.string(),
|
|
9595
|
+
description: zod.string().optional(),
|
|
9679
9596
|
code: zod.string(),
|
|
9680
9597
|
schema: zod.record(zod.string(), zod.unknown()),
|
|
9681
9598
|
secret_ids: zod.array(zod.string()).describe(
|
|
@@ -9708,49 +9625,6 @@ var ExecuteCodeResponse = zod.object({
|
|
|
9708
9625
|
}),
|
|
9709
9626
|
message: zod.string()
|
|
9710
9627
|
});
|
|
9711
|
-
var WorkerListToolsResponse = zod.object({
|
|
9712
|
-
data: zod.object({
|
|
9713
|
-
tools: zod.array(
|
|
9714
|
-
zod.object({
|
|
9715
|
-
id: zod.string(),
|
|
9716
|
-
name: zod.string(),
|
|
9717
|
-
description: zod.string()
|
|
9718
|
-
})
|
|
9719
|
-
)
|
|
9720
|
-
}),
|
|
9721
|
-
message: zod.string()
|
|
9722
|
-
});
|
|
9723
|
-
var WorkerGetToolParams = zod.object({
|
|
9724
|
-
id: zod.string().uuid()
|
|
9725
|
-
});
|
|
9726
|
-
var WorkerGetToolResponse = zod.object({
|
|
9727
|
-
data: zod.object({
|
|
9728
|
-
tool: zod.object({
|
|
9729
|
-
id: zod.string(),
|
|
9730
|
-
name: zod.string(),
|
|
9731
|
-
description: zod.string(),
|
|
9732
|
-
schema: zod.record(zod.string(), zod.unknown())
|
|
9733
|
-
})
|
|
9734
|
-
}),
|
|
9735
|
-
message: zod.string()
|
|
9736
|
-
});
|
|
9737
|
-
var WorkerExecuteToolParams = zod.object({
|
|
9738
|
-
id: zod.string().uuid()
|
|
9739
|
-
});
|
|
9740
|
-
var workerExecuteToolBodyParamsDefault = {};
|
|
9741
|
-
var WorkerExecuteToolBody = zod.object({
|
|
9742
|
-
params: zod.record(zod.string(), zod.unknown()).default(workerExecuteToolBodyParamsDefault)
|
|
9743
|
-
});
|
|
9744
|
-
var WorkerExecuteToolResponse = zod.object({
|
|
9745
|
-
data: zod.object({
|
|
9746
|
-
result: zod.string().optional(),
|
|
9747
|
-
error: zod.object({
|
|
9748
|
-
name: zod.string(),
|
|
9749
|
-
message: zod.string()
|
|
9750
|
-
}).optional()
|
|
9751
|
-
}),
|
|
9752
|
-
message: zod.string()
|
|
9753
|
-
});
|
|
9754
9628
|
var notifyAdminBodyMessageMax = 2e3;
|
|
9755
9629
|
var NotifyAdminBody = zod.object({
|
|
9756
9630
|
message: zod.string().min(1).max(notifyAdminBodyMessageMax).describe(
|
|
@@ -11284,24 +11158,6 @@ server.tool(
|
|
|
11284
11158
|
},
|
|
11285
11159
|
executeCodeHandler
|
|
11286
11160
|
);
|
|
11287
|
-
server.tool("workerListTools", "List worker tools", workerListToolsHandler);
|
|
11288
|
-
server.tool(
|
|
11289
|
-
"workerGetTool",
|
|
11290
|
-
"Get worker tool",
|
|
11291
|
-
{
|
|
11292
|
-
pathParams: WorkerGetToolParams
|
|
11293
|
-
},
|
|
11294
|
-
workerGetToolHandler
|
|
11295
|
-
);
|
|
11296
|
-
server.tool(
|
|
11297
|
-
"workerExecuteTool",
|
|
11298
|
-
"Execute a worker-attached tool",
|
|
11299
|
-
{
|
|
11300
|
-
pathParams: WorkerExecuteToolParams,
|
|
11301
|
-
bodyParams: WorkerExecuteToolBody
|
|
11302
|
-
},
|
|
11303
|
-
workerExecuteToolHandler
|
|
11304
|
-
);
|
|
11305
11161
|
server.tool(
|
|
11306
11162
|
"notifyAdmin",
|
|
11307
11163
|
"Notify an admin",
|
|
@@ -11419,4 +11275,4 @@ var transport = new StdioServerTransport();
|
|
|
11419
11275
|
server.connect(transport).then(() => {
|
|
11420
11276
|
console.error("MCP server running on stdio");
|
|
11421
11277
|
}).catch(console.error);
|
|
11422
|
-
//# sourceMappingURL=server-
|
|
11278
|
+
//# sourceMappingURL=server-NM73MW7C.js.map
|