@avallon-labs/mcp 34.0.0 → 34.2.0-staging.860

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-6E7KTMB7.js");
57
+ await import("./server-BIIWZEUN.js");
58
58
  //# sourceMappingURL=index.js.map
@@ -147,6 +147,27 @@ var getVoiceAgentVersion = async (voiceAgentId, version, options) => {
147
147
  headers: res.headers
148
148
  };
149
149
  };
150
+ var getPromoteVoiceAgentVersionUrl = (voiceAgentId, version) => {
151
+ return `/v1/voice-agents/${voiceAgentId}/versions/${version}/promote`;
152
+ };
153
+ var promoteVoiceAgentVersion = async (voiceAgentId, version, promoteVoiceAgentVersionBody, options) => {
154
+ const res = await fetch(
155
+ getPromoteVoiceAgentVersionUrl(voiceAgentId, version),
156
+ {
157
+ ...options,
158
+ method: "POST",
159
+ headers: { "Content-Type": "application/json", ...options?.headers },
160
+ body: JSON.stringify(promoteVoiceAgentVersionBody)
161
+ }
162
+ );
163
+ const body = [204, 205, 304].includes(res.status) ? null : await res.text();
164
+ const data = body ? JSON.parse(body) : {};
165
+ return {
166
+ data,
167
+ status: res.status,
168
+ headers: res.headers
169
+ };
170
+ };
150
171
  var getGetVoiceAgentVersionChangeSummaryUrl = (voiceAgentId, version) => {
151
172
  return `/v1/voice-agents/${voiceAgentId}/versions/${version}/change-summary`;
152
173
  };
@@ -2723,6 +2744,21 @@ var getVoiceAgentVersionHandler = async (args) => {
2723
2744
  ]
2724
2745
  };
2725
2746
  };
2747
+ var promoteVoiceAgentVersionHandler = async (args) => {
2748
+ const res = await promoteVoiceAgentVersion(
2749
+ args.pathParams.voiceAgentId,
2750
+ args.pathParams.version,
2751
+ args.bodyParams
2752
+ );
2753
+ return {
2754
+ content: [
2755
+ {
2756
+ type: "text",
2757
+ text: JSON.stringify(res)
2758
+ }
2759
+ ]
2760
+ };
2761
+ };
2726
2762
  var getVoiceAgentVersionChangeSummaryHandler = async (args) => {
2727
2763
  const res = await getVoiceAgentVersionChangeSummary(
2728
2764
  args.pathParams.voiceAgentId,
@@ -4473,7 +4509,8 @@ var GetVoiceAgentResponse = zod.object({
4473
4509
  inactivity_timeout_seconds: zod.union([
4474
4510
  zod.number().min(getVoiceAgentResponseAgentInactivityTimeoutSecondsOneMin).max(getVoiceAgentResponseAgentInactivityTimeoutSecondsOneMax),
4475
4511
  zod.null()
4476
- ]).describe("Inactivity timeout in seconds. null disables the feature.")
4512
+ ]).describe("Inactivity timeout in seconds. null disables the feature."),
4513
+ test_phone_number: zod.union([zod.string(), zod.null()])
4477
4514
  })
4478
4515
  });
