@massa-ai/mcp-client 1.63.0 → 1.63.1

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.
@@ -15146,10 +15146,15 @@ var init_esm6 = __esm(() => {
15146
15146
  });
15147
15147
 
15148
15148
  // ../../packages/core/dist/kernel/db-connection.js
15149
+ function resolveConnectionTimeoutMs() {
15150
+ const parsed = Number.parseInt(process.env.DB_CONNECTION_TIMEOUT_MS || "15000", 10);
15151
+ return Number.isFinite(parsed) && parsed > 0 ? parsed : 15000;
15152
+ }
15149
15153
  function getDbConfig() {
15150
15154
  return {
15151
15155
  connectionString: requirePostgresDatabaseUrl(),
15152
- poolSize: Number.parseInt(process.env.DB_POOL_SIZE || "10", 10)
15156
+ poolSize: Number.parseInt(process.env.DB_POOL_SIZE || "10", 10),
15157
+ connectionTimeoutMs: resolveConnectionTimeoutMs()
15153
15158
  };
15154
15159
  }
15155
15160
  async function getPgPool() {
@@ -15160,7 +15165,7 @@ async function getPgPool() {
15160
15165
  connectionString: config2.connectionString,
15161
15166
  max: Number.isFinite(config2.poolSize) && config2.poolSize > 0 ? config2.poolSize : 10,
15162
15167
  idleTimeoutMillis: 30000,
15163
- connectionTimeoutMillis: 5000
15168
+ connectionTimeoutMillis: config2.connectionTimeoutMs
15164
15169
  };
15165
15170
  pgPool = new Pool(poolConfig);
15166
15171
  logger.info("PostgreSQL pool initialized", { poolSize: poolConfig.max });
@@ -108332,12 +108337,16 @@ __export(exports_prisma_client, {
108332
108337
  getPrismaClient: () => getPrismaClient2,
108333
108338
  disconnectPrisma: () => disconnectPrisma,
108334
108339
  _resetPrismaForTesting: () => _resetPrismaForTesting,
108340
+ _getPrismaPoolForTesting: () => _getPrismaPoolForTesting,
108335
108341
  _adapters: () => _adapters
108336
108342
  });
108337
108343
  function _resetPrismaForTesting() {
108338
108344
  prismaInstance = null;
108339
108345
  prismaPool = null;
108340
108346
  }
108347
+ function _getPrismaPoolForTesting() {
108348
+ return prismaPool;
108349
+ }
108341
108350
  function getPrismaClient2() {
108342
108351
  if (prismaInstance)
108343
108352
  return prismaInstance;
@@ -108345,7 +108354,12 @@ function getPrismaClient2() {
108345
108354
  try {
108346
108355
  const pg2 = _adapters.loadPg();
108347
108356
  const { PrismaPg: PrismaPg2 } = _adapters.loadPrismaPg();
108348
- const pool = new pg2.Pool({ connectionString: databaseUrl, max: 10, idleTimeoutMillis: 30000, connectionTimeoutMillis: 5000 });
108357
+ const pool = new pg2.Pool({
108358
+ connectionString: databaseUrl,
108359
+ max: 10,
108360
+ idleTimeoutMillis: 30000,
108361
+ connectionTimeoutMillis: resolveConnectionTimeoutMs()
108362
+ });
108349
108363
  pool.on("error", (error51) => logger.error("prisma-client: unexpected PG pool error", error51, { poolMax: 10 }));
108350
108364
  prismaPool = pool;
108351
108365
  prismaInstance = new import_prisma.PrismaClient({ adapter: new PrismaPg2(pool) });
@@ -108365,6 +108379,7 @@ var import_prisma, prismaInstance = null, prismaPool = null, _adapters;
108365
108379
  var init_prisma_client = __esm(() => {
108366
108380
  init_dist();
108367
108381
  init_config();
108382
+ init_db_connection();
108368
108383
  import_prisma = __toESM(require_prisma(), 1);
108369
108384
  _adapters = {
108370
108385
  loadPg() {
@@ -111279,6 +111294,7 @@ var init_postgres_vector_store = __esm(() => {
111279
111294
  init_config();
111280
111295
  init_inference_providers();
111281
111296
  init_identity_guard_installer();
111297
+ init_db_connection();
111282
111298
  PostgresVectorStore = class PostgresVectorStore extends BaseVectorStore {
111283
111299
  pool = null;
111284
111300
  config;
@@ -111314,7 +111330,7 @@ var init_postgres_vector_store = __esm(() => {
111314
111330
  connectionString: this.config.connectionString,
111315
111331
  max: this.config.poolSize,
111316
111332
  idleTimeoutMillis: 30000,
111317
- connectionTimeoutMillis: 5000
111333
+ connectionTimeoutMillis: resolveConnectionTimeoutMs()
111318
111334
  };
111319
111335
  return new PgPool(poolConfig);
111320
111336
  }
@@ -112482,9 +112498,7 @@ function normalizeStructuralFile(file2) {
112482
112498
  }
112483
112499
  function normalizeSymbolText(value, label) {
112484
112500
  const normalized = normalizedNfcText(value, label);
112485
- if (normalized.includes("#"))
112486
- throw new TypeError(`${label} contains reserved #`);
112487
- return normalized;
112501
+ return normalized.includes("#") ? normalized.replace(/#/gu, "%23") : normalized;
112488
112502
  }
112489
112503
  function hasReservedModernSuffix(value) {
112490
112504
  return KNOWN_KIND_SUFFIX.test(value) || MODERN_LIKE_SUFFIX.test(value);
@@ -135153,7 +135167,11 @@ class ResolveStage {
135153
135167
  if (identities.length !== parsed.symbols.length) {
135154
135168
  throw new Error(`structural_identity_projection_mismatch:${filePath}`);
135155
135169
  }
135156
- const symbols = parsed.symbols.map((symbol27, index) => ({ ...symbol27, fqn: identities[index].fqn }));
135170
+ const symbols = parsed.symbols.map((symbol27, index) => ({
135171
+ ...symbol27,
135172
+ fqn: identities[index].fqn,
135173
+ name: identities[index].name
135174
+ }));
135157
135175
  const resolvedEdges = (parsed.structure?.edges ?? []).filter((edge) => edge.kind !== "import").map((edge) => {
135158
135176
  const resolution = session2.resolve(filePath, {
135159
135177
  kind: edge.kind,
package/dist/index.js CHANGED
@@ -40143,10 +40143,15 @@ var init_esm6 = __esm(() => {
40143
40143
  });
40144
40144
 
40145
40145
  // ../../packages/core/dist/kernel/db-connection.js
40146
+ function resolveConnectionTimeoutMs() {
40147
+ const parsed = Number.parseInt(process.env.DB_CONNECTION_TIMEOUT_MS || "15000", 10);
40148
+ return Number.isFinite(parsed) && parsed > 0 ? parsed : 15000;
40149
+ }
40146
40150
  function getDbConfig() {
40147
40151
  return {
40148
40152
  connectionString: requirePostgresDatabaseUrl(),
40149
- poolSize: Number.parseInt(process.env.DB_POOL_SIZE || "10", 10)
40153
+ poolSize: Number.parseInt(process.env.DB_POOL_SIZE || "10", 10),
40154
+ connectionTimeoutMs: resolveConnectionTimeoutMs()
40150
40155
  };
40151
40156
  }
40152
40157
  async function getPgPool() {
@@ -40157,7 +40162,7 @@ async function getPgPool() {
40157
40162
  connectionString: config3.connectionString,
40158
40163
  max: Number.isFinite(config3.poolSize) && config3.poolSize > 0 ? config3.poolSize : 10,
40159
40164
  idleTimeoutMillis: 30000,
40160
- connectionTimeoutMillis: 5000
40165
+ connectionTimeoutMillis: config3.connectionTimeoutMs
40161
40166
  };
40162
40167
  pgPool = new Pool(poolConfig);
40163
40168
  logger.info("PostgreSQL pool initialized", { poolSize: poolConfig.max });
@@ -114891,12 +114896,16 @@ __export(exports_prisma_client, {
114891
114896
  getPrismaClient: () => getPrismaClient2,
114892
114897
  disconnectPrisma: () => disconnectPrisma,
114893
114898
  _resetPrismaForTesting: () => _resetPrismaForTesting,
114899
+ _getPrismaPoolForTesting: () => _getPrismaPoolForTesting,
114894
114900
  _adapters: () => _adapters
114895
114901
  });
114896
114902
  function _resetPrismaForTesting() {
114897
114903
  prismaInstance = null;
114898
114904
  prismaPool = null;
114899
114905
  }
114906
+ function _getPrismaPoolForTesting() {
114907
+ return prismaPool;
114908
+ }
114900
114909
  function getPrismaClient2() {
114901
114910
  if (prismaInstance)
114902
114911
  return prismaInstance;
@@ -114904,7 +114913,12 @@ function getPrismaClient2() {
114904
114913
  try {
114905
114914
  const pg2 = _adapters.loadPg();
114906
114915
  const { PrismaPg: PrismaPg2 } = _adapters.loadPrismaPg();
114907
- const pool = new pg2.Pool({ connectionString: databaseUrl, max: 10, idleTimeoutMillis: 30000, connectionTimeoutMillis: 5000 });
114916
+ const pool = new pg2.Pool({
114917
+ connectionString: databaseUrl,
114918
+ max: 10,
114919
+ idleTimeoutMillis: 30000,
114920
+ connectionTimeoutMillis: resolveConnectionTimeoutMs()
114921
+ });
114908
114922
  pool.on("error", (error51) => logger.error("prisma-client: unexpected PG pool error", error51, { poolMax: 10 }));
114909
114923
  prismaPool = pool;
114910
114924
  prismaInstance = new import_prisma.PrismaClient({ adapter: new PrismaPg2(pool) });
@@ -114924,6 +114938,7 @@ var import_prisma, prismaInstance = null, prismaPool = null, _adapters;
114924
114938
  var init_prisma_client = __esm(() => {
114925
114939
  init_dist();
114926
114940
  init_config();
114941
+ init_db_connection();
114927
114942
  import_prisma = __toESM(require_prisma(), 1);
114928
114943
  _adapters = {
114929
114944
  loadPg() {
@@ -117838,6 +117853,7 @@ var init_postgres_vector_store = __esm(() => {
117838
117853
  init_config();
117839
117854
  init_inference_providers();
117840
117855
  init_identity_guard_installer();
117856
+ init_db_connection();
117841
117857
  PostgresVectorStore = class PostgresVectorStore extends BaseVectorStore {
117842
117858
  pool = null;
117843
117859
  config;
@@ -117873,7 +117889,7 @@ var init_postgres_vector_store = __esm(() => {
117873
117889
  connectionString: this.config.connectionString,
117874
117890
  max: this.config.poolSize,
117875
117891
  idleTimeoutMillis: 30000,
117876
- connectionTimeoutMillis: 5000
117892
+ connectionTimeoutMillis: resolveConnectionTimeoutMs()
117877
117893
  };
117878
117894
  return new PgPool(poolConfig);
117879
117895
  }
@@ -119041,9 +119057,7 @@ function normalizeStructuralFile(file2) {
119041
119057
  }
119042
119058
  function normalizeSymbolText(value, label) {
119043
119059
  const normalized = normalizedNfcText(value, label);
119044
- if (normalized.includes("#"))
119045
- throw new TypeError(`${label} contains reserved #`);
119046
- return normalized;
119060
+ return normalized.includes("#") ? normalized.replace(/#/gu, "%23") : normalized;
119047
119061
  }
119048
119062
  function hasReservedModernSuffix(value) {
119049
119063
  return KNOWN_KIND_SUFFIX.test(value) || MODERN_LIKE_SUFFIX.test(value);
@@ -130413,7 +130427,11 @@ class ResolveStage {
130413
130427
  if (identities.length !== parsed.symbols.length) {
130414
130428
  throw new Error(`structural_identity_projection_mismatch:${filePath}`);
130415
130429
  }
130416
- const symbols = parsed.symbols.map((symbol27, index) => ({ ...symbol27, fqn: identities[index].fqn }));
130430
+ const symbols = parsed.symbols.map((symbol27, index) => ({
130431
+ ...symbol27,
130432
+ fqn: identities[index].fqn,
130433
+ name: identities[index].name
130434
+ }));
130417
130435
  const resolvedEdges = (parsed.structure?.edges ?? []).filter((edge) => edge.kind !== "import").map((edge) => {
130418
130436
  const resolution = session2.resolve(filePath, {
130419
130437
  kind: edge.kind,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@massa-ai/mcp-client",
3
- "version": "1.63.0",
3
+ "version": "1.63.1",
4
4
  "description": "massa-ai MCP server - Semantic code search, memory, and context compression via Model Context Protocol",
5
5
  "author": "luizgmassa",
6
6
  "type": "module",
@@ -20,8 +20,8 @@
20
20
  "type-check": "tsc --noEmit"
21
21
  },
22
22
  "dependencies": {
23
- "@massa-ai/core": "^1.63.0",
24
- "@massa-ai/shared": "^1.63.0",
23
+ "@massa-ai/core": "^1.63.1",
24
+ "@massa-ai/shared": "^1.63.1",
25
25
  "@modelcontextprotocol/sdk": "^1.0.0"
26
26
  },
27
27
  "devDependencies": {