@avallon-labs/mcp 34.0.0 → 34.1.0-staging.858

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-H424KFFR.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,
@@ -4627,7 +4663,7 @@ var ListVoiceAgentVersionsResponseItem = zod.object({
4627
4663
  voice_agent_id: zod.string(),
4628
4664
  version: zod.number().min(listVoiceAgentVersionsResponseVersionMin).max(listVoiceAgentVersionsResponseVersionMax),
4629
4665
  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."
4666
+ "Promotion history tag on this version (`live`, `test`, or null if never promoted)."
4631
4667
  ),
4632
4668
  actor: zod.string(),
4633
4669
  created_at: zod.string().datetime({}),
@@ -4753,7 +4789,7 @@ var GetVoiceAgentVersionResponse = zod.object({
4753
4789
  ]).describe("Inactivity timeout in seconds. null disables the feature."),
4754
4790
  version: zod.number().min(getVoiceAgentVersionResponseVersionMin).max(getVoiceAgentVersionResponseVersionMax),
4755
4791
  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."
4792
+ "Promotion history tag on this version (`live`, `test`, or null if never promoted)."
4757
4793
  ),
4758
4794
  version_created_at: zod.string().datetime({}),
4759
4795
  actor: zod.string(),
@@ -4761,6 +4797,17 @@ var GetVoiceAgentVersionResponse = zod.object({
4761
4797
  "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
4798
  )
4763
4799
  });
4800
+ var PromoteVoiceAgentVersionParams = zod.object({
4801
+ voiceAgentId: zod.string().uuid(),
4802
+ version: zod.number()
4803
+ });
4804
+ var PromoteVoiceAgentVersionBody = zod.object({
4805
+ environment: zod.enum(["live", "test"])
4806
+ });
4807
+ var PromoteVoiceAgentVersionResponse = zod.object({
4808
+ version: zod.number(),
4809
+ environment: zod.enum(["live", "test"])
4810
+ });
4764
4811
  var GetVoiceAgentVersionChangeSummaryParams = zod.object({
4765
4812
  voiceAgentId: zod.string().uuid(),
4766
4813
  version: zod.number()
@@ -5418,7 +5465,7 @@ var ScheduleJobBody = zod.object({
5418
5465
  payload: zod.record(zod.string(), zod.unknown()).default(scheduleJobBodyPayloadDefault),
5419
5466
  metadata: zod.record(zod.string(), zod.unknown()).optional(),
5420
5467
  environment: zod.enum(["live", "test"]).default(scheduleJobBodyEnvironmentDefault).describe(
5421
- "Environment the job dispatches against (agent configuration and phone binding)."
5468
+ "Promoted environment the job dispatches against (agent configuration and phone binding). TEST requires an active TEST promotion."
5422
5469
  ),
5423
5470
  trigger_immediately: zod.boolean().default(scheduleJobBodyTriggerImmediatelyDefault)
5424
5471
  });
@@ -5432,7 +5479,7 @@ var ScheduleJobResponse = zod.object({
5432
5479
  payload: zod.record(zod.string(), zod.unknown()),
5433
5480
  metadata: zod.union([zod.record(zod.string(), zod.unknown()), zod.null()]),
5434
5481
  environment: zod.enum(["live", "test"]).describe(
5435
- "Environment the job dispatches against (agent configuration and phone binding)."
5482
+ "Promoted environment the job dispatches against (agent configuration and phone binding). TEST requires an active TEST promotion."
5436
5483
  ),
5437
5484
  status: zod.enum([
5438
5485
  "pending",
@@ -5468,7 +5515,7 @@ var ListJobsResponseItem = zod.object({
5468
5515
  payload: zod.record(zod.string(), zod.unknown()),
5469
5516
  metadata: zod.union([zod.record(zod.string(), zod.unknown()), zod.null()]),
5470
5517
  environment: zod.enum(["live", "test"]).describe(
5471
- "Environment the job dispatches against (agent configuration and phone binding)."
5518
+ "Promoted environment the job dispatches against (agent configuration and phone binding). TEST requires an active TEST promotion."
5472
5519
  ),
5473
5520
  status: zod.enum([
5474
5521
  "pending",
@@ -5493,7 +5540,7 @@ var CancelJobResponse = zod.object({
5493
5540
  payload: zod.record(zod.string(), zod.unknown()),
5494
5541
  metadata: zod.union([zod.record(zod.string(), zod.unknown()), zod.null()]),
5495
5542
  environment: zod.enum(["live", "test"]).describe(
5496
- "Environment the job dispatches against (agent configuration and phone binding)."
5543
+ "Promoted environment the job dispatches against (agent configuration and phone binding). TEST requires an active TEST promotion."
5497
5544
  ),
5498
5545
  status: zod.enum([
5499
5546
  "pending",
@@ -7236,6 +7283,7 @@ var GetProfileResponse = zod.object({
7236
7283
  permissions: zod.array(
7237
7284
  zod.enum([
7238
7285
  "voice-agents:write",
7286
+ "voice-agents:promote",
7239
7287
  "tools:write",
7240
7288
  "tools:execute",
7241
7289
  "extractors:write",
@@ -7853,6 +7901,15 @@ server.tool(
7853
7901
  },
7854
7902
  getVoiceAgentVersionHandler
7855
7903
  );
7904
+ server.tool(
7905
+ "promoteVoiceAgentVersion",
7906
+ "Promote voice agent version",
7907
+ {
7908
+ pathParams: PromoteVoiceAgentVersionParams,
7909
+ bodyParams: PromoteVoiceAgentVersionBody
7910
+ },
7911
+ promoteVoiceAgentVersionHandler
7912
+ );
7856
7913
  server.tool(
7857
7914
  "getVoiceAgentVersionChangeSummary",
7858
7915
  "Get voice agent version change summary",
@@ -8877,4 +8934,4 @@ var transport = new StdioServerTransport();
8877
8934
  server.connect(transport).then(() => {
8878
8935
  console.error("MCP server running on stdio");
8879
8936
  }).catch(console.error);
8880
- //# sourceMappingURL=server-6E7KTMB7.js.map
8937
+ //# sourceMappingURL=server-H424KFFR.js.map