@avallon-labs/mcp 68.5.0-staging.1446 → 68.6.0-staging.1447
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
|
@@ -1453,6 +1453,21 @@ var listWorkerRunMessages = async (workerRunId, params, options) => {
|
|
|
1453
1453
|
const data = body ? JSON.parse(body) : {};
|
|
1454
1454
|
return { data, status: res.status, headers: res.headers };
|
|
1455
1455
|
};
|
|
1456
|
+
var getGetWorkerRunMessageUrl = (workerRunId, messageId) => {
|
|
1457
|
+
return `/v1/worker-runs/${workerRunId}/messages/${messageId}`;
|
|
1458
|
+
};
|
|
1459
|
+
var getWorkerRunMessage = async (workerRunId, messageId, options) => {
|
|
1460
|
+
const res = await fetch(
|
|
1461
|
+
getGetWorkerRunMessageUrl(workerRunId, messageId),
|
|
1462
|
+
{
|
|
1463
|
+
...options,
|
|
1464
|
+
method: "GET"
|
|
1465
|
+
}
|
|
1466
|
+
);
|
|
1467
|
+
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
1468
|
+
const data = body ? JSON.parse(body) : {};
|
|
1469
|
+
return { data, status: res.status, headers: res.headers };
|
|
1470
|
+
};
|
|
1456
1471
|
var getCancelWorkerRunUrl = (workerRunId) => {
|
|
1457
1472
|
return `/v1/worker-runs/${workerRunId}/cancel`;
|
|
1458
1473
|
};
|
|
@@ -5946,6 +5961,29 @@ var listWorkerRunMessagesHandler = async (args, options) => {
|
|
|
5946
5961
|
structuredContent: res.data
|
|
5947
5962
|
};
|
|
5948
5963
|
};
|
|
5964
|
+
var getWorkerRunMessageHandler = async (args, options) => {
|
|
5965
|
+
const res = await getWorkerRunMessage(args.pathParams.workerRunId, args.pathParams.messageId, options);
|
|
5966
|
+
if (res.status >= 400) {
|
|
5967
|
+
return {
|
|
5968
|
+
content: [
|
|
5969
|
+
{
|
|
5970
|
+
type: "text",
|
|
5971
|
+
text: JSON.stringify(res.data ?? null)
|
|
5972
|
+
}
|
|
5973
|
+
],
|
|
5974
|
+
isError: true
|
|
5975
|
+
};
|
|
5976
|
+
}
|
|
5977
|
+
return {
|
|
5978
|
+
content: [
|
|
5979
|
+
{
|
|
5980
|
+
type: "text",
|
|
5981
|
+
text: JSON.stringify(res.data ?? null)
|
|
5982
|
+
}
|
|
5983
|
+
],
|
|
5984
|
+
structuredContent: res.data
|
|
5985
|
+
};
|
|
5986
|
+
};
|
|
5949
5987
|
var cancelWorkerRunHandler = async (args, options) => {
|
|
5950
5988
|
const res = await cancelWorkerRun(args.pathParams.workerRunId, options);
|
|
5951
5989
|
if (res.status >= 400) {
|
|
@@ -11272,10 +11310,25 @@ var ListWorkerRunMessagesResponse = zod.object({
|
|
|
11272
11310
|
"worker_run_id": zod.string(),
|
|
11273
11311
|
"message": zod.record(zod.string(), zod.unknown()),
|
|
11274
11312
|
"emitted_at": zod.string().datetime({ "offset": true }),
|
|
11275
|
-
"created_at": zod.string().datetime({ "offset": true })
|
|
11313
|
+
"created_at": zod.string().datetime({ "offset": true }),
|
|
11314
|
+
"truncated": zod.boolean().describe("True when the message was too large to fit the page under the response size limit and was replaced by `{ phase?, _truncated, original_bytes, hint }`. Fetch the full message with the Get worker run message (GET /v1/worker-runs/{workerRunId}/messages/{messageId}) endpoint.")
|
|
11276
11315
|
})),
|
|
11277
11316
|
"message": zod.string()
|
|
11278
11317
|
});
|
|
11318
|
+
var GetWorkerRunMessageParams = zod.object({
|
|
11319
|
+
"workerRunId": zod.string().uuid(),
|
|
11320
|
+
"messageId": zod.string().uuid()
|
|
11321
|
+
});
|
|
11322
|
+
var GetWorkerRunMessageResponse = zod.object({
|
|
11323
|
+
"data": zod.object({
|
|
11324
|
+
"id": zod.string(),
|
|
11325
|
+
"worker_run_id": zod.string(),
|
|
11326
|
+
"message": zod.record(zod.string(), zod.unknown()),
|
|
11327
|
+
"emitted_at": zod.string().datetime({ "offset": true }),
|
|
11328
|
+
"created_at": zod.string().datetime({ "offset": true })
|
|
11329
|
+
}),
|
|
11330
|
+
"message": zod.string()
|
|
11331
|
+
});
|
|
11279
11332
|
var CancelWorkerRunParams = zod.object({
|
|
11280
11333
|
"workerRunId": zod.string().uuid()
|
|
11281
11334
|
});
|
|
@@ -16559,7 +16612,7 @@ var createMcpServer = (options) => {
|
|
|
16559
16612
|
"listWorkerRunMessages",
|
|
16560
16613
|
{
|
|
16561
16614
|
title: "List worker run messages",
|
|
16562
|
-
description: "Retrieve messages emitted during a worker run, ordered by emission time. Supports cursor-style pagination via `after` and `count`.",
|
|
16615
|
+
description: "Retrieve messages emitted during a worker run, ordered by emission time. Supports cursor-style pagination via `after` and `count`. When a page would exceed the response size limit, the largest messages are replaced by a hint to the full message and marked `truncated`.",
|
|
16563
16616
|
inputSchema: {
|
|
16564
16617
|
pathParams: ListWorkerRunMessagesParams,
|
|
16565
16618
|
queryParams: ListWorkerRunMessagesQueryParams
|
|
@@ -16572,6 +16625,22 @@ var createMcpServer = (options) => {
|
|
|
16572
16625
|
signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
|
|
16573
16626
|
})
|
|
16574
16627
|
);
|
|
16628
|
+
tools.getWorkerRunMessage = server2.registerTool(
|
|
16629
|
+
"getWorkerRunMessage",
|
|
16630
|
+
{
|
|
16631
|
+
title: "Get worker run message",
|
|
16632
|
+
description: "Retrieve one message emitted during a worker run, in full. Use it for messages the list endpoint returned with `truncated: true`.",
|
|
16633
|
+
inputSchema: {
|
|
16634
|
+
pathParams: GetWorkerRunMessageParams
|
|
16635
|
+
},
|
|
16636
|
+
outputSchema: GetWorkerRunMessageResponse,
|
|
16637
|
+
annotations: { readOnlyHint: true }
|
|
16638
|
+
},
|
|
16639
|
+
(args, ctx) => getWorkerRunMessageHandler(args, {
|
|
16640
|
+
...options,
|
|
16641
|
+
signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
|
|
16642
|
+
})
|
|
16643
|
+
);
|
|
16575
16644
|
tools.cancelWorkerRun = server2.registerTool(
|
|
16576
16645
|
"cancelWorkerRun",
|
|
16577
16646
|
{
|
|
@@ -18952,4 +19021,4 @@ var transport = new StdioServerTransport();
|
|
|
18952
19021
|
server.connect(transport).then(() => {
|
|
18953
19022
|
console.error("MCP server running on stdio");
|
|
18954
19023
|
}).catch(console.error);
|
|
18955
|
-
//# sourceMappingURL=server-
|
|
19024
|
+
//# sourceMappingURL=server-OG4M5K3N.js.map
|