secondbrainos-mcp-server 1.4.0 → 1.4.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/build/index.js +11 -4
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -72,7 +72,8 @@ class SecondBrainOSServer {
|
|
|
72
72
|
resources: {},
|
|
73
73
|
tools: {},
|
|
74
74
|
prompts: {}
|
|
75
|
-
}
|
|
75
|
+
},
|
|
76
|
+
instructions: "SBOS provides tools for managing knowledge along with definitions for sub-agents and associated skills. For full server context, see the skills at ~/.claude/skills/secondbrainos/"
|
|
76
77
|
});
|
|
77
78
|
this.setupHandlers();
|
|
78
79
|
this.setupErrorHandling();
|
|
@@ -475,7 +476,13 @@ class SecondBrainOSServer {
|
|
|
475
476
|
async interceptFilePathArgs(args) {
|
|
476
477
|
const result = { ...args };
|
|
477
478
|
for (const [key, value] of Object.entries(result)) {
|
|
478
|
-
if (
|
|
479
|
+
if (Array.isArray(value)) {
|
|
480
|
+
result[key] = await Promise.all(value.map(async (item) => typeof item === 'object' && item !== null
|
|
481
|
+
? this.interceptFilePathArgs(item)
|
|
482
|
+
: item));
|
|
483
|
+
continue;
|
|
484
|
+
}
|
|
485
|
+
if (typeof value === 'object' && value !== null) {
|
|
479
486
|
result[key] = await this.interceptFilePathArgs(value);
|
|
480
487
|
continue;
|
|
481
488
|
}
|
|
@@ -671,11 +678,11 @@ class SecondBrainOSServer {
|
|
|
671
678
|
// This method is kept for future error handling implementations
|
|
672
679
|
}
|
|
673
680
|
async run() {
|
|
681
|
+
// Write skill files before connecting so Claude Code sees them at session start
|
|
682
|
+
await this.writeSkillFiles().catch(err => console.error('Failed to write skill files:', err));
|
|
674
683
|
const transport = new StdioServerTransport();
|
|
675
684
|
await this.server.connect(transport);
|
|
676
685
|
console.error("Second Brain OS MCP server running on stdio");
|
|
677
|
-
// Write skill files in the background (non-blocking)
|
|
678
|
-
this.writeSkillFiles().catch(err => console.error('Failed to write skill files:', err));
|
|
679
686
|
}
|
|
680
687
|
}
|
|
681
688
|
SecondBrainOSServer.ALLOWED_EXTENSIONS = ['.txt', '.md'];
|