papersearch 0.8.0 → 0.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/NOTICE +1 -1
- package/README.fr.md +5 -8
- package/README.ja.md +5 -8
- package/README.ko.md +5 -8
- package/README.md +148 -151
- package/README.zh-Hant.md +5 -8
- package/README.zh.md +265 -0
- package/dist/capabilities/download/batch/batch.d.ts +4 -0
- package/dist/capabilities/download/batch/batch.d.ts.map +1 -1
- package/dist/capabilities/download/batch/batch.js +714 -198
- package/dist/capabilities/download/batch/batch.js.map +1 -1
- package/dist/capabilities/download/batch/windowPlan.d.ts +96 -0
- package/dist/capabilities/download/batch/windowPlan.d.ts.map +1 -0
- package/dist/capabilities/download/batch/windowPlan.js +196 -0
- package/dist/capabilities/download/batch/windowPlan.js.map +1 -0
- package/dist/capabilities/download/content/markdown/step.d.ts.map +1 -1
- package/dist/capabilities/download/content/markdown/step.js +4 -1
- package/dist/capabilities/download/content/markdown/step.js.map +1 -1
- package/dist/capabilities/download/content/pdf/open/tiers/scihub.d.ts.map +1 -1
- package/dist/capabilities/download/content/pdf/open/tiers/scihub.js +3 -1
- package/dist/capabilities/download/content/pdf/open/tiers/scihub.js.map +1 -1
- package/dist/infrastructure/http/hostGate.d.ts +24 -0
- package/dist/infrastructure/http/hostGate.d.ts.map +1 -0
- package/dist/infrastructure/http/hostGate.js +72 -0
- package/dist/infrastructure/http/hostGate.js.map +1 -0
- package/dist/infrastructure/pdf/PdfDownload.d.ts +1 -0
- package/dist/infrastructure/pdf/PdfDownload.d.ts.map +1 -1
- package/dist/infrastructure/pdf/PdfDownload.js +6 -1
- package/dist/infrastructure/pdf/PdfDownload.js.map +1 -1
- package/dist/infrastructure/runlog/RunLedger.d.ts +7 -0
- package/dist/infrastructure/runlog/RunLedger.d.ts.map +1 -1
- package/dist/infrastructure/runlog/RunLedger.js +17 -4
- package/dist/infrastructure/runlog/RunLedger.js.map +1 -1
- package/dist/infrastructure/school/SchoolMcpClient.d.ts +12 -2
- package/dist/infrastructure/school/SchoolMcpClient.d.ts.map +1 -1
- package/dist/infrastructure/school/SchoolMcpClient.js +122 -11
- package/dist/infrastructure/school/SchoolMcpClient.js.map +1 -1
- package/dist/infrastructure/school/SchoolReadiness.d.ts +7 -0
- package/dist/infrastructure/school/SchoolReadiness.d.ts.map +1 -1
- package/dist/infrastructure/school/SchoolReadiness.js +8 -0
- package/dist/infrastructure/school/SchoolReadiness.js.map +1 -1
- package/dist/infrastructure/school/index.d.ts +1 -1
- package/dist/infrastructure/school/index.d.ts.map +1 -1
- package/dist/infrastructure/school/types.d.ts +31 -1
- package/dist/infrastructure/school/types.d.ts.map +1 -1
- package/dist/infrastructure/school/types.js.map +1 -1
- package/dist/infrastructure/security/SecurityUtils.d.ts.map +1 -1
- package/dist/infrastructure/security/SecurityUtils.js +6 -2
- package/dist/infrastructure/security/SecurityUtils.js.map +1 -1
- package/dist/management/failures/index.d.ts.map +1 -1
- package/dist/management/failures/index.js +5 -2
- package/dist/management/failures/index.js.map +1 -1
- package/dist/management/school/autoUpdate.d.ts.map +1 -1
- package/dist/management/school/autoUpdate.js +9 -1
- package/dist/management/school/autoUpdate.js.map +1 -1
- package/dist/management/school/cliProgress.d.ts.map +1 -1
- package/dist/management/school/cliProgress.js +3 -1
- package/dist/management/school/cliProgress.js.map +1 -1
- package/package.json +2 -2
- package/school/paper_search_school/adapters/base.py +3 -0
- package/school/paper_search_school/adapters/optica/__init__.py +50 -4
- package/school/paper_search_school/adapters/platforms/atypon/__init__.py +4 -3
- package/school/paper_search_school/adapters/platforms/figshare/__init__.py +23 -4
- package/school/paper_search_school/assets/capsule.html +380 -41
- package/school/paper_search_school/assets/capsule_en.json +72 -4
- package/school/paper_search_school/assets/capsule_fr.json +72 -4
- package/school/paper_search_school/assets/capsule_ja.json +72 -4
- package/school/paper_search_school/assets/capsule_ko.json +72 -4
- package/school/paper_search_school/assets/capsule_zh-Hant.json +66 -3
- package/school/paper_search_school/browser/backend.py +125 -4
- package/school/paper_search_school/browser/batch_session.py +188 -7
- package/school/paper_search_school/browser/challenge/continuation.py +19 -1
- package/school/paper_search_school/browser/challenge/handlers/text_captcha.py +38 -10
- package/school/paper_search_school/browser/challenge/pro.py +24 -0
- package/school/paper_search_school/browser/challenge/services/solver.py +24 -4
- package/school/paper_search_school/browser/engine.py +4 -1
- package/school/paper_search_school/browser/user_turn.py +126 -0
- package/school/paper_search_school/browser/watchdog.py +213 -60
- package/school/paper_search_school/config.py +5 -0
- package/school/paper_search_school/engine/batch.py +9 -7
- package/school/paper_search_school/engine/batch_access.py +27 -7
- package/school/paper_search_school/engine/batch_capture.py +45 -13
- package/school/paper_search_school/engine/batch_institution.py +14 -0
- package/school/paper_search_school/engine/batch_login.py +177 -22
- package/school/paper_search_school/engine/batch_user.py +48 -3
- package/school/paper_search_school/engine/batch_waits.py +42 -2
- package/school/paper_search_school/engine/bridge.py +1 -2
- package/school/paper_search_school/engine/fulltext_page.py +10 -1
- package/school/paper_search_school/engine/supplements.py +7 -1
- package/school/paper_search_school/entitlements.py +28 -0
- package/school/paper_search_school/progress_capsule.py +33 -5
- package/school/paper_search_school/progress_reporter.py +189 -6
- package/school/paper_search_school/progress_view.py +142 -48
- package/school/paper_search_school/rate_limit.py +24 -1
- package/school/paper_search_school/school_login.py +170 -8
- package/school/paper_search_school/server.py +164 -19
- package/school/paper_search_school/user_settings.py +33 -4
- package/skills/paper-search/SKILL.md +1 -1
- package/skills/paper-search/references/browser-download.md +2 -2
- package/LICENSE-paper-search-mcp-nodejs +0 -24
- package/README.en.md +0 -268
|
@@ -23,12 +23,22 @@ _PAGE_LINKS = """() => {
|
|
|
23
23
|
const links = [...document.querySelectorAll('a[href], iframe[src]')]
|
|
24
24
|
.filter(a => !a.closest('[role="doc-bibliography"], [role="doc-biblioentry"], '
|
|
25
25
|
+ '#references, #bibliography, #articleReferences, .ref-list, .article-section__references'));
|
|
26
|
+
const said = (node) => (node.textContent || '').replace(/\\s+/g,' ').trim();
|
|
27
|
+
// The names the page's own list of its supplementary material gives, a part of its own under a
|
|
28
|
+
// "Supplementary Material" heading (Optica's table: "Supplement 1", "Visualization 1", 2026-11-26).
|
|
29
|
+
const listed = new Set();
|
|
30
|
+
for (const heading of document.querySelectorAll('h2, h3, h4')) {
|
|
31
|
+
const part = heading.parentElement;
|
|
32
|
+
if (part && /^supplementary materials?\\b/i.test(said(heading)) && part.querySelectorAll('h1, h2, h3, h4').length === 1) {
|
|
33
|
+
part.querySelectorAll('a').forEach(a => said(a) && listed.add(said(a).toLowerCase()));
|
|
34
|
+
}
|
|
35
|
+
}
|
|
26
36
|
return {
|
|
27
37
|
doi: document.querySelector('meta[name="citation_doi"]')?.content || '',
|
|
28
38
|
links: links.map(a => a.href || a.src),
|
|
29
39
|
labelled: links.filter(a => a.tagName === 'A' &&
|
|
30
|
-
/^(?:supplement(?:ary)?(?: (?:material|information|data|file|document))?|supporting information)\\s*\\d*$/i
|
|
31
|
-
.test((a
|
|
40
|
+
(/^(?:supplement(?:ary)?(?: (?:material|information|data|file|document))?|supporting information)\\s*\\d*$/i
|
|
41
|
+
.test(said(a)) || listed.has(said(a).toLowerCase()))).map(a => a.href)
|
|
32
42
|
};
|
|
33
43
|
}"""
|
|
34
44
|
|
|
@@ -78,11 +88,20 @@ def _belongs(data: dict, doi: str, *, labelled: bool = False) -> bool:
|
|
|
78
88
|
if isinstance(item, dict) and item.get("relation") == "IsSupplementTo"]
|
|
79
89
|
if parents:
|
|
80
90
|
return doi in parents
|
|
81
|
-
# Some publisher deposits omit the backlink. An explicit Supplement
|
|
82
|
-
# on the DOI-verified article
|
|
91
|
+
# Some publisher deposits omit the backlink (Optica's, all of them). An explicit Supplement
|
|
92
|
+
# link on the DOI-verified article, or one under a name its own supplementary list gives
|
|
93
|
+
# ("Visualization 1", a video), is then sufficient; a plain citation is not.
|
|
83
94
|
return labelled
|
|
84
95
|
|
|
85
96
|
|
|
97
|
+
def resources_linked(page: Any) -> bool:
|
|
98
|
+
"""Whether the page links a Figshare article or collection outside its references (a link to
|
|
99
|
+
Figshare's own pages, as Optica's menu has to its preprints, is none)."""
|
|
100
|
+
data = page.evaluate(_PAGE_LINKS)
|
|
101
|
+
links = data.get("links") if isinstance(data, dict) else None
|
|
102
|
+
return any(isinstance(url, str) and resource(url) for url in links or ())
|
|
103
|
+
|
|
104
|
+
|
|
86
105
|
def supplement_links(page: Any, doi: str, *, clock=time.monotonic, pause=time.sleep) -> list[SupplementLink] | None:
|
|
87
106
|
"""None means no Figshare route on this article; failures stay in the manifest.
|
|
88
107
|
A resource not shown to be this article's is set aside (``set_aside``)."""
|