@avallon-labs/mcp 54.5.0 → 54.7.0-staging.1255

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
@@ -46,5 +46,5 @@ function setupFetch() {
46
46
 
47
47
  // src/index.ts
48
48
  setupFetch();
49
- await import("./server-TINVVYSY.js");
49
+ await import("./server-DKJW6HMW.js");
50
50
  //# sourceMappingURL=index.js.map
@@ -932,6 +932,21 @@ var cancelCall = async (id, options) => {
932
932
  const data = body ? JSON.parse(body) : {};
933
933
  return { data, status: res.status, headers: res.headers };
934
934
  };
935
+ var getListenCallUrl = (id) => {
936
+ return `/v1/calls/${id}/listen`;
937
+ };
938
+ var listenCall = async (id, options) => {
939
+ const res = await fetch(
940
+ getListenCallUrl(id),
941
+ {
942
+ ...options,
943
+ method: "POST"
944
+ }
945
+ );
946
+ const body = [204, 205, 304].includes(res.status) ? null : await res.text();
947
+ const data = body ? JSON.parse(body) : {};
948
+ return { data, status: res.status, headers: res.headers };
949
+ };
935
950
  var getGetCallEvaluationUrl = (id) => {
936
951
  return `/v1/calls/${id}/evaluation`;
937
952
  };
@@ -3086,6 +3101,21 @@ var getInformationRequest = async (informationRequestId, options) => {
3086
3101
  const data = body ? JSON.parse(body) : {};
3087
3102
  return { data, status: res.status, headers: res.headers };
3088
3103
  };
3104
+ var getDeleteInformationRequestUrl = (informationRequestId) => {
3105
+ return `/v1/information-requests/${informationRequestId}`;
3106
+ };
3107
+ var deleteInformationRequest = async (informationRequestId, options) => {
3108
+ const res = await fetch(
3109
+ getDeleteInformationRequestUrl(informationRequestId),
3110
+ {
3111
+ ...options,
3112
+ method: "DELETE"
3113
+ }
3114
+ );
3115
+ const body = [204, 205, 304].includes(res.status) ? null : await res.text();
3116
+ const data = body ? JSON.parse(body) : {};
3117
+ return { data, status: res.status, headers: res.headers };
3118
+ };
3089
3119
  var getResolveInformationRequestUrl = (informationRequestId) => {
3090
3120
  return `/v1/information-requests/${informationRequestId}/resolve`;
3091
3121
  };
@@ -4680,6 +4710,29 @@ var cancelCallHandler = async (args, options) => {
4680
4710
  structuredContent: res.data
4681
4711
  };
4682
4712
  };
