@mindbridgeio/muse 0.1.0 → 0.1.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/README.md CHANGED
@@ -11,7 +11,9 @@ into `~/.config/muse/settings.json` (or `$XDG_CONFIG_HOME/muse/settings.json`),
11
11
  starts Muse's MCP login, then signs lifecycle hooks in through the system
12
12
  keychain. It uses `https://memory.ifelse.io` by default; pass
13
13
  `--server-url https://…` or set `MINDBRIDGE_MCP_SERVER_URL` for a nonsecret
14
- server override.
14
+ server override. The server entry merges into whichever MCP section already
15
+ exists (`mcpServers` or `mcp_servers`), since Muse faults the config when both
16
+ spellings are present.
15
17
 
16
18
  ```sh
17
19
  npx -y @mindbridgeio/muse@latest auth status
@@ -44,9 +44,19 @@ export function installSettings(existing, hookPath, serverURL) {
44
44
  }
45
45
  // Muse has no `mcp add` command; the server entry is written directly. It
46
46
  // stays optional so a memory-server outage can never abort a session.
47
- const mcpServers = { ...(existing?.mcpServers && typeof existing.mcpServers === "object" ? existing.mcpServers : {}) };
48
- mcpServers.mindbridge = { transport: "streamable_http", url: `${serverURL}/mcp`, mode: "optional" };
49
- return { ...existing, schema_version: 1, hooks, mcpServers };
47
+ // Muse reads either `mcpServers` or `mcp_servers`, but faults the whole MCP
48
+ // config when both spellings coexist so merge into whichever exists.
49
+ // A config that already has both (e.g. from an older installer) heals into
50
+ // `mcpServers`, which wins on duplicate server names.
51
+ const camel = existing?.mcpServers && typeof existing.mcpServers === "object" ? existing.mcpServers : null;
52
+ const snake = existing?.mcp_servers && typeof existing.mcp_servers === "object" ? existing.mcp_servers : null;
53
+ const servers = camel && snake ? { ...snake, ...camel } : { ...(camel || snake || {}) };
54
+ servers.mindbridge = { transport: "streamable_http", url: `${serverURL}/mcp`, mode: "optional" };
55
+ const next = { ...existing, schema_version: 1, hooks };
56
+ delete next.mcpServers;
57
+ delete next.mcp_servers;
58
+ next[camel || !snake ? "mcpServers" : "mcp_servers"] = servers;
59
+ return next;
50
60
  }
51
61
 
52
62
  function unavailable(error) {
@@ -55,7 +65,7 @@ function unavailable(error) {
55
65
 
56
66
  async function hostLogin(commandRunner) {
57
67
  try {
58
- await commandRunner("muse", ["mcp", "login", "mindbridge"]);
68
+ await commandRunner("muse", ["mcp", "login", "mindbridge", "--scope", "mcp"]);
59
69
  return "started";
60
70
  } catch (error) {
61
71
  if (unavailable(error)) return "unavailable";
@@ -126,7 +136,9 @@ export async function doctor({
126
136
  try {
127
137
  const settings = JSON.parse(await readFile(join(museHome, "settings.json"), "utf8"));
128
138
  const serialized = JSON.stringify(settings.hooks || {});
129
- checks.installation = serialized.includes("mindbridge") && settings.mcpServers?.mindbridge?.url === `${resolvedServerURL}/mcp` ? "pass" : "stale";
139
+ const mindbridge = settings.mcpServers?.mindbridge ?? settings.mcp_servers?.mindbridge;
140
+ const faulted = settings.mcpServers != null && settings.mcp_servers != null;
141
+ checks.installation = !faulted && serialized.includes("mindbridge") && mindbridge?.url === `${resolvedServerURL}/mcp` ? "pass" : "stale";
130
142
  } catch { checks.installation = "missing"; }
131
143
  try { await oauthClientFactory(resolvedServerURL).check(); checks.lifecycleAuth = "pass"; } catch (error) { checks.lifecycleAuth = oauthReason(error); }
132
144
  const outbox = await outboxStatus(agentHookStateRoot({ env }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mindbridgeio/muse",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "MindBridge MCP and lifecycle hooks for Muse.",
5
5
  "license": "UNLICENSED",
6
6
  "engines": {