@avallon-labs/mcp 22.1.0 → 22.3.0-staging.493

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-NZWPNUSW.js");
57
+ await import("./server-4RWELTDP.js");
58
58
  //# sourceMappingURL=index.js.map
@@ -138,6 +138,40 @@ var getVoiceAgentPlaceholders = async (voiceAgentId, options) => {
138
138
  headers: res.headers
139
139
  };
140
140
  };
141
+ var getGetVoiceAgentPromptUrl = (voiceAgentId) => {
142
+ return `/v1/voice-agents/${voiceAgentId}/prompt`;
143
+ };
144
+ var getVoiceAgentPrompt = async (voiceAgentId, options) => {
145
+ const res = await fetch(getGetVoiceAgentPromptUrl(voiceAgentId), {
146
+ ...options,
147
+ method: "GET"
148
+ });
149
+ const body = [204, 205, 304].includes(res.status) ? null : await res.text();
150
+ const data = body ? JSON.parse(body) : {};
151
+ return {
152
+ data,
153
+ status: res.status,
154
+ headers: res.headers
155
+ };
156
+ };
157
+ var getUpdateVoiceAgentPromptUrl = (voiceAgentId) => {
158
+ return `/v1/voice-agents/${voiceAgentId}/prompt`;
159
+ };
160
+ var updateVoiceAgentPrompt = async (voiceAgentId, updateVoiceAgentPromptBody, options) => {
161
+ const res = await fetch(getUpdateVoiceAgentPromptUrl(voiceAgentId), {
162
+ ...options,
163
+ method: "PATCH",
164
+ headers: { "Content-Type": "application/json", ...options?.headers },
165
+ body: JSON.stringify(updateVoiceAgentPromptBody)
166
+ });
167
+ const body = [204, 205, 304].includes(res.status) ? null : await res.text();
168
+ const data = body ? JSON.parse(body) : {};
169
+ return {
170
+ data,
171
+ status: res.status,
172
+ headers: res.headers
173
+ };
174
+ };
141
175
  var getUpdateVoiceAgentModelsUrl = (voiceAgentId) => {
142
176
  return `/v1/voice-agents/${voiceAgentId}/models`;
143
177
  };
@@ -2055,6 +2089,31 @@ var getVoiceAgentPlaceholdersHandler = async (args) => {
2055
2089
  ]
2056
2090
  };
2057
2091
  };
2092
+ var getVoiceAgentPromptHandler = async (args) => {
2093
+ const res = await getVoiceAgentPrompt(args.pathParams.voiceAgentId);
2094
+ return {
2095
+ content: [
2096
+ {
2097
+ type: "text",
2098
+ text: JSON.stringify(res)
2099
+ }
2100
+ ]
2101
+ };
2102
+ };
2103
+ var updateVoiceAgentPromptHandler = async (args) => {
2104
+ const res = await updateVoiceAgentPrompt(
2105
+ args.pathParams.voiceAgentId,
2106
+ args.bodyParams
2107
+ );
2108
+ return {
2109
+ content: [
2110
+ {
2111
+ type: "text",
2112
+ text: JSON.stringify(res)
2113
+ }
2114
+ ]
2115
+ };
2116
+ };
2058
2117
  var updateVoiceAgentModelsHandler = async (args) => {
2059
2118
  const res = await updateVoiceAgentModels(
2060
2119
  args.pathParams.voiceAgentId,
@@ -3092,6 +3151,8 @@ import { z as zod } from "zod";
3092
3151
  var ListVoiceAgentsQueryParams = zod.object({
3093
3152
  agent_name: zod.string().optional().describe("Filter by exact agent name")
3094
3153
  });
3154
+ var listVoiceAgentsResponseAgentsItemInactivityTimeoutSecondsOneMin = -9007199254740991;
3155
+ var listVoiceAgentsResponseAgentsItemInactivityTimeoutSecondsOneMax = 9007199254740991;
3095
3156
  var listVoiceAgentsResponseTotalMin = -9007199254740991;
3096
3157
  var listVoiceAgentsResponseTotalMax = 9007199254740991;
3097
3158
  var ListVoiceAgentsResponse = zod.object({
@@ -3189,11 +3250,21 @@ var ListVoiceAgentsResponse = zod.object({
3189
3250
  "ELEVENLABS-SCRIBE-V2-REALTIME"
3190
3251
  ]),
3191
3252
  zod.null()
3192
- ])
3253
+ ]),
3254
+ inactivity_timeout_seconds: zod.union([
3255
+ zod.number().min(
3256
+ listVoiceAgentsResponseAgentsItemInactivityTimeoutSecondsOneMin
3257
+ ).max(
3258
+ listVoiceAgentsResponseAgentsItemInactivityTimeoutSecondsOneMax
3259
+ ),
3260
+ zod.null()
3261
+ ]).describe("Inactivity timeout in seconds. null disables the feature.")
3193
3262
  })
