@andespindola/brainlink 1.8.0 → 1.8.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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.8.2
4
+
5
+ - **Connect page AGENTS.md now instructs proactive capture.** The ready operating contract on the `/connect` page changed its "After you learn" guidance from only writing back "durable learnings" to capturing proactively — decisions and their rationale, project maps/paths, conventions, runbooks, recent state, and recurring pitfalls; when in doubt, capture (using volatile memory only for the truly ephemeral), then reindex. So agents wired to a brainlink persist everything worth reusing, not just occasional highlights.
6
+
7
+ ## 1.8.1
8
+
9
+ - **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.
10
+
3
11
  ## 1.8.0
4
12
 
5
13
  - **"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.
@@ -41,10 +41,15 @@ it as the continuity of your cognition, not an optional lookup.
41
41
  - Retrieve with \`strategy: "auto"\` (CAG on a fresh pack, RAG otherwise) and
42
42
  \`mode: "hybrid"\` (FTS + semantic) unless a narrower mode clearly fits.
43
43
 
44
- ## After you learn
45
- - Write durable learnings back with \`brainlink_remember\` (or
46
- \`brainlink_add_note\` for structured notes), then reindex with
47
- \`brainlink_index\`.
44
+ ## Capture proactively — save everything worth reusing
45
+ - Do not wait for an explicit "durable learning". After anything worth reusing,
46
+ write it back: decisions and their rationale, project maps and paths,
47
+ conventions, runbooks, recent state (last actions / open work), and recurring
48
+ pitfalls plus how you worked around them.
49
+ - When in doubt, capture — the cost is low and reuse is likely. Use volatile
50
+ memory only for the truly ephemeral.
51
+ - Persist with \`brainlink_remember\` (or \`brainlink_add_note\` for structured
52
+ notes), then reindex with \`brainlink_index\`.
48
53
  - Write connected memory: include \`[[wiki links]]\`, tags, and priority markers
49
54
  so notes join the knowledge graph instead of sitting orphaned.
50
55
  `;
@@ -318,12 +323,13 @@ const snippetBlock = (id, title, hint, body) => `
318
323
  <button class="connect-copy" type="button" data-target="${escapeHtml(id)}">Copy</button>
319
324
  </div>`;
320
325
  const remoteSnippets = (mcpUrl, token) => {
326
+ // The bearer token MUST be an mcp-remote `--header` arg — mcp-remote does not
327
+ // read a MCP_AUTHORIZATION env var, so the env form leaves the request
328
+ // unauthenticated and mcp-remote falls back to a hanging OAuth flow.
321
329
  const codexToml = `[mcp_servers.brainlink]
322
330
  command = "npx"
323
- args = ["-y", "mcp-remote", "${mcpUrl}"]
324
-
325
- [mcp_servers.brainlink.env]
326
- MCP_AUTHORIZATION = "Bearer ${token}"`;
331
+ args = ["-y", "mcp-remote", "${mcpUrl}", "--header", "Authorization: Bearer ${token}"]
332
+ startup_timeout_sec = 60`;
327
333
  const claudeCmd = `claude mcp add --transport http brainlink ${mcpUrl} --header "Authorization: Bearer ${token}"`;
328
334
  const mcpJson = `{
329
335
  "mcpServers": {
@@ -359,7 +365,8 @@ Authorization: Bearer ${token}`;
359
365
  const localSnippets = (vaultPath) => {
360
366
  const codexToml = `[mcp_servers.brainlink]
361
367
  command = "brainlink"
362
- args = ["mcp-server", "--vault", "${vaultPath}"]`;
368
+ args = ["mcp-server", "--vault", "${vaultPath}"]
369
+ startup_timeout_sec = 60`;
363
370
  const claudeCmd = `claude mcp add brainlink -- brainlink mcp-server --vault ${vaultPath}`;
364
371
  const mcpJson = `{
365
372
  "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.2",
4
4
  "description": "Local-first knowledge memory for agents with Markdown, backlinks, indexing and context retrieval.",
5
5
  "type": "module",
6
6
  "license": "MIT",