4713
+ var listenCallHandler = async (args, options) => {
4714
+ const res = await listenCall(args.pathParams.id, options);
4715
+ if (res.status >= 400) {
4716
+ return {
4717
+ content: [
4718
+ {
4719
+ type: "text",
4720
+ text: JSON.stringify(res.data ?? null)
4721
+ }
4722
+ ],
4723
+ isError: true
4724
+ };
4725
+ }
4726
+ return {
4727
+ content: [
4728
+ {
4729
+ type: "text",
4730
+ text: JSON.stringify(res.data ?? null)
4731
+ }
4732
+ ],
4733
+ structuredContent: res.data
4734
+ };
4735
+ };
4683
4736
  var getCallEvaluationHandler = async (args, options) => {
4684
4737
  const res = await getCallEvaluation(args.pathParams.id, options);
4685
4738
  if (res.status >= 400) {
@@ -7141,6 +7194,29 @@ var getInformationRequestHandler = async (args, options) => {
7141
7194
  structuredContent: res.data
7142
7195
  };
7143
7196
  };
7197
+ var deleteInformationRequestHandler = async (args, options) => {
7198
+ const res = await deleteInformationRequest(args.pathParams.informationRequestId, options);
7199
+ if (res.status >= 400) {
7200
+ return {
7201
+ content: [
7202
+ {
7203
+ type: "text",
7204
+ text: JSON.stringify(res.data ?? null)
7205
+ }
7206
+ ],
7207
+ isError: true
7208
+ };
7209
+ }
7210
+ return {
7211
+ content: [
7212
+ {
7213
+ type: "text",
7214
+ text: JSON.stringify(res.data ?? null)
7215
+ }
7216
+ ],
7217
+ structuredContent: res.data
7218
+ };
7219
+ };
7144
7220
  var resolveInformationRequestHandler = async (args, options) => {
7145
7221
  const res = await resolveInformationRequest(args.pathParams.informationRequestId, args.bodyParams, options);
7146
7222
  if (res.status >= 400) {
@@ -8785,6 +8861,7 @@ var ListCallsResponse = zod.object({
8785
8861
  "scheduled_at": zod.union([zod.string().datetime({ "offset": true }), zod.null()]),
8786
8862
  "schedule_window_minutes": zod.union([zod.number(), zod.null()]),
8787
8863
  "started_at": zod.union([zod.string().datetime({ "offset": true }), zod.null()]),
8864
+ "connected_at": zod.union([zod.string().datetime({ "offset": true }), zod.null()]).describe("When the caller was connected. Set while an `in_progress` call can be listened to."),
8788
8865
  "ended_at": zod.union([zod.string().datetime({ "offset": true }), zod.null()]),
8789
8866
  "duration_seconds": zod.union([zod.number(), zod.null()]),
8790
8867
  "completion_status": zod.union([zod.string().describe("Call completion status"), zod.null()]),
@@ -8827,6 +8904,7 @@ var CreateCallResponse = zod.object({
8827
8904
  "scheduled_at": zod.union([zod.string().datetime({ "offset": true }), zod.null()]),
8828
8905
  "schedule_window_minutes": zod.union([zod.number(), zod.null()]),
8829
8906
  "started_at": zod.union([zod.string().datetime({ "offset": true }), zod.null()]),
8907
+ "connected_at": zod.union([zod.string().datetime({ "offset": true }), zod.null()]).describe("When the caller was connected. Set while an `in_progress` call can be listened to."),
8830
8908
  "ended_at": zod.union([zod.string().datetime({ "offset": true }), zod.null()]),
8831
8909
  "duration_seconds": zod.union([zod.number(), zod.null()]),
8832
8910
  "completion_status": zod.union([zod.string().describe("Call completion status"), zod.null()]),
@@ -8864,6 +8942,7 @@ var GetCallResponse = zod.object({
8864
8942
  "schedule_window_minutes": zod.union([zod.number(), zod.null()]),
8865
8943
  "payload": zod.union([zod.record(zod.string(), zod.unknown()), zod.null()]).describe("Variables the call was scheduled with; null for calls that were not scheduled."),
8866
8944
  "started_at": zod.union([zod.string().datetime({ "offset": true }), zod.null()]),
8945
+ "connected_at": zod.union([zod.string().datetime({ "offset": true }), zod.null()]).describe("When the caller was connected. Set while an `in_progress` call can be listened to."),
8867
8946
  "ended_at": zod.union([zod.string().datetime({ "offset": true }), zod.null()]),
8868
8947
  "duration_seconds": zod.union([zod.number(), zod.null()]),
8869
8948
  "completion_status": zod.union([zod.string().describe("Call completion status"), zod.null()]),
@@ -8912,6 +8991,7 @@ var CancelCallResponse = zod.object({
8912
8991
  "scheduled_at": zod.union([zod.string().datetime({ "offset": true }), zod.null()]),
8913
8992
  "schedule_window_minutes": zod.union([zod.number(), zod.null()]),
8914
8993
  "started_at": zod.union([zod.string().datetime({ "offset": true }), zod.null()]),
8994
+ "connected_at": zod.union([zod.string().datetime({ "offset": true }), zod.null()]).describe("When the caller was connected. Set while an `in_progress` call can be listened to."),
8915
8995
  "ended_at": zod.union([zod.string().datetime({ "offset": true }), zod.null()]),
8916
8996
  "duration_seconds": zod.union([zod.number(), zod.null()]),
8917
8997
  "completion_status": zod.union([zod.string().describe("Call completion status"), zod.null()]),
@@ -8928,6 +9008,16 @@ var CancelCallResponse = zod.object({
8928
9008
  }),
8929
9009
  "message": zod.string()
8930
9010
  });
9011
+ var ListenCallParams = zod.object({
9012
+ "id": zod.string().uuid()
9013
+ });
9014
+ var ListenCallResponse = zod.object({
9015
+ "data": zod.object({
9016
+ "url": zod.string(),
9017
+ "token": zod.string()
9018
+ }),
9019
+ "message": zod.string()
9020
+ });
8931
9021
  var GetCallEvaluationParams = zod.object({
8932
9022
  "id": zod.string().uuid()
8933
9023
  });
@@ -11341,7 +11431,7 @@ var GetProfileResponse = zod.object({
11341
11431
  "last_name": zod.union([zod.string(), zod.null()]),
11342
11432
  "email": zod.string(),
11343
11433
  "role": zod.enum(["admin", "avallon_admin", "member"]),
11344
- "permissions": zod.array(zod.enum(["voice-agents:write", "voice-agents:promote", "tools:write", "tools:execute", "tools:promote", "extractors:write", "inboxes:write", "inboxes:send", "artifacts:write", "api-keys:write", "teams:write", "cases:write", "cases:delete", "information-requests:write", "information-requests:resolve", "feedback:write", "outbound-jobs:write", "outbound-jobs:schedule", "workers:read", "workers:create", "workers:write", "workers:execute", "workers:write-mcp", "workers:run", "workers:promote", "chat-agents:write", "notifications:write", "prompts:read", "prompts:write", "secrets:read", "secrets:write", "schedules:read", "schedules:write", "tenants:write"])),
11434
+ "permissions": zod.array(zod.enum(["voice-agents:write", "voice-agents:promote", "tools:write", "tools:execute", "tools:promote", "extractors:write", "inboxes:write", "inboxes:send", "artifacts:write", "api-keys:write", "teams:write", "cases:write", "cases:delete", "information-requests:write", "information-requests:resolve", "information-requests:delete", "feedback:write", "outbound-jobs:write", "outbound-jobs:schedule", "calls:monitor", "workers:read", "workers:create", "workers:write", "workers:execute", "workers:write-mcp", "workers:run", "workers:promote", "chat-agents:write", "notifications:write", "prompts:read", "prompts:write", "secrets:read", "secrets:write", "schedules:read", "schedules:write", "tenants:write"])),
11345
11435
  "tenants": zod.object({
11346
11436
  "active": zod.object({
11347
11437
  "id": zod.string(),
@@ -11979,6 +12069,13 @@ var GetInformationRequestResponse = zod.object({
11979
12069
  }),
11980
12070
  "message": zod.string()
11981
12071
  });
12072
+ var DeleteInformationRequestParams = zod.object({
12073
+ "informationRequestId": zod.string().uuid()
12074
+ });
12075
+ var DeleteInformationRequestResponse = zod.object({
12076
+ "data": zod.object({}),
12077
+ "message": zod.string()
12078
+ });
11982
12079
  var ResolveInformationRequestParams = zod.object({
11983
12080
  "informationRequestId": zod.string().uuid()
11984
12081
  });
@@ -13438,6 +13535,22 @@ var createMcpServer = (options) => {
13438
13535
  signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
13439
13536
  })
13440
13537
  );
13538
+ tools.listenCall = server2.registerTool(
13539
+ "listenCall",
13540
+ {
13541
+ title: "Listen to a call",
13542
+ description: "Issue a short-lived token that joins a connected call as a hidden, listen-only participant. Only calls that are `in_progress` with a `connected_at` can be listened to.",
13543
+ inputSchema: {
13544
+ pathParams: ListenCallParams
13545
+ },
13546
+ outputSchema: ListenCallResponse,
13547
+ annotations: { destructiveHint: true }
13548
+ },
13549
+ (args, ctx) => listenCallHandler(args, {
13550
+ ...options,
13551
+ signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
13552
+ })
13553
+ );
13441
13554
  tools.getCallEvaluation = server2.registerTool(
13442
13555
  "getCallEvaluation",
13443
13556
  {
@@ -15169,6 +15282,22 @@ var createMcpServer = (options) => {
15169
15282
  signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
15170
15283
  })
15171
15284
  );
15285
+ tools.deleteInformationRequest = server2.registerTool(
15286
+ "deleteInformationRequest",
15287
+ {
15288
+ title: "Delete information request",
15289
+ description: "Delete an information request, open or resolved..",
15290
+ inputSchema: {
15291
+ pathParams: DeleteInformationRequestParams
15292
+ },
15293
+ outputSchema: DeleteInformationRequestResponse,
15294
+ annotations: { destructiveHint: true, idempotentHint: true }
15295
+ },
15296
+ (args, ctx) => deleteInformationRequestHandler(args, {
15297
+ ...options,
15298
+ signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
15299
+ })
15300
+ );
15172
15301
  tools.resolveInformationRequest = server2.registerTool(
15173
15302
  "resolveInformationRequest",
15174
15303
  {
@@ -15655,4 +15784,4 @@ var transport = new StdioServerTransport();
15655
15784
  server.connect(transport).then(() => {
15656
15785
  console.error("MCP server running on stdio");
15657
15786
  }).catch(console.error);
15658
- //# sourceMappingURL=server-TINVVYSY.js.map
15787
+ //# sourceMappingURL=server-DKJW6HMW.js.map