@mrrlin-dev/mcp 0.4.247 → 0.4.248

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/bin.cjs +21 -5
  2. package/package.json +1 -1
package/dist/bin.cjs CHANGED
@@ -91934,6 +91934,12 @@ function validateCandidateUrl(rawUrl) {
91934
91934
  }
91935
91935
  return parsed.toString().replace(/\/$/, "");
91936
91936
  }
91937
+ function parseGitHubRepository(value) {
91938
+ if (!value) return null;
91939
+ const match2 = /^([A-Za-z0-9](?:[A-Za-z0-9-]{0,38}))\/([A-Za-z0-9_.-]{1,100})$/.exec(value);
91940
+ if (!match2 || !match2[1] || !match2[2] || match2[2] === "." || match2[2] === "..") return null;
91941
+ return { org: match2[1], repo: match2[2] };
91942
+ }
91937
91943
  var VercelAdapter = class {
91938
91944
  profileId = "vercel.v1";
91939
91945
  adapterVersion = "1.0.0";
@@ -91974,6 +91980,12 @@ var VercelAdapter = class {
91974
91980
  if (!manifest.gitCommitSha || !/^[0-9a-f]{40}$/.test(manifest.gitCommitSha)) {
91975
91981
  return { eligible: false, reason: "Git source mode requires a 40-character commit SHA" };
91976
91982
  }
91983
+ if (!parseGitHubRepository(manifest.gitRepository)) {
91984
+ return { eligible: false, reason: "Git source mode requires a GitHub repository in owner/repo format" };
91985
+ }
91986
+ if (computeSourceManifestDigest({ mode: "git_commit", gitCommitSha: manifest.gitCommitSha }) !== manifest.sourceDigest) {
91987
+ return { eligible: false, reason: "Git source digest does not match the requested commit" };
91988
+ }
91977
91989
  return { eligible: true };
91978
91990
  }
91979
91991
  if (manifest.mode === "inline_manifest") {
@@ -91997,15 +92009,15 @@ var VercelAdapter = class {
91997
92009
  throw new VercelContractError(targetValidation.reason);
91998
92010
  }
91999
92011
  const target = targetValidation.target;
92000
- const sourceEligibility = this.isSourceEligible(params.sourceManifest);
92001
- if (!sourceEligibility.eligible) {
92002
- throw new VercelContractError(sourceEligibility.reason);
92003
- }
92004
92012
  if (!params.operationId || typeof params.operationId !== "string") {
92005
92013
  throw new VercelContractError("PrepareRequestParams must specify non-empty operationId");
92006
92014
  }
92007
92015
  const op = normalizePublisherOperation(params.operation);
92008
92016
  if (op === "publish_release" || op === "publish_preview") {
92017
+ const sourceEligibility = this.isSourceEligible(params.sourceManifest);
92018
+ if (!sourceEligibility.eligible) {
92019
+ throw new VercelContractError(sourceEligibility.reason);
92020
+ }
92009
92021
  if (op === "publish_release") {
92010
92022
  if (params.environment !== "production") {
92011
92023
  throw new VercelContractError(
@@ -92075,8 +92087,12 @@ var VercelAdapter = class {
92075
92087
  if (params.sourceManifest.mode === "inline_manifest") {
92076
92088
  requestBody.files = filesPayload;
92077
92089
  } else if (params.sourceManifest.mode === "git_commit") {
92090
+ const repository = parseGitHubRepository(params.sourceManifest.gitRepository);
92091
+ if (!repository) throw new VercelContractError("GitHub repository is missing or invalid");
92078
92092
  requestBody.gitSource = {
92079
92093
  type: "github",
92094
+ org: repository.org,
92095
+ repo: repository.repo,
92080
92096
  sha: params.sourceManifest.gitCommitSha
92081
92097
  };
92082
92098
  }
@@ -106839,7 +106855,7 @@ Do NOT derail the current task - if the operator has an in-flight question, answ
106839
106855
  }
106840
106856
 
106841
106857
  // src/_generated/version.ts
106842
- var PKG_VERSION = "0.4.247";
106858
+ var PKG_VERSION = "0.4.248";
106843
106859
 
106844
106860
  // src/bridge-allowed-origins.ts
106845
106861
  var DEFAULT_DIRECTOR_BRIDGE_ALLOWED_ORIGINS = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mrrlin-dev/mcp",
3
- "version": "0.4.247",
3
+ "version": "0.4.248",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "mrrlin-mcp": "dist/bin.cjs"