@contextstream/mcp-server 0.3.0 → 0.3.2
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.js +14 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6380,12 +6380,15 @@ var SessionManager = class {
|
|
|
6380
6380
|
}
|
|
6381
6381
|
try {
|
|
6382
6382
|
const rootsResponse = await this.server.server.listRoots();
|
|
6383
|
+
console.error("[ContextStream] listRoots response:", JSON.stringify(rootsResponse));
|
|
6383
6384
|
if (rootsResponse?.roots) {
|
|
6384
6385
|
this.ideRoots = rootsResponse.roots.map(
|
|
6385
6386
|
(r) => r.uri.replace("file://", "")
|
|
6386
6387
|
);
|
|
6388
|
+
console.error("[ContextStream] IDE roots detected:", this.ideRoots);
|
|
6387
6389
|
}
|
|
6388
|
-
} catch {
|
|
6390
|
+
} catch (e) {
|
|
6391
|
+
console.error("[ContextStream] listRoots not available:", e?.message || e);
|
|
6389
6392
|
}
|
|
6390
6393
|
if (this.ideRoots.length === 0 && this.folderPath) {
|
|
6391
6394
|
this.ideRoots = [this.folderPath];
|
|
@@ -6401,6 +6404,7 @@ var SessionManager = class {
|
|
|
6401
6404
|
async _doInitialize() {
|
|
6402
6405
|
try {
|
|
6403
6406
|
console.error("[ContextStream] Auto-initializing session context...");
|
|
6407
|
+
console.error("[ContextStream] Using IDE roots:", this.ideRoots.length > 0 ? this.ideRoots : "(none - will use fallback)");
|
|
6404
6408
|
const context = await this.client.initSession(
|
|
6405
6409
|
{
|
|
6406
6410
|
auto_index: true,
|
|
@@ -6411,6 +6415,7 @@ var SessionManager = class {
|
|
|
6411
6415
|
);
|
|
6412
6416
|
this.initialized = true;
|
|
6413
6417
|
this.context = context;
|
|
6418
|
+
console.error("[ContextStream] Workspace resolved:", context.workspace_name, "(source:", context.workspace_source, ")");
|
|
6414
6419
|
const summary = this.buildContextSummary(context);
|
|
6415
6420
|
console.error("[ContextStream] Auto-initialization complete");
|
|
6416
6421
|
console.error(`[ContextStream] Workspace: ${context.workspace_name || "unknown"}`);
|
|
@@ -6450,6 +6455,9 @@ var SessionManager = class {
|
|
|
6450
6455
|
}
|
|
6451
6456
|
if (context.workspace_name) {
|
|
6452
6457
|
parts.push(`\u{1F4C1} Workspace: ${context.workspace_name}`);
|
|
6458
|
+
if (context.workspace_source) {
|
|
6459
|
+
parts.push(` (resolved via: ${context.workspace_source})`);
|
|
6460
|
+
}
|
|
6453
6461
|
if (context.workspace_created) {
|
|
6454
6462
|
parts.push(" (auto-created for this folder)");
|
|
6455
6463
|
}
|
|
@@ -6486,7 +6494,10 @@ var SessionManager = class {
|
|
|
6486
6494
|
if (context.ide_roots && context.ide_roots.length > 0) {
|
|
6487
6495
|
const roots = context.ide_roots;
|
|
6488
6496
|
parts.push("");
|
|
6489
|
-
parts.push(`\u{1F5A5}\uFE0F IDE Roots: ${roots.
|
|
6497
|
+
parts.push(`\u{1F5A5}\uFE0F IDE Roots: ${roots.join(", ")}`);
|
|
6498
|
+
} else {
|
|
6499
|
+
parts.push("");
|
|
6500
|
+
parts.push(`\u{1F5A5}\uFE0F IDE Roots: (none detected - used fallback)`);
|
|
6490
6501
|
}
|
|
6491
6502
|
parts.push("");
|
|
6492
6503
|
parts.push("\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550");
|
|
@@ -6503,7 +6514,7 @@ async function main() {
|
|
|
6503
6514
|
const client = new ContextStreamClient(config);
|
|
6504
6515
|
const server = new McpServer({
|
|
6505
6516
|
name: "contextstream-mcp",
|
|
6506
|
-
version: "0.3.
|
|
6517
|
+
version: "0.3.2"
|
|
6507
6518
|
});
|
|
6508
6519
|
const sessionManager = new SessionManager(server, client);
|
|
6509
6520
|
registerTools(server, client, sessionManager);
|
package/package.json
CHANGED