3194
3263
  ),
3195
3264
  total: zod.number().min(listVoiceAgentsResponseTotalMin).max(listVoiceAgentsResponseTotalMax).describe("Total number of agents")
3196
3265
  });
3266
+ var createVoiceAgentBodyInactivityTimeoutSecondsOneMin = 5;
3267
+ var createVoiceAgentBodyInactivityTimeoutSecondsOneMax = 9007199254740991;
3197
3268
  var CreateVoiceAgentBody = zod.object({
3198
3269
  agent_name: zod.string().min(1).describe("Name for the agent"),
3199
3270
  direction: zod.enum(["OUTBOUND", "INBOUND"]).describe("Call direction the agent handles"),
@@ -3252,11 +3323,19 @@ var CreateVoiceAgentBody = zod.object({
3252
3323
  dial_pad: zod.boolean().optional().describe("Whether the agent supports DTMF dial pad input"),
3253
3324
  end_call: zod.boolean().optional().describe("Whether the agent can end the call"),
3254
3325
  call_processor_id: zod.union([zod.string(), zod.null()]).optional().describe("ID of extractor or worker to run after call"),
3255
- call_processor_type: zod.enum(["extractor", "worker"]).optional().describe("Type of processor: extractor or worker")
3326
+ call_processor_type: zod.enum(["extractor", "worker"]).optional().describe("Type of processor: extractor or worker"),
3327
+ inactivity_timeout_seconds: zod.union([
3328
+ zod.number().min(createVoiceAgentBodyInactivityTimeoutSecondsOneMin).max(createVoiceAgentBodyInactivityTimeoutSecondsOneMax),
3329
+ zod.null()
3330
+ ]).optional().describe(
3331
+ "Inactivity timeout in seconds. null disables the feature. Minimum 5. Defaults to 7 if omitted."
3332
+ )
3256
3333
  });
3257
3334
  var GetVoiceAgentParams = zod.object({
3258
3335
  voiceAgentId: zod.string().uuid().describe("Voice Agent ID")
3259
3336
  });
3337
+ var getVoiceAgentResponseAgentInactivityTimeoutSecondsOneMin = -9007199254740991;
3338
+ var getVoiceAgentResponseAgentInactivityTimeoutSecondsOneMax = 9007199254740991;
3260
3339
  var GetVoiceAgentResponse = zod.object({
3261
3340
  agent: zod.object({
3262
3341
  id: zod.string(),
@@ -3351,17 +3430,31 @@ var GetVoiceAgentResponse = zod.object({
3351
3430
  "ELEVENLABS-SCRIBE-V2-REALTIME"
3352
3431
  ]),
3353
3432
  zod.null()
3354
- ])
3433
+ ]),
3434
+ inactivity_timeout_seconds: zod.union([
3435
+ zod.number().min(getVoiceAgentResponseAgentInactivityTimeoutSecondsOneMin).max(getVoiceAgentResponseAgentInactivityTimeoutSecondsOneMax),
3436
+ zod.null()
3437
+ ]).describe("Inactivity timeout in seconds. null disables the feature.")
3355
3438
  })
3356
3439
  });
3357
3440
  var UpdateVoiceAgentParams = zod.object({
3358
3441
  voiceAgentId: zod.string().uuid()
3359
3442
  });
3443
+ var updateVoiceAgentBodyInactivityTimeoutSecondsOneMin = 5;
3444
+ var updateVoiceAgentBodyInactivityTimeoutSecondsOneMax = 9007199254740991;
3360
3445
  var UpdateVoiceAgentBody = zod.object({
3361
3446
  name: zod.string().min(1).optional(),
3362
3447
  call_processor_id: zod.union([zod.string().uuid(), zod.null()]).optional(),
3363
- call_processor_type: zod.enum(["extractor", "worker"]).optional()
3448
+ call_processor_type: zod.enum(["extractor", "worker"]).optional(),
3449
+ inactivity_timeout_seconds: zod.union([
3450
+ zod.number().min(updateVoiceAgentBodyInactivityTimeoutSecondsOneMin).max(updateVoiceAgentBodyInactivityTimeoutSecondsOneMax),
3451
+ zod.null()
3452
+ ]).optional().describe(
3453
+ "Inactivity timeout in seconds. null disables the feature. Minimum 5. Omit to leave unchanged."
3454
+ )
3364
3455
  });