4479
4516
  var UpdateVoiceAgentParams = zod.object({
@@ -4627,7 +4664,7 @@ var ListVoiceAgentVersionsResponseItem = zod.object({
4627
4664
  voice_agent_id: zod.string(),
4628
4665
  version: zod.number().min(listVoiceAgentVersionsResponseVersionMin).max(listVoiceAgentVersionsResponseVersionMax),
4629
4666
  environment: zod.union([zod.enum(["live", "test"]), zod.null()]).describe(
4630
- "Promotion tag on this version (`live`, `test`, or null if untagged). At most one version per agent holds each tag."
4667
+ "Promotion history tag on this version (`live`, `test`, or null if never promoted)."
4631
4668
  ),
4632
4669
  actor: zod.string(),
4633
4670
  created_at: zod.string().datetime({}),
@@ -4753,7 +4790,7 @@ var GetVoiceAgentVersionResponse = zod.object({
4753
4790
  ]).describe("Inactivity timeout in seconds. null disables the feature."),
4754
4791
  version: zod.number().min(getVoiceAgentVersionResponseVersionMin).max(getVoiceAgentVersionResponseVersionMax),
4755
4792
  environment: zod.union([zod.enum(["live", "test"]), zod.null()]).describe(
4756
- "Promotion tag on this version (`live`, `test`, or null if untagged). At most one version per agent holds each tag."
4793
+ "Promotion history tag on this version (`live`, `test`, or null if never promoted)."
4757
4794
  ),
4758
4795
  version_created_at: zod.string().datetime({}),
4759
4796
  actor: zod.string(),
@@ -4761,6 +4798,17 @@ var GetVoiceAgentVersionResponse = zod.object({
4761
4798
  "Voice agent config field names (matching the keys on the voice agent response) whose values differ from the previous version. Empty for version 1."
4762
4799
  )
4763
4800
  });
4801
+ var PromoteVoiceAgentVersionParams = zod.object({
4802
+ voiceAgentId: zod.string().uuid(),
4803
+ version: zod.number()
4804
+ });
4805
+ var PromoteVoiceAgentVersionBody = zod.object({
4806
+ environment: zod.enum(["live", "test"])
4807
+ });
4808
+ var PromoteVoiceAgentVersionResponse = zod.object({
4809
+ version: zod.number(),
4810
+ environment: zod.enum(["live", "test"])
4811
+ });
4764
4812
  var GetVoiceAgentVersionChangeSummaryParams = zod.object({
4765
4813
  voiceAgentId: zod.string().uuid(),
4766
4814
  version: zod.number()
@@ -5418,7 +5466,7 @@ var ScheduleJobBody = zod.object({
5418
5466
  payload: zod.record(zod.string(), zod.unknown()).default(scheduleJobBodyPayloadDefault),
5419
5467
  metadata: zod.record(zod.string(), zod.unknown()).optional(),
5420
5468
  environment: zod.enum(["live", "test"]).default(scheduleJobBodyEnvironmentDefault).describe(
5421
- "Environment the job dispatches against (agent configuration and phone binding)."
5469
+ "Promoted environment the job dispatches against (agent configuration and phone binding). TEST requires an active TEST promotion."
5422
5470
  ),
5423
5471
  trigger_immediately: zod.boolean().default(scheduleJobBodyTriggerImmediatelyDefault)
5424
5472
  });
@@ -5432,7 +5480,7 @@ var ScheduleJobResponse = zod.object({
5432
5480
  payload: zod.record(zod.string(), zod.unknown()),
5433
5481
  metadata: zod.union([zod.record(zod.string(), zod.unknown()), zod.null()]),
5434
5482
  environment: zod.enum(["live", "test"]).describe(
5435
- "Environment the job dispatches against (agent configuration and phone binding)."
5483
+ "Promoted environment the job dispatches against (agent configuration and phone binding). TEST requires an active TEST promotion."
5436
5484
  ),
5437
5485
  status: zod.enum([
5438
5486
  "pending",
@@ -5468,7 +5516,7 @@ var ListJobsResponseItem = zod.object({
5468
5516
  payload: zod.record(zod.string(), zod.unknown()),
5469
5517
  metadata: zod.union([zod.record(zod.string(), zod.unknown()), zod.null()]),
5470
5518
  environment: zod.enum(["live", "test"]).describe(
5471
- "Environment the job dispatches against (agent configuration and phone binding)."
5519
+ "Promoted environment the job dispatches against (agent configuration and phone binding). TEST requires an active TEST promotion."
5472
5520
  ),
5473
5521
  status: zod.enum([
5474
5522
  "pending",
@@ -5493,7 +5541,7 @@ var CancelJobResponse = zod.object({
5493
5541
  payload: zod.record(zod.string(), zod.unknown()),
5494
5542
  metadata: zod.union([zod.record(zod.string(), zod.unknown()), zod.null()]),
5495
5543
  environment: zod.enum(["live", "test"]).describe(
5496
- "Environment the job dispatches against (agent configuration and phone binding)."
5544
+ "Promoted environment the job dispatches against (agent configuration and phone binding). TEST requires an active TEST promotion."
5497
5545
  ),
5498
5546
  status: zod.enum([
5499
5547
  "pending",
@@ -7236,6 +7284,7 @@ var GetProfileResponse = zod.object({
7236
7284
  permissions: zod.array(
7237
7285
  zod.enum([
7238
7286
  "voice-agents:write",
7287
+ "voice-agents:promote",
7239
7288
  "tools:write",
7240
7289
  "tools:execute",
7241
7290
  "extractors:write",
@@ -7853,6 +7902,15 @@ server.tool(
7853
7902
  },
7854
7903
  getVoiceAgentVersionHandler
7855
7904
  );
7905
+ server.tool(
7906
+ "promoteVoiceAgentVersion",
7907
+ "Promote voice agent version",
7908
+ {
7909
+ pathParams: PromoteVoiceAgentVersionParams,
7910
+ bodyParams: PromoteVoiceAgentVersionBody
7911
+ },
7912
+ promoteVoiceAgentVersionHandler
7913
+ );
7856
7914
  server.tool(
7857
7915
  "getVoiceAgentVersionChangeSummary",
7858
7916
  "Get voice agent version change summary",
@@ -8877,4 +8935,4 @@ var transport = new StdioServerTransport();
8877
8935
  server.connect(transport).then(() => {
8878
8936
  console.error("MCP server running on stdio");
8879
8937
  }).catch(console.error);
8880
- //# sourceMappingURL=server-6E7KTMB7.js.map
8938
+ //# sourceMappingURL=server-BIIWZEUN.js.map