ai4scholar 0.3.0 → 0.3.2
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 +144 -82
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -15
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/src/services/auto-updater.d.ts +0 -15
- package/dist/src/services/auto-updater.d.ts.map +0 -1
- package/dist/src/services/auto-updater.js +0 -153
- package/dist/src/services/auto-updater.js.map +0 -1
package/README.md
CHANGED
|
@@ -6,24 +6,97 @@ Powered by [ai4scholar.net](https://ai4scholar.net).
|
|
|
6
6
|
|
|
7
7
|
## What It Does
|
|
8
8
|
|
|
9
|
-
AI4Scholar gives OpenClaw direct access to 6 academic platforms through
|
|
10
|
-
|
|
11
|
-
### Platforms
|
|
12
|
-
|
|
13
|
-
| Platform |
|
|
14
|
-
|
|
15
|
-
| **Semantic Scholar** |
|
|
16
|
-
| **PubMed** |
|
|
17
|
-
| **Google Scholar** |
|
|
18
|
-
| **arXiv** |
|
|
19
|
-
| **bioRxiv** |
|
|
20
|
-
| **medRxiv** |
|
|
9
|
+
AI4Scholar gives your OpenClaw agent direct access to **6 academic platforms** through **35 built-in tools**, plus 2 agent skills for literature surveys and automatic citation annotation.
|
|
10
|
+
|
|
11
|
+
### Platforms
|
|
12
|
+
|
|
13
|
+
| Platform | Coverage |
|
|
14
|
+
|----------|----------|
|
|
15
|
+
| **Semantic Scholar** | 200M+ papers across all fields |
|
|
16
|
+
| **PubMed** | Biomedical & life sciences |
|
|
17
|
+
| **Google Scholar** | Broad academic search |
|
|
18
|
+
| **arXiv** | Physics, CS, math, biology preprints |
|
|
19
|
+
| **bioRxiv** | Biology preprints |
|
|
20
|
+
| **medRxiv** | Health sciences preprints |
|
|
21
|
+
|
|
22
|
+
### Tools (35)
|
|
23
|
+
|
|
24
|
+
**Search (9)**
|
|
25
|
+
|
|
26
|
+
| Tool | Platform | Description |
|
|
27
|
+
|------|----------|-------------|
|
|
28
|
+
| `search_semantic` | Semantic Scholar | Search papers with year filtering |
|
|
29
|
+
| `search_pubmed` | PubMed | Biomedical papers, date range + sorting |
|
|
30
|
+
| `search_google_scholar` | Google Scholar | Broad academic search via ai4scholar proxy |
|
|
31
|
+
| `search_arxiv` | arXiv | Preprints search |
|
|
32
|
+
| `search_biorxiv` | bioRxiv | Biology preprints by category + date |
|
|
33
|
+
| `search_medrxiv` | medRxiv | Health preprints by category + date |
|
|
34
|
+
| `search_semantic_snippets` | Semantic Scholar | Full-text snippet search (~500 word excerpts) |
|
|
35
|
+
| `search_semantic_bulk` | Semantic Scholar | Bulk search, up to 1000 results with pagination |
|
|
36
|
+
| `search_semantic_paper_match` | Semantic Scholar | Exact title matching |
|
|
37
|
+
|
|
38
|
+
**Paper Details & Batch (4)**
|
|
39
|
+
|
|
40
|
+
| Tool | Description |
|
|
41
|
+
|------|-------------|
|
|
42
|
+
| `get_semantic_paper_detail` | Paper metadata by ID (DOI, arXiv ID, PMID, etc.) |
|
|
43
|
+
| `get_pubmed_paper_detail` | PubMed paper metadata by PMID |
|
|
44
|
+
| `get_semantic_paper_batch` | Batch paper details (up to 500) |
|
|
45
|
+
| `get_pubmed_paper_batch` | Batch PubMed details |
|
|
46
|
+
|
|
47
|
+
**Citations & References (4)**
|
|
48
|
+
|
|
49
|
+
| Tool | Description |
|
|
50
|
+
|------|-------------|
|
|
51
|
+
| `get_semantic_citations` | Papers citing the given paper |
|
|
52
|
+
| `get_semantic_references` | Papers referenced by the given paper |
|
|
53
|
+
| `get_pubmed_citations` | PubMed citation lookup |
|
|
54
|
+
| `get_pubmed_related` | PubMed related papers |
|
|
55
|
+
|
|
56
|
+
**Authors (5)**
|
|
57
|
+
|
|
58
|
+
| Tool | Description |
|
|
59
|
+
|------|-------------|
|
|
60
|
+
| `search_semantic_authors` | Search authors by name |
|
|
61
|
+
| `get_semantic_author_detail` | Author profile (h-index, papers, citations) |
|
|
62
|
+
| `get_semantic_author_papers` | All papers by an author |
|
|
63
|
+
| `get_semantic_author_batch` | Batch author details (up to 1000) |
|
|
64
|
+
| `get_semantic_paper_authors` | All authors of a paper |
|
|
65
|
+
|
|
66
|
+
**Recommendations (2)**
|
|
67
|
+
|
|
68
|
+
| Tool | Description |
|
|
69
|
+
|------|-------------|
|
|
70
|
+
| `get_semantic_recommendations` | Recommend papers from positive/negative examples |
|
|
71
|
+
| `get_semantic_recommendations_for_paper` | Similar papers for a single paper |
|
|
72
|
+
|
|
73
|
+
**PDF Download & Full-Text Reading (10)**
|
|
74
|
+
|
|
75
|
+
| Tool | Description |
|
|
76
|
+
|------|-------------|
|
|
77
|
+
| `download_semantic` | Open access PDF URL from Semantic Scholar |
|
|
78
|
+
| `read_semantic_paper` | Download + extract full text (Semantic Scholar) |
|
|
79
|
+
| `download_arxiv` | arXiv PDF URL |
|
|
80
|
+
| `read_arxiv_paper` | Download + extract full text (arXiv) |
|
|
81
|
+
| `download_biorxiv` | bioRxiv PDF URL |
|
|
82
|
+
| `download_medrxiv` | medRxiv PDF URL |
|
|
83
|
+
| `read_biorxiv_paper` | Download + extract full text (bioRxiv) |
|
|
84
|
+
| `read_medrxiv_paper` | Download + extract full text (medRxiv) |
|
|
85
|
+
| `download_by_doi` | Download PDF by DOI (supports institutional access) |
|
|
86
|
+
| `read_by_doi` | Download + extract full text by DOI |
|
|
87
|
+
|
|
88
|
+
**Quality Evaluation (1)**
|
|
89
|
+
|
|
90
|
+
| Tool | Description |
|
|
91
|
+
|------|-------------|
|
|
92
|
+
| `paper_quality_rank` | Rank papers by CCF classification, citations, year, h-index |
|
|
21
93
|
|
|
22
94
|
### Skills
|
|
23
95
|
|
|
24
96
|
| Skill | Description |
|
|
25
97
|
|-------|-------------|
|
|
26
|
-
| **literature-survey** |
|
|
98
|
+
| **literature-survey** | Multi-source literature survey with HTML report generation |
|
|
99
|
+
| **auto-cite** | Automatically add citation markers and reference list to academic text |
|
|
27
100
|
|
|
28
101
|
### Slash Commands
|
|
29
102
|
|
|
@@ -33,22 +106,6 @@ AI4Scholar gives OpenClaw direct access to 6 academic platforms through 17 built
|
|
|
33
106
|
| `/projects` | List all literature projects |
|
|
34
107
|
| `/reading-list` | Show the reading list |
|
|
35
108
|
|
|
36
|
-
### Report Generation
|
|
37
|
-
|
|
38
|
-
The plugin includes Python scripts for generating rich HTML reports from fulltext search results:
|
|
39
|
-
|
|
40
|
-
- **6 color themes** (Light, Sepia, Dark, Green, Pink, Perplexity)
|
|
41
|
-
- Interactive snippet cards with modal detail views
|
|
42
|
-
- Filtering by source type, year, venue, and keyword
|
|
43
|
-
- Automatic title translation (Chinese ↔ English)
|
|
44
|
-
- CSV data export
|
|
45
|
-
|
|
46
|
-
## Prerequisites
|
|
47
|
-
|
|
48
|
-
- [OpenClaw](https://github.com/openclaw/openclaw) installed and running
|
|
49
|
-
- An [ai4scholar.net](https://ai4scholar.net) API key (for Semantic Scholar, PubMed, and Google Scholar tools)
|
|
50
|
-
- Python 3.8+ with `requests` (for HTML report generation)
|
|
51
|
-
|
|
52
109
|
## Install
|
|
53
110
|
|
|
54
111
|
### From npm (recommended)
|
|
@@ -57,101 +114,106 @@ The plugin includes Python scripts for generating rich HTML reports from fulltex
|
|
|
57
114
|
openclaw plugins install ai4scholar
|
|
58
115
|
```
|
|
59
116
|
|
|
60
|
-
|
|
117
|
+
After installation, **restart the gateway**:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
openclaw gateway
|
|
121
|
+
```
|
|
61
122
|
|
|
62
123
|
### From source (development)
|
|
63
124
|
|
|
64
125
|
```bash
|
|
65
126
|
git clone https://github.com/literaf/ai4scholar.git
|
|
66
|
-
cd ai4scholar
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
pnpm dev:link
|
|
70
|
-
# or equivalently:
|
|
127
|
+
cd ai4scholar
|
|
128
|
+
pnpm install
|
|
129
|
+
pnpm build
|
|
71
130
|
openclaw plugins install -l .
|
|
72
131
|
```
|
|
73
132
|
|
|
74
|
-
### Verify
|
|
133
|
+
### Verify
|
|
75
134
|
|
|
76
135
|
```bash
|
|
77
136
|
openclaw plugins list
|
|
78
137
|
# Should show: ai4scholar (enabled)
|
|
79
138
|
```
|
|
80
139
|
|
|
81
|
-
|
|
140
|
+
## Configuration
|
|
82
141
|
|
|
83
|
-
|
|
84
|
-
# Stop the running gateway (Ctrl+C), then:
|
|
85
|
-
openclaw gateway
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
### Configuration
|
|
89
|
-
|
|
90
|
-
After installation, set your API key in OpenClaw's plugin settings (WebUI):
|
|
91
|
-
|
|
92
|
-
- **AI4Scholar API Key** — get one at [ai4scholar.net/dashboard](https://ai4scholar.net/dashboard?view=api-keys)
|
|
93
|
-
|
|
94
|
-
### Optional: External MCP Server
|
|
95
|
-
|
|
96
|
-
For additional capabilities, you can also configure the [ai4scholar-mcp](https://github.com/literaf/ai4s-mcp) server in `~/.openclaw/openclaw.json`:
|
|
142
|
+
Set your API key in `openclaw.json`:
|
|
97
143
|
|
|
98
144
|
```json
|
|
99
145
|
{
|
|
100
|
-
"
|
|
101
|
-
"
|
|
102
|
-
"
|
|
103
|
-
|
|
104
|
-
"
|
|
146
|
+
"plugins": {
|
|
147
|
+
"entries": {
|
|
148
|
+
"ai4scholar": {
|
|
149
|
+
"enabled": true,
|
|
150
|
+
"config": {
|
|
151
|
+
"apiKey": "<your-api-key>"
|
|
152
|
+
}
|
|
105
153
|
}
|
|
106
154
|
}
|
|
107
155
|
}
|
|
108
156
|
}
|
|
109
157
|
```
|
|
110
158
|
|
|
159
|
+
Get your API key at [ai4scholar.net/dashboard](https://ai4scholar.net/dashboard?view=api-keys).
|
|
160
|
+
|
|
111
161
|
## Usage
|
|
112
162
|
|
|
113
|
-
Just talk to your OpenClaw
|
|
163
|
+
Just talk to your OpenClaw agent:
|
|
164
|
+
|
|
165
|
+
```
|
|
166
|
+
Search for recent papers on CRISPR in cancer immunotherapy
|
|
167
|
+
```
|
|
114
168
|
|
|
115
169
|
```
|
|
116
|
-
|
|
170
|
+
Read the full text of arXiv:2401.12345 and summarize the Methods section
|
|
117
171
|
```
|
|
118
172
|
|
|
119
173
|
```
|
|
120
|
-
|
|
174
|
+
Add citations to this Introduction paragraph: <paste text>
|
|
121
175
|
```
|
|
122
176
|
|
|
123
177
|
```
|
|
124
|
-
|
|
178
|
+
Give me a literature survey on protein folding methods since 2020
|
|
125
179
|
```
|
|
126
180
|
|
|
181
|
+
For detailed usage examples, see [docs/tutorial.md](docs/tutorial.md).
|
|
182
|
+
|
|
127
183
|
## Project Structure
|
|
128
184
|
|
|
129
185
|
```
|
|
130
186
|
ai4scholar/
|
|
131
|
-
├── src/
|
|
132
|
-
│ ├── tools/
|
|
133
|
-
│ │ ├── api-client.ts
|
|
134
|
-
│ │ ├── semantic-scholar.ts #
|
|
135
|
-
│ │ ├── pubmed.ts
|
|
187
|
+
├── src/
|
|
188
|
+
│ ├── tools/
|
|
189
|
+
│ │ ├── api-client.ts # HTTP client for ai4scholar.net
|
|
190
|
+
│ │ ├── semantic-scholar.ts # 17 Semantic Scholar tools
|
|
191
|
+
│ │ ├── pubmed.ts # 5 PubMed tools
|
|
136
192
|
│ │ ├── google-scholar.ts # Google Scholar search
|
|
137
|
-
│ │ ├── arxiv.ts
|
|
138
|
-
│ │ ├── biorxiv.ts
|
|
139
|
-
│ │ ├──
|
|
140
|
-
│ │
|
|
141
|
-
│ ├──
|
|
142
|
-
│
|
|
143
|
-
|
|
144
|
-
│ ├──
|
|
145
|
-
│ ├──
|
|
146
|
-
│ └──
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
├── skills/
|
|
151
|
-
│
|
|
193
|
+
│ │ ├── arxiv.ts # 3 arXiv tools
|
|
194
|
+
│ │ ├── biorxiv.ts # 6 bioRxiv/medRxiv tools
|
|
195
|
+
│ │ ├── doi-download.ts # 2 DOI-based download tools
|
|
196
|
+
│ │ ├── quality-rank.ts # Paper quality ranking (CCF)
|
|
197
|
+
│ │ ├── pdf-utils.ts # PDF download & text extraction
|
|
198
|
+
│ │ ├── result.ts # Tool result helpers
|
|
199
|
+
│ │ └── params.ts # Parameter parsing
|
|
200
|
+
│ ├── hooks/
|
|
201
|
+
│ │ ├── scholar-mode.ts # Scholar mode system prompt
|
|
202
|
+
│ │ └── inject-skill.ts # Skill injection for sub-agents
|
|
203
|
+
│ └── commands.ts # Slash commands
|
|
204
|
+
├── scripts/ # Python helpers (HTML reports)
|
|
205
|
+
├── assets/ # Report templates
|
|
206
|
+
├── skills/
|
|
207
|
+
│ ├── literature-survey/
|
|
208
|
+
│ │ └── SKILL.md
|
|
209
|
+
│ └── auto-cite/
|
|
152
210
|
│ └── SKILL.md
|
|
153
|
-
├──
|
|
154
|
-
└──
|
|
211
|
+
├── data/
|
|
212
|
+
│ └── ccf_2022.jsonl # CCF ranking data
|
|
213
|
+
├── docs/
|
|
214
|
+
│ └── tutorial.md # Installation & usage tutorial
|
|
215
|
+
├── openclaw.plugin.json
|
|
216
|
+
└── index.ts
|
|
155
217
|
```
|
|
156
218
|
|
|
157
219
|
## License
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAgDlD,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,GAAG,EAAE,iBAAiB,QA4FtD"}
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
2
|
import { setApiKey } from "./src/tools/api-client.js";
|
|
3
3
|
import { createSkillInjectionHook } from "./src/hooks/inject-skill.js";
|
|
4
|
-
import { createAutoUpdaterService } from "./src/services/auto-updater.js";
|
|
5
4
|
import { createSemanticSearchTool, createSemanticDetailTool, createSemanticCitationsTool, createSemanticReferencesTool, createSemanticAuthorSearchTool, createSemanticAuthorPapersTool, createSemanticRecommendationsTool, createSemanticRecommendationsForPaperTool, createSemanticSnippetSearchTool, createSemanticAuthorDetailTool, createSemanticPaperMatchTool, createSemanticPaperBatchTool, createSemanticAuthorBatchTool, createSemanticPaperAuthorsTool, createSemanticBulkSearchTool, createSemanticDownloadTool, createSemanticReadTool, } from "./src/tools/semantic-scholar.js";
|
|
6
5
|
import { createPubmedSearchTool, createPubmedDetailTool, createPubmedCitationsTool, createPubmedRelatedTool, createPubmedBatchTool, } from "./src/tools/pubmed.js";
|
|
7
6
|
import { createGoogleScholarSearchTool } from "./src/tools/google-scholar.js";
|
|
@@ -11,7 +10,6 @@ import { createDoiDownloadTool, createDoiReadTool } from "./src/tools/doi-downlo
|
|
|
11
10
|
import { createPaperQualityRankTool } from "./src/tools/quality-rank.js";
|
|
12
11
|
import { handleLibrary, handleProjects, handleReadingList, } from "./src/commands.js";
|
|
13
12
|
import { createScholarModeHook } from "./src/hooks/scholar-mode.js";
|
|
14
|
-
const UPDATE_CHECK_INTERVAL_MS = 60 * 60 * 1000; // 1 hour
|
|
15
13
|
export default function register(api) {
|
|
16
14
|
const cfg = api.pluginConfig;
|
|
17
15
|
if (cfg?.apiKey) {
|
|
@@ -87,19 +85,6 @@ export default function register(api) {
|
|
|
87
85
|
// --- Hooks ---
|
|
88
86
|
api.on("before_prompt_build", createScholarModeHook(), { priority: 100 });
|
|
89
87
|
api.on("before_tool_call", createSkillInjectionHook(path.dirname(api.source)));
|
|
90
|
-
// --- Auto-updater service ---
|
|
91
|
-
const autoUpdateEnabled = cfg?.autoUpdate !== false;
|
|
92
|
-
if (autoUpdateEnabled) {
|
|
93
|
-
api.registerService(createAutoUpdaterService({
|
|
94
|
-
packageName: "ai4scholar",
|
|
95
|
-
checkIntervalMs: UPDATE_CHECK_INTERVAL_MS,
|
|
96
|
-
logger: {
|
|
97
|
-
info: (msg) => api.logger.info(msg),
|
|
98
|
-
warn: (msg) => api.logger.warn(msg),
|
|
99
|
-
debug: (msg) => api.logger.debug?.(msg),
|
|
100
|
-
},
|
|
101
|
-
}));
|
|
102
|
-
}
|
|
103
88
|
api.logger.info(`AI4Scholar plugin loaded — 35 tools registered (apiKey: ${cfg?.apiKey ? "configured" : "missing"})`);
|
|
104
89
|
}
|
|
105
90
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AACvE,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AACvE,OAAO,EACL,wBAAwB,EACxB,wBAAwB,EACxB,2BAA2B,EAC3B,4BAA4B,EAC5B,8BAA8B,EAC9B,8BAA8B,EAC9B,iCAAiC,EACjC,yCAAyC,EACzC,+BAA+B,EAC/B,8BAA8B,EAC9B,4BAA4B,EAC5B,4BAA4B,EAC5B,6BAA6B,EAC7B,8BAA8B,EAC9B,4BAA4B,EAC5B,0BAA0B,EAC1B,sBAAsB,GACvB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,sBAAsB,EACtB,sBAAsB,EACtB,yBAAyB,EACzB,uBAAuB,EACvB,qBAAqB,GACtB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,6BAA6B,EAAE,MAAM,+BAA+B,CAAC;AAC9E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,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,GAAG,CACrG,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export interface AutoUpdaterOptions {
|
|
2
|
-
packageName: string;
|
|
3
|
-
checkIntervalMs: number;
|
|
4
|
-
logger: {
|
|
5
|
-
info: (msg: string) => void;
|
|
6
|
-
warn: (msg: string) => void;
|
|
7
|
-
debug?: (msg: string) => void;
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
export declare function createAutoUpdaterService(options: AutoUpdaterOptions): {
|
|
11
|
-
id: string;
|
|
12
|
-
start: () => Promise<void>;
|
|
13
|
-
stop: () => void;
|
|
14
|
-
};
|
|
15
|
-
//# sourceMappingURL=auto-updater.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auto-updater.d.ts","sourceRoot":"","sources":["../../../src/services/auto-updater.ts"],"names":[],"mappings":"AAkHA,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE;QACN,IAAI,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;QAC5B,IAAI,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;QAC5B,KAAK,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;KAC/B,CAAC;CACH;AAED,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,kBAAkB;;;;EAyDnE"}
|
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
import { exec } from "child_process";
|
|
2
|
-
import { readFileSync, existsSync, lstatSync } from "fs";
|
|
3
|
-
import { fileURLToPath } from "url";
|
|
4
|
-
import { dirname, join } from "path";
|
|
5
|
-
function getPluginRoot() {
|
|
6
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
7
|
-
const __dirname = dirname(__filename);
|
|
8
|
-
let root = __dirname;
|
|
9
|
-
for (let i = 0; i < 5; i++) {
|
|
10
|
-
if (existsSync(join(root, "package.json"))) {
|
|
11
|
-
return root;
|
|
12
|
-
}
|
|
13
|
-
root = dirname(root);
|
|
14
|
-
}
|
|
15
|
-
return join(__dirname, "../../..");
|
|
16
|
-
}
|
|
17
|
-
function isDevMode() {
|
|
18
|
-
if (process.env.AI4SCHOLAR_DEV === "1" || process.env.AI4SCHOLAR_DEV === "true") {
|
|
19
|
-
return true;
|
|
20
|
-
}
|
|
21
|
-
if (process.env.NODE_ENV === "development") {
|
|
22
|
-
return true;
|
|
23
|
-
}
|
|
24
|
-
const pluginRoot = getPluginRoot();
|
|
25
|
-
if (existsSync(join(pluginRoot, "tsconfig.json"))) {
|
|
26
|
-
return true;
|
|
27
|
-
}
|
|
28
|
-
try {
|
|
29
|
-
if (lstatSync(pluginRoot).isSymbolicLink()) {
|
|
30
|
-
return true;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
catch {
|
|
34
|
-
// ignore
|
|
35
|
-
}
|
|
36
|
-
try {
|
|
37
|
-
const pkg = JSON.parse(readFileSync(join(pluginRoot, "package.json"), "utf-8"));
|
|
38
|
-
if (pkg.version && pkg.version.includes("-dev")) {
|
|
39
|
-
return true;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
catch {
|
|
43
|
-
// ignore
|
|
44
|
-
}
|
|
45
|
-
return false;
|
|
46
|
-
}
|
|
47
|
-
function getCurrentVersion() {
|
|
48
|
-
try {
|
|
49
|
-
const packagePath = join(getPluginRoot(), "package.json");
|
|
50
|
-
const pkg = JSON.parse(readFileSync(packagePath, "utf-8"));
|
|
51
|
-
return pkg.version;
|
|
52
|
-
}
|
|
53
|
-
catch {
|
|
54
|
-
return "0.0.0";
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
async function getLatestVersion(packageName) {
|
|
58
|
-
return new Promise((resolve) => {
|
|
59
|
-
exec(`npm view ${packageName} version`, { timeout: 10000 }, (error, stdout) => {
|
|
60
|
-
if (error) {
|
|
61
|
-
resolve(null);
|
|
62
|
-
return;
|
|
63
|
-
}
|
|
64
|
-
resolve(stdout.trim());
|
|
65
|
-
});
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
function isNewerVersion(current, latest) {
|
|
69
|
-
const currentParts = current.split(".").map(Number);
|
|
70
|
-
const latestParts = latest.split(".").map(Number);
|
|
71
|
-
for (let i = 0; i < 3; i++) {
|
|
72
|
-
const c = currentParts[i] || 0;
|
|
73
|
-
const l = latestParts[i] || 0;
|
|
74
|
-
if (l > c)
|
|
75
|
-
return true;
|
|
76
|
-
if (l < c)
|
|
77
|
-
return false;
|
|
78
|
-
}
|
|
79
|
-
return false;
|
|
80
|
-
}
|
|
81
|
-
function getExtensionsDir() {
|
|
82
|
-
const home = process.env.HOME || process.env.USERPROFILE || "";
|
|
83
|
-
return join(home, ".openclaw", "extensions");
|
|
84
|
-
}
|
|
85
|
-
async function runUpdate(packageName, logger) {
|
|
86
|
-
const extensionsDir = getExtensionsDir();
|
|
87
|
-
const targetDir = join(extensionsDir, packageName);
|
|
88
|
-
return new Promise((resolve) => {
|
|
89
|
-
const cmd = `cd "${extensionsDir}" && npm pack ${packageName} --pack-destination . && tar -xzf ${packageName}-*.tgz && rm -rf "${targetDir}" && mv package "${targetDir}" && rm ${packageName}-*.tgz`;
|
|
90
|
-
exec(cmd, { timeout: 120000 }, (error, _stdout, stderr) => {
|
|
91
|
-
if (error) {
|
|
92
|
-
logger.warn(`AI4Scholar auto-update failed: ${stderr || error.message}`);
|
|
93
|
-
resolve(false);
|
|
94
|
-
return;
|
|
95
|
-
}
|
|
96
|
-
logger.info(`AI4Scholar updated. Restart gateway to apply.`);
|
|
97
|
-
resolve(true);
|
|
98
|
-
});
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
export function createAutoUpdaterService(options) {
|
|
102
|
-
const { packageName, checkIntervalMs, logger } = options;
|
|
103
|
-
let intervalId = null;
|
|
104
|
-
let isChecking = false;
|
|
105
|
-
const checkAndUpdate = async () => {
|
|
106
|
-
if (isChecking)
|
|
107
|
-
return;
|
|
108
|
-
isChecking = true;
|
|
109
|
-
try {
|
|
110
|
-
const currentVersion = getCurrentVersion();
|
|
111
|
-
const latestVersion = await getLatestVersion(packageName);
|
|
112
|
-
if (!latestVersion) {
|
|
113
|
-
logger.debug?.(`AI4Scholar update check: could not fetch latest version`);
|
|
114
|
-
return;
|
|
115
|
-
}
|
|
116
|
-
if (isNewerVersion(currentVersion, latestVersion)) {
|
|
117
|
-
logger.info(`AI4Scholar update available: ${currentVersion} → ${latestVersion}`);
|
|
118
|
-
await runUpdate(packageName, logger);
|
|
119
|
-
}
|
|
120
|
-
else {
|
|
121
|
-
logger.debug?.(`AI4Scholar is up to date (${currentVersion})`);
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
catch (err) {
|
|
125
|
-
logger.warn(`AI4Scholar update check error: ${err}`);
|
|
126
|
-
}
|
|
127
|
-
finally {
|
|
128
|
-
isChecking = false;
|
|
129
|
-
}
|
|
130
|
-
};
|
|
131
|
-
return {
|
|
132
|
-
id: "ai4scholar-auto-updater",
|
|
133
|
-
start: async () => {
|
|
134
|
-
if (isDevMode()) {
|
|
135
|
-
logger.debug?.("AI4Scholar auto-updater skipped (dev mode)");
|
|
136
|
-
return;
|
|
137
|
-
}
|
|
138
|
-
logger.debug?.("AI4Scholar auto-updater service started");
|
|
139
|
-
setTimeout(() => {
|
|
140
|
-
checkAndUpdate();
|
|
141
|
-
}, 5000);
|
|
142
|
-
intervalId = setInterval(checkAndUpdate, checkIntervalMs);
|
|
143
|
-
},
|
|
144
|
-
stop: () => {
|
|
145
|
-
if (intervalId) {
|
|
146
|
-
clearInterval(intervalId);
|
|
147
|
-
intervalId = null;
|
|
148
|
-
}
|
|
149
|
-
logger.debug?.("AI4Scholar auto-updater service stopped");
|
|
150
|
-
},
|
|
151
|
-
};
|
|
152
|
-
}
|
|
153
|
-
//# sourceMappingURL=auto-updater.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auto-updater.js","sourceRoot":"","sources":["../../../src/services/auto-updater.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAErC,SAAS,aAAa;IACpB,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAClD,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IACtC,IAAI,IAAI,GAAG,SAAS,CAAC;IACrB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QAC3B,IAAI,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC,EAAE,CAAC;YAC3C,OAAO,IAAI,CAAC;QACd,CAAC;QACD,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACvB,CAAC;IACD,OAAO,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;AACrC,CAAC;AAED,SAAS,SAAS;IAChB,IAAI,OAAO,CAAC,GAAG,CAAC,cAAc,KAAK,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC,cAAc,KAAK,MAAM,EAAE,CAAC;QAChF,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,aAAa,EAAE,CAAC;QAC3C,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,UAAU,GAAG,aAAa,EAAE,CAAC;IAEnC,IAAI,UAAU,CAAC,IAAI,CAAC,UAAU,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