@avallon-labs/mcp 68.1.0-staging.1417 → 68.2.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
|
@@ -2595,6 +2595,21 @@ var listChatMessages = async (chatId, params, options) => {
|
|
|
2595
2595
|
const data = body ? JSON.parse(body) : {};
|
|
2596
2596
|
return { data, status: res.status, headers: res.headers };
|
|
2597
2597
|
};
|
|
2598
|
+
var getGetChatEvaluationUrl = (chatId) => {
|
|
2599
|
+
return `/v1/chats/${chatId}/evaluation`;
|
|
2600
|
+
};
|
|
2601
|
+
var getChatEvaluation = async (chatId, options) => {
|
|
2602
|
+
const res = await fetch(
|
|
2603
|
+
getGetChatEvaluationUrl(chatId),
|
|
2604
|
+
{
|
|
2605
|
+
...options,
|
|
2606
|
+
method: "GET"
|
|
2607
|
+
}
|
|
2608
|
+
);
|
|
2609
|
+
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
2610
|
+
const data = body ? JSON.parse(body) : {};
|
|
2611
|
+
return { data, status: res.status, headers: res.headers };
|
|
2612
|
+
};
|
|
2598
2613
|
var getGetPublicFormSubmissionUrl = (id, params) => {
|
|
2599
2614
|
const normalizedParams = new URLSearchParams();
|
|
2600
2615
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
@@ -7175,6 +7190,29 @@ var listChatMessagesHandler = async (args, options) => {
|
|
|
7175
7190
|
structuredContent: res.data
|
|
7176
7191
|
};
|
|
7177
7192
|
};
|
|
7193
|
+
var getChatEvaluationHandler = async (args, options) => {
|
|
7194
|
+
const res = await getChatEvaluation(args.pathParams.chatId, options);
|
|
7195
|
+
if (res.status >= 400) {
|
|
7196
|
+
return {
|
|
7197
|
+
content: [
|
|
7198
|
+
{
|
|
7199
|
+
type: "text",
|
|
7200
|
+
text: JSON.stringify(res.data ?? null)
|
|
7201
|
+
}
|
|
7202
|
+
],
|
|
7203
|
+
isError: true
|
|
7204
|
+
};
|
|
7205
|
+
}
|
|
7206
|
+
return {
|
|
7207
|
+
content: [
|
|
7208
|
+
{
|
|
7209
|
+
type: "text",
|
|
7210
|
+
text: JSON.stringify(res.data ?? null)
|
|
7211
|
+
}
|
|
7212
|
+
],
|
|
7213
|
+
structuredContent: res.data
|
|
7214
|
+
};
|
|
7215
|
+
};
|
|
7178
7216
|
var getPublicFormSubmissionHandler = async (args, options) => {
|
|
7179
7217
|
const res = await getPublicFormSubmission(args.pathParams.id, args.queryParams, options);
|
|
7180
7218
|
if (res.status >= 400) {
|
|
@@ -12932,7 +12970,12 @@ var ListChatsResponse = zod.object({
|
|
|
12932
12970
|
"chat_agent_id": zod.string().uuid(),
|
|
12933
12971
|
"status": zod.enum(["active", "ended"]),
|
|
12934
12972
|
"created_at": zod.string().datetime({ "offset": true }),
|
|
12935
|
-
"message_count": zod.number().int().min(listChatsResponseDataItemMessageCountMin).max(listChatsResponseDataItemMessageCountMax)
|
|
12973
|
+
"message_count": zod.number().int().min(listChatsResponseDataItemMessageCountMin).max(listChatsResponseDataItemMessageCountMax),
|
|
12974
|
+
"evaluation": zod.union([zod.object({
|
|
12975
|
+
"status": zod.string(),
|
|
12976
|
+
"score": zod.union([zod.number(), zod.null()]),
|
|
12977
|
+
"passed": zod.union([zod.boolean(), zod.null()])
|
|
12978
|
+
}), zod.null()])
|
|
12936
12979
|
})),
|
|
12937
12980
|
"message": zod.string(),
|
|
12938
12981
|
"meta": zod.object({
|
|
@@ -12968,6 +13011,26 @@ var ListChatMessagesResponse = zod.object({
|
|
|
12968
13011
|
"total": zod.number()
|
|
12969
13012
|
})
|
|
12970
13013
|
});
|
|
13014
|
+
var GetChatEvaluationParams = zod.object({
|
|
13015
|
+
"chatId": zod.string().uuid()
|
|
13016
|
+
});
|
|
13017
|
+
var GetChatEvaluationResponse = zod.object({
|
|
13018
|
+
"data": zod.object({
|
|
13019
|
+
"id": zod.string(),
|
|
13020
|
+
"evaluation_status": zod.union([zod.string().describe("Evaluation status"), zod.null()]),
|
|
13021
|
+
"score": zod.union([zod.number(), zod.null()]),
|
|
13022
|
+
"passed": zod.union([zod.boolean(), zod.null()]),
|
|
13023
|
+
"metrics": zod.array(zod.object({
|
|
13024
|
+
"slug": zod.string(),
|
|
13025
|
+
"name": zod.string(),
|
|
13026
|
+
"question": zod.string(),
|
|
13027
|
+
"pass": zod.union([zod.boolean(), zod.null()]),
|
|
13028
|
+
"score": zod.union([zod.number(), zod.null()]),
|
|
13029
|
+
"explanation": zod.union([zod.string(), zod.null()])
|
|
13030
|
+
}))
|
|
13031
|
+
}),
|
|
13032
|
+
"message": zod.string()
|
|
13033
|
+
});
|
|
12971
13034
|
var GetPublicFormSubmissionParams = zod.object({
|
|
12972
13035
|
"id": zod.string().uuid()
|
|
12973
13036
|
});
|
|
@@ -17202,7 +17265,7 @@ var createMcpServer = (options) => {
|
|
|
17202
17265
|
"listChats",
|
|
17203
17266
|
{
|
|
17204
17267
|
title: "List chats",
|
|
17205
|
-
description: "List the tenant's chats with pagination, sorting, and optional filtering by case. Returns chat metadata and
|
|
17268
|
+
description: "List the tenant's chats with pagination, sorting, and optional filtering by case. Returns chat metadata, message counts and evaluation outcome; messages are not included.",
|
|
17206
17269
|
inputSchema: {
|
|
17207
17270
|
queryParams: ListChatsQueryParams
|
|
17208
17271
|
},
|
|
@@ -17231,6 +17294,22 @@ var createMcpServer = (options) => {
|
|
|
17231
17294
|
signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
|
|
17232
17295
|
})
|
|
17233
17296
|
);
|
|
17297
|
+
tools.getChatEvaluation = server2.registerTool(
|
|
17298
|
+
"getChatEvaluation",
|
|
17299
|
+
{
|
|
17300
|
+
title: "Get chat evaluation",
|
|
17301
|
+
description: "Retrieve the evaluation results for a chat, including overall score, pass status, and per-metric breakdowns.",
|
|
17302
|
+
inputSchema: {
|
|
17303
|
+
pathParams: GetChatEvaluationParams
|
|
17304
|
+
},
|
|
17305
|
+
outputSchema: GetChatEvaluationResponse,
|
|
17306
|
+
annotations: { readOnlyHint: true }
|
|
17307
|
+
},
|
|
17308
|
+
(args, ctx) => getChatEvaluationHandler(args, {
|
|
17309
|
+
...options,
|
|
17310
|
+
signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
|
|
17311
|
+
})
|
|
17312
|
+
);
|
|
17234
17313
|
tools.getPublicFormSubmission = server2.registerTool(
|
|
17235
17314
|
"getPublicFormSubmission",
|
|
17236
17315
|
{
|
|
@@ -18643,4 +18722,4 @@ var transport = new StdioServerTransport();
|
|
|
18643
18722
|
server.connect(transport).then(() => {
|
|
18644
18723
|
console.error("MCP server running on stdio");
|
|
18645
18724
|
}).catch(console.error);
|
|
18646
|
-
//# sourceMappingURL=server-
|
|
18725
|
+
//# sourceMappingURL=server-2WLFXTEC.js.map
|