3456
+ var updateVoiceAgentResponseAgentInactivityTimeoutSecondsOneMin = -9007199254740991;
3457
+ var updateVoiceAgentResponseAgentInactivityTimeoutSecondsOneMax = 9007199254740991;
3365
3458
  var UpdateVoiceAgentResponse = zod.object({
3366
3459
  agent: zod.object({
3367
3460
  id: zod.string(),
@@ -3456,7 +3549,11 @@ var UpdateVoiceAgentResponse = zod.object({
3456
3549
  "ELEVENLABS-SCRIBE-V2-REALTIME"
3457
3550
  ]),
3458
3551
  zod.null()
3459
- ])
3552
+ ]),
3553
+ inactivity_timeout_seconds: zod.union([
3554
+ zod.number().min(updateVoiceAgentResponseAgentInactivityTimeoutSecondsOneMin).max(updateVoiceAgentResponseAgentInactivityTimeoutSecondsOneMax),
3555
+ zod.null()
3556
+ ]).describe("Inactivity timeout in seconds. null disables the feature.")
3460
3557
  })
3461
3558
  });
3462
3559
  var AddToolsToVoiceAgentParams = zod.object({
@@ -3465,6 +3562,8 @@ var AddToolsToVoiceAgentParams = zod.object({
3465
3562
  var AddToolsToVoiceAgentBody = zod.object({
3466
3563
  tool_ids: zod.array(zod.string().uuid())
3467
3564
  });
3565
+ var addToolsToVoiceAgentResponseAgentInactivityTimeoutSecondsOneMin = -9007199254740991;
3566
+ var addToolsToVoiceAgentResponseAgentInactivityTimeoutSecondsOneMax = 9007199254740991;
3468
3567
  var AddToolsToVoiceAgentResponse = zod.object({
3469
3568
  agent: zod.object({
3470
3569
  id: zod.string(),
@@ -3559,7 +3658,11 @@ var AddToolsToVoiceAgentResponse = zod.object({
3559
3658
  "ELEVENLABS-SCRIBE-V2-REALTIME"
3560
3659
  ]),
3561
3660
  zod.null()
3562
- ])
3661
+ ]),
3662
+ inactivity_timeout_seconds: zod.union([
3663
+ zod.number().min(addToolsToVoiceAgentResponseAgentInactivityTimeoutSecondsOneMin).max(addToolsToVoiceAgentResponseAgentInactivityTimeoutSecondsOneMax),
3664
+ zod.null()
3665
+ ]).describe("Inactivity timeout in seconds. null disables the feature.")
3563
3666
  })
3564
3667
  });
3565
3668
  var DeleteToolsFromVoiceAgentParams = zod.object({
@@ -3568,6 +3671,8 @@ var DeleteToolsFromVoiceAgentParams = zod.object({
3568
3671
  var DeleteToolsFromVoiceAgentBody = zod.object({
3569
3672
  tool_ids: zod.array(zod.string().uuid())
3570
3673
  });
3674
+ var deleteToolsFromVoiceAgentResponseAgentInactivityTimeoutSecondsOneMin = -9007199254740991;
3675
+ var deleteToolsFromVoiceAgentResponseAgentInactivityTimeoutSecondsOneMax = 9007199254740991;
3571
3676
  var DeleteToolsFromVoiceAgentResponse = zod.object({
3572
3677
  agent: zod.object({
3573
3678
  id: zod.string(),
@@ -3662,7 +3767,15 @@ var DeleteToolsFromVoiceAgentResponse = zod.object({
3662
3767
  "ELEVENLABS-SCRIBE-V2-REALTIME"
3663
3768
  ]),
3664
3769
  zod.null()
3665
- ])
3770
+ ]),
3771
+ inactivity_timeout_seconds: zod.union([
3772
+ zod.number().min(
3773
+ deleteToolsFromVoiceAgentResponseAgentInactivityTimeoutSecondsOneMin
3774
+ ).max(
3775
+ deleteToolsFromVoiceAgentResponseAgentInactivityTimeoutSecondsOneMax
3776
+ ),
3777
+ zod.null()
3778
+ ]).describe("Inactivity timeout in seconds. null disables the feature.")
3666
3779
  })
3667
3780
  });
