paper-search-cli 0.2.0 → 0.3.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/.env.example +2 -6
- package/README.md +149 -653
- package/README.zh.md +270 -0
- package/dist/cli.js +184 -21
- package/dist/cli.js.map +1 -1
- package/dist/config/ConfigService.d.ts +1 -1
- package/dist/config/ConfigService.d.ts.map +1 -1
- package/dist/config/ConfigService.js +1 -3
- package/dist/config/ConfigService.js.map +1 -1
- package/dist/config/ResultCaps.d.ts +4 -0
- package/dist/config/ResultCaps.d.ts.map +1 -0
- package/dist/config/ResultCaps.js +10 -0
- package/dist/config/ResultCaps.js.map +1 -0
- package/dist/core/capabilityProfile.d.ts +18 -0
- package/dist/core/capabilityProfile.d.ts.map +1 -0
- package/dist/core/capabilityProfile.js +167 -0
- package/dist/core/capabilityProfile.js.map +1 -0
- package/dist/core/diagnostics.js +16 -16
- package/dist/core/diagnostics.js.map +1 -1
- package/dist/core/handleToolCall.d.ts.map +1 -1
- package/dist/core/handleToolCall.js +33 -0
- package/dist/core/handleToolCall.js.map +1 -1
- package/dist/core/liveSmoke.d.ts +42 -0
- package/dist/core/liveSmoke.d.ts.map +1 -0
- package/dist/core/liveSmoke.js +226 -0
- package/dist/core/liveSmoke.js.map +1 -0
- package/dist/core/platformMetadata.js +2 -2
- package/dist/core/platformMetadata.js.map +1 -1
- package/dist/core/schemas.d.ts +77 -2
- package/dist/core/schemas.d.ts.map +1 -1
- package/dist/core/schemas.js +58 -3
- package/dist/core/schemas.js.map +1 -1
- package/dist/core/textReports.d.ts +21 -0
- package/dist/core/textReports.d.ts.map +1 -0
- package/dist/core/textReports.js +85 -0
- package/dist/core/textReports.js.map +1 -0
- package/dist/core/tools.d.ts.map +1 -1
- package/dist/core/tools.js +60 -1
- package/dist/core/tools.js.map +1 -1
- package/dist/platforms/BioRxivSearcher.d.ts.map +1 -1
- package/dist/platforms/BioRxivSearcher.js +40 -21
- package/dist/platforms/BioRxivSearcher.js.map +1 -1
- package/dist/platforms/CORESearcher.d.ts.map +1 -1
- package/dist/platforms/CORESearcher.js +39 -9
- package/dist/platforms/CORESearcher.js.map +1 -1
- package/dist/platforms/GoogleScholarSearcher.d.ts.map +1 -1
- package/dist/platforms/GoogleScholarSearcher.js +3 -2
- package/dist/platforms/GoogleScholarSearcher.js.map +1 -1
- package/dist/platforms/OpenAIRESearcher.js +1 -1
- package/dist/platforms/OpenAIRESearcher.js.map +1 -1
- package/dist/services/CitationService.d.ts.map +1 -1
- package/dist/services/CitationService.js +8 -2
- package/dist/services/CitationService.js.map +1 -1
- package/dist/services/JournalMetricsService.js +1 -1
- package/dist/services/JournalMetricsService.js.map +1 -1
- package/dist/services/OpenAccessFallbackService.d.ts +20 -0
- package/dist/services/OpenAccessFallbackService.d.ts.map +1 -1
- package/dist/services/OpenAccessFallbackService.js +95 -72
- package/dist/services/OpenAccessFallbackService.js.map +1 -1
- package/dist/skills/SkillInstaller.d.ts +108 -0
- package/dist/skills/SkillInstaller.d.ts.map +1 -0
- package/dist/skills/SkillInstaller.js +389 -0
- package/dist/skills/SkillInstaller.js.map +1 -0
- package/dist/utils/RateLimiter.d.ts.map +1 -1
- package/dist/utils/RateLimiter.js +7 -0
- package/dist/utils/RateLimiter.js.map +1 -1
- package/package.json +2 -2
- package/skills/paper-search/SKILL.md +52 -143
- package/skills/paper-search/references/capability-routing.md +147 -0
- package/skills/paper-search/references/cli-contract.md +152 -0
- package/skills/paper-search/references/management-layer.md +140 -0
- package/README-sc.md +0 -766
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
# Management Layer Reference
|
|
2
|
+
|
|
3
|
+
Use this reference when checking whether `paper-search` is installed, configured, healthy, and synchronized with the installed agent Skill. These commands help the agent decide readiness; they do not perform literature tasks.
|
|
4
|
+
|
|
5
|
+
## Management Commands
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
paper-search doctor --pretty
|
|
9
|
+
paper-search doctor --format text
|
|
10
|
+
paper-search smoke --mock --pretty
|
|
11
|
+
paper-search smoke --live --pretty
|
|
12
|
+
paper-search skills status --pretty
|
|
13
|
+
paper-search skills diff --targets agents --format text
|
|
14
|
+
paper-search skills update --targets agents --pretty
|
|
15
|
+
paper-search tools --pretty
|
|
16
|
+
paper-search config list --pretty
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
| Command | Purpose | Use When |
|
|
20
|
+
|---|---|---|
|
|
21
|
+
| `paper-search doctor --pretty` | Complete health report: masked config, Capability Profile, platform status, and missing items | First use, uncertain environment, or user asks what capabilities are available |
|
|
22
|
+
| `paper-search doctor --format text` | Human-readable health report | You need to summarize health for the user |
|
|
23
|
+
| `paper-search smoke --mock --pretty` | Offline check of CLI wiring, Capability Profile logic, and Skill sync status logic | After code/install changes, or when network is unavailable |
|
|
24
|
+
| `paper-search smoke --live --pretty` | Small real checks of free metadata, configured key-backed capabilities, and Sci-Hub mirror availability | User asks for local live verification or provider/network issues are suspected |
|
|
25
|
+
| `paper-search skills status --pretty` | Shows whether Installed Skill files match the Bundled Skill | Install/update checks or debugging why an agent reads old Skill text |
|
|
26
|
+
| `paper-search skills diff --targets agents --format text` | Previews managed-file diffs between Bundled Skill and Installed Skill | Before updating Skill files |
|
|
27
|
+
| `paper-search skills update --targets agents --pretty` | Syncs package-managed Skill files into the user Skill directory while preserving Extra Skill Files | After the user confirms Skill update |
|
|
28
|
+
| `paper-search tools --pretty` | Lists `paper-search run` tool names and argument schemas | Unsure about exact tool name or arguments |
|
|
29
|
+
| `paper-search config list --pretty` | Shows masked configuration status | Need to confirm whether key/email/caps are configured |
|
|
30
|
+
|
|
31
|
+
## Doctor
|
|
32
|
+
|
|
33
|
+
`paper-search doctor` is the main health report. It combines masked configuration, Capability Profile, and platform status.
|
|
34
|
+
|
|
35
|
+
Capability Profile entries are independent workflow capabilities:
|
|
36
|
+
|
|
37
|
+
- `metadata_search`: metadata search through configured/free literature sources. Sci-Hub must not be included in metadata search.
|
|
38
|
+
- `citation_expansion`: citation and reference expansion for a known paper through Semantic Scholar Graph API. `SEMANTIC_SCHOLAR_API_KEY` is optional for higher quota.
|
|
39
|
+
- `body_snippet_search`: Semantic Scholar Open Access snippet search. It requires `SEMANTIC_SCHOLAR_API_KEY`.
|
|
40
|
+
- `journal_metrics`: EasyScholar journal metrics. It requires `EASYSCHOLAR_KEY`.
|
|
41
|
+
- `pdf_discovery`: PDF discovery and download through source-native download, metadata PDF URLs, open-access sources, entitled-access sources when configured, and the default enabled Sci-Hub Fallback.
|
|
42
|
+
- `entitled_access`: user-specific access rights such as publisher API keys, database keys, TDM tokens, or institutional entitlements.
|
|
43
|
+
|
|
44
|
+
Use JSON output for agent decisions. Use `--format text` only when the user needs a readable report.
|
|
45
|
+
|
|
46
|
+
## Smoke
|
|
47
|
+
|
|
48
|
+
`paper-search smoke --mock` is offline and should pass without provider keys.
|
|
49
|
+
|
|
50
|
+
`paper-search smoke --live` performs small real checks:
|
|
51
|
+
|
|
52
|
+
- free metadata check always runs
|
|
53
|
+
- Sci-Hub mirror availability is checked by default without downloading PDFs
|
|
54
|
+
- configured key-backed capabilities get lightweight checks
|
|
55
|
+
- unconfigured key-backed capabilities are marked `skipped`
|
|
56
|
+
|
|
57
|
+
Live smoke severity:
|
|
58
|
+
|
|
59
|
+
- `critical` failures make the command fail.
|
|
60
|
+
- `degraded` means a configured or default-enabled capability did not work as expected and must include remediation, but it is not the same as whole-tool failure.
|
|
61
|
+
- `warning` and `skipped` are informational.
|
|
62
|
+
|
|
63
|
+
When reporting live smoke results, include any `message` and `remediation` for degraded cases.
|
|
64
|
+
|
|
65
|
+
## Skill Sync
|
|
66
|
+
|
|
67
|
+
The npm package ships a Bundled Skill under `skills/paper-search`. Installing or updating user-visible Skill files is explicit.
|
|
68
|
+
|
|
69
|
+
Supported targets:
|
|
70
|
+
|
|
71
|
+
- `agents`
|
|
72
|
+
- `codex`
|
|
73
|
+
- `claude`
|
|
74
|
+
- `cursor`
|
|
75
|
+
- `gemini`
|
|
76
|
+
- `antigravity`
|
|
77
|
+
|
|
78
|
+
Routine sync after package updates:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
paper-search skills status --targets agents --pretty
|
|
82
|
+
paper-search skills diff --targets agents --format text
|
|
83
|
+
paper-search skills update --targets agents --pretty
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
`skills update` overwrites package-managed files and preserves Extra Skill Files. `skills diff` may show diffs only for Managed Skill Files; extra files are listed by name only.
|
|
87
|
+
|
|
88
|
+
## Package Update And Capability Setup
|
|
89
|
+
|
|
90
|
+
`skills update` only syncs Bundled Skill files into the selected Installed Skill directory. It does not update the npm package, GitHub checkout, compiled CLI files, or provider configuration.
|
|
91
|
+
|
|
92
|
+
`paper-search setup` only configures keys, email, and install destinations for the currently installed CLI. It does not update the package body.
|
|
93
|
+
|
|
94
|
+
Ordinary user update path:
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
npm install -g paper-search-cli@latest
|
|
98
|
+
paper-search skills update --targets agents --pretty
|
|
99
|
+
paper-search doctor --pretty
|
|
100
|
+
paper-search setup
|
|
101
|
+
paper-search smoke --mock --pretty
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Use `doctor` before or after `setup` to inspect the Capability Profile. Missing, unavailable, or degraded capability entries should tell the agent which key, email, source, or environment item the user needs to configure.
|
|
105
|
+
|
|
106
|
+
Maintainer or local-dev update path:
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
git pull
|
|
110
|
+
npm install
|
|
111
|
+
npm run build
|
|
112
|
+
npm install -g .
|
|
113
|
+
paper-search skills update --targets agents --pretty
|
|
114
|
+
paper-search doctor --pretty
|
|
115
|
+
paper-search setup
|
|
116
|
+
paper-search smoke --mock --pretty
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Use the local-dev path when validating this repository checkout before publishing or before installing a local build globally.
|
|
120
|
+
|
|
121
|
+
## Configuration Checks
|
|
122
|
+
|
|
123
|
+
Configuration sources, in priority order:
|
|
124
|
+
|
|
125
|
+
1. Shell environment variables
|
|
126
|
+
2. Current directory `.env`
|
|
127
|
+
3. User config file under `~/.config/paper-search-cli/config.json`
|
|
128
|
+
4. Free-source built-in defaults
|
|
129
|
+
|
|
130
|
+
Useful commands:
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
paper-search setup
|
|
134
|
+
paper-search config list --pretty
|
|
135
|
+
paper-search config get SEMANTIC_SCHOLAR_API_KEY --pretty
|
|
136
|
+
paper-search config get EASYSCHOLAR_KEY --pretty
|
|
137
|
+
paper-search doctor --pretty
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Do not ask users to paste secrets into chat. Do not write secrets into Skill, README, tests, or logs. `doctor` and `config` output should mask configured secret values.
|