@avallon-labs/mcp 69.4.0-staging.1481 → 69.5.0-staging.1482
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
|
@@ -2436,6 +2436,28 @@ var removeCaseLink = async (id, entityType, entityId, params, options) => {
|
|
|
2436
2436
|
const data = body ? JSON.parse(body) : {};
|
|
2437
2437
|
return { data, status: res.status, headers: res.headers };
|
|
2438
2438
|
};
|
|
2439
|
+
var getListCaseLeasesUrl = (params) => {
|
|
2440
|
+
const normalizedParams = new URLSearchParams();
|
|
2441
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
2442
|
+
if (value !== void 0) {
|
|
2443
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2444
|
+
}
|
|
2445
|
+
});
|
|
2446
|
+
const stringifiedParams = normalizedParams.toString();
|
|
2447
|
+
return stringifiedParams.length > 0 ? `/v1/case-leases?${stringifiedParams}` : `/v1/case-leases`;
|
|
2448
|
+
};
|
|
2449
|
+
var listCaseLeases = async (params, options) => {
|
|
2450
|
+
const res = await fetch(
|
|
2451
|
+
getListCaseLeasesUrl(params),
|
|
2452
|
+
{
|
|
2453
|
+
...options,
|
|
2454
|
+
method: "GET"
|
|
2455
|
+
}
|
|
2456
|
+
);
|
|
2457
|
+
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
2458
|
+
const data = body ? JSON.parse(body) : {};
|
|
2459
|
+
return { data, status: res.status, headers: res.headers };
|
|
2460
|
+
};
|
|
2439
2461
|
var getCreateChatAgentUrl = () => {
|
|
2440
2462
|
return `/v1/chat-agents`;
|
|
2441
2463
|
};
|
|
@@ -7179,6 +7201,29 @@ var removeCaseLinkHandler = async (args, options) => {
|
|
|
7179
7201
|
structuredContent: res.data
|
|
7180
7202
|
};
|
|
7181
7203
|
};
|
|
7204
|
+
var listCaseLeasesHandler = async (args, options) => {
|
|
7205
|
+
const res = await listCaseLeases(args.queryParams, options);
|
|
7206
|
+
if (res.status >= 400) {
|
|
7207
|
+
return {
|
|
7208
|
+
content: [
|
|
7209
|
+
{
|
|
7210
|
+
type: "text",
|
|
7211
|
+
text: JSON.stringify(res.data ?? null)
|
|
7212
|
+
}
|
|
7213
|
+
],
|
|
7214
|
+
isError: true
|
|
7215
|
+
};
|
|
7216
|
+
}
|
|
7217
|
+
return {
|
|
7218
|
+
content: [
|
|
7219
|
+
{
|
|
7220
|
+
type: "text",
|
|
7221
|
+
text: JSON.stringify(res.data ?? null)
|
|
7222
|
+
}
|
|
7223
|
+
],
|
|
7224
|
+
structuredContent: res.data
|
|
7225
|
+
};
|
|
7226
|
+
};
|
|
7182
7227
|
var createChatAgentHandler = async (args, options) => {
|
|
7183
7228
|
const res = await createChatAgent(args.bodyParams, options);
|
|
7184
7229
|
if (res.status >= 400) {
|
|
@@ -13403,6 +13448,39 @@ var RemoveCaseLinkResponse = zod.object({
|
|
|
13403
13448
|
"data": zod.object({}),
|
|
13404
13449
|
"message": zod.string()
|
|
13405
13450
|
});
|
|
13451
|
+
var listCaseLeasesQueryCountDefault = 50;
|
|
13452
|
+
var listCaseLeasesQueryCountMax = 100;
|
|
13453
|
+
var listCaseLeasesQueryOffsetDefault = 0;
|
|
13454
|
+
var listCaseLeasesQueryOffsetMin = 0;
|
|
13455
|
+
var listCaseLeasesQuerySortByDefault = `created_at`;
|
|
13456
|
+
var listCaseLeasesQuerySortOrderDefault = `desc`;
|
|
13457
|
+
var ListCaseLeasesQueryParams = zod.object({
|
|
13458
|
+
"case_id": zod.string().optional().describe("Filter by case id. Values are normalized server-side (trimmed and lowercased) to match how case ids are stored."),
|
|
13459
|
+
"environment": zod.enum(["live", "test"]).optional().describe("Filter by the case's environment. Omit to list both."),
|
|
13460
|
+
"active": zod.enum(["true", "false"]).optional().describe("`true` for leases still in effect, `false` for released ones and ones whose run has ended. Omit to list both."),
|
|
13461
|
+
"count": zod.number().min(1).max(listCaseLeasesQueryCountMax).default(listCaseLeasesQueryCountDefault),
|
|
13462
|
+
"offset": zod.number().min(listCaseLeasesQueryOffsetMin).default(listCaseLeasesQueryOffsetDefault),
|
|
13463
|
+
"sort_by": zod.enum(["created_at"]).default(listCaseLeasesQuerySortByDefault),
|
|
13464
|
+
"sort_order": zod.enum(["asc", "desc"]).default(listCaseLeasesQuerySortOrderDefault)
|
|
13465
|
+
});
|
|
13466
|
+
var ListCaseLeasesResponse = zod.object({
|
|
13467
|
+
"data": zod.array(zod.object({
|
|
13468
|
+
"id": zod.string().uuid(),
|
|
13469
|
+
"case_id": zod.string(),
|
|
13470
|
+
"environment": zod.enum(["live", "test"]),
|
|
13471
|
+
"worker_id": zod.string().uuid(),
|
|
13472
|
+
"worker_name": zod.string(),
|
|
13473
|
+
"worker_run_id": zod.string().uuid(),
|
|
13474
|
+
"purpose": zod.string(),
|
|
13475
|
+
"active": zod.boolean(),
|
|
13476
|
+
"created_at": zod.string().datetime({ "offset": true }),
|
|
13477
|
+
"released_at": zod.union([zod.string().datetime({ "offset": true }), zod.null()])
|
|
13478
|
+
})),
|
|
13479
|
+
"message": zod.string(),
|
|
13480
|
+
"meta": zod.object({
|
|
13481
|
+
"total": zod.number()
|
|
13482
|
+
})
|
|
13483
|
+
});
|
|
13406
13484
|
var CreateChatAgentBody = zod.object({
|
|
13407
13485
|
"name": zod.string().min(1),
|
|
13408
13486
|
"prompt": zod.string().min(1),
|
|
@@ -17856,6 +17934,22 @@ var createMcpServer = (options) => {
|
|
|
17856
17934
|
signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
|
|
17857
17935
|
})
|
|
17858
17936
|
);
|
|
17937
|
+
tools.listCaseLeases = server2.registerTool(
|
|
17938
|
+
"listCaseLeases",
|
|
17939
|
+
{
|
|
17940
|
+
title: "List case leases",
|
|
17941
|
+
description: "List which worker runs work on which cases, or did so before, and what for.",
|
|
17942
|
+
inputSchema: {
|
|
17943
|
+
queryParams: ListCaseLeasesQueryParams
|
|
17944
|
+
},
|
|
17945
|
+
outputSchema: ListCaseLeasesResponse,
|
|
17946
|
+
annotations: { readOnlyHint: true }
|
|
17947
|
+
},
|
|
17948
|
+
(args, ctx) => listCaseLeasesHandler(args, {
|
|
17949
|
+
...options,
|
|
17950
|
+
signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
|
|
17951
|
+
})
|
|
17952
|
+
);
|
|
17859
17953
|
tools.createChatAgent = server2.registerTool(
|
|
17860
17954
|
"createChatAgent",
|
|
17861
17955
|
{
|
|
@@ -19557,4 +19651,4 @@ var transport = new StdioServerTransport();
|
|
|
19557
19651
|
server.connect(transport).then(() => {
|
|
19558
19652
|
console.error("MCP server running on stdio");
|
|
19559
19653
|
}).catch(console.error);
|
|
19560
|
-
//# sourceMappingURL=server-
|
|
19654
|
+
//# sourceMappingURL=server-TZRRAFZV.js.map
|