@avallon-labs/mcp 69.4.0-staging.1481 → 69.6.0-staging.1483
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),
|
|
@@ -15230,6 +15308,7 @@ var GetToolResponse = zod.object({
|
|
|
15230
15308
|
"code": zod.string(),
|
|
15231
15309
|
"schema": zod.record(zod.string(), zod.unknown()),
|
|
15232
15310
|
"secret_ids": zod.array(zod.string()).describe("Secrets attached to the tool. A tool with attached secrets takes its execution environment exclusively from the secret store, each secret arriving under its own env key."),
|
|
15311
|
+
"eval_behavior": zod.enum(["lookup", "write"]).describe("How evals treat the tool: `lookup` expects the response recorded for the same input; `write` marks a tool that changes an outside system, which the fixture match rate leaves out."),
|
|
15233
15312
|
"versions": zod.object({
|
|
15234
15313
|
"latest": zod.number().int().min(getToolResponseDataToolVersionsLatestMin).max(getToolResponseDataToolVersionsLatestMax).describe("Newest config version. The code, schema and secrets in this response are its snapshot."),
|
|
15235
15314
|
"live": zod.number().int().min(getToolResponseDataToolVersionsLiveMin).max(getToolResponseDataToolVersionsLiveMax).describe("Config version runs in the `live` environment execute."),
|
|
@@ -15246,7 +15325,8 @@ var UpdateToolBody = zod.object({
|
|
|
15246
15325
|
"name": zod.string().min(1).optional(),
|
|
15247
15326
|
"code": zod.string().min(1).optional(),
|
|
15248
15327
|
"description": zod.string().min(1).optional(),
|
|
15249
|
-
"secret_ids": zod.array(zod.string().uuid()).optional().describe("Replace the tool's attached secret set. Omit to leave unchanged; pass [] to detach all.")
|
|
15328
|
+
"secret_ids": zod.array(zod.string().uuid()).optional().describe("Replace the tool's attached secret set. Omit to leave unchanged; pass [] to detach all."),
|
|
15329
|
+
"eval_behavior": zod.enum(["lookup", "write"]).optional().describe("How evals treat the tool: `lookup` expects the response recorded for the same input; `write` marks a tool that changes an outside system, which the fixture match rate leaves out.")
|
|
15250
15330
|
});
|
|
15251
15331
|
var updateToolResponseDataToolVersionsLatestMin = -9007199254740991;
|
|
15252
15332
|
var updateToolResponseDataToolVersionsLatestMax = 9007199254740991;
|
|
@@ -15263,6 +15343,7 @@ var UpdateToolResponse = zod.object({
|
|
|
15263
15343
|
"code": zod.string(),
|
|
15264
15344
|
"schema": zod.record(zod.string(), zod.unknown()),
|
|
15265
15345
|
"secret_ids": zod.array(zod.string()).describe("Secrets attached to the tool. A tool with attached secrets takes its execution environment exclusively from the secret store, each secret arriving under its own env key."),
|
|
15346
|
+
"eval_behavior": zod.enum(["lookup", "write"]).describe("How evals treat the tool: `lookup` expects the response recorded for the same input; `write` marks a tool that changes an outside system, which the fixture match rate leaves out."),
|
|
15266
15347
|
"versions": zod.object({
|
|
15267
15348
|
"latest": zod.number().int().min(updateToolResponseDataToolVersionsLatestMin).max(updateToolResponseDataToolVersionsLatestMax).describe("Newest config version. The code, schema and secrets in this response are its snapshot."),
|
|
15268
15349
|
"live": zod.number().int().min(updateToolResponseDataToolVersionsLiveMin).max(updateToolResponseDataToolVersionsLiveMax).describe("Config version runs in the `live` environment execute."),
|
|
@@ -15494,6 +15575,7 @@ var WorkerGetToolResponse = zod.object({
|
|
|
15494
15575
|
"code": zod.string(),
|
|
15495
15576
|
"schema": zod.record(zod.string(), zod.unknown()),
|
|
15496
15577
|
"secret_ids": zod.array(zod.string()).describe("Secrets attached to the tool. A tool with attached secrets takes its execution environment exclusively from the secret store, each secret arriving under its own env key."),
|
|
15578
|
+
"eval_behavior": zod.enum(["lookup", "write"]).describe("How evals treat the tool: `lookup` expects the response recorded for the same input; `write` marks a tool that changes an outside system, which the fixture match rate leaves out."),
|
|
15497
15579
|
"versions": zod.object({
|
|
15498
15580
|
"latest": zod.number().int().min(workerGetToolResponseDataToolVersionsLatestMin).max(workerGetToolResponseDataToolVersionsLatestMax).describe("Newest config version. The code, schema and secrets in this response are its snapshot."),
|
|
15499
15581
|
"live": zod.number().int().min(workerGetToolResponseDataToolVersionsLiveMin).max(workerGetToolResponseDataToolVersionsLiveMax).describe("Config version runs in the `live` environment execute."),
|
|
@@ -17856,6 +17938,22 @@ var createMcpServer = (options) => {
|
|
|
17856
17938
|
signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
|
|
17857
17939
|
})
|
|
17858
17940
|
);
|
|
17941
|
+
tools.listCaseLeases = server2.registerTool(
|
|
17942
|
+
"listCaseLeases",
|
|
17943
|
+
{
|
|
17944
|
+
title: "List case leases",
|
|
17945
|
+
description: "List which worker runs work on which cases, or did so before, and what for.",
|
|
17946
|
+
inputSchema: {
|
|
17947
|
+
queryParams: ListCaseLeasesQueryParams
|
|
17948
|
+
},
|
|
17949
|
+
outputSchema: ListCaseLeasesResponse,
|
|
17950
|
+
annotations: { readOnlyHint: true }
|
|
17951
|
+
},
|
|
17952
|
+
(args, ctx) => listCaseLeasesHandler(args, {
|
|
17953
|
+
...options,
|
|
17954
|
+
signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
|
|
17955
|
+
})
|
|
17956
|
+
);
|
|
17859
17957
|
tools.createChatAgent = server2.registerTool(
|
|
17860
17958
|
"createChatAgent",
|
|
17861
17959
|
{
|
|
@@ -19124,7 +19222,7 @@ var createMcpServer = (options) => {
|
|
|
19124
19222
|
"updateTool",
|
|
19125
19223
|
{
|
|
19126
19224
|
title: "Update tool",
|
|
19127
|
-
description: "Update a code tool's name, description, code, or
|
|
19225
|
+
description: "Update a code tool's name, description, code, attached secrets or eval behavior. All fields are optional \u2014 only provided fields are updated.\n\nChanging the code, description or attached secrets creates a new config version; runs keep executing the versions promoted to live and test until that version is promoted. Renaming and changing the eval behavior do not create a version.",
|
|
19128
19226
|
inputSchema: {
|
|
19129
19227
|
pathParams: UpdateToolParams,
|
|
19130
19228
|
bodyParams: UpdateToolBody.optional()
|
|
@@ -19557,4 +19655,4 @@ var transport = new StdioServerTransport();
|
|
|
19557
19655
|
server.connect(transport).then(() => {
|
|
19558
19656
|
console.error("MCP server running on stdio");
|
|
19559
19657
|
}).catch(console.error);
|
|
19560
|
-
//# sourceMappingURL=server-
|
|
19658
|
+
//# sourceMappingURL=server-JGXXRVLB.js.map
|