@avallon-labs/mcp 66.4.0-staging.1399 → 66.5.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
@@ -56,5 +56,5 @@ function describeErrors(body) {
56
56
 
57
57
  // src/index.ts
58
58
  setupFetch();
59
- await import("./server-YY5F2XYI.js");
59
+ await import("./server-AKWIQJHV.js");
60
60
  //# sourceMappingURL=index.js.map
@@ -2535,6 +2535,21 @@ var postChatMessage = async (chatId, postChatMessageBody, options) => {
2535
2535
  const data = body ? JSON.parse(body) : {};
2536
2536
  return { data, status: res.status, headers: res.headers };
2537
2537
  };
2538
+ var getEndChatUrl = () => {
2539
+ return `/public/v1/chat/end`;
2540
+ };
2541
+ var endChat = async (options) => {
2542
+ const res = await fetch(
2543
+ getEndChatUrl(),
2544
+ {
2545
+ ...options,
2546
+ method: "POST"
2547
+ }
2548
+ );
2549
+ const body = [204, 205, 304].includes(res.status) ? null : await res.text();
2550
+ const data = body ? JSON.parse(body) : void 0;
2551
+ return { data, status: res.status, headers: res.headers };
2552
+ };
2538
2553
  var getExchangeExternalIdentityTokenUrl = () => {
2539
2554
  return `/public/v1/identity/token`;
2540
2555
  };
@@ -7113,6 +7128,29 @@ var postChatMessageHandler = async (args, options) => {
7113
7128
  structuredContent: res.data
7114
7129
  };
7115
7130
  };
7131
+ var endChatHandler = async (options) => {
7132
+ const res = await endChat(options);
7133
+ if (res.status >= 400) {
7134
+ return {
7135
+ content: [
7136
+ {
7137
+ type: "text",
7138
+ text: JSON.stringify(res.data ?? null)
7139
+ }
7140
+ ],
7141
+ isError: true
7142
+ };
7143
+ }
7144
+ return {
7145
+ content: [
7146
+ {
7147
+ type: "text",
7148
+ text: JSON.stringify(res.data ?? null)
7149
+ }
7150
+ ],
7151
+ structuredContent: res.data
7152
+ };
7153
+ };
7116
7154
  var exchangeExternalIdentityTokenHandler = async (args, options) => {
7117
7155
  const res = await exchangeExternalIdentityToken(args.bodyParams, options);
7118
7156
  if (res.status >= 400) {
@@ -12841,6 +12879,7 @@ var GetChatResponse = zod.object({
12841
12879
  "data": zod.object({
12842
12880
  "id": zod.string().uuid(),
12843
12881
  "chat_agent_id": zod.string().uuid(),
12882
+ "status": zod.enum(["active", "ended"]),
12844
12883
  "created_at": zod.string().datetime({ "offset": true }),
12845
12884
  "messages": zod.array(zod.object({
12846
12885
  "id": zod.string().uuid(),
@@ -12883,6 +12922,7 @@ var PostChatMessageResponse = zod.object({
12883
12922
  }),
12884
12923
  "message": zod.string()
12885
12924
  });
12925
+ var EndChatResponse = zod.void();
12886
12926
  var exchangeExternalIdentityTokenBodyProviderIdMax = 64;
12887
12927
  var exchangeExternalIdentityTokenBodyInterclientTokenMax = 8192;
12888
12928
  var ExchangeExternalIdentityTokenBody = zod.object({
@@ -12916,6 +12956,7 @@ var ListChatsResponse = zod.object({
12916
12956
  "data": zod.array(zod.object({
12917
12957
  "id": zod.string().uuid(),
12918
12958
  "chat_agent_id": zod.string().uuid(),
12959
+ "status": zod.enum(["active", "ended"]),
12919
12960
  "created_at": zod.string().datetime({ "offset": true }),
12920
12961
  "message_count": zod.number().int().min(listChatsResponseDataItemMessageCountMin).max(listChatsResponseDataItemMessageCountMax)
12921
12962
  })),
@@ -17170,6 +17211,19 @@ var createMcpServer = (options) => {
17170
17211
  signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
17171
17212
  })
17172
17213
  );
17214
+ tools.endChat = server2.registerTool(
17215
+ "endChat",
17216
+ {
17217
+ title: "End a chat",
17218
+ description: "End a chat. Further messages are rejected with `409`. Ending an ended chat also returns `204`.",
17219
+ outputSchema: EndChatResponse,
17220
+ annotations: { destructiveHint: true }
17221
+ },
17222
+ (ctx) => endChatHandler({
17223
+ ...options,
17224
+ signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
17225
+ })
17226
+ );
17173
17227
  tools.exchangeExternalIdentityToken = server2.registerTool(
17174
17228
  "exchangeExternalIdentityToken",
17175
17229
  {
@@ -18631,4 +18685,4 @@ var transport = new StdioServerTransport();
18631
18685
  server.connect(transport).then(() => {
18632
18686
  console.error("MCP server running on stdio");
18633
18687
  }).catch(console.error);
18634
- //# sourceMappingURL=server-YY5F2XYI.js.map
18688
+ //# sourceMappingURL=server-AKWIQJHV.js.map