@massa-ai/mcp-client 1.40.1 → 1.42.0
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/config-cli.js +49 -0
- package/dist/index.js +49 -0
- package/package.json +3 -3
package/dist/config-cli.js
CHANGED
|
@@ -728,6 +728,11 @@ var init_env = __esm(() => {
|
|
|
728
728
|
} catch {}
|
|
729
729
|
});
|
|
730
730
|
|
|
731
|
+
// ../../packages/shared/dist/config/config-writer.js
|
|
732
|
+
var init_config_writer = __esm(() => {
|
|
733
|
+
init_config_loader();
|
|
734
|
+
});
|
|
735
|
+
|
|
731
736
|
// ../../packages/shared/dist/config/api-key.js
|
|
732
737
|
var init_api_key = __esm(() => {
|
|
733
738
|
init_config_loader();
|
|
@@ -997,6 +1002,8 @@ var init_config = __esm(() => {
|
|
|
997
1002
|
init_config_loader();
|
|
998
1003
|
init_massa_ai_config();
|
|
999
1004
|
init_config_loader();
|
|
1005
|
+
init_config_writer();
|
|
1006
|
+
init_xdg();
|
|
1000
1007
|
init_api_key();
|
|
1001
1008
|
DEFAULT_ALLOWED_EXTENSIONS = [
|
|
1002
1009
|
".ts",
|
|
@@ -109633,6 +109640,48 @@ var init_postgres_vector_store = __esm(() => {
|
|
|
109633
109640
|
lastIndexed: row.last_updated?.toISOString() ?? null
|
|
109634
109641
|
}));
|
|
109635
109642
|
}
|
|
109643
|
+
async getPool() {
|
|
109644
|
+
if (this.pool)
|
|
109645
|
+
return this.pool;
|
|
109646
|
+
const pg2 = await Promise.resolve().then(() => (init_esm6(), exports_esm));
|
|
109647
|
+
const PgPool = pg2.default?.Pool ?? pg2.Pool;
|
|
109648
|
+
const poolConfig = {
|
|
109649
|
+
connectionString: this.config.connectionString,
|
|
109650
|
+
max: this.config.poolSize,
|
|
109651
|
+
idleTimeoutMillis: 30000,
|
|
109652
|
+
connectionTimeoutMillis: 5000
|
|
109653
|
+
};
|
|
109654
|
+
this.pool = new PgPool(poolConfig);
|
|
109655
|
+
return this.pool;
|
|
109656
|
+
}
|
|
109657
|
+
async listAllProjectsAcrossDimensions() {
|
|
109658
|
+
const pool = await this.getPool();
|
|
109659
|
+
const { rows: tables } = await pool.query(`
|
|
109660
|
+
SELECT tablename FROM pg_tables
|
|
109661
|
+
WHERE tablename = 'vector_documents'
|
|
109662
|
+
OR tablename ~ '^vector_documents_[0-9]+d$'
|
|
109663
|
+
ORDER BY tablename
|
|
109664
|
+
`);
|
|
109665
|
+
if (tables.length === 0)
|
|
109666
|
+
return [];
|
|
109667
|
+
const unionParts = tables.map((t) => `SELECT project_id, COUNT(*)::int AS doc_count, MAX(updated_at) AS last_updated, SUM(LENGTH(content))::bigint AS total_size FROM ${t.tablename} WHERE id NOT LIKE '_metadata:%' GROUP BY project_id`).join(" UNION ALL ");
|
|
109668
|
+
const { rows } = await pool.query(`
|
|
109669
|
+
SELECT project_id,
|
|
109670
|
+
SUM(doc_count)::int AS doc_count,
|
|
109671
|
+
MAX(last_updated) AS last_updated,
|
|
109672
|
+
SUM(total_size)::bigint AS total_size
|
|
109673
|
+
FROM (${unionParts}) AS merged
|
|
109674
|
+
GROUP BY project_id
|
|
109675
|
+
ORDER BY last_updated DESC
|
|
109676
|
+
`);
|
|
109677
|
+
return rows.map((row) => ({
|
|
109678
|
+
projectId: row.project_id,
|
|
109679
|
+
projectPath: null,
|
|
109680
|
+
documentCount: parseInt(row.doc_count),
|
|
109681
|
+
totalSize: parseInt(row.total_size ?? "0"),
|
|
109682
|
+
lastIndexed: row.last_updated?.toISOString() ?? null
|
|
109683
|
+
}));
|
|
109684
|
+
}
|
|
109636
109685
|
async getCollection(name26) {
|
|
109637
109686
|
const pool = await this.ensureInitialized();
|
|
109638
109687
|
return new PostgresVectorCollection(pool, name26, this.tableName, this);
|
package/dist/index.js
CHANGED
|
@@ -25725,6 +25725,11 @@ var init_env = __esm(() => {
|
|
|
25725
25725
|
} catch {}
|
|
25726
25726
|
});
|
|
25727
25727
|
|
|
25728
|
+
// ../../packages/shared/dist/config/config-writer.js
|
|
25729
|
+
var init_config_writer = __esm(() => {
|
|
25730
|
+
init_config_loader();
|
|
25731
|
+
});
|
|
25732
|
+
|
|
25728
25733
|
// ../../packages/shared/dist/config/api-key.js
|
|
25729
25734
|
var init_api_key = __esm(() => {
|
|
25730
25735
|
init_config_loader();
|
|
@@ -25994,6 +25999,8 @@ var init_config = __esm(() => {
|
|
|
25994
25999
|
init_config_loader();
|
|
25995
26000
|
init_massa_ai_config();
|
|
25996
26001
|
init_config_loader();
|
|
26002
|
+
init_config_writer();
|
|
26003
|
+
init_xdg();
|
|
25997
26004
|
init_api_key();
|
|
25998
26005
|
DEFAULT_ALLOWED_EXTENSIONS = [
|
|
25999
26006
|
".ts",
|
|
@@ -116192,6 +116199,48 @@ var init_postgres_vector_store = __esm(() => {
|
|
|
116192
116199
|
lastIndexed: row.last_updated?.toISOString() ?? null
|
|
116193
116200
|
}));
|
|
116194
116201
|
}
|
|
116202
|
+
async getPool() {
|
|
116203
|
+
if (this.pool)
|
|
116204
|
+
return this.pool;
|
|
116205
|
+
const pg2 = await Promise.resolve().then(() => (init_esm6(), exports_esm));
|
|
116206
|
+
const PgPool = pg2.default?.Pool ?? pg2.Pool;
|
|
116207
|
+
const poolConfig = {
|
|
116208
|
+
connectionString: this.config.connectionString,
|
|
116209
|
+
max: this.config.poolSize,
|
|
116210
|
+
idleTimeoutMillis: 30000,
|
|
116211
|
+
connectionTimeoutMillis: 5000
|
|
116212
|
+
};
|
|
116213
|
+
this.pool = new PgPool(poolConfig);
|
|
116214
|
+
return this.pool;
|
|
116215
|
+
}
|
|
116216
|
+
async listAllProjectsAcrossDimensions() {
|
|
116217
|
+
const pool = await this.getPool();
|
|
116218
|
+
const { rows: tables } = await pool.query(`
|
|
116219
|
+
SELECT tablename FROM pg_tables
|
|
116220
|
+
WHERE tablename = 'vector_documents'
|
|
116221
|
+
OR tablename ~ '^vector_documents_[0-9]+d$'
|
|
116222
|
+
ORDER BY tablename
|
|
116223
|
+
`);
|
|
116224
|
+
if (tables.length === 0)
|
|
116225
|
+
return [];
|
|
116226
|
+
const unionParts = tables.map((t) => `SELECT project_id, COUNT(*)::int AS doc_count, MAX(updated_at) AS last_updated, SUM(LENGTH(content))::bigint AS total_size FROM ${t.tablename} WHERE id NOT LIKE '_metadata:%' GROUP BY project_id`).join(" UNION ALL ");
|
|
116227
|
+
const { rows } = await pool.query(`
|
|
116228
|
+
SELECT project_id,
|
|
116229
|
+
SUM(doc_count)::int AS doc_count,
|
|
116230
|
+
MAX(last_updated) AS last_updated,
|
|
116231
|
+
SUM(total_size)::bigint AS total_size
|
|
116232
|
+
FROM (${unionParts}) AS merged
|
|
116233
|
+
GROUP BY project_id
|
|
116234
|
+
ORDER BY last_updated DESC
|
|
116235
|
+
`);
|
|
116236
|
+
return rows.map((row) => ({
|
|
116237
|
+
projectId: row.project_id,
|
|
116238
|
+
projectPath: null,
|
|
116239
|
+
documentCount: parseInt(row.doc_count),
|
|
116240
|
+
totalSize: parseInt(row.total_size ?? "0"),
|
|
116241
|
+
lastIndexed: row.last_updated?.toISOString() ?? null
|
|
116242
|
+
}));
|
|
116243
|
+
}
|
|
116195
116244
|
async getCollection(name26) {
|
|
116196
116245
|
const pool = await this.ensureInitialized();
|
|
116197
116246
|
return new PostgresVectorCollection(pool, name26, this.tableName, this);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@massa-ai/mcp-client",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.42.0",
|
|
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.
|
|
24
|
-
"@massa-ai/shared": "^1.
|
|
23
|
+
"@massa-ai/core": "^1.42.0",
|
|
24
|
+
"@massa-ai/shared": "^1.42.0",
|
|
25
25
|
"@modelcontextprotocol/sdk": "^1.0.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|