@memoraone/mcp 0.1.55 → 0.1.57

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.cjs CHANGED
@@ -466,6 +466,7 @@ function parsePayload(raw, repositoryBindingId) {
466
466
  optionalString("refreshTokenExpiresAt");
467
467
  optionalString("clientRedeemKey");
468
468
  optionalString("clientRefreshKey");
469
+ optionalString("supabaseUserId");
469
470
  return payload;
470
471
  }
471
472
  async function readInstallationCredentials(repositoryBindingId, options = {}) {
@@ -827,7 +828,8 @@ async function redeemLocalConnectCode(apiUrl, body, options = {}) {
827
828
  const installationPublicId = data?.installation_public_id;
828
829
  const projectId = data?.project_id;
829
830
  const repositoryBindingId = data?.repository_binding_id;
830
- if (typeof accessToken !== "string" || typeof refreshToken !== "string" || typeof installationPublicId !== "string" || typeof projectId !== "string" || typeof repositoryBindingId !== "string") {
831
+ const supabaseUserId = data?.supabase_user_id;
832
+ if (typeof accessToken !== "string" || typeof refreshToken !== "string" || typeof installationPublicId !== "string" || typeof projectId !== "string" || typeof repositoryBindingId !== "string" || typeof supabaseUserId !== "string" || supabaseUserId.length === 0) {
831
833
  throw new Error("[memoraone-mcp] Invalid redeem response");
832
834
  }
833
835
  let sourceId = null;
@@ -845,7 +847,8 @@ async function redeemLocalConnectCode(apiUrl, body, options = {}) {
845
847
  project_id: projectId,
846
848
  repository_binding_id: repositoryBindingId,
847
849
  source_id: sourceId,
848
- recovered: Boolean(data.recovered)
850
+ recovered: Boolean(data.recovered),
851
+ supabase_user_id: supabaseUserId
849
852
  };
850
853
  }
851
854
  async function refreshLocalMcpToken(apiUrl, body, options = {}) {
@@ -11346,7 +11349,8 @@ async function runConnectCommand(options) {
11346
11349
  accessTokenExpiresAt: redeemed.access_token_expires_at ?? void 0,
11347
11350
  refreshTokenExpiresAt: redeemed.refresh_token_expires_at ?? void 0,
11348
11351
  installationPublicId: redeemed.installation_public_id,
11349
- projectId: redeemed.project_id
11352
+ projectId: redeemed.project_id,
11353
+ supabaseUserId: redeemed.supabase_user_id
11350
11354
  },
11351
11355
  { ...options.credentialOptions, clearKeys: ["clientRedeemKey"] }
11352
11356
  );
@@ -199,6 +199,7 @@ function parsePayload(raw, repositoryBindingId) {
199
199
  optionalString("refreshTokenExpiresAt");
200
200
  optionalString("clientRedeemKey");
201
201
  optionalString("clientRefreshKey");
202
+ optionalString("supabaseUserId");
202
203
  return payload;
203
204
  }
204
205
  async function readInstallationCredentials(repositoryBindingId, options = {}) {
@@ -539,7 +540,8 @@ async function redeemLocalConnectCode(apiUrl, body, options = {}) {
539
540
  const installationPublicId = data?.installation_public_id;
540
541
  const projectId = data?.project_id;
541
542
  const repositoryBindingId = data?.repository_binding_id;
542
- if (typeof accessToken !== "string" || typeof refreshToken !== "string" || typeof installationPublicId !== "string" || typeof projectId !== "string" || typeof repositoryBindingId !== "string") {
543
+ const supabaseUserId = data?.supabase_user_id;
544
+ if (typeof accessToken !== "string" || typeof refreshToken !== "string" || typeof installationPublicId !== "string" || typeof projectId !== "string" || typeof repositoryBindingId !== "string" || typeof supabaseUserId !== "string" || supabaseUserId.length === 0) {
543
545
  throw new Error("[memoraone-mcp] Invalid redeem response");
544
546
  }
545
547
  let sourceId = null;
@@ -557,7 +559,8 @@ async function redeemLocalConnectCode(apiUrl, body, options = {}) {
557
559
  project_id: projectId,
558
560
  repository_binding_id: repositoryBindingId,
559
561
  source_id: sourceId,
560
- recovered: Boolean(data.recovered)
562
+ recovered: Boolean(data.recovered),
563
+ supabase_user_id: supabaseUserId
561
564
  };
562
565
  }
563
566
 
@@ -9641,7 +9644,8 @@ async function runConnectCommand(options) {
9641
9644
  accessTokenExpiresAt: redeemed.access_token_expires_at ?? void 0,
9642
9645
  refreshTokenExpiresAt: redeemed.refresh_token_expires_at ?? void 0,
9643
9646
  installationPublicId: redeemed.installation_public_id,
9644
- projectId: redeemed.project_id
9647
+ projectId: redeemed.project_id,
9648
+ supabaseUserId: redeemed.supabase_user_id
9645
9649
  },
9646
9650
  { ...options.credentialOptions, clearKeys: ["clientRedeemKey"] }
9647
9651
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memoraone/mcp",
3
- "version": "0.1.55",
3
+ "version": "0.1.57",
4
4
  "type": "module",
5
5
  "main": "dist/index.cjs",
6
6
  "exports": {