brainllm 12.6.3 → 12.6.4
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 +1 -1
- package/dist/index.js +29 -15
- package/manifest.json +1 -1
- package/package.json +1 -1
- package/server.json +2 -2
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ A persistent, graph-structured second brain for Claude and any MCP client — bu
|
|
|
10
10
|
|
|
11
11
|
[**brainllm site**](https://miisodev.github.io/BrainLLM/) · [How it works](https://miisodev.github.io/BrainLLM/how-it-works.html) · [Use cases](https://miisodev.github.io/BrainLLM/use-cases.html) · [Docs](https://miisodev.github.io/BrainLLM/docs.html)
|
|
12
12
|
|
|
13
|
-
[](https://github.com/miisodev/BrainLLM/releases)
|
|
14
14
|
[](https://github.com/miisodev/BrainLLM/actions/workflows/ci.yml)
|
|
15
15
|
[](./LICENSE)
|
|
16
16
|
[](https://bun.sh)
|
package/dist/index.js
CHANGED
|
@@ -28495,14 +28495,15 @@ var PAGE_CSS = `
|
|
|
28495
28495
|
padding:11px 14px; border-radius:9px; font-size:14px; margin-bottom:18px;
|
|
28496
28496
|
}
|
|
28497
28497
|
.foot { margin:22px 0 0; font-size:12.5px; color:var(--text-dim,#52525b); text-align:center; }
|
|
28498
|
+
.foot a { color:inherit; }
|
|
28498
28499
|
@media (prefers-reduced-motion: reduce) { button { transition:none; } .approve:hover { transform:none; } }
|
|
28499
28500
|
`;
|
|
28500
28501
|
var BRAND_MARK = `<span class="brand-mark"><i></i><i class="off"></i><i></i><i></i><i></i><i class="off"></i><i class="off"></i><i></i><i></i></span>`;
|
|
28501
|
-
var shell = (title, body) => `<!doctype html>
|
|
28502
|
+
var shell = (title, body, head = "") => `<!doctype html>
|
|
28502
28503
|
<html lang="en"><head><meta charset="utf-8">
|
|
28503
28504
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
28504
28505
|
<meta name="theme-color" content="#0a0a0f">
|
|
28505
|
-
<meta name="robots" content="noindex,nofollow"
|
|
28506
|
+
<meta name="robots" content="noindex,nofollow">${head}
|
|
28506
28507
|
<title>${esc2(title)}</title>
|
|
28507
28508
|
<style>${PAGE_CSS}</style></head>
|
|
28508
28509
|
<body>${body}</body></html>`;
|
|
@@ -28517,14 +28518,8 @@ function landingPage(base, oauthOn, sseOn) {
|
|
|
28517
28518
|
</div>`);
|
|
28518
28519
|
}
|
|
28519
28520
|
var PAGE_SECURITY_DIRECTIVES = "default-src 'none'; frame-ancestors 'none'; base-uri 'none'; img-src 'self' data:";
|
|
28520
|
-
function pageContentSecurityPolicy(
|
|
28521
|
-
|
|
28522
|
-
if (redirectUri) {
|
|
28523
|
-
const origin = new URL(redirectUri).origin;
|
|
28524
|
-
if (origin !== "null")
|
|
28525
|
-
formAction += ` ${origin}`;
|
|
28526
|
-
}
|
|
28527
|
-
return `${PAGE_SECURITY_DIRECTIVES}; form-action ${formAction}; style-src 'unsafe-inline'`;
|
|
28521
|
+
function pageContentSecurityPolicy() {
|
|
28522
|
+
return `${PAGE_SECURITY_DIRECTIVES}; form-action 'self'; style-src 'unsafe-inline'`;
|
|
28528
28523
|
}
|
|
28529
28524
|
function consentResponse(transaction, redirectUri, clientHost, verifiedHost, error, status = 200) {
|
|
28530
28525
|
return new Response(consentPage({ transaction }, clientHost, error, verifiedHost), {
|
|
@@ -28532,7 +28527,7 @@ function consentResponse(transaction, redirectUri, clientHost, verifiedHost, err
|
|
|
28532
28527
|
headers: {
|
|
28533
28528
|
"Content-Type": "text/html; charset=utf-8",
|
|
28534
28529
|
"Cache-Control": "no-store",
|
|
28535
|
-
"Content-Security-Policy": pageContentSecurityPolicy(
|
|
28530
|
+
"Content-Security-Policy": pageContentSecurityPolicy()
|
|
28536
28531
|
}
|
|
28537
28532
|
});
|
|
28538
28533
|
}
|
|
@@ -28561,6 +28556,26 @@ var redirectWith = (uri, params) => {
|
|
|
28561
28556
|
u.searchParams.set(k, v);
|
|
28562
28557
|
return new Response(null, { status: 302, headers: { Location: u.href } });
|
|
28563
28558
|
};
|
|
28559
|
+
function handoff(uri, params, heading, message) {
|
|
28560
|
+
const u = new URL(uri);
|
|
28561
|
+
for (const [k, v] of Object.entries(params))
|
|
28562
|
+
u.searchParams.set(k, v);
|
|
28563
|
+
const href = esc2(u.href);
|
|
28564
|
+
return new Response(shell(heading, `<div class="card">
|
|
28565
|
+
<div class="brand">${BRAND_MARK}<span class="brand-name">BrainLLM</span></div>
|
|
28566
|
+
<h1>${esc2(heading)}</h1>
|
|
28567
|
+
<p>${esc2(message)}</p>
|
|
28568
|
+
<p class="foot"><a href="${href}">Continue</a> if this page does not move on by itself.</p>
|
|
28569
|
+
</div>`, `
|
|
28570
|
+
<meta http-equiv="refresh" content="0;url=${href}">`), {
|
|
28571
|
+
status: 200,
|
|
28572
|
+
headers: {
|
|
28573
|
+
"Content-Type": "text/html; charset=utf-8",
|
|
28574
|
+
"Cache-Control": "no-store",
|
|
28575
|
+
"Content-Security-Policy": pageContentSecurityPolicy()
|
|
28576
|
+
}
|
|
28577
|
+
});
|
|
28578
|
+
}
|
|
28564
28579
|
var htmlError = (message, status = 400) => new Response(shell("Authorization error", `<div class="card">
|
|
28565
28580
|
<div class="brand">${BRAND_MARK}<span class="brand-name">BrainLLM</span></div>
|
|
28566
28581
|
<h1>Authorization error</h1>
|
|
@@ -28635,7 +28650,6 @@ async function handleAuthorize(req, base) {
|
|
|
28635
28650
|
transaction = issueConsentTransaction(request, base);
|
|
28636
28651
|
}
|
|
28637
28652
|
const { clientId, redirectUri, codeChallenge, state, resource, scope } = request;
|
|
28638
|
-
const fail = (error, description) => redirectWith(redirectUri, { error, error_description: description, iss: base, ...state ? { state } : {} });
|
|
28639
28653
|
let clientHost;
|
|
28640
28654
|
let verifiedHost = true;
|
|
28641
28655
|
try {
|
|
@@ -28648,7 +28662,7 @@ async function handleAuthorize(req, base) {
|
|
|
28648
28662
|
return consentResponse(transaction, redirectUri, clientHost, verifiedHost);
|
|
28649
28663
|
}
|
|
28650
28664
|
if (form.get("decision") !== "approve") {
|
|
28651
|
-
return
|
|
28665
|
+
return handoff(redirectUri, { error: "access_denied", error_description: "The owner denied the request.", iss: base, ...state ? { state } : {} }, "Access denied", `Nothing was authorized. Returning you to ${clientHost}.`);
|
|
28652
28666
|
}
|
|
28653
28667
|
if (!ownerPasswordMatches(form.get("password") ?? "")) {
|
|
28654
28668
|
return consentResponse(transaction, redirectUri, clientHost, verifiedHost, "Incorrect password.", 401);
|
|
@@ -28664,7 +28678,7 @@ async function handleAuthorize(req, base) {
|
|
|
28664
28678
|
expiresAt: Date.now() + AUTH_CODE_TTL_MS
|
|
28665
28679
|
};
|
|
28666
28680
|
saveStore();
|
|
28667
|
-
return
|
|
28681
|
+
return handoff(redirectUri, { code, iss: base, ...state ? { state } : {} }, "Authorized", `Returning you to ${clientHost}. You can close this window once it confirms the connection.`);
|
|
28668
28682
|
}
|
|
28669
28683
|
var tokenError = (error, description, status = 400) => new Response(JSON.stringify({ error, error_description: description }), {
|
|
28670
28684
|
status,
|
|
@@ -28829,7 +28843,7 @@ function createServer(origin = null) {
|
|
|
28829
28843
|
const s = new McpServer({
|
|
28830
28844
|
name: "BrainLLM",
|
|
28831
28845
|
title: "BrainLLM",
|
|
28832
|
-
version: "12.6.
|
|
28846
|
+
version: "12.6.4",
|
|
28833
28847
|
icons: brandingIcons(origin)
|
|
28834
28848
|
});
|
|
28835
28849
|
registerTools(s, trilium, brainRef);
|
package/manifest.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"manifest_version": "0.3",
|
|
3
3
|
"name": "brainllm",
|
|
4
4
|
"display_name": "BrainLLM",
|
|
5
|
-
"version": "12.6.
|
|
5
|
+
"version": "12.6.4",
|
|
6
6
|
"description": "Turns TriliumNext Notes into a persistent, graph-structured second brain for Claude and other LLM clients.",
|
|
7
7
|
"long_description": "BrainLLM is an MCP server that organises memory into five purpose-built areas (Master, LLM, Memory, Knowledge, Insights). The model supplies content while the server owns placement, format, lifecycle, dates and backups. Includes a full raw ETAPI surface for advanced use. Requires a running TriliumNext instance and the Bun runtime.",
|
|
8
8
|
"author": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "brainllm",
|
|
3
|
-
"version": "12.6.
|
|
3
|
+
"version": "12.6.4",
|
|
4
4
|
"mcpName": "io.github.miisodev/brainllm",
|
|
5
5
|
"description": "MCP server that turns TriliumNext Notes into a persistent, graph-structured second brain for Claude and other LLM clients.",
|
|
6
6
|
"author": "Kevin Miiso Novo <miisodev@gmail.com>",
|
package/server.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
|
|
3
3
|
"name": "io.github.miisodev/brainllm",
|
|
4
4
|
"description": "Persistent graph-structured memory for LLMs in TriliumNext Notes — readable and editable by humans.",
|
|
5
|
-
"version": "12.6.
|
|
5
|
+
"version": "12.6.4",
|
|
6
6
|
"websiteUrl": "https://github.com/miisodev/BrainLLM#readme",
|
|
7
7
|
"repository": {
|
|
8
8
|
"url": "https://github.com/miisodev/BrainLLM",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
{
|
|
13
13
|
"registryType": "npm",
|
|
14
14
|
"identifier": "brainllm",
|
|
15
|
-
"version": "12.6.
|
|
15
|
+
"version": "12.6.4",
|
|
16
16
|
"transport": {
|
|
17
17
|
"type": "stdio"
|
|
18
18
|
},
|