fh-library 0.2.19 → 0.2.20
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 +5 -0
- package/README.md +1 -1
- package/dist/index.js +20 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# FH Library — Change Log
|
|
2
2
|
|
|
3
|
+
### v0.2.20 — 2026-11-09
|
|
4
|
+
|
|
5
|
+
* **`library_verify` without the reference list:** the decision model no longer gets the paper's References / Bibliography section — other papers' titles, which state nothing this paper found and could pass a claim on a cited title; 22.7% less text per full text (96 full texts measured). The stored text and `library_read` keep it.
|
|
6
|
+
* **Less noise to the decision model:** a paper's citation line (authors, journal, PMID, DOI) is sent as its year only — 9.8% of an abstract.
|
|
7
|
+
|
|
3
8
|
### v0.2.19 — 2026-11-09
|
|
4
9
|
|
|
5
10
|
* **Faster full texts:** a browser rung (or Bright Data) that met the same site's challenge twice in a row is skipped for that site for `FH_LIBRARY_RETRY_AFTER_DAYS` — the other rungs still run, a success clears it; the open-access lookups (Europe PMC, Crossref, Unpaywall, OpenAlex) start together instead of one after the other, the downloads stay in tier order.
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-

|
|
2
2
|

|
|
3
3
|
[_2026-Forever_Healthy-573D7D.svg)](https://forever-healthy.org)
|
|
4
4
|
[](https://www.npmjs.com/package/fh-library)
|
package/dist/index.js
CHANGED
|
@@ -3113,7 +3113,26 @@ function isLocal(baseUrl) {
|
|
|
3113
3113
|
}
|
|
3114
3114
|
}
|
|
3115
3115
|
function cleanMarkdown(md) {
|
|
3116
|
-
return md.replace(/!\[[^\]]*\]\([^)]*\)/g, "").replace(/\]\([^)]*\)/g, "]").replace(/^\s*#+\s*(see more about|more for you|back to top)\b.*$/gim, "").replace(/\n{3,}/g, "\n\n");
|
|
3116
|
+
return paperYearOnly(dropReferences(md)).replace(/!\[[^\]]*\]\([^)]*\)/g, "").replace(/\]\([^)]*\)/g, "]").replace(/^\s*#+\s*(see more about|more for you|back to top)\b.*$/gim, "").replace(/\n{3,}/g, "\n\n");
|
|
3117
|
+
}
|
|
3118
|
+
var REF_HEAD = /^(#{1,6})\s*\**\s*(references|bibliography|literature cited|reference list|works cited|cited literature)\b[^\n]*$|^\**(references|bibliography|literature cited)\**:?[ \t]*$/gim;
|
|
3119
|
+
function dropReferences(md) {
|
|
3120
|
+
let out = md;
|
|
3121
|
+
for (; ; ) {
|
|
3122
|
+
REF_HEAD.lastIndex = 0;
|
|
3123
|
+
const m = REF_HEAD.exec(out);
|
|
3124
|
+
if (!m) return out;
|
|
3125
|
+
const level = m[1]?.length ?? 6;
|
|
3126
|
+
const rest = out.slice(m.index + m[0].length);
|
|
3127
|
+
const next = new RegExp(`^#{1,${level}}\\s`, "m").exec(rest);
|
|
3128
|
+
out = out.slice(0, m.index) + (next ? rest.slice(next.index) : "");
|
|
3129
|
+
}
|
|
3130
|
+
}
|
|
3131
|
+
function paperYearOnly(md) {
|
|
3132
|
+
return md.replace(/^(#[^\n]*\n\n)([^\n]*· (?:PMID \d+|DOI 10\.)[^\n]*)$/m, (_, title, line) => {
|
|
3133
|
+
const year = / · (\d{4})(?: · |$)/.exec(line)?.[1];
|
|
3134
|
+
return year ? `${title}${year}` : title.trimEnd();
|
|
3135
|
+
});
|
|
3117
3136
|
}
|
|
3118
3137
|
function windows(md, max) {
|
|
3119
3138
|
const out = [];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fh-library",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.20",
|
|
4
4
|
"mcpName": "io.github.forever-healthy/fh-library",
|
|
5
5
|
"description": "MCP Server that builds a local Markdown library of the scientific papers cited by evidence reviews — fetches metadata, abstract and full text per PubMed ID through a configurable cascade of retrieval services",
|
|
6
6
|
"type": "module",
|