shipmail-mcp 0.8.3 → 0.8.6

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shipmail",
3
- "version": "0.8.3",
3
+ "version": "0.8.6",
4
4
  "description": "Operate secure custom-domain business email, calendars, and agent inboxes with Shipmail.",
5
5
  "author": {
6
6
  "name": "Shipmail",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shipmail",
3
- "version": "0.8.3",
3
+ "version": "0.8.6",
4
4
  "description": "Operate secure custom-domain business email, calendars, and agent inboxes with Shipmail.",
5
5
  "author": {
6
6
  "name": "Shipmail",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shipmail",
3
- "version": "0.8.3",
3
+ "version": "0.8.6",
4
4
  "description": "Operate secure custom-domain business email, calendars, and agent inboxes with Shipmail.",
5
5
  "author": {
6
6
  "name": "Shipmail",
package/dist/index.js CHANGED
@@ -661,6 +661,15 @@ var CLOSING_KEYWORDS = /* @__PURE__ */ new Set(["additionalProperties", "unevalu
661
661
  function isSchemaNode(value) {
662
662
  return typeof value === "object" && value !== null && !Array.isArray(value);
663
663
  }
664
+ function isStringTyped(node) {
665
+ const type = node["type"];
666
+ if (type === void 0) return true;
667
+ if (Array.isArray(type)) return type.includes("string");
668
+ return type === "string";
669
+ }
670
+ function isStringEnum(value) {
671
+ return Array.isArray(value) && value.length > 0 && value.every((entry) => typeof entry === "string");
672
+ }
664
673
  function openSchemaValue(value) {
665
674
  if (Array.isArray(value)) return value.map((entry) => openSchemaValue(entry));
666
675
  return isSchemaNode(value) ? openSchemaNode(value) : value;
@@ -675,15 +684,25 @@ function openSchemaRecord(value) {
675
684
  }
676
685
  function openSchemaNode(node) {
677
686
  const opened = {};
687
+ const stringTyped = isStringTyped(node);
688
+ const mergeUnion = Object.hasOwn(node, "oneOf");
689
+ const union = [];
678
690
  for (const keyword of Object.getOwnPropertyNames(node)) {
679
691
  const value = node[keyword];
680
692
  if (value === false && CLOSING_KEYWORDS.has(keyword)) continue;
693
+ if (stringTyped && keyword === "enum" && isStringEnum(value)) continue;
694
+ if (stringTyped && keyword === "const" && typeof value === "string") continue;
695
+ if (mergeUnion && (keyword === "oneOf" || keyword === "anyOf") && Array.isArray(value)) {
696
+ union.push(...value.map((branch) => openSchemaValue(branch)));
697
+ continue;
698
+ }
681
699
  if (SCHEMA_RECORD_KEYWORDS.has(keyword)) {
682
700
  opened[keyword] = openSchemaRecord(value);
683
701
  continue;
684
702
  }
685
703
  opened[keyword] = SCHEMA_KEYWORDS.has(keyword) ? openSchemaValue(value) : value;
686
704
  }
705
+ if (union.length > 0) opened["anyOf"] = union;
687
706
  return opened;
688
707
  }
689
708
  function openJsonSchemaObjects(schema) {
@@ -2032,7 +2051,8 @@ var importFolderSchema = z.object({
2032
2051
  source_folder: z.string(),
2033
2052
  target_folder: z.string().nullable(),
2034
2053
  role: z.string().nullable(),
2035
- state: z.enum(["pending", "importing", "completed", "failed"]),
2054
+ // "skipped": the source server refused the folder; the import finished without it.
2055
+ state: z.enum(["pending", "importing", "completed", "failed", "skipped"]),
2036
2056
  found: z.number(),
2037
2057
  imported: z.number(),
2038
2058
  duplicates: z.number(),
@@ -2510,9 +2530,12 @@ var updateScheduledMessageInputSchema = z.object({
2510
2530
  staged_attachment_ids: z.array(z.string().regex(/^sat_[0-9a-z]+$/, "Invalid staged attachment ID.")).max(20).optional(),
2511
2531
  scheduled_at: z.iso.datetime(),
2512
2532
  idempotency_key: idempotencyKeySchema
2513
- }).strict().refine((value) => Boolean(value.html || value.text), {
2514
- message: "At least one of html or text is required."
2515
- });
2533
+ }).strict().refine(
2534
+ (value) => value.html === void 0 && value.text === void 0 || Boolean(value.html) || Boolean(value.text),
2535
+ {
2536
+ message: "Provide a non-empty html or text, or omit both to keep the stored body."
2537
+ }
2538
+ );
2516
2539
  var replyToMessageInputSchema = z.object({
2517
2540
  id: idSchema.describe("Message ID to reply to."),
2518
2541
  to: z.array(recipientInputSchema).min(1).max(50),
@@ -8727,7 +8750,7 @@ function registerTools(rawServer, client, allowedTools, grantedOrganizations = [
8727
8750
  }
8728
8751
 
8729
8752
  // src/version.ts
8730
- var VERSION = "0.8.3";
8753
+ var VERSION = "0.8.6";
8731
8754
 
8732
8755
  // src/server.ts
8733
8756
  var INSTRUCTIONS = `Shipmail MCP exposes the business email and calendar tools authorized by the connection's current Shipmail permissions.
package/dist/server.js CHANGED
@@ -564,6 +564,15 @@ var CLOSING_KEYWORDS = /* @__PURE__ */ new Set(["additionalProperties", "unevalu
564
564
  function isSchemaNode(value) {
565
565
  return typeof value === "object" && value !== null && !Array.isArray(value);
566
566
  }
567
+ function isStringTyped(node) {
568
+ const type = node["type"];
569
+ if (type === void 0) return true;
570
+ if (Array.isArray(type)) return type.includes("string");
571
+ return type === "string";
572
+ }
573
+ function isStringEnum(value) {
574
+ return Array.isArray(value) && value.length > 0 && value.every((entry) => typeof entry === "string");
575
+ }
567
576
  function openSchemaValue(value) {
568
577
  if (Array.isArray(value)) return value.map((entry) => openSchemaValue(entry));
569
578
  return isSchemaNode(value) ? openSchemaNode(value) : value;
@@ -578,15 +587,25 @@ function openSchemaRecord(value) {
578
587
  }
579
588
  function openSchemaNode(node) {
580
589
  const opened = {};
590
+ const stringTyped = isStringTyped(node);
591
+ const mergeUnion = Object.hasOwn(node, "oneOf");
592
+ const union = [];
581
593
  for (const keyword of Object.getOwnPropertyNames(node)) {
582
594
  const value = node[keyword];
583
595
  if (value === false && CLOSING_KEYWORDS.has(keyword)) continue;
596
+ if (stringTyped && keyword === "enum" && isStringEnum(value)) continue;
597
+ if (stringTyped && keyword === "const" && typeof value === "string") continue;
598
+ if (mergeUnion && (keyword === "oneOf" || keyword === "anyOf") && Array.isArray(value)) {
599
+ union.push(...value.map((branch) => openSchemaValue(branch)));
600
+ continue;
601
+ }
584
602
  if (SCHEMA_RECORD_KEYWORDS.has(keyword)) {
585
603
  opened[keyword] = openSchemaRecord(value);
586
604
  continue;
587
605
  }
588
606
  opened[keyword] = SCHEMA_KEYWORDS.has(keyword) ? openSchemaValue(value) : value;
589
607
  }
608
+ if (union.length > 0) opened["anyOf"] = union;
590
609
  return opened;
591
610
  }
592
611
  function openJsonSchemaObjects(schema) {
@@ -1935,7 +1954,8 @@ var importFolderSchema = z.object({
1935
1954
  source_folder: z.string(),
1936
1955
  target_folder: z.string().nullable(),
1937
1956
  role: z.string().nullable(),
1938
- state: z.enum(["pending", "importing", "completed", "failed"]),
1957
+ // "skipped": the source server refused the folder; the import finished without it.
1958
+ state: z.enum(["pending", "importing", "completed", "failed", "skipped"]),
1939
1959
  found: z.number(),
1940
1960
  imported: z.number(),
1941
1961
  duplicates: z.number(),
@@ -2413,9 +2433,12 @@ var updateScheduledMessageInputSchema = z.object({
2413
2433
  staged_attachment_ids: z.array(z.string().regex(/^sat_[0-9a-z]+$/, "Invalid staged attachment ID.")).max(20).optional(),
2414
2434
  scheduled_at: z.iso.datetime(),
2415
2435
  idempotency_key: idempotencyKeySchema
2416
- }).strict().refine((value) => Boolean(value.html || value.text), {
2417
- message: "At least one of html or text is required."
2418
- });
2436
+ }).strict().refine(
2437
+ (value) => value.html === void 0 && value.text === void 0 || Boolean(value.html) || Boolean(value.text),
2438
+ {
2439
+ message: "Provide a non-empty html or text, or omit both to keep the stored body."
2440
+ }
2441
+ );
2419
2442
  var replyToMessageInputSchema = z.object({
2420
2443
  id: idSchema.describe("Message ID to reply to."),
2421
2444
  to: z.array(recipientInputSchema).min(1).max(50),
@@ -8637,7 +8660,7 @@ function registerTools(rawServer, client, allowedTools, grantedOrganizations = [
8637
8660
  }
8638
8661
 
8639
8662
  // src/version.ts
8640
- var VERSION = "0.8.3";
8663
+ var VERSION = "0.8.6";
8641
8664
 
8642
8665
  // src/server.ts
8643
8666
  var INSTRUCTIONS = `Shipmail MCP exposes the business email and calendar tools authorized by the connection's current Shipmail permissions.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shipmail-mcp",
3
- "version": "0.8.3",
3
+ "version": "0.8.6",
4
4
  "mcpName": "io.github.shipmail-to/shipmail-mcp",
5
5
  "description": "Official Model Context Protocol (MCP) server for Shipmail, a business email provider with REST API, webhooks, and custom-domain inboxes for AI agents.",
6
6
  "type": "module",
@@ -67,7 +67,7 @@
67
67
  },
68
68
  "dependencies": {
69
69
  "@modelcontextprotocol/server": "2.0.0",
70
- "shipmail": "0.5.3",
70
+ "shipmail": "0.5.6",
71
71
  "zod": "4.4.3"
72
72
  },
73
73
  "devDependencies": {
package/server.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "url": "https://github.com/shipmail-to/shipmail-mcp",
7
7
  "source": "github"
8
8
  },
9
- "version": "0.8.3",
9
+ "version": "0.8.6",
10
10
  "websiteUrl": "https://shipmail.to/docs/mcp",
11
11
  "remotes": [
12
12
  {
@@ -27,7 +27,7 @@
27
27
  "registryType": "npm",
28
28
  "registryBaseUrl": "https://registry.npmjs.org",
29
29
  "identifier": "shipmail-mcp",
30
- "version": "0.8.3",
30
+ "version": "0.8.6",
31
31
  "transport": {
32
32
  "type": "stdio"
33
33
  },
package/smithery.yaml CHANGED
@@ -1,6 +1,6 @@
1
1
  # Smithery configuration file: https://smithery.ai/docs/build/project-config/smithery-yaml
2
2
  name: shipmail-mcp
3
- version: 0.8.3
3
+ version: 0.8.6
4
4
  description: Official Shipmail MCP server for AI-agent custom-domain business email inboxes with REST API and webhooks.
5
5
  author: Shipmail
6
6
  repository: https://github.com/shipmail-to/shipmail-mcp