@andespindola/brainlink 1.8.0 → 1.8.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.8.1
4
+
5
+ - **Fix the Connect page's Codex snippet auth.** The `/connect` page's Codex `config.toml` block passed the bearer token via a `MCP_AUTHORIZATION` env var, but `mcp-remote` does not read that env — so the request went out unauthenticated and `mcp-remote` fell back to a hanging OAuth flow. The token is now passed as an `mcp-remote` `--header "Authorization: Bearer <token>"` argument (verified to connect), and both the remote and local Codex snippets gained `startup_timeout_sec = 60` so Codex doesn't time out the cold-start MCP handshake.
6
+
3
7
  ## 1.8.0
4
8
 
5
9
  - **"Connect your agent" page in the graph UI.** The exposed graph web UI (`brainlink server --expose`) now serves a new auth-gated `GET /connect` page, reachable from the account menu, with ready-to-paste MCP setup for wiring agents and chats (Codex, Claude Code, ChatGPT/generic MCP) to this brainlink. It detects its mode server-side: in **remote** mode — when the server is exposed and `BRAINLINK_MCP_TOKEN` is set — it builds the MCP endpoint from the request host as `https://<host>/mcp` and renders the Codex `~/.codex/config.toml` (`mcp-remote`), Claude Code `claude mcp add --transport http`, `.mcp.json` (streamable HTTP) and ChatGPT/generic connector snippets, each carrying the owner's bearer token; in **local** mode — no token / not exposed — it renders the stdio equivalents (`brainlink mcp-server --vault <path>`) and never shows a token. The page also ships a ready AGENTS.md operating contract, per-snippet copy-to-clipboard buttons, and the shared neon identity. It is served behind the same session as `/settings`, so the token is shown only to the authenticated graph owner and never on any unauthenticated route.
@@ -318,12 +318,13 @@ const snippetBlock = (id, title, hint, body) => `
318
318
  <button class="connect-copy" type="button" data-target="${escapeHtml(id)}">Copy</button>
319
319
  </div>`;
320
320
  const remoteSnippets = (mcpUrl, token) => {
321
+ // The bearer token MUST be an mcp-remote `--header` arg — mcp-remote does not
322
+ // read a MCP_AUTHORIZATION env var, so the env form leaves the request
323
+ // unauthenticated and mcp-remote falls back to a hanging OAuth flow.
321
324
  const codexToml = `[mcp_servers.brainlink]
322
325
  command = "npx"
323
- args = ["-y", "mcp-remote", "${mcpUrl}"]
324
-
325
- [mcp_servers.brainlink.env]
326
- MCP_AUTHORIZATION = "Bearer ${token}"`;
326
+ args = ["-y", "mcp-remote", "${mcpUrl}", "--header", "Authorization: Bearer ${token}"]
327
+ startup_timeout_sec = 60`;
327
328
  const claudeCmd = `claude mcp add --transport http brainlink ${mcpUrl} --header "Authorization: Bearer ${token}"`;
328
329
  const mcpJson = `{
329
330
  "mcpServers": {
@@ -359,7 +360,8 @@ Authorization: Bearer ${token}`;
359
360
  const localSnippets = (vaultPath) => {
360
361
  const codexToml = `[mcp_servers.brainlink]
361
362
  command = "brainlink"
362
- args = ["mcp-server", "--vault", "${vaultPath}"]`;
363
+ args = ["mcp-server", "--vault", "${vaultPath}"]
364
+ startup_timeout_sec = 60`;
363
365
  const claudeCmd = `claude mcp add brainlink -- brainlink mcp-server --vault ${vaultPath}`;
364
366
  const mcpJson = `{
365
367
  "mcpServers": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@andespindola/brainlink",
3
- "version": "1.8.0",
3
+ "version": "1.8.1",
4
4
  "description": "Local-first knowledge memory for agents with Markdown, backlinks, indexing and context retrieval.",
5
5
  "type": "module",
6
6
  "license": "MIT",