@avallon-labs/mcp 43.1.0 → 43.2.0-staging.1027

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-LLILYP2F.js");
49
+ await import("./server-SGFEXT5P.js");
50
50
  //# sourceMappingURL=index.js.map
@@ -1110,15 +1110,25 @@ var deleteInbox = async (inboxId, options) => {
1110
1110
  headers: res.headers
1111
1111
  };
1112
1112
  };
1113
- var getCreateEmailUrl = () => {
1114
- return `/v1/emails`;
1113
+ var getGetEmailUrl = (emailId) => {
1114
+ return `/v1/emails/${emailId}`;
1115
1115
  };
1116
- var createEmail = async (createEmailBody, options) => {
1117
- const res = await fetch(getCreateEmailUrl(), {
1116
+ var getEmail = async (emailId, options) => {
1117
+ const res = await fetch(getGetEmailUrl(emailId), {
1118
1118
  ...options,
1119
- method: "POST",
1120
- headers: { "Content-Type": "application/json", ...options?.headers },
1121
- body: JSON.stringify(createEmailBody)
1119
+ method: "GET"
1120
+ });
1121
+ const body = [204, 205, 304].includes(res.status) ? null : await res.text();
1122
+ const data = body ? JSON.parse(body) : {};
1123
+ return { data, status: res.status, headers: res.headers };
1124
+ };
1125
+ var getDeleteEmailUrl = (emailId) => {
1126
+ return `/v1/emails/${emailId}`;
1127
+ };
1128
+ var deleteEmail = async (emailId, options) => {
1129
+ const res = await fetch(getDeleteEmailUrl(emailId), {
1130
+ ...options,
1131
+ method: "DELETE"
1122
1132
  });
1123
1133
  const body = [204, 205, 304].includes(res.status) ? null : await res.text();
1124
1134
  const data = body ? JSON.parse(body) : {};
@@ -1157,34 +1167,6 @@ var listEmails = async (params, options) => {
1157
1167
  headers: res.headers
1158
1168
  };
1159
1169
  };
1160
- var getGetEmailUrl = (emailId) => {
1161
- return `/v1/emails/${emailId}`;
1162
- };
1163
- var getEmail = async (emailId, options) => {
1164
- const res = await fetch(getGetEmailUrl(emailId), {
1165
- ...options,
1166
- method: "GET"
1167
- });
1168
- const body = [204, 205, 304].includes(res.status) ? null : await res.text();
1169
- const data = body ? JSON.parse(body) : {};
1170
- return { data, status: res.status, headers: res.headers };
1171
- };
1172
- var getDeleteEmailUrl = (emailId) => {
1173
- return `/v1/emails/${emailId}`;
1174
- };
1175
- var deleteEmail = async (emailId, options) => {
1176
- const res = await fetch(getDeleteEmailUrl(emailId), {
1177
- ...options,
1178
- method: "DELETE"
1179
- });
1180
- const body = [204, 205, 304].includes(res.status) ? null : await res.text();
1181
- const data = body ? JSON.parse(body) : {};
1182
- return {
1183
- data,
1184
- status: res.status,
1185
- headers: res.headers
1186
- };
1187
- };
1188
1170
  var getListEmailThreadsUrl = (params) => {
1189
1171
  const normalizedParams = new URLSearchParams();
1190
1172
  Object.entries(params || {}).forEach(([key, value]) => {
@@ -3677,19 +3659,8 @@ var deleteInboxHandler = async (args) => {
3677
3659
  ]
3678
3660
  };
3679
3661
  };
3680
- var createEmailHandler = async (args) => {
3681
- const res = await createEmail(args.bodyParams);
3682
- return {
3683
- content: [
3684
- {
3685
- type: "text",
3686
- text: JSON.stringify(res)
3687
- }
3688
- ]
3689
- };
3690
- };
3691
- var listEmailsHandler = async (args) => {
3692
- const res = await listEmails(args.queryParams);
3662
+ var getEmailHandler = async (args) => {
3663
+ const res = await getEmail(args.pathParams.emailId);
3693
3664
  return {
3694
3665
  content: [
3695
3666
  {
@@ -3699,8 +3670,8 @@ var listEmailsHandler = async (args) => {
3699
3670
  ]
3700
3671
  };
3701
3672
  };
3702
- var getEmailHandler = async (args) => {
3703
- const res = await getEmail(args.pathParams.emailId);
3673
+ var deleteEmailHandler = async (args) => {
3674
+ const res = await deleteEmail(args.pathParams.emailId);
3704
3675
  return {
3705
3676
  content: [
3706
3677
  {
@@ -3710,8 +3681,8 @@ var getEmailHandler = async (args) => {
3710
3681
  ]
3711
3682
  };
3712
3683
  };
3713
- var deleteEmailHandler = async (args) => {
3714
- const res = await deleteEmail(args.pathParams.emailId);
3684
+ var listEmailsHandler = async (args) => {
3685
+ const res = await listEmails(args.queryParams);
3715
3686
  return {
3716
3687
  content: [
3717
3688
  {
@@ -6190,7 +6161,6 @@ var scheduleJobBodyScheduleWindowMinutesDefault = 60;
6190
6161
  var scheduleJobBodyScheduleWindowMinutesMin = 10;
6191
6162
  var scheduleJobBodyScheduleWindowMinutesMax = 9007199254740991;
6192
6163
  var scheduleJobBodyPayloadDefault = {};
6193
- var scheduleJobBodyEnvironmentDefault = `live`;
6194
6164
  var scheduleJobBodyTriggerImmediatelyDefault = false;
6195
6165
  var ScheduleJobBody = zod.object({
6196
6166
  scheduled_at: zod.string(),
@@ -6198,8 +6168,8 @@ var ScheduleJobBody = zod.object({
6198
6168
  destination_phone_number: zod.string(),
6199
6169
  payload: zod.record(zod.string(), zod.unknown()).default(scheduleJobBodyPayloadDefault),
6200
6170
  metadata: zod.record(zod.string(), zod.unknown()).optional(),
6201
- environment: zod.enum(["live", "test"]).default(scheduleJobBodyEnvironmentDefault).describe(
6202
- "Promoted environment the job dispatches against (agent configuration and phone binding). TEST requires an active TEST promotion."
6171
+ environment: zod.enum(["live", "test"]).optional().describe(
6172
+ "Promoted environment the job dispatches against (agent configuration and phone binding). Defaults to `live`. TEST requires an active TEST promotion."
6203
6173
  ),
6204
6174
  trigger_immediately: zod.boolean().default(scheduleJobBodyTriggerImmediatelyDefault)
6205
6175
  });
@@ -6969,7 +6939,8 @@ var CreateInboxBody = zod.object({
6969
6939
  zod.null()
6970
6940
  ]).optional(),
6971
6941
  pdf_splitting_enabled: zod.boolean().optional(),
6972
- username: zod.string().optional().describe("Email username"),
6942
+ username: zod.string().optional().describe("Username for the live address. Generated when omitted."),
6943
+ test_username: zod.string().optional().describe("Username for the test address. Generated when omitted."),
6973
6944
  allowed_sender_domains: zod.union([zod.array(zod.string()).min(1), zod.null()]).describe(
6974
6945
  "List of allowed sender domain patterns. When null, all senders are accepted. When set to an array, only emails from matching domains are processed. Supports wildcard patterns: '*.example.com' matches 'example.com' and all its subdomains."
6975
6946
  )
@@ -6978,7 +6949,13 @@ var CreateInboxResponse = zod.object({
6978
6949
  data: zod.object({
6979
6950
  id: zod.string(),
6980
6951
  name: zod.string(),
6981
- email_address: zod.string(),
6952
+ addresses: zod.object({
6953
+ live: zod.string(),
6954
+ test: zod.union([zod.string(), zod.null()]).describe("Null on inboxes created before test addresses existed.")
6955
+ }).describe(
6956
+ "Mail sent to the test address runs the worker's test version instead of its live one."
6957
+ ),
6958
+ email_address: zod.string().describe("Deprecated. Use addresses.live instead."),
6982
6959
  extractor_id: zod.string().describe("Deprecated. Use processor_id instead."),
6983
6960
  processor_id: zod.string(),
6984
6961
  processor_type: zod.enum(["extractor", "worker"]),
@@ -7007,7 +6984,13 @@ var ListInboxesResponse = zod.object({
7007
6984
  zod.object({
7008
6985
  id: zod.string(),
7009
6986
  name: zod.string(),
7010
- email_address: zod.string(),
6987
+ addresses: zod.object({
6988
+ live: zod.string(),
6989
+ test: zod.union([zod.string(), zod.null()]).describe("Null on inboxes created before test addresses existed.")
6990
+ }).describe(
6991
+ "Mail sent to the test address runs the worker's test version instead of its live one."
6992
+ ),
6993
+ email_address: zod.string().describe("Deprecated. Use addresses.live instead."),
7011
6994
  extractor_id: zod.string().describe("Deprecated. Use processor_id instead."),
7012
6995
  processor_id: zod.string(),
7013
6996
  processor_type: zod.enum(["extractor", "worker"]),
@@ -7042,7 +7025,13 @@ var UpdateInboxResponse = zod.object({
7042
7025
  data: zod.object({
7043
7026
  id: zod.string(),
7044
7027
  name: zod.string(),
7045
- email_address: zod.string(),
7028
+ addresses: zod.object({
7029
+ live: zod.string(),
7030
+ test: zod.union([zod.string(), zod.null()]).describe("Null on inboxes created before test addresses existed.")
7031
+ }).describe(
7032
+ "Mail sent to the test address runs the worker's test version instead of its live one."
7033
+ ),
7034
+ email_address: zod.string().describe("Deprecated. Use addresses.live instead."),
7046
7035
  extractor_id: zod.string().describe("Deprecated. Use processor_id instead."),
7047
7036
  processor_id: zod.string(),
7048
7037
  processor_type: zod.enum(["extractor", "worker"]),
@@ -7061,33 +7050,47 @@ var DeleteInboxResponse = zod.object({
7061
7050
  data: zod.object({}),
7062
7051
  message: zod.string()
7063
7052
  });
7064
- var CreateEmailBody = zod.object({
7065
- direction: zod.enum(["inbound", "outbound"]),
7066
- from: zod.string().email(),
7067
- to: zod.array(zod.string().email()).min(1),
7068
- cc: zod.array(zod.string().email()).optional(),
7069
- bcc: zod.array(zod.string().email()).optional(),
7070
- subject: zod.string().optional(),
7071
- body_text: zod.string().optional(),
7072
- body_html: zod.string().optional(),
7073
- sent_at: zod.string().optional(),
7074
- received_at: zod.string().optional(),
7075
- claim_id: zod.string().optional()
7076
- });
7077
- var CreateEmailResponse = zod.object({
7053
+ var GetEmailParams = zod.object({
7054
+ emailId: zod.string().uuid()
7055
+ });
7056
+ var GetEmailResponse = zod.object({
7078
7057
  data: zod.object({
7079
- email_id: zod.string(),
7058
+ id: zod.string(),
7059
+ thread_id: zod.string(),
7060
+ inbox_id: zod.union([zod.string(), zod.null()]),
7061
+ email_agent_id: zod.union([zod.string(), zod.null()]),
7062
+ claim_id: zod.union([zod.string(), zod.null()]),
7080
7063
  direction: zod.enum(["inbound", "outbound"]),
7081
7064
  from: zod.string(),
7082
7065
  to: zod.array(zod.string()),
7066
+ cc: zod.array(zod.string()),
7067
+ bcc: zod.array(zod.string()),
7083
7068
  subject: zod.union([zod.string(), zod.null()]),
7069
+ body_text: zod.union([zod.string(), zod.null()]),
7070
+ body_html: zod.union([zod.string(), zod.null()]),
7071
+ ignored_reason: zod.union([
7072
+ zod.enum([
7073
+ "sender_domain_not_allowed",
7074
+ "received_via_cc_or_bcc",
7075
+ "sent_from_own_inbox"
7076
+ ]),
7077
+ zod.null()
7078
+ ]).describe(
7079
+ "Why the email was stored without processing. Null for emails that were processed normally."
7080
+ ),
7084
7081
  sent_at: zod.string(),
7085
7082
  received_at: zod.string(),
7086
- claim_id: zod.union([zod.string(), zod.null()]),
7087
7083
  created_at: zod.string().datetime({})
7088
7084
  }),
7089
7085
  message: zod.string()
7090
7086
  });
7087
+ var DeleteEmailParams = zod.object({
7088
+ emailId: zod.string().uuid()
7089
+ });
7090
+ var DeleteEmailResponse = zod.object({
7091
+ data: zod.object({}),
7092
+ message: zod.string()
7093
+ });
7091
7094
  var listEmailsQueryContentMax = 500;
7092
7095
  var listEmailsQueryCountDefault = 50;
7093
7096
  var listEmailsQueryCountMax = 100;
@@ -7116,6 +7119,7 @@ var ListEmailsResponse = zod.object({
7116
7119
  inbox_id: zod.union([zod.string(), zod.null()]),
7117
7120
  email_agent_id: zod.union([zod.string(), zod.null()]),
7118
7121
  direction: zod.enum(["inbound", "outbound"]),
7122
+ environment: zod.enum(["live", "test"]),
7119
7123
  from: zod.string(),
7120
7124
  to: zod.array(zod.string()),
7121
7125
  subject: zod.union([zod.string(), zod.null()]),
@@ -7140,47 +7144,6 @@ var ListEmailsResponse = zod.object({
7140
7144
  total: zod.number()
7141
7145
  })
7142
7146
  });
7143
- var GetEmailParams = zod.object({
7144
- emailId: zod.string().uuid()
7145
- });
7146
- var GetEmailResponse = zod.object({
7147
- data: zod.object({
7148
- id: zod.string(),
7149
- thread_id: zod.string(),
7150
- inbox_id: zod.union([zod.string(), zod.null()]),
7151
- email_agent_id: zod.union([zod.string(), zod.null()]),
7152
- claim_id: zod.union([zod.string(), zod.null()]),
7153
- direction: zod.enum(["inbound", "outbound"]),
7154
- from: zod.string(),
7155
- to: zod.array(zod.string()),
7156
- cc: zod.array(zod.string()),
7157
- bcc: zod.array(zod.string()),
7158
- subject: zod.union([zod.string(), zod.null()]),
7159
- body_text: zod.union([zod.string(), zod.null()]),
7160
- body_html: zod.union([zod.string(), zod.null()]),
7161
- ignored_reason: zod.union([
7162
- zod.enum([
7163
- "sender_domain_not_allowed",
7164
- "received_via_cc_or_bcc",
7165
- "sent_from_own_inbox"
7166
- ]),
7167
- zod.null()
7168
- ]).describe(
7169
- "Why the email was stored without processing. Null for emails that were processed normally."
7170
- ),
7171
- sent_at: zod.string(),
7172
- received_at: zod.string(),
7173
- created_at: zod.string().datetime({})
7174
- }),
7175
- message: zod.string()
7176
- });
7177
- var DeleteEmailParams = zod.object({
7178
- emailId: zod.string().uuid()
7179
- });
7180
- var DeleteEmailResponse = zod.object({
7181
- data: zod.object({}),
7182
- message: zod.string()
7183
- });
7184
7147
  var listEmailThreadsQueryCountDefault = 50;
7185
7148
  var listEmailThreadsQueryCountMax = 100;
7186
7149
  var listEmailThreadsQueryOffsetDefault = 0;
@@ -7250,6 +7213,9 @@ var sendEmailBodyAttachmentsItemOneContentTypeMax = 255;
7250
7213
  var sendEmailBodyAttachmentsMax = 10;
7251
7214
  var SendEmailBody = zod.object({
7252
7215
  inbox_id: zod.string().min(1),
7216
+ environment: zod.enum(["live", "test"]).optional().describe(
7217
+ "Inbox address to send from. `test` sends from the inbox's test address, `live` from its live one. Defaults to `live`."
7218
+ ),
7253
7219
  to: zod.array(zod.string().email()).min(1),
7254
7220
  cc: zod.array(zod.string().email()).optional(),
7255
7221
  bcc: zod.array(zod.string().email()).optional(),
@@ -7444,7 +7410,6 @@ var ListWorkerRunsResponse = zod.object({
7444
7410
  total: zod.number().min(listWorkerRunsResponseMetaTotalMin).max(listWorkerRunsResponseMetaTotalMax).describe("Total number of matching runs")
7445
7411
  })
7446
7412
  });
7447
- var createWorkerRunBodyEnvironmentDefault = `live`;
7448
7413
  var CreateWorkerRunBody = zod.object({
7449
7414
  worker_id: zod.string().uuid(),
7450
7415
  scope: zod.union([
@@ -7454,8 +7419,8 @@ var CreateWorkerRunBody = zod.object({
7454
7419
  ),
7455
7420
  zod.null()
7456
7421
  ]),
7457
- environment: zod.enum(["live", "test"]).default(createWorkerRunBodyEnvironmentDefault).describe(
7458
- "Release channel to run. `test` runs the worker's test version, `live` the live one."
7422
+ environment: zod.enum(["live", "test"]).optional().describe(
7423
+ "Release channel to run. `test` runs the worker's test version, `live` the live one. Defaults to `live`."
7459
7424
  )
7460
7425
  });
7461
7426
  var CreateWorkerRunResponse = zod.object({
@@ -9057,7 +9022,7 @@ var CreateScheduleBody = zod.object({
9057
9022
  )
9058
9023
  })
9059
9024
  ]).describe("When the schedule fires"),
9060
- environments: zod.array(zod.enum(["live", "test"])).describe(
9025
+ environments: zod.array(zod.enum(["live", "test"])).optional().describe(
9061
9026
  "Environments the schedule fires in. `live` resolves the worker at its live version, `test` at its test version. Listing both fires every occurrence twice, once per version."
9062
9027
  ),
9063
9028
  name: zod.string().min(1).max(createScheduleBodyNameMax).optional().describe('Human-readable name, e.g. "Nightly claim sweep"'),
@@ -10465,22 +10430,6 @@ server.tool(
10465
10430
  },
10466
10431
  deleteInboxHandler
10467
10432
  );
10468
- server.tool(
10469
- "createEmail",
10470
- "Create email (deprecated)",
10471
- {
10472
- bodyParams: CreateEmailBody
10473
- },
10474
- createEmailHandler
10475
- );
10476
- server.tool(
10477
- "listEmails",
10478
- "List emails",
10479
- {
10480
- queryParams: ListEmailsQueryParams
10481
- },
10482
- listEmailsHandler
10483
- );
10484
10433
  server.tool(
10485
10434
  "getEmail",
10486
10435
  "Get email",
@@ -10497,6 +10446,14 @@ server.tool(
10497
10446
  },
10498
10447
  deleteEmailHandler
10499
10448
  );
10449
+ server.tool(
10450
+ "listEmails",
10451
+ "List emails",
10452
+ {
10453
+ queryParams: ListEmailsQueryParams
10454
+ },
10455
+ listEmailsHandler
10456
+ );
10500
10457
  server.tool(
10501
10458
  "listEmailThreads",
10502
10459
  "List email threads",
@@ -11269,4 +11226,4 @@ var transport = new StdioServerTransport();
11269
11226
  server.connect(transport).then(() => {
11270
11227
  console.error("MCP server running on stdio");
11271
11228
  }).catch(console.error);
11272
- //# sourceMappingURL=server-LLILYP2F.js.map
11229
+ //# sourceMappingURL=server-SGFEXT5P.js.map