@bicon/mcp-composer 0.3.4 → 0.3.5

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.
Files changed (2) hide show
  1. package/dist/index.mjs +22 -16
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -12,7 +12,7 @@ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"
12
12
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
13
13
 
14
14
  // src/version.ts
15
- var COMPOSER_VERSION = true ? "0.3.4" : readPackageVersion();
15
+ var COMPOSER_VERSION = true ? "0.3.5" : readPackageVersion();
16
16
 
17
17
  // ../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/external.js
18
18
  var external_exports = {};
@@ -8741,19 +8741,7 @@ function buildSchemaDescriptor(sectionShapes) {
8741
8741
  };
8742
8742
  }
8743
8743
 
8744
- // src/schema.ts
8745
- function contractObjectShape() {
8746
- const def = CreateInitiativeBody._def;
8747
- if (def.typeName === "ZodIntersection" && def.left && def.right) return { ...def.left.shape, ...def.right.shape };
8748
- return CreateInitiativeBody.shape;
8749
- }
8750
- var contractShape = contractObjectShape();
8751
- function contractSection(key) {
8752
- const s = contractShape[key];
8753
- if (!s) throw new Error(`contract has no section ${key}`);
8754
- return s instanceof external_exports.ZodOptional ? s.unwrap() : s;
8755
- }
8756
- var keepDescription = (from, to) => from.description ? to.describe(from.description) : to;
8744
+ // ../../initiative-model/src/dates.ts
8757
8745
  var ISO_DATE = /^\d{4}-\d{2}-\d{2}$/;
8758
8746
  var DMY = /^(\d{1,2})[./](\d{1,2})[./](\d{4})$/;
8759
8747
  function normaliseDateInput(v) {
@@ -8763,12 +8751,30 @@ function normaliseDateInput(v) {
8763
8751
  const [, d, mo, y] = m;
8764
8752
  return `${y}-${mo.padStart(2, "0")}-${d.padStart(2, "0")}`;
8765
8753
  }
8754
+ function isCalendarParts(y, m, d) {
8755
+ const dt = /* @__PURE__ */ new Date(0);
8756
+ dt.setUTCFullYear(y, m - 1, d);
8757
+ return dt.getUTCFullYear() === y && dt.getUTCMonth() === m - 1 && dt.getUTCDate() === d;
8758
+ }
8766
8759
  function isCalendarDate(s) {
8767
8760
  if (!ISO_DATE.test(s)) return false;
8768
8761
  const [y, m, d] = s.split("-").map(Number);
8769
- const dt = new Date(Date.UTC(y, m - 1, d));
8770
- return dt.getUTCFullYear() === y && dt.getUTCMonth() === m - 1 && dt.getUTCDate() === d;
8762
+ return isCalendarParts(y, m, d);
8763
+ }
8764
+
8765
+ // src/schema.ts
8766
+ function contractObjectShape() {
8767
+ const def = CreateInitiativeBody._def;
8768
+ if (def.typeName === "ZodIntersection" && def.left && def.right) return { ...def.left.shape, ...def.right.shape };
8769
+ return CreateInitiativeBody.shape;
8771
8770
  }
8771
+ var contractShape = contractObjectShape();
8772
+ function contractSection(key) {
8773
+ const s = contractShape[key];
8774
+ if (!s) throw new Error(`contract has no section ${key}`);
8775
+ return s instanceof external_exports.ZodOptional ? s.unwrap() : s;
8776
+ }
8777
+ var keepDescription = (from, to) => from.description ? to.describe(from.description) : to;
8772
8778
  var dateField = (what) => external_exports.preprocess(normaliseDateInput, external_exports.string().refine(isCalendarDate, { message: `${what} must be a real calendar date \u2014 dd/mm/yyyy or yyyy-mm-dd` })).describe("dd/mm/yyyy (or yyyy-mm-dd)");
8773
8779
  var DATE_LIKE_KEY = /^date$|Date$|At$/;
8774
8780
  var MINTED_KEYS = /* @__PURE__ */ new Set(["id", "createdAt", "updatedAt"]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bicon/mcp-composer",
3
- "version": "0.3.4",
3
+ "version": "0.3.5",
4
4
  "description": "MCP server that helps an AI client compose a valid BICon portfolio initiative and hand it back as an import file (draft-first, no auth, no API calls).",
5
5
  "license": "UNLICENSED",
6
6
  "author": "BICon Establishment",