@avallon-labs/mcp 23.8.0 → 23.9.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
|
@@ -1183,6 +1183,22 @@ var updateWorkerRunScope = async (workerRunId, updateWorkerRunScopeBody, options
|
|
|
1183
1183
|
headers: res.headers
|
|
1184
1184
|
};
|
|
1185
1185
|
};
|
|
1186
|
+
var getCancelWorkerRunUrl = (workerRunId) => {
|
|
1187
|
+
return `/v1/worker-runs/${workerRunId}/cancel`;
|
|
1188
|
+
};
|
|
1189
|
+
var cancelWorkerRun = async (workerRunId, options) => {
|
|
1190
|
+
const res = await fetch(getCancelWorkerRunUrl(workerRunId), {
|
|
1191
|
+
...options,
|
|
1192
|
+
method: "POST"
|
|
1193
|
+
});
|
|
1194
|
+
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
1195
|
+
const data = body ? JSON.parse(body) : {};
|
|
1196
|
+
return {
|
|
1197
|
+
data,
|
|
1198
|
+
status: res.status,
|
|
1199
|
+
headers: res.headers
|
|
1200
|
+
};
|
|
1201
|
+
};
|
|
1186
1202
|
var getCreateExtractorUrl = () => {
|
|
1187
1203
|
return `/v1/extractors`;
|
|
1188
1204
|
};
|
|
@@ -2736,6 +2752,17 @@ var updateWorkerRunScopeHandler = async (args) => {
|
|
|
2736
2752
|
]
|
|
2737
2753
|
};
|
|
2738
2754
|
};
|
|
2755
|
+
var cancelWorkerRunHandler = async (args) => {
|
|
2756
|
+
const res = await cancelWorkerRun(args.pathParams.workerRunId);
|
|
2757
|
+
return {
|
|
2758
|
+
content: [
|
|
2759
|
+
{
|
|
2760
|
+
type: "text",
|
|
2761
|
+
text: JSON.stringify(res)
|
|
2762
|
+
}
|
|
2763
|
+
]
|
|
2764
|
+
};
|
|
2765
|
+
};
|
|
2739
2766
|
var createExtractorHandler = async (args) => {
|
|
2740
2767
|
const res = await createExtractor(args.bodyParams);
|
|
2741
2768
|
return {
|
|
@@ -5242,6 +5269,27 @@ var UpdateWorkerRunScopeResponse = zod.object({
|
|
|
5242
5269
|
),
|
|
5243
5270
|
error: zod.union([zod.string(), zod.null()])
|
|
5244
5271
|
});
|
|
5272
|
+
var CancelWorkerRunParams = zod.object({
|
|
5273
|
+
workerRunId: zod.string().uuid()
|
|
5274
|
+
});
|
|
5275
|
+
var cancelWorkerRunResponseWorkerVersionMin = -9007199254740991;
|
|
5276
|
+
var cancelWorkerRunResponseWorkerVersionMax = 9007199254740991;
|
|
5277
|
+
var CancelWorkerRunResponse = zod.object({
|
|
5278
|
+
id: zod.string().describe("Unique run identifier"),
|
|
5279
|
+
worker_id: zod.string().describe("ID of the worker"),
|
|
5280
|
+
worker_version: zod.number().min(cancelWorkerRunResponseWorkerVersionMin).max(cancelWorkerRunResponseWorkerVersionMax).describe("Version of the worker at run creation time"),
|
|
5281
|
+
worker_name: zod.string().describe("Name of the worker"),
|
|
5282
|
+
status: zod.string().describe("Current run status"),
|
|
5283
|
+
scope: zod.record(zod.string(), zod.unknown()).describe("Run scope metadata (e.g. claim_id, email_id)"),
|
|
5284
|
+
created_at: zod.string().datetime({}).describe("ISO 8601 timestamp when the run was created"),
|
|
5285
|
+
started_at: zod.union([zod.string().datetime({}), zod.null()]).describe("ISO 8601 timestamp when processing started"),
|
|
5286
|
+
completed_at: zod.union([zod.string().datetime({}), zod.null()]).describe("ISO 8601 timestamp when processing finished"),
|
|
5287
|
+
processing_duration_ms: zod.union([zod.number(), zod.null()]).describe("Processing duration in milliseconds"),
|
|
5288
|
+
extract_id: zod.union([zod.string().uuid(), zod.null()]).describe(
|
|
5289
|
+
"Optional extract ID, set only if the worker run created an extract."
|
|
5290
|
+
),
|
|
5291
|
+
error: zod.union([zod.string(), zod.null()])
|
|
5292
|
+
});
|
|
5245
5293
|
var CreateExtractorBody = zod.object({
|
|
5246
5294
|
name: zod.string().min(1),
|
|
5247
5295
|
schema: zod.record(zod.string(), zod.unknown())
|
|
@@ -6633,6 +6681,14 @@ server.tool(
|
|
|
6633
6681
|
},
|
|
6634
6682
|
updateWorkerRunScopeHandler
|
|
6635
6683
|
);
|
|
6684
|
+
server.tool(
|
|
6685
|
+
"cancelWorkerRun",
|
|
6686
|
+
"Cancel a worker run",
|
|
6687
|
+
{
|
|
6688
|
+
pathParams: CancelWorkerRunParams
|
|
6689
|
+
},
|
|
6690
|
+
cancelWorkerRunHandler
|
|
6691
|
+
);
|
|
6636
6692
|
server.tool(
|
|
6637
6693
|
"createExtractor",
|
|
6638
6694
|
"Create extractor",
|
|
@@ -7006,4 +7062,4 @@ var transport = new StdioServerTransport();
|
|
|
7006
7062
|
server.connect(transport).then(() => {
|
|
7007
7063
|
console.error("MCP server running on stdio");
|
|
7008
7064
|
}).catch(console.error);
|
|
7009
|
-
//# sourceMappingURL=server-
|
|
7065
|
+
//# sourceMappingURL=server-DAE2KLHK.js.map
|