3668
3781
  var GetVoiceAgentPlaceholdersParams = zod.object({
@@ -3671,6 +3784,24 @@ var GetVoiceAgentPlaceholdersParams = zod.object({
3671
3784
  var GetVoiceAgentPlaceholdersResponse = zod.object({
3672
3785
  placeholders: zod.array(zod.string()).describe("Available placeholder variables")
3673
3786
  });
3787
+ var GetVoiceAgentPromptParams = zod.object({
3788
+ voiceAgentId: zod.string().uuid()
3789
+ });
3790
+ var GetVoiceAgentPromptResponse = zod.object({
3791
+ prompt: zod.string().optional(),
3792
+ greeting: zod.string().optional()
3793
+ });
3794
+ var UpdateVoiceAgentPromptParams = zod.object({
3795
+ voiceAgentId: zod.string().uuid()
3796
+ });
3797
+ var UpdateVoiceAgentPromptBody = zod.object({
3798
+ prompt: zod.string().min(1).optional(),
3799
+ greeting: zod.union([zod.string().min(1), zod.null()]).optional()
3800
+ });
3801
+ var UpdateVoiceAgentPromptResponse = zod.object({
3802
+ id: zod.string(),
3803
+ updated_at: zod.string().datetime({})
3804
+ });
3674
3805
  var UpdateVoiceAgentModelsParams = zod.object({
3675
3806
  voiceAgentId: zod.string().uuid()
3676
3807
  });
@@ -3790,6 +3921,8 @@ var UpdateVoiceAgentModelsBody = zod.object({
3790
3921
  zod.null()
3791
3922
  ]).optional()
3792
3923
  });
3924
+ var updateVoiceAgentModelsResponseAgentInactivityTimeoutSecondsOneMin = -9007199254740991;
3925
+ var updateVoiceAgentModelsResponseAgentInactivityTimeoutSecondsOneMax = 9007199254740991;
3793
3926
  var UpdateVoiceAgentModelsResponse = zod.object({
3794
3927
  agent: zod.object({
3795
3928
  id: zod.string(),
@@ -3884,7 +4017,15 @@ var UpdateVoiceAgentModelsResponse = zod.object({
3884
4017
  "ELEVENLABS-SCRIBE-V2-REALTIME"
3885
4018
  ]),
3886
4019
  zod.null()
3887
- ])
4020
+ ]),
4021
+ inactivity_timeout_seconds: zod.union([
4022
+ zod.number().min(
4023
+ updateVoiceAgentModelsResponseAgentInactivityTimeoutSecondsOneMin
4024
+ ).max(
4025
+ updateVoiceAgentModelsResponseAgentInactivityTimeoutSecondsOneMax
4026
+ ),
4027
+ zod.null()
4028
+ ]).describe("Inactivity timeout in seconds. null disables the feature.")
3888
4029
  })
3889
4030
  });
3890
4031
  var UpdateCallControlsParams = zod.object({
@@ -3895,6 +4036,8 @@ var UpdateCallControlsBody = zod.object({
3895
4036
  end_call: zod.boolean().optional(),
3896
4037
  transfer_phone_number: zod.union([zod.string(), zod.null()]).optional()
3897
4038
  });
4039
+ var updateCallControlsResponseAgentInactivityTimeoutSecondsOneMin = -9007199254740991;
4040
+ var updateCallControlsResponseAgentInactivityTimeoutSecondsOneMax = 9007199254740991;
3898
4041
  var UpdateCallControlsResponse = zod.object({
3899
4042
  agent: zod.object({
3900
4043
  id: zod.string(),
@@ -3989,7 +4132,11 @@ var UpdateCallControlsResponse = zod.object({
3989
4132
  "ELEVENLABS-SCRIBE-V2-REALTIME"
3990
4133
  ]),
3991
4134
  zod.null()
3992
- ])
4135
+ ]),
4136
+ inactivity_timeout_seconds: zod.union([
4137
+ zod.number().min(updateCallControlsResponseAgentInactivityTimeoutSecondsOneMin).max(updateCallControlsResponseAgentInactivityTimeoutSecondsOneMax),
4138
+ zod.null()
4139
+ ]).describe("Inactivity timeout in seconds. null disables the feature.")
3993
4140
  })
3994
4141
  });
3995
4142
  var ScheduleJobParams = zod.object({
@@ -5874,6 +6021,23 @@ server.tool(
5874
6021
  },
5875
6022
  getVoiceAgentPlaceholdersHandler
5876
6023
  );
6024
+ server.tool(
6025
+ "getVoiceAgentPrompt",
6026
+ "Get voice agent prompt",
6027
+ {
6028
+ pathParams: GetVoiceAgentPromptParams
6029
+ },
6030
+ getVoiceAgentPromptHandler
6031
+ );
6032
+ server.tool(
6033
+ "updateVoiceAgentPrompt",
6034
+ "Update voice agent prompt",
6035
+ {
6036
+ pathParams: UpdateVoiceAgentPromptParams,
6037
+ bodyParams: UpdateVoiceAgentPromptBody
6038
+ },
6039
+ updateVoiceAgentPromptHandler
6040
+ );
5877
6041
  server.tool(
5878
6042
  "updateVoiceAgentModels",
5879
6043
  "Update voice agent models",
@@ -6610,4 +6774,4 @@ var transport = new StdioServerTransport();
6610
6774
  server.connect(transport).then(() => {
6611
6775
  console.error("MCP server running on stdio");
6612
6776
  }).catch(console.error);
6613
- //# sourceMappingURL=server-NZWPNUSW.js.map
6777
+ //# sourceMappingURL=server-4RWELTDP.js.map