@avallon-labs/mcp 23.18.0 → 23.19.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
@@ -54,5 +54,5 @@ function setupFetch() {
54
54
 
55
55
  // src/index.ts
56
56
  setupFetch();
57
- await import("./server-F5L5GI2C.js");
57
+ await import("./server-UP3XNXCN.js");
58
58
  //# sourceMappingURL=index.js.map
@@ -1616,6 +1616,40 @@ var updateChatAgent = async (chatAgentId, updateChatAgentRequest, options) => {
1616
1616
  headers: res.headers
1617
1617
  };
1618
1618
  };
1619
+ var getGetChatAgentPromptUrl = (chatAgentId) => {
1620
+ return `/v1/chat-agents/${chatAgentId}/prompt`;
1621
+ };
1622
+ var getChatAgentPrompt = async (chatAgentId, options) => {
1623
+ const res = await fetch(getGetChatAgentPromptUrl(chatAgentId), {
1624
+ ...options,
1625
+ method: "GET"
1626
+ });
1627
+ const body = [204, 205, 304].includes(res.status) ? null : await res.text();
1628
+ const data = body ? JSON.parse(body) : {};
1629
+ return {
1630
+ data,
1631
+ status: res.status,
1632
+ headers: res.headers
1633
+ };
1634
+ };
1635
+ var getUpdateChatAgentPromptUrl = (chatAgentId) => {
1636
+ return `/v1/chat-agents/${chatAgentId}/prompt`;
1637
+ };
1638
+ var updateChatAgentPrompt = async (chatAgentId, updateChatAgentPromptBody, options) => {
1639
+ const res = await fetch(getUpdateChatAgentPromptUrl(chatAgentId), {
1640
+ ...options,
1641
+ method: "PATCH",
1642
+ headers: { "Content-Type": "application/json", ...options?.headers },
1643
+ body: JSON.stringify(updateChatAgentPromptBody)
1644
+ });
1645
+ const body = [204, 205, 304].includes(res.status) ? null : await res.text();
1646
+ const data = body ? JSON.parse(body) : {};
1647
+ return {
1648
+ data,
1649
+ status: res.status,
1650
+ headers: res.headers
1651
+ };
1652
+ };
1619
1653
  var getCreateChatUrl = () => {
1620
1654
  return `/public/v1/chats`;
1621
1655
  };
@@ -3115,6 +3149,31 @@ var updateChatAgentHandler = async (args) => {
3115
3149
  ]
3116
3150
  };
3117
3151
  };
3152
+ var getChatAgentPromptHandler = async (args) => {
3153
+ const res = await getChatAgentPrompt(args.pathParams.chatAgentId);
3154
+ return {
3155
+ content: [
3156
+ {
3157
+ type: "text",
3158
+ text: JSON.stringify(res)
3159
+ }
3160
+ ]
3161
+ };
3162
+ };
3163
+ var updateChatAgentPromptHandler = async (args) => {
3164
+ const res = await updateChatAgentPrompt(
3165
+ args.pathParams.chatAgentId,
3166
+ args.bodyParams
3167
+ );
3168
+ return {
3169
+ content: [
3170
+ {
3171
+ type: "text",
3172
+ text: JSON.stringify(res)
3173
+ }
3174
+ ]
3175
+ };
3176
+ };
3118
3177
  var createChatHandler = async (args) => {
3119
3178
  const res = await createChat(args.bodyParams);
3120
3179
  return {
@@ -5995,6 +6054,24 @@ var UpdateChatAgentResponse = zod.object({
5995
6054
  created_at: zod.string().datetime({}),
5996
6055
  updated_at: zod.string().datetime({})
5997
6056
  });
6057
+ var GetChatAgentPromptParams = zod.object({
6058
+ chatAgentId: zod.string().uuid()
6059
+ });
6060
+ var GetChatAgentPromptResponse = zod.object({
6061
+ prompt: zod.string(),
6062
+ greeting: zod.string()
6063
+ });
6064
+ var UpdateChatAgentPromptParams = zod.object({
6065
+ chatAgentId: zod.string().uuid()
6066
+ });
6067
+ var UpdateChatAgentPromptBody = zod.object({
6068
+ prompt: zod.string().min(1).optional(),
6069
+ greeting: zod.string().min(1).optional()
6070
+ });
6071
+ var UpdateChatAgentPromptResponse = zod.object({
6072
+ id: zod.string(),
6073
+ updated_at: zod.string().datetime({})
6074
+ });
5998
6075
  var CreateChatBody = zod.object({
5999
6076
  chat_agent_id: zod.string().uuid()
6000
6077
  });
@@ -7285,6 +7362,23 @@ server.tool(
7285
7362
  },
7286
7363
  updateChatAgentHandler
7287
7364
  );
7365
+ server.tool(
7366
+ "getChatAgentPrompt",
7367
+ "Get chat agent prompt",
7368
+ {
7369
+ pathParams: GetChatAgentPromptParams
7370
+ },
7371
+ getChatAgentPromptHandler
7372
+ );
7373
+ server.tool(
7374
+ "updateChatAgentPrompt",
7375
+ "Update chat agent prompt",
7376
+ {
7377
+ pathParams: UpdateChatAgentPromptParams,
7378
+ bodyParams: UpdateChatAgentPromptBody
7379
+ },
7380
+ updateChatAgentPromptHandler
7381
+ );
7288
7382
  server.tool(
7289
7383
  "createChat",
7290
7384
  "Create a chat",
@@ -7534,4 +7628,4 @@ var transport = new StdioServerTransport();
7534
7628
  server.connect(transport).then(() => {
7535
7629
  console.error("MCP server running on stdio");
7536
7630
  }).catch(console.error);
7537
- //# sourceMappingURL=server-F5L5GI2C.js.map
7631
+ //# sourceMappingURL=server-UP3XNXCN.js.map