@avallon-labs/mcp 23.9.0 → 23.10.0-staging.538
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
|
@@ -1569,6 +1569,22 @@ var getChat = async (chatId, options) => {
|
|
|
1569
1569
|
const data = body ? JSON.parse(body) : {};
|
|
1570
1570
|
return { data, status: res.status, headers: res.headers };
|
|
1571
1571
|
};
|
|
1572
|
+
var getGetPublicChatAgentUrl = (chatAgentId) => {
|
|
1573
|
+
return `/public/v1/chat-agents/${chatAgentId}`;
|
|
1574
|
+
};
|
|
1575
|
+
var getPublicChatAgent = async (chatAgentId, options) => {
|
|
1576
|
+
const res = await fetch(getGetPublicChatAgentUrl(chatAgentId), {
|
|
1577
|
+
...options,
|
|
1578
|
+
method: "GET"
|
|
1579
|
+
});
|
|
1580
|
+
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
1581
|
+
const data = body ? JSON.parse(body) : {};
|
|
1582
|
+
return {
|
|
1583
|
+
data,
|
|
1584
|
+
status: res.status,
|
|
1585
|
+
headers: res.headers
|
|
1586
|
+
};
|
|
1587
|
+
};
|
|
1572
1588
|
var getPostChatMessageUrl = (chatId) => {
|
|
1573
1589
|
return `/public/v1/chats/${chatId}/messages`;
|
|
1574
1590
|
};
|
|
@@ -2981,6 +2997,17 @@ var getChatHandler = async (args) => {
|
|
|
2981
2997
|
]
|
|
2982
2998
|
};
|
|
2983
2999
|
};
|
|
3000
|
+
var getPublicChatAgentHandler = async (args) => {
|
|
3001
|
+
const res = await getPublicChatAgent(args.pathParams.chatAgentId);
|
|
3002
|
+
return {
|
|
3003
|
+
content: [
|
|
3004
|
+
{
|
|
3005
|
+
type: "text",
|
|
3006
|
+
text: JSON.stringify(res)
|
|
3007
|
+
}
|
|
3008
|
+
]
|
|
3009
|
+
};
|
|
3010
|
+
};
|
|
2984
3011
|
var postChatMessageHandler = async (args) => {
|
|
2985
3012
|
const res = await postChatMessage(args.pathParams.chatId, args.bodyParams);
|
|
2986
3013
|
return {
|
|
@@ -5540,7 +5567,8 @@ var ListCasesResponseItem = zod.object({
|
|
|
5540
5567
|
var ListCasesResponse = zod.array(ListCasesResponseItem);
|
|
5541
5568
|
var CreateChatAgentBody = zod.object({
|
|
5542
5569
|
name: zod.string().min(1),
|
|
5543
|
-
prompt: zod.string().min(1)
|
|
5570
|
+
prompt: zod.string().min(1),
|
|
5571
|
+
greeting: zod.string().min(1).optional()
|
|
5544
5572
|
});
|
|
5545
5573
|
var CreateChatAgentResponse = zod.object({
|
|
5546
5574
|
chat_agent_id: zod.string(),
|
|
@@ -5607,6 +5635,14 @@ var GetChatResponse = zod.object({
|
|
|
5607
5635
|
})
|
|
5608
5636
|
)
|
|
5609
5637
|
});
|
|
5638
|
+
var GetPublicChatAgentParams = zod.object({
|
|
5639
|
+
chatAgentId: zod.string().uuid()
|
|
5640
|
+
});
|
|
5641
|
+
var GetPublicChatAgentResponse = zod.object({
|
|
5642
|
+
id: zod.string().uuid(),
|
|
5643
|
+
name: zod.string(),
|
|
5644
|
+
greeting: zod.string()
|
|
5645
|
+
});
|
|
5610
5646
|
var PostChatMessageParams = zod.object({
|
|
5611
5647
|
chatId: zod.string().uuid()
|
|
5612
5648
|
});
|
|
@@ -6846,6 +6882,14 @@ server.tool(
|
|
|
6846
6882
|
},
|
|
6847
6883
|
getChatHandler
|
|
6848
6884
|
);
|
|
6885
|
+
server.tool(
|
|
6886
|
+
"getPublicChatAgent",
|
|
6887
|
+
"Get a chat agent (public)",
|
|
6888
|
+
{
|
|
6889
|
+
pathParams: GetPublicChatAgentParams
|
|
6890
|
+
},
|
|
6891
|
+
getPublicChatAgentHandler
|
|
6892
|
+
);
|
|
6849
6893
|
server.tool(
|
|
6850
6894
|
"postChatMessage",
|
|
6851
6895
|
"Post a message to a chat",
|
|
@@ -7062,4 +7106,4 @@ var transport = new StdioServerTransport();
|
|
|
7062
7106
|
server.connect(transport).then(() => {
|
|
7063
7107
|
console.error("MCP server running on stdio");
|
|
7064
7108
|
}).catch(console.error);
|
|
7065
|
-
//# sourceMappingURL=server-
|
|
7109
|
+
//# sourceMappingURL=server-XIHC44I4.js.map
|