papersearch 0.7.2 → 0.8.0
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/LICENSE-paper-search-mcp-nodejs +24 -0
- package/NOTICE +8 -37
- package/README.en.md +7 -3
- package/README.fr.md +268 -0
- package/README.ja.md +268 -0
- package/README.ko.md +268 -0
- package/README.md +7 -3
- package/README.zh-Hant.md +268 -0
- package/dist/capabilities/download/batch/batch.d.ts +16 -1
- package/dist/capabilities/download/batch/batch.d.ts.map +1 -1
- package/dist/capabilities/download/batch/batch.js +669 -53
- package/dist/capabilities/download/batch/batch.js.map +1 -1
- package/dist/capabilities/download/batch/batchFolder.d.ts.map +1 -1
- package/dist/capabilities/download/batch/batchFolder.js +4 -3
- package/dist/capabilities/download/batch/batchFolder.js.map +1 -1
- package/dist/capabilities/download/batch/batchSummary.js +1 -1
- package/dist/capabilities/download/batch/batchSummary.js.map +1 -1
- package/dist/capabilities/download/batch/networkLoss.d.ts +12 -3
- package/dist/capabilities/download/batch/networkLoss.d.ts.map +1 -1
- package/dist/capabilities/download/batch/networkLoss.js +25 -4
- package/dist/capabilities/download/batch/networkLoss.js.map +1 -1
- package/dist/capabilities/download/batch/resume.d.ts +7 -0
- package/dist/capabilities/download/batch/resume.d.ts.map +1 -1
- package/dist/capabilities/download/batch/resume.js +50 -9
- package/dist/capabilities/download/batch/resume.js.map +1 -1
- package/dist/capabilities/download/content/markdown/pro.d.ts +6 -0
- package/dist/capabilities/download/content/markdown/pro.d.ts.map +1 -1
- package/dist/capabilities/download/content/markdown/pro.js.map +1 -1
- package/dist/capabilities/download/content/markdown/shortfall.d.ts +8 -5
- package/dist/capabilities/download/content/markdown/shortfall.d.ts.map +1 -1
- package/dist/capabilities/download/content/markdown/shortfall.js +27 -15
- package/dist/capabilities/download/content/markdown/shortfall.js.map +1 -1
- package/dist/capabilities/download/content/markdown/step.d.ts +9 -0
- package/dist/capabilities/download/content/markdown/step.d.ts.map +1 -1
- package/dist/capabilities/download/content/markdown/step.js +42 -2
- package/dist/capabilities/download/content/markdown/step.js.map +1 -1
- package/dist/capabilities/download/content/markdown/types.d.ts +10 -1
- package/dist/capabilities/download/content/markdown/types.d.ts.map +1 -1
- package/dist/capabilities/download/handler.d.ts.map +1 -1
- package/dist/capabilities/download/handler.js +13 -5
- package/dist/capabilities/download/handler.js.map +1 -1
- package/dist/capabilities/download/outputLayout.d.ts.map +1 -1
- package/dist/capabilities/download/outputLayout.js +3 -1
- package/dist/capabilities/download/outputLayout.js.map +1 -1
- package/dist/capabilities/download/tools.js +2 -2
- package/dist/capabilities/download/tools.js.map +1 -1
- package/dist/capabilities/download/types.d.ts +9 -1
- package/dist/capabilities/download/types.d.ts.map +1 -1
- package/dist/cli.js +3 -1
- package/dist/cli.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 +13 -0
- package/dist/infrastructure/runlog/RunLedger.js.map +1 -1
- package/dist/infrastructure/runlog/failureClass.d.ts +17 -9
- package/dist/infrastructure/runlog/failureClass.d.ts.map +1 -1
- package/dist/infrastructure/runlog/failureClass.js +89 -56
- package/dist/infrastructure/runlog/failureClass.js.map +1 -1
- package/dist/infrastructure/school/SchoolAttempt.d.ts +11 -0
- package/dist/infrastructure/school/SchoolAttempt.d.ts.map +1 -1
- package/dist/infrastructure/school/SchoolAttempt.js +107 -59
- package/dist/infrastructure/school/SchoolAttempt.js.map +1 -1
- package/dist/infrastructure/school/SchoolMcpClient.d.ts +7 -2
- package/dist/infrastructure/school/SchoolMcpClient.d.ts.map +1 -1
- package/dist/infrastructure/school/SchoolMcpClient.js +30 -7
- package/dist/infrastructure/school/SchoolMcpClient.js.map +1 -1
- package/dist/infrastructure/school/SchoolProgress.d.ts +2 -0
- package/dist/infrastructure/school/SchoolProgress.d.ts.map +1 -1
- package/dist/infrastructure/school/SchoolProgress.js +2 -0
- package/dist/infrastructure/school/SchoolProgress.js.map +1 -1
- package/dist/infrastructure/school/SchoolReadiness.d.ts +2 -0
- package/dist/infrastructure/school/SchoolReadiness.d.ts.map +1 -1
- package/dist/infrastructure/school/SchoolReadiness.js +2 -0
- package/dist/infrastructure/school/SchoolReadiness.js.map +1 -1
- package/dist/infrastructure/school/SchoolResultNormalizer.d.ts.map +1 -1
- package/dist/infrastructure/school/SchoolResultNormalizer.js +4 -0
- package/dist/infrastructure/school/SchoolResultNormalizer.js.map +1 -1
- package/dist/infrastructure/school/index.d.ts +2 -2
- package/dist/infrastructure/school/index.d.ts.map +1 -1
- package/dist/infrastructure/school/index.js +1 -1
- package/dist/infrastructure/school/index.js.map +1 -1
- package/dist/infrastructure/school/types.d.ts +52 -3
- package/dist/infrastructure/school/types.d.ts.map +1 -1
- package/dist/infrastructure/school/types.js.map +1 -1
- package/dist/management/failures/index.d.ts +28 -2
- package/dist/management/failures/index.d.ts.map +1 -1
- package/dist/management/failures/index.js +83 -21
- package/dist/management/failures/index.js.map +1 -1
- package/package.json +7 -2
- package/school/NOTICE +3 -2
- package/school/paper_search_school/adapters/__init__.py +2 -0
- package/school/paper_search_school/adapters/aps/__init__.py +3 -6
- package/school/paper_search_school/adapters/base.py +18 -0
- package/school/paper_search_school/adapters/copernicus/__init__.py +2 -7
- package/school/paper_search_school/adapters/elsevier/__init__.py +50 -1
- package/school/paper_search_school/adapters/frontiers/__init__.py +41 -2
- package/school/paper_search_school/adapters/ieee/__init__.py +6 -4
- package/school/paper_search_school/adapters/iop/__init__.py +8 -0
- package/school/paper_search_school/adapters/jama/__init__.py +8 -0
- package/school/paper_search_school/adapters/lww/__init__.py +14 -6
- package/school/paper_search_school/adapters/mdpi/__init__.py +12 -7
- package/school/paper_search_school/adapters/neurology/__init__.py +5 -2
- package/school/paper_search_school/adapters/optica/__init__.py +2 -9
- package/school/paper_search_school/adapters/oup/__init__.py +27 -4
- package/school/paper_search_school/adapters/platforms/__init__.py +4 -1
- package/school/paper_search_school/adapters/platforms/atypon/__init__.py +8 -0
- package/school/paper_search_school/adapters/platforms/jstage/__init__.py +64 -0
- package/school/paper_search_school/adapters/sage/__init__.py +4 -1
- package/school/paper_search_school/adapters/thieme/__init__.py +6 -11
- package/school/paper_search_school/api_keys.py +63 -13
- package/school/paper_search_school/assets/api_keys.json +14 -0
- package/school/paper_search_school/assets/capsule.html +274 -158
- package/school/paper_search_school/assets/capsule_en.json +99 -98
- package/school/paper_search_school/assets/capsule_fr.json +100 -99
- package/school/paper_search_school/assets/capsule_ja.json +99 -98
- package/school/paper_search_school/assets/capsule_ko.json +99 -98
- package/school/paper_search_school/assets/capsule_zh-Hant.json +94 -97
- package/school/paper_search_school/browser/batch_session.py +1 -1
- package/school/paper_search_school/browser/challenge/__init__.py +12 -9
- package/school/paper_search_school/browser/challenge/continuation.py +65 -0
- package/school/paper_search_school/browser/challenge/handlers/__init__.py +1 -0
- package/school/paper_search_school/browser/challenge/handlers/aws_waf.py +260 -0
- package/school/paper_search_school/browser/challenge/handlers/recaptcha_hcaptcha.py +167 -0
- package/school/paper_search_school/browser/challenge/handlers/text_captcha.py +100 -0
- package/school/paper_search_school/browser/challenge/handlers/turnstile.py +174 -0
- package/school/paper_search_school/browser/challenge/kinds.py +203 -0
- package/school/paper_search_school/browser/challenge/local/__init__.py +1 -0
- package/school/paper_search_school/browser/challenge/{interaction.py → local/interaction.py} +94 -13
- package/school/paper_search_school/browser/challenge/{pointer.py → local/pointer.py} +2 -2
- package/school/paper_search_school/browser/challenge/local/prompt.py +283 -0
- package/school/paper_search_school/browser/challenge/local/submission.py +33 -0
- package/school/paper_search_school/browser/challenge/services/__init__.py +1 -0
- package/school/paper_search_school/browser/challenge/services/solver.py +272 -0
- package/school/paper_search_school/cli_config.py +10 -5
- package/school/paper_search_school/cold_start.py +22 -11
- package/school/paper_search_school/config.py +11 -10
- package/school/paper_search_school/download_diagnostics.py +7 -2
- package/school/paper_search_school/engine/access_rules.py +15 -5
- package/school/paper_search_school/engine/batch.py +55 -15
- package/school/paper_search_school/engine/batch_access.py +59 -21
- package/school/paper_search_school/engine/batch_capture.py +215 -18
- package/school/paper_search_school/engine/batch_common.py +3 -0
- package/school/paper_search_school/engine/batch_diagnostics.py +25 -5
- package/school/paper_search_school/engine/batch_institution.py +168 -32
- package/school/paper_search_school/engine/batch_login.py +223 -16
- package/school/paper_search_school/engine/batch_pdf_urls.py +38 -7
- package/school/paper_search_school/engine/batch_waits.py +179 -12
- package/school/paper_search_school/engine/bridge.py +44 -7
- package/school/paper_search_school/engine/fulltext_page.py +45 -7
- package/school/paper_search_school/engine/router.py +18 -2
- package/school/paper_search_school/entitlements.py +1 -1
- package/school/paper_search_school/orchestrator.py +44 -18
- package/school/paper_search_school/pdf_utils.py +25 -16
- package/school/paper_search_school/progress_capsule.py +36 -6
- package/school/paper_search_school/progress_reporter.py +71 -13
- package/school/paper_search_school/progress_view.py +64 -44
- package/school/paper_search_school/publishers/builtin/iop.json +2 -1
- package/school/paper_search_school/publishers/builtin/neurology.json +4 -2
- package/school/paper_search_school/publishers/builtin/sage.json +4 -2
- package/school/paper_search_school/publishers/builtin/thieme.json +3 -1
- package/school/paper_search_school/publishers/site.py +12 -4
- package/school/paper_search_school/school_switch.py +34 -52
- package/school/paper_search_school/school_test.py +1 -1
- package/school/paper_search_school/server.py +24 -11
- package/school/paper_search_school/user_settings.py +13 -0
- package/school/pyproject.toml +1 -0
- package/skills/paper-search/SKILL.md +107 -107
- package/skills/paper-search/references/browser-download.md +102 -101
- package/skills/paper-search/references/capability-routing.md +89 -89
- package/skills/paper-search/references/cli-contract.md +78 -78
- package/skills/paper-search/references/federation-support.md +172 -172
- package/skills/paper-search/references/management-layer.md +78 -78
- package/skills/paper-search/references/publisher-support.md +38 -38
- package/skills/paper-search/references/school-setup.md +56 -55
- package/skills/paper-search/references/setup.md +20 -20
- package/skills/paper-search/references/troubleshooting.md +12 -12
- package/school/paper_search_school/browser/challenge/prompt.py +0 -154
|
@@ -1,79 +1,79 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: paper-search
|
|
3
3
|
description: |
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
Literature work with the local paper-search command: search papers, verify DOI/PMID, full-text snippets, journal IF and quartiles, citations and references, download full texts and supplementary files.
|
|
5
|
+
Also for "start setup" and Chinese requests (找文献、查期刊、下载论文、请开始配置).
|
|
6
6
|
metadata:
|
|
7
|
-
version: "0.
|
|
7
|
+
version: "0.8.0"
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
-
#
|
|
10
|
+
# Literature search and download (paper-search)
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
You are an academic literature dispatcher. This is a routing Skill: it hands the user's intent to the `paper-search` command and guards the boundaries for evidence, keys and downloads; it holds no keys, cookies, accounts or download strategies.
|
|
13
13
|
|
|
14
|
-
##
|
|
14
|
+
## Reply to the user
|
|
15
15
|
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
16
|
+
- Reply in the language the user writes in. This Skill is written in English; quoted phrasings give only the meaning: say them in the user's language. The program's own messages and output may be in Chinese: say them in the user's language when you relay them. Keep paper titles, original sentences from papers, DOIs, journal names, commands and file paths as they are.
|
|
17
|
+
- Say only the result and the next step, in a few sentences; no tables when reporting installation or setup.
|
|
18
|
+
- Do not repeat install paths, version numbers, dependency counts, hashes or configuration details from command output; give them only when the user asks or when troubleshooting.
|
|
19
|
+
- Do only what the user asked and the steps this Skill names; do not run extra tests, look up package information or search through files.
|
|
20
20
|
|
|
21
|
-
##
|
|
21
|
+
## Overall flow
|
|
22
22
|
|
|
23
23
|
```text
|
|
24
|
-
|
|
24
|
+
The user's literature request
|
|
25
25
|
│
|
|
26
|
-
├─
|
|
27
|
-
│ paper-search search / run search_
|
|
28
|
-
│ └─
|
|
26
|
+
├─ Find papers, verify DOI/PMID → metadata_search
|
|
27
|
+
│ paper-search search / run search_* (Crossref, PubMed, OpenAlex, etc.)
|
|
28
|
+
│ └─ The user confirms the items and needs the full text → go to "Download" below
|
|
29
29
|
│
|
|
30
|
-
├─
|
|
31
|
-
│ run get_paper_citations
|
|
30
|
+
├─ Citing papers, references → citation_expansion
|
|
31
|
+
│ run get_paper_citations (OpenAlex) / get_paper_references (the publisher's Crossref list, or OpenAlex)
|
|
32
32
|
│
|
|
33
|
-
├─
|
|
34
|
-
│ journal-metrics
|
|
33
|
+
├─ Impact factor, quartiles → journal_metrics
|
|
34
|
+
│ journal-metrics (EasyScholar, needs EASYSCHOLAR_KEY)
|
|
35
35
|
│
|
|
36
|
-
├─
|
|
37
|
-
│ run search_semantic_snippets
|
|
36
|
+
├─ How Methods are written, parameters → body_snippet_search
|
|
37
|
+
│ run search_semantic_snippets (needs SEMANTIC_SCHOLAR_API_KEY)
|
|
38
38
|
│
|
|
39
|
-
└─
|
|
39
|
+
└─ Download full texts, supplementary files → pdf_discovery
|
|
40
40
|
download / run download_with_fallback / run download_batch
|
|
41
|
-
|
|
41
|
+
One download command tries, in order:
|
|
42
42
|
│
|
|
43
|
-
├─ ①
|
|
43
|
+
├─ ① Open download (available by default)
|
|
44
44
|
│ primary → direct_pdf_url → repositories → unpaywall → publisher_api
|
|
45
|
-
├─ ② Sci-Hub
|
|
46
|
-
├─ ③
|
|
47
|
-
│ entitled_access
|
|
48
|
-
│ →
|
|
49
|
-
│
|
|
45
|
+
├─ ② Sci-Hub fallback (on by default; useSciHub=false turns it off)
|
|
46
|
+
├─ ③ School download (school subscription downloads, installed on a computer with the user's consent; paper-search school install)
|
|
47
|
+
│ entitled_access: the browser opens the publisher's site → the program picks the school's federation and the school
|
|
48
|
+
│ → the user signs in to the school; the backend tries simple checks and asks for a manual takeover when needed → the program fetches the PDF
|
|
49
|
+
│ Supplementary files come only from this step: when ①② already got the PDF and supplementary files are wanted, they are fetched here on their own
|
|
50
50
|
│
|
|
51
|
-
├─ ④ arXiv
|
|
52
|
-
├─
|
|
53
|
-
└─
|
|
51
|
+
├─ ④ arXiv preprint as the last fallback: tried only when the published-version routes failed; you must tell the user version=preprint
|
|
52
|
+
├─ Every file a step gets is checked for identity (the DOI and title on the first page); once it passes it is saved and later steps are not tried
|
|
53
|
+
└─ Nothing obtained → paper-search failures --format text, and explain to the user by failure class
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
Management commands: doctor (health check), setup / config (configure keys), skills (sync the Skill), school (install, status, update, uninstall school subscription downloads)
|
|
56
56
|
```
|
|
57
57
|
|
|
58
|
-
##
|
|
58
|
+
## Which reference to read
|
|
59
59
|
|
|
60
|
-
|
|
|
60
|
+
| Task | Reference |
|
|
61
61
|
|---|---|
|
|
62
|
-
|
|
|
63
|
-
|
|
|
64
|
-
|
|
|
65
|
-
|
|
|
66
|
-
|
|
|
67
|
-
|
|
|
68
|
-
|
|
|
69
|
-
|
|
|
70
|
-
|
|
|
62
|
+
| Setup ("start setup", "请开始配置"): whether to install school subscription downloads, set the school, enter API keys, set the default download folder | `references/setup.md` |
|
|
63
|
+
| Install, update, health check (doctor), smoke test (smoke), Skill sync | `references/management-layer.md` |
|
|
64
|
+
| Choose the route among search, citation expansion, journal metrics, PDF retrieval and body snippet search; the open download channels; verifying a paper's identity | `references/capability-routing.md` |
|
|
65
|
+
| Check commands, `paper-search run` tool names, parameters and output formats | `references/cli-contract.md` |
|
|
66
|
+
| Search commands fail (command missing, key missing, rate limits, 0 results, Scholar verification page) | `references/troubleshooting.md` |
|
|
67
|
+
| School download: install or check the extension, set the school, choose the browser (Google Chrome / ego) | `references/school-setup.md` |
|
|
68
|
+
| School download: sign-in and verification, batches, the progress window, failure classes, supplementary files, confirming a download succeeded | `references/browser-download.md` |
|
|
69
|
+
| School download: whether a publisher or journal can give full texts and supplementary files; what to do when there is no school login route | `references/publisher-support.md` |
|
|
70
|
+
| School download: whether a school, country or region can use it (which academic identity federations are supported) | `references/federation-support.md` |
|
|
71
71
|
|
|
72
|
-
|
|
72
|
+
When a reference disagrees with the actual `paper-search --help` or `paper-search tools`, the actual command wins; tell the user the Skill needs updating.
|
|
73
73
|
|
|
74
|
-
##
|
|
74
|
+
## Quick self-check
|
|
75
75
|
|
|
76
|
-
|
|
76
|
+
On first use, when the environment is unclear, or when the user asks "what can I use now":
|
|
77
77
|
|
|
78
78
|
```bash
|
|
79
79
|
command -v paper-search
|
|
@@ -81,95 +81,95 @@ paper-search --version
|
|
|
81
81
|
paper-search doctor --pretty
|
|
82
82
|
```
|
|
83
83
|
|
|
84
|
-
`command -v paper-search`
|
|
84
|
+
When `command -v paper-search` finds no command, the user installed only this Skill: follow "When only the Skill is installed" in `references/management-layer.md`, and install the command only after the user agrees.
|
|
85
85
|
|
|
86
|
-
`paper-search --version`
|
|
86
|
+
When `paper-search --version` is older than the version in `metadata.version` at the top of this Skill, the command-line program needs updating: tell the user, ask whether to run `npm install -g papersearch@latest` now (in Windows PowerShell use `npm.cmd`), run it only after they agree, then carry on with the original task. Do the same when command output shows `PaperSearch update available` or "PaperSearch 有新版本……本机版本为……" (PaperSearch has a new version …; this computer has …).
|
|
87
87
|
|
|
88
|
-
|
|
88
|
+
For a readable report for the user, use `paper-search doctor --format text`. Right after you install it for the user, tell them in a sentence or two what they can use now and that they can say "start setup" when they need setup; install nothing else at this point. When the user came with a literature request, carry on with it after that.
|
|
89
89
|
|
|
90
|
-
###
|
|
90
|
+
### Setup ("start setup")
|
|
91
91
|
|
|
92
|
-
|
|
92
|
+
When the user says "start setup", "请开始配置" or "配置 PaperSearch" (set up PaperSearch), or wants to enter API keys, set the download folder or install school subscription downloads, **read `references/setup.md` first and follow its fixed flow**: ask one question at a time; first ask whether to use school subscription downloads, then take the matching route.
|
|
93
93
|
|
|
94
|
-
|
|
94
|
+
For updates, first tell apart updating the package itself and syncing the Skill; do not just run `skills update`; the steps are in the "Package update and capability setup" section of `references/management-layer.md`.
|
|
95
95
|
|
|
96
|
-
###
|
|
96
|
+
### Default download folder
|
|
97
97
|
|
|
98
|
-
|
|
98
|
+
When downloading, do not pass `savePath` / `--save-path`: files go to `DEFAULT_DOWNLOAD_PATH` automatically; pass it only when the user names another place for this download. Each download creates a `<YYYYMMDD-HHmmss>_PaperSearchDownload` folder in it, holding this download's papers; when telling the user the location, use the actual path in the download result. When `paper-search config get DEFAULT_DOWNLOAD_PATH` returns `configured` as `false`, first ask the user where to put it, as "Default download folder" in `references/setup.md` says, then download.
|
|
99
99
|
|
|
100
|
-
##
|
|
100
|
+
## Capability map
|
|
101
101
|
|
|
102
|
-
`paper-search update check --format text`
|
|
102
|
+
`paper-search update check --format text` checks for a new stable npm release. Update notices from everyday commands go to stderr and are not a failure of the literature task; you may pass on the suggestion, but do not run the upgrade without the user's permission. `paper-search config set PAPER_SEARCH_UPDATE_NOTIFY false` turns off the automatic check and notices; see `references/management-layer.md`.
|
|
103
103
|
|
|
104
|
-
|
|
104
|
+
This Skill has five literature capabilities; `doctor`, `smoke`, `config`, `skills`, `school` and `failures` are management and diagnostic commands.
|
|
105
105
|
|
|
106
|
-
|
|
|
106
|
+
| User intent | Capability | Preferred entry | Key boundary |
|
|
107
107
|
|---|---|---|---|
|
|
108
|
-
|
|
|
109
|
-
|
|
|
110
|
-
|
|
|
111
|
-
|
|
|
112
|
-
|
|
|
113
|
-
|
|
|
114
|
-
|
|
|
108
|
+
| Search papers, find related studies, verify DOI/PMID, first screening | `metadata_search` | `paper-search search` integrated entry / `paper-search run search_*` exact tool entry | Returns and verifies paper metadata only; Sci-Hub is not a search source |
|
|
109
|
+
| Citing papers or references of a known paper | `citation_expansion` | `paper-search run get_paper_citations` / `paper-search run get_paper_references` | Needs a known `paperId`, DOI or arXiv ID; not a keyword search |
|
|
110
|
+
| Impact factor, JCR/SSCI/CAS zones, JCI, ESI, warning lists, journal grades | `journal_metrics` | `paper-search journal-metrics` / `paper-search run query_journal_metrics` | Looks up journals, not papers; needs `EASYSCHOLAR_KEY` |
|
|
111
|
+
| Download the PDF of a confirmed paper | `pdf_discovery` | `paper-search download` / `paper-search run download_with_fallback` | Verify the paper's identity first; by default only open download is used; with school subscription downloads installed, the school's access comes last |
|
|
112
|
+
| Batch-download a set of confirmed papers (dozens or more, no upper limit) | `pdf_discovery` | `paper-search run download_batch` | One call; do not loop over single downloads yourself; when the school's access is used, read `references/browser-download.md` |
|
|
113
|
+
| Download supplementary files (appendices, Supporting Information) | `pdf_discovery` | `supplements` in the `content` of `download_with_fallback` / `download_batch` | Only the school download can fetch them; only some publishers have rules, see `references/publisher-support.md` |
|
|
114
|
+
| Find Methods, parameters and phrasing in body snippets | `body_snippet_search` | `paper-search run search_semantic_snippets` | Searches the Semantic Scholar open-access snippet index; needs `SEMANTIC_SCHOLAR_API_KEY`; not full-text parsing |
|
|
115
115
|
|
|
116
|
-
##
|
|
116
|
+
## Two ways to download
|
|
117
117
|
|
|
118
|
-
|
|
118
|
+
Open download works as soon as `paper-search` is installed. The school download (school subscription downloads) is installed only after the user agrees: once you have asked as `references/setup.md` says and the user agrees, run `paper-search school install --yes --skip-school`; when this computer has no Google Chrome, install Chrome first (say so when you ask). When it finishes, the settings window opens on its API key page; ask the user to enter keys and change the download folder in the window (see `references/school-setup.md`). On a server without a graphical interface, do not install it and do not ask.
|
|
119
119
|
|
|
120
|
-
|
|
121
|
-
-
|
|
122
|
-
-
|
|
120
|
+
In two cases, do not install it or bring it up; install it only when the user asks:
|
|
121
|
+
- The user said no: `paper-search config get PAPER_SEARCH_SCHOOL_DECLINED` is `true`. When the user says no, run `paper-search config set PAPER_SEARCH_SCHOOL_DECLINED true` to record it.
|
|
122
|
+
- This computer has no graphical interface (on Linux, no `DISPLAY` or `WAYLAND_DISPLAY`): the school login must happen in a visible browser, so it cannot be installed.
|
|
123
123
|
|
|
124
|
-
| |
|
|
124
|
+
| | Open download | School download (school subscription downloads) |
|
|
125
125
|
|---|---|---|
|
|
126
|
-
|
|
|
127
|
-
|
|
|
128
|
-
|
|
|
129
|
-
|
|
|
130
|
-
|
|
|
131
|
-
|
|
|
126
|
+
| Ready to use? | Works once `paper-search` is installed | Installed on a computer after the user agrees (`paper-search school install`); needs Google Chrome; not installed on servers |
|
|
127
|
+
| What it gets | Open-access full texts | Full texts the user's school subscribes to; supplementary files from publishers with rules |
|
|
128
|
+
| How | The program downloads directly, usually in seconds, with no sign-in: the source's own download, the PDF address in the metadata, PMC, Unpaywall, the publisher API (the user's own key); last, the Sci-Hub fallback, on by default (it is not open access; `useSciHub=false` turns it off) | Opens a browser, signs in to the school through its academic identity federation or OpenAthens, and fetches the PDF on the publisher's site; the user types the account and password; the backend tries simple checks and asks for a manual takeover when needed |
|
|
129
|
+
| Supplementary files | Not provided | From publishers with rules; see `references/publisher-support.md` |
|
|
130
|
+
| In the result | The successful step in `attempts[]` is `primary`, `direct_pdf_url`, `repositories`, `unpaywall`, `publisher_api` or `scihub` | The successful step is `entitled_access` |
|
|
131
|
+
| Reference | "PDF retrieval" in `references/capability-routing.md` | `references/school-setup.md`, `references/browser-download.md`, `references/publisher-support.md`, `references/federation-support.md` |
|
|
132
132
|
|
|
133
|
-
|
|
133
|
+
Both ways use the same download command; no separate calls: open download is tried first; when it gets nothing, the school's access is used only if the school download is enabled, and it is always the last step.
|
|
134
134
|
|
|
135
|
-
-
|
|
136
|
-
-
|
|
137
|
-
-
|
|
138
|
-
-
|
|
135
|
+
- When delivering, tell the user which way each file came from: open download, Sci-Hub, or the school download.
|
|
136
|
+
- When open download got nothing and the school download is not installed: tell the user the open channels did not find this paper. When you are not to bring up installing it (see above), mention only the publisher API key; otherwise say that if their school subscribes to it, there are two ways: install school subscription downloads (Google Chrome must be installed on this computer first); or, on the campus network, set a publisher API key, which works only for Elsevier (DOI starting with 10.1016) and Springer (10.1007) papers; the sign-up address and the command are in the hint of the `publisher_api` step in the download result. Ask for the user's consent before installing; never install on your own.
|
|
137
|
+
- Before using the school download, run `paper-search school status --format text` to confirm the extension is usable: it shows installed and enabled, or the "PaperSearch 配置" (PaperSearch config) line shows enabled with a backend path. The latter is a backend the user maintains (a development build, for example); its first line saying "未安装" (not installed) is normal: use it directly; do not install it again or change the path. `entitled_access` as `available` in `paper-search doctor` also means the backend works.
|
|
138
|
+
- The extension's own command `paper-search-school` is usually not on PATH after installation: when `command -v paper-search-school` finds nothing, call it by the full path after "后端" (backend) on the "PaperSearch 配置" line of the `school status` output, for example `<backend path> issues`, `<backend path> progress --json`.
|
|
139
139
|
|
|
140
|
-
##
|
|
140
|
+
## Default workflow
|
|
141
141
|
|
|
142
|
-
|
|
142
|
+
Open-ended literature tasks take two steps:
|
|
143
143
|
|
|
144
|
-
1.
|
|
145
|
-
2.
|
|
144
|
+
1. First `metadata_search`: search and verify title, authors, year, journal, DOI, PMID/PMCID, URL, abstract clues and relevance.
|
|
145
|
+
2. Only after the user confirms the items, or the task clearly needs PDFs, do `pdf_discovery`; record the reason for each failed item and do not let it block the others.
|
|
146
146
|
|
|
147
|
-
|
|
147
|
+
Direct download requests (the user gives a single DOI, PMID, PMCID or a verified list and clearly asks for a download) may skip the broad search: verify the target's identity first, then download.
|
|
148
148
|
|
|
149
|
-
|
|
149
|
+
Ask what is wanted before downloading: when the user has not said which contents they want, ask once before starting (only once for a batch too). The two contents are each fetched on their own; one or both can be wanted (`"pdf,supplements"`):
|
|
150
150
|
|
|
151
|
-
- `pdf
|
|
152
|
-
- `supplements
|
|
151
|
+
- `pdf`: the full-text PDF (the default when `content` is not given);
|
|
152
|
+
- `supplements`: supplementary files;
|
|
153
153
|
|
|
154
|
-
|
|
154
|
+
When asking, also say that only some publishers support supplementary files; see `references/publisher-support.md`. Do not ask again about what the user has already said. When the school download is not enabled, only open download is used: supplementary files cannot be fetched; when the user wants supplementary files, tell them these need school subscription downloads (`references/school-setup.md`); when the user said they will not install it, only say this and do not urge them to install.
|
|
155
155
|
|
|
156
|
-
|
|
156
|
+
For dozens of papers or more (no upper limit), use one `download_batch`; do not loop over single downloads yourself. Give a batch `folderName`, named for what it holds: a journal's papers get the journal abbreviation plus years, the same abbreviation that begins each paper's folder (the NLM abbreviation, e.g. `Osteoarthritis Cartilage_2024-2026`), not initials you make up; a topic search gets the topic words plus years; do not use the default time-stamped folder. It is created in the download folder (or `savePath`); see "Download results" below. After the download ends, run `paper-search failures --format text` and explain to the user by failure class. When something needs reporting to the maintainers, export a copy with `paper-search failures --export ./failure-report.zip` and first go through the public-check list in the package; see `references/browser-download.md`. Never upload anything or open an issue automatically.
|
|
157
157
|
|
|
158
|
-
##
|
|
158
|
+
## Core rules
|
|
159
159
|
|
|
160
|
-
-
|
|
161
|
-
-
|
|
162
|
-
-
|
|
163
|
-
-
|
|
164
|
-
-
|
|
165
|
-
-
|
|
166
|
-
-
|
|
167
|
-
-
|
|
160
|
+
- Do not make up PMIDs, DOIs, journals, years or authors from model memory; verify key papers as `references/capability-routing.md` says before giving them.
|
|
161
|
+
- The PMID, DOI, title, first author and year of one paper should agree; when they do not, mark it as doubtful.
|
|
162
|
+
- The school login, two-factor checks and complex CAPTCHAs are done by the user in the download browser; on each verification wait the backend tries clicking a recognizable Turnstile checkbox at most 2 times, and asks the user only when a person is still needed. The user types the account and password on the login page; never ask the user for their account or password.
|
|
163
|
+
- For test downloads, use `paper-search download` or `paper-search run download_batch`, keeping the default wait times and data directory.
|
|
164
|
+
- When the user wants to sign in to the school first, or to try whether sign-in works, run `paper-search school login --doi <DOI of an article the school subscribes to>` (see `references/school-setup.md`): only a reply with `success: true` means sign-in succeeded. The program manages the download browser and its profile directory; do not dig through the source code for another way to sign in.
|
|
165
|
+
- The download result is the command's final return and the files actually saved; each file counts as a success only after its identity is checked (the DOI and title on the first page); give the actual file paths when delivering.
|
|
166
|
+
- "No access" needs evidence; never call a failure with an unknown cause "no access".
|
|
167
|
+
- The publisher support table says whether the program can work through that kind of site, not whether the user's school subscribes to a journal.
|
|
168
168
|
|
|
169
|
-
##
|
|
169
|
+
## Not part of this Skill
|
|
170
170
|
|
|
171
|
-
-
|
|
172
|
-
-
|
|
173
|
-
-
|
|
171
|
+
- Managing Zotero, Obsidian or other reference libraries.
|
|
172
|
+
- Writing paper text or polishing language.
|
|
173
|
+
- Writing API keys, tokens or cookies into the Skill, the README or replies.
|
|
174
174
|
|
|
175
|
-
|
|
175
|
+
Download results are in this download's folder inside the download folder (`savePath`, or `DEFAULT_DOWNLOAD_PATH` when it is not passed): the `folderName` given to a batch, otherwise a new `<YYYYMMDD-HHmmss>_PaperSearchDownload/`. PDFs go straight into it; a paper with supplementary files gets its own folder (the full text, `supplements/`). A batch folder also has `_run/`: `batch-args.json` (what this batch is to download), `batch.log` (progress), one subfolder of details per run ("go on" (接着下) runs included), and `article_index.csv` (each paper's result: PDF, source, supplementary files, failure reason, folder, with paths from the batch folder), updated as the download runs; when reporting, you can ask the user to open this list. Diagnostic records and screenshots of papers that had problems are in `diagnostics/` of the run-log directory that the result's `runLog` points to (they may contain sign-in information: do not send them to others; they are deleted after 30 days). Full texts are named "journal abbreviation_year-month_title"; attachments keep their original names; use the actual `path` / `supplements[].file` in the result; do not build DOI file names yourself. Names that are too long are shortened; the full title is in the result.
|