@luffysolution/omnischolar-pi 0.1.0 → 0.1.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/PRIVACY.md +24 -0
- package/TERMS.md +7 -0
- package/THIRD_PARTY_NOTICES.md +5 -0
- package/docs/CONFIGURATION.en.md +130 -0
- package/docs/CONFIGURATION.md +130 -0
- package/docs/IMAGE_PROVIDERS.en.md +58 -0
- package/docs/IMAGE_PROVIDERS.md +58 -0
- package/docs/INSTALLATION.en.md +106 -0
- package/docs/INSTALLATION.md +106 -0
- package/docs/MATERIALS.en.md +45 -0
- package/docs/MATERIALS.md +45 -0
- package/docs/RESEARCH.en.md +83 -0
- package/docs/RESEARCH.md +83 -0
- package/docs/TOOLS.en.md +49 -0
- package/docs/TOOLS.md +49 -0
- package/host-configs/README.md +11 -0
- package/host-configs/hermes.yaml +6 -0
- package/host-configs/opencode.jsonc +11 -0
- package/host-configs/pi.md +13 -0
- package/host-configs/workbuddy.json +10 -0
- package/host-configs/workbuddy.md +20 -0
- package/omnischolar.config.example.json +214 -0
- package/package.json +9 -2
- package/pi-extension/dist/index.js +1 -1
package/PRIVACY.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Privacy notice
|
|
2
|
+
|
|
3
|
+
OmniScholar is open-source software that runs on the user's computer. The maintainers do not operate an OmniScholar service for version 0.1.0.
|
|
4
|
+
|
|
5
|
+
## Local data
|
|
6
|
+
|
|
7
|
+
Configuration, cache, output files, and Zotero Local API results remain on the local machine unless a selected tool calls an external service. Zotero access uses GET requests to the local API only.
|
|
8
|
+
|
|
9
|
+
## Data sent to other services
|
|
10
|
+
|
|
11
|
+
- Literature and materials tools send search terms, identifiers, and selected filters to the chosen data source.
|
|
12
|
+
- Ai4Scholar receives the request needed for the selected Ai4Scholar operation.
|
|
13
|
+
- MinerU receives a PDF only after the user approves that file upload.
|
|
14
|
+
- Image services receive the prompt and any reference images approved for upload.
|
|
15
|
+
|
|
16
|
+
Each provider has its own privacy, retention, training, region, and account policies. Review those policies before enabling the provider.
|
|
17
|
+
|
|
18
|
+
## Credentials
|
|
19
|
+
|
|
20
|
+
Environment variables are recommended for API keys. OmniScholar removes known secrets from tool results, status, errors, and logs, and does not write provider keys into Agent MCP files. Users are still responsible for protecting configuration files and shell history.
|
|
21
|
+
|
|
22
|
+
Privacy and security questions: `LuffySolution@gmail.com`.
|
|
23
|
+
|
|
24
|
+
This notice describes the software's behavior. A marketplace may require additional legal terms before publication.
|
package/TERMS.md
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Terms of Use
|
|
2
|
+
|
|
3
|
+
OmniScholar is open-source software distributed under the [MIT License](LICENSE). By installing or using it, you agree to that license and to the terms of any third-party services or datasets you choose to enable.
|
|
4
|
+
|
|
5
|
+
You are responsible for reviewing generated research output, respecting copyright and data-access restrictions, and confirming any external upload or paid operation. OmniScholar does not provide legal, medical, or financial advice and does not guarantee the accuracy or availability of third-party data.
|
|
6
|
+
|
|
7
|
+
See [PRIVACY.md](PRIVACY.md) for data-handling details and [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md) for third-party terms.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# Third-party notices
|
|
2
|
+
|
|
3
|
+
Third-party services and datasets remain governed by their own terms, licenses, quotas, and billing policies. Product names are the property of their respective owners.
|
|
4
|
+
|
|
5
|
+
CAS Common Chemistry identifies its public substance content as CC BY-NC 4.0. OmniScholar grants neither commercial data rights nor SciFinder access.
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
# Configuration
|
|
2
|
+
|
|
3
|
+
[简体中文](CONFIGURATION.md)
|
|
4
|
+
|
|
5
|
+
OmniScholar uses JSON with `schemaVersion: 1`. Start with [`omnischolar.config.example.json`](../omnischolar.config.example.json) and remove services you do not use.
|
|
6
|
+
|
|
7
|
+
## Config file location
|
|
8
|
+
|
|
9
|
+
The first matching file is used; files are not merged:
|
|
10
|
+
|
|
11
|
+
1. the path passed with `--config PATH`
|
|
12
|
+
2. the file named by `OMNISCHOLAR_CONFIG`
|
|
13
|
+
3. `omnischolar.config.json` in the current project
|
|
14
|
+
4. `omnischolar/omnischolar.config.json` in the user config directory
|
|
15
|
+
5. built-in defaults
|
|
16
|
+
|
|
17
|
+
Relative paths resolve from the config file. Misspelled fields and invalid values are rejected.
|
|
18
|
+
|
|
19
|
+
## Minimal config
|
|
20
|
+
|
|
21
|
+
```json
|
|
22
|
+
{
|
|
23
|
+
"schemaVersion": 1,
|
|
24
|
+
"runtime": {
|
|
25
|
+
"workspaceRoots": ["./research-inputs"],
|
|
26
|
+
"requestTimeoutSeconds": 30
|
|
27
|
+
},
|
|
28
|
+
"zotero": {
|
|
29
|
+
"enabled": true,
|
|
30
|
+
"baseUrl": "http://127.0.0.1:23119/api"
|
|
31
|
+
},
|
|
32
|
+
"output": {
|
|
33
|
+
"rootDirectory": "./research-output"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
`workspaceRoots` limits local file reads. `output.rootDirectory` limits file writes. To use Obsidian, set the output directory to a folder inside the vault.
|
|
39
|
+
|
|
40
|
+
## API keys
|
|
41
|
+
|
|
42
|
+
Keep keys in environment variables and place only the variable name in the config:
|
|
43
|
+
|
|
44
|
+
```json
|
|
45
|
+
{
|
|
46
|
+
"schemaVersion": 1,
|
|
47
|
+
"ai4scholar": {
|
|
48
|
+
"enabled": true,
|
|
49
|
+
"apiKeyEnv": "OMNISCHOLAR_AI4SCHOLAR_API_KEY",
|
|
50
|
+
"allowPaid": false
|
|
51
|
+
},
|
|
52
|
+
"data": {
|
|
53
|
+
"materialsProject": {
|
|
54
|
+
"enabled": true,
|
|
55
|
+
"apiKeyEnv": "OMNISCHOLAR_MATERIALS_PROJECT_API_KEY"
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Credential order is `apiKey`, the variable named by `apiKeyEnv`, then the service's default environment variable. Do not place plaintext keys in agent MCP files, Skills, command lines, or source control.
|
|
62
|
+
|
|
63
|
+
| Service | Key or account requirement |
|
|
64
|
+
|---|---|
|
|
65
|
+
| OpenAlex, PubMed, arXiv, Crossref | Basic search works without keys; a PubMed key can raise NCBI request limits |
|
|
66
|
+
| Semantic Scholar | Optional key; shared anonymous traffic is more likely to receive 429 |
|
|
67
|
+
| Unpaywall | Contact email required |
|
|
68
|
+
| easyScholar | API key required |
|
|
69
|
+
| Zotero | No key; the local API must be enabled |
|
|
70
|
+
| MinerU | API key and explicit PDF upload approval |
|
|
71
|
+
| Ai4Scholar | API key; some calls use account credit |
|
|
72
|
+
| Materials Project | API key required |
|
|
73
|
+
| Image services | Provider key, model, and endpoint as required |
|
|
74
|
+
| CAS Common Chemistry | A provider-supplied interface description file is still required |
|
|
75
|
+
|
|
76
|
+
## Paid calls and uploads
|
|
77
|
+
|
|
78
|
+
A stored key does not approve spending or upload.
|
|
79
|
+
|
|
80
|
+
- Ai4Scholar and image generation require `allowPaid` in the config and again in the individual tool call.
|
|
81
|
+
- MinerU and reference-image uploads require `allowExternalUpload` in the config and again in the tool call.
|
|
82
|
+
- Sync recovery only repairs local files; it does not reuse previous upload approval.
|
|
83
|
+
- If a paid request times out after the provider may have accepted it, OmniScholar does not retry automatically.
|
|
84
|
+
|
|
85
|
+
## Literature search
|
|
86
|
+
|
|
87
|
+
```json
|
|
88
|
+
{
|
|
89
|
+
"schemaVersion": 1,
|
|
90
|
+
"research": {
|
|
91
|
+
"fallback": true,
|
|
92
|
+
"maxPages": 5,
|
|
93
|
+
"providers": {
|
|
94
|
+
"openalex": { "enabled": true, "email": "researcher@example.org" },
|
|
95
|
+
"pubmed": { "enabled": true, "email": "researcher@example.org" },
|
|
96
|
+
"arxiv": { "enabled": true },
|
|
97
|
+
"crossref": { "enabled": true, "email": "researcher@example.org" },
|
|
98
|
+
"unpaywall": { "enabled": true, "email": "researcher@example.org" }
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
`fallback` moves only to another service that supports the same operation. HTTP 429 is returned as a rate-limit result and does not start an immediate retry loop.
|
|
105
|
+
|
|
106
|
+
## MinerU
|
|
107
|
+
|
|
108
|
+
```json
|
|
109
|
+
{
|
|
110
|
+
"schemaVersion": 1,
|
|
111
|
+
"mineru": {
|
|
112
|
+
"enabled": true,
|
|
113
|
+
"apiKeyEnv": "OMNISCHOLAR_MINERU_API_KEY",
|
|
114
|
+
"model": "pipeline",
|
|
115
|
+
"allowExternalUpload": false
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
The MinerU v1 fallback is off by default. Provider documentation currently gives inconsistent page limits, so OmniScholar does not switch APIs on its own.
|
|
121
|
+
|
|
122
|
+
## Check the config
|
|
123
|
+
|
|
124
|
+
```sh
|
|
125
|
+
omnischolar config path
|
|
126
|
+
omnischolar config schema
|
|
127
|
+
omnischolar status
|
|
128
|
+
omnischolar doctor --json
|
|
129
|
+
```
|
|
130
|
+
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
# 配置
|
|
2
|
+
|
|
3
|
+
[English](CONFIGURATION.en.md)
|
|
4
|
+
|
|
5
|
+
OmniScholar 使用 `schemaVersion: 1` 的 JSON 配置。可直接复制根目录的 [`omnischolar.config.example.json`](../omnischolar.config.example.json),再删除不需要的服务。
|
|
6
|
+
|
|
7
|
+
## 配置文件位置
|
|
8
|
+
|
|
9
|
+
程序使用找到的第一个配置文件,不合并多份配置:
|
|
10
|
+
|
|
11
|
+
1. `--config PATH` 指定的文件
|
|
12
|
+
2. `OMNISCHOLAR_CONFIG` 指向的文件
|
|
13
|
+
3. 当前项目的 `omnischolar.config.json`
|
|
14
|
+
4. 用户配置目录中的 `omnischolar/omnischolar.config.json`
|
|
15
|
+
5. 内置默认值
|
|
16
|
+
|
|
17
|
+
相对路径以配置文件所在目录为基准。拼错字段名或填写不合法的值时,程序会直接报错。
|
|
18
|
+
|
|
19
|
+
## 最小配置
|
|
20
|
+
|
|
21
|
+
```json
|
|
22
|
+
{
|
|
23
|
+
"schemaVersion": 1,
|
|
24
|
+
"runtime": {
|
|
25
|
+
"workspaceRoots": ["./research-inputs"],
|
|
26
|
+
"requestTimeoutSeconds": 30
|
|
27
|
+
},
|
|
28
|
+
"zotero": {
|
|
29
|
+
"enabled": true,
|
|
30
|
+
"baseUrl": "http://127.0.0.1:23119/api"
|
|
31
|
+
},
|
|
32
|
+
"output": {
|
|
33
|
+
"rootDirectory": "./research-output"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
`workspaceRoots` 限定可读取的本地文件,`output.rootDirectory` 限定写入位置。若要直接写入 Obsidian,可把输出目录设为 Vault 中的一个文件夹。
|
|
39
|
+
|
|
40
|
+
## API key
|
|
41
|
+
|
|
42
|
+
建议把 key 存入环境变量,配置中只写变量名:
|
|
43
|
+
|
|
44
|
+
```json
|
|
45
|
+
{
|
|
46
|
+
"schemaVersion": 1,
|
|
47
|
+
"ai4scholar": {
|
|
48
|
+
"enabled": true,
|
|
49
|
+
"apiKeyEnv": "OMNISCHOLAR_AI4SCHOLAR_API_KEY",
|
|
50
|
+
"allowPaid": false
|
|
51
|
+
},
|
|
52
|
+
"data": {
|
|
53
|
+
"materialsProject": {
|
|
54
|
+
"enabled": true,
|
|
55
|
+
"apiKeyEnv": "OMNISCHOLAR_MATERIALS_PROJECT_API_KEY"
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
读取顺序为 `apiKey`、`apiKeyEnv` 指向的环境变量、该服务的默认环境变量。不要把明文 key 写入 Agent 的 MCP 配置、Skills、命令行或版本库。
|
|
62
|
+
|
|
63
|
+
| 服务 | 是否需要 key 或其他信息 |
|
|
64
|
+
|---|---|
|
|
65
|
+
| OpenAlex、PubMed、arXiv、Crossref | 基本检索无需 key;PubMed key 可提高 NCBI 请求额度 |
|
|
66
|
+
| Semantic Scholar | key 可选;匿名共享流量更容易遇到 429 |
|
|
67
|
+
| Unpaywall | 需要联系邮箱 |
|
|
68
|
+
| easyScholar | 需要 API key |
|
|
69
|
+
| Zotero | 不需要 key;需开启本地 API |
|
|
70
|
+
| MinerU | 需要 API key,并确认 PDF 上传 |
|
|
71
|
+
| Ai4Scholar | 需要 API key,部分调用消耗额度 |
|
|
72
|
+
| Materials Project | 需要 API key |
|
|
73
|
+
| 图片服务 | 按服务商要求配置 key、模型和服务地址 |
|
|
74
|
+
| CAS Common Chemistry | 当前还需要服务商提供的正式接口说明文件 |
|
|
75
|
+
|
|
76
|
+
## 付费与上传
|
|
77
|
+
|
|
78
|
+
保存 key 不会自动允许付费或上传。
|
|
79
|
+
|
|
80
|
+
- Ai4Scholar 和图片生成需在配置中启用 `allowPaid`,调用时还要再次确认 `allowPaid`。
|
|
81
|
+
- MinerU 与参考图上传需在配置中启用 `allowExternalUpload`,调用时还要再次确认同名参数。
|
|
82
|
+
- 同步恢复只处理本地文件,不会沿用以前的上传许可。
|
|
83
|
+
- 付费请求超时后,如果服务端结果不明确,程序不会自动重试。
|
|
84
|
+
|
|
85
|
+
## 文献检索
|
|
86
|
+
|
|
87
|
+
```json
|
|
88
|
+
{
|
|
89
|
+
"schemaVersion": 1,
|
|
90
|
+
"research": {
|
|
91
|
+
"fallback": true,
|
|
92
|
+
"maxPages": 5,
|
|
93
|
+
"providers": {
|
|
94
|
+
"openalex": { "enabled": true, "email": "researcher@example.org" },
|
|
95
|
+
"pubmed": { "enabled": true, "email": "researcher@example.org" },
|
|
96
|
+
"arxiv": { "enabled": true },
|
|
97
|
+
"crossref": { "enabled": true, "email": "researcher@example.org" },
|
|
98
|
+
"unpaywall": { "enabled": true, "email": "researcher@example.org" }
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
`fallback` 只会改用支持同一项查询的服务。HTTP 429 会作为限流结果返回,不会触发连续重试。
|
|
105
|
+
|
|
106
|
+
## MinerU
|
|
107
|
+
|
|
108
|
+
```json
|
|
109
|
+
{
|
|
110
|
+
"schemaVersion": 1,
|
|
111
|
+
"mineru": {
|
|
112
|
+
"enabled": true,
|
|
113
|
+
"apiKeyEnv": "OMNISCHOLAR_MINERU_API_KEY",
|
|
114
|
+
"model": "pipeline",
|
|
115
|
+
"allowExternalUpload": false
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
默认不启用 MinerU v1 备用接口。当前文档对页数限制的描述不一致,因此程序不会自行切换接口。
|
|
121
|
+
|
|
122
|
+
## 检查配置
|
|
123
|
+
|
|
124
|
+
```sh
|
|
125
|
+
omnischolar config path
|
|
126
|
+
omnischolar config schema
|
|
127
|
+
omnischolar status
|
|
128
|
+
omnischolar doctor --json
|
|
129
|
+
```
|
|
130
|
+
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Scientific image services
|
|
2
|
+
|
|
3
|
+
[简体中文](IMAGE_PROVIDERS.md)
|
|
4
|
+
|
|
5
|
+
OmniScholar can connect to OpenAI, xAI, Gemini, Vertex AI, fal.ai, DashScope/Qwen, Atlas, and custom OpenAI-compatible services. Available models depend on the account, region, endpoint, and configuration.
|
|
6
|
+
|
|
7
|
+
## Tools
|
|
8
|
+
|
|
9
|
+
| Tool | Use |
|
|
10
|
+
|---|---|
|
|
11
|
+
| `omnischolar_image_models` | Show configured models and their usable operations |
|
|
12
|
+
| `omnischolar_image_generate` | Text-to-image, image-to-image, or multi-reference generation |
|
|
13
|
+
| `omnischolar_image_edit` | Edit an existing image |
|
|
14
|
+
| `omnischolar_image_service` | Run supported provider status, model, or task operations |
|
|
15
|
+
| `ai4scholar_figure` | Generate, edit, or vectorize through Ai4Scholar |
|
|
16
|
+
|
|
17
|
+
Each model must explicitly declare the operation it supports. A model name appearing in a provider catalog does not by itself prove that it can generate or edit images; the corresponding operation must show `usable: true` in `omnischolar_image_models`.
|
|
18
|
+
|
|
19
|
+
## Example config
|
|
20
|
+
|
|
21
|
+
```json
|
|
22
|
+
{
|
|
23
|
+
"schemaVersion": 1,
|
|
24
|
+
"defaults": {
|
|
25
|
+
"defaultImageProvider": "fal"
|
|
26
|
+
},
|
|
27
|
+
"media": {
|
|
28
|
+
"allowPaid": false,
|
|
29
|
+
"allowExternalUpload": false,
|
|
30
|
+
"providers": {
|
|
31
|
+
"fal": {
|
|
32
|
+
"enabled": true,
|
|
33
|
+
"apiKeyEnv": "OMNISCHOLAR_FAL_API_KEY",
|
|
34
|
+
"baseUrl": "https://fal.run",
|
|
35
|
+
"models": {},
|
|
36
|
+
"options": {}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
A custom service needs an exact `baseUrl`, model ID, capability list, and generation or edit endpoint. Do not infer capabilities from the model name.
|
|
44
|
+
|
|
45
|
+
## Generate and edit
|
|
46
|
+
|
|
47
|
+
Before submitting a task, define the scientific content, labels, units, aspect ratio, and file format. Generation requires `allowPaid` for that call. Uploading a reference image also requires `allowExternalUpload` for that call.
|
|
48
|
+
|
|
49
|
+
Upload only images you may share with the selected service. After files are saved, signed URLs and base64 source data are removed from the returned payload. Downloads are checked for public HTTPS, file size, MIME type, and image signature. If one file in a multi-file result is missing, the incomplete set is not published.
|
|
50
|
+
|
|
51
|
+
## Current provider notes
|
|
52
|
+
|
|
53
|
+
- fal has been tested for queue submission, polling, data-URI results, text-to-image, and two-reference editing. If the local machine cannot resolve the fal CDN, a data-URI result can still be saved.
|
|
54
|
+
- DashScope/Qwen currently needs a workspace-scoped endpoint or an explicit `baseUrl` supplied by the provider. A retired generic endpoint returns `dashscope_workspace_required`.
|
|
55
|
+
- Gemini's `apiKeyEnv` must name an environment variable that exists.
|
|
56
|
+
- Atlas and custom services need a working endpoint and model description.
|
|
57
|
+
|
|
58
|
+
Review text, structures, mechanisms, scale, and quantitative labels after generation. **AI images are illustrative drafts, not experimental data, real measurements, or scientific conclusions.**
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# 科研绘图服务
|
|
2
|
+
|
|
3
|
+
[English](IMAGE_PROVIDERS.en.md)
|
|
4
|
+
|
|
5
|
+
OmniScholar 可连接 OpenAI、xAI、Gemini、Vertex AI、fal.ai、DashScope/Qwen、Atlas 和自定义 OpenAI 兼容服务。实际可用模型取决于账号、地区、服务地址和配置。
|
|
6
|
+
|
|
7
|
+
## 工具
|
|
8
|
+
|
|
9
|
+
| 工具 | 用途 |
|
|
10
|
+
|---|---|
|
|
11
|
+
| `omnischolar_image_models` | 查看已配置模型及其可用功能 |
|
|
12
|
+
| `omnischolar_image_generate` | 文生图、图生图或多参考图生成 |
|
|
13
|
+
| `omnischolar_image_edit` | 编辑已有图片 |
|
|
14
|
+
| `omnischolar_image_service` | 调用服务商已经支持的状态、模型或任务操作 |
|
|
15
|
+
| `ai4scholar_figure` | 使用 Ai4Scholar 生成、编辑或矢量化图片 |
|
|
16
|
+
|
|
17
|
+
每个模型都必须明确声明支持的功能。模型名出现在服务商目录中,并不自动代表它可以生图或编辑;`omnischolar_image_models` 中对应功能需要显示 `usable: true`。
|
|
18
|
+
|
|
19
|
+
## 配置示例
|
|
20
|
+
|
|
21
|
+
```json
|
|
22
|
+
{
|
|
23
|
+
"schemaVersion": 1,
|
|
24
|
+
"defaults": {
|
|
25
|
+
"defaultImageProvider": "fal"
|
|
26
|
+
},
|
|
27
|
+
"media": {
|
|
28
|
+
"allowPaid": false,
|
|
29
|
+
"allowExternalUpload": false,
|
|
30
|
+
"providers": {
|
|
31
|
+
"fal": {
|
|
32
|
+
"enabled": true,
|
|
33
|
+
"apiKeyEnv": "OMNISCHOLAR_FAL_API_KEY",
|
|
34
|
+
"baseUrl": "https://fal.run",
|
|
35
|
+
"models": {},
|
|
36
|
+
"options": {}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
自定义服务需要填写准确的 `baseUrl`、模型 ID、功能列表,以及生成或编辑接口。不要只凭模型名填写功能。
|
|
44
|
+
|
|
45
|
+
## 生成与编辑
|
|
46
|
+
|
|
47
|
+
提交任务前应明确图片要表达的科学内容、标签、单位、比例和文件格式。生成需要本次 `allowPaid` 授权;上传参考图还需要本次 `allowExternalUpload` 授权。
|
|
48
|
+
|
|
49
|
+
只能上传有权交给第三方处理的图片。图片保存后,返回结果中的签名 URL 和 base64 原文会被移除。下载文件会检查 HTTPS 地址、文件大小、MIME 类型和图片文件头;多文件任务缺少任一文件时,不发布不完整结果。
|
|
50
|
+
|
|
51
|
+
## 当前服务说明
|
|
52
|
+
|
|
53
|
+
- fal 已验证队列提交、轮询、data URI 结果、文生图和双参考图编辑。本机若无法解析 fal CDN,data URI 结果仍可保存。
|
|
54
|
+
- DashScope/Qwen 当前需要绑定 workspace 的服务地址,或服务商明确提供的 `baseUrl`。旧通用地址会返回 `dashscope_workspace_required`。
|
|
55
|
+
- Gemini 配置中的 `apiKeyEnv` 必须指向已存在的环境变量。
|
|
56
|
+
- Atlas 和自定义服务必须给出可用的服务地址与模型说明。
|
|
57
|
+
|
|
58
|
+
生成后仍需人工检查文字、结构、机制、比例和定量描述。**AI 图片是示意草稿,不是实验数据、真实测量或科研结论。**
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# Installation and agent setup
|
|
2
|
+
|
|
3
|
+
[简体中文](INSTALLATION.md)
|
|
4
|
+
|
|
5
|
+
## Install the Python command
|
|
6
|
+
|
|
7
|
+
Python 3.11 or newer is required. Choose one installer:
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
uv tool install luffysolution-omnischolar
|
|
11
|
+
pipx install luffysolution-omnischolar
|
|
12
|
+
python -m pip install luffysolution-omnischolar
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
For development from a source checkout, replace the package name with `.`.
|
|
16
|
+
|
|
17
|
+
Check the command:
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
omnischolar --version
|
|
21
|
+
omnischolar doctor --json
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Install local MCP and Skills
|
|
25
|
+
|
|
26
|
+
```sh
|
|
27
|
+
omnischolar install --dry-run claude
|
|
28
|
+
omnischolar install claude
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
`--dry-run` prints the planned changes without writing files. User scope is the default; use `--scope project` for repository-local configuration:
|
|
32
|
+
|
|
33
|
+
```sh
|
|
34
|
+
omnischolar install cursor --scope project
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
| Agent | User MCP | Project MCP | Skills |
|
|
38
|
+
|---|---|---|---|
|
|
39
|
+
| Codex | `~/.codex/config.toml` | `.codex/config.toml` | supported |
|
|
40
|
+
| Claude Code | `~/.claude.json` | `.mcp.json` | supported |
|
|
41
|
+
| Cursor | `~/.cursor/mcp.json` | `.cursor/mcp.json` | supported |
|
|
42
|
+
| OpenCode | `~/.config/opencode/opencode.json` | `opencode.jsonc` | supported |
|
|
43
|
+
| Hermes | `~/.hermes/config.yaml` | manual MCP setup | supported |
|
|
44
|
+
| Pi | npm Extension | npm Extension | supported |
|
|
45
|
+
| WorkBuddy/CodeBuddy | `~/.codebuddy/.mcp.json` | `.mcp.json` | no documented portable path |
|
|
46
|
+
|
|
47
|
+
For Pi, `omnischolar install pi` installs `npm:@luffysolution/omnischolar-pi` with Pi's package manager and copies the Skills to the selected scope. The Extension starts the local `omnischolar mcp` process. The `pi` command and the Python `omnischolar` command must both be on `PATH`.
|
|
48
|
+
|
|
49
|
+
WorkBuddy/CodeBuddy supports local stdio MCP servers. Its official documentation does not define a portable Skills directory, so only the MCP component is installed automatically.
|
|
50
|
+
|
|
51
|
+
## Update, uninstall, and restore
|
|
52
|
+
|
|
53
|
+
```sh
|
|
54
|
+
omnischolar update claude
|
|
55
|
+
omnischolar uninstall claude
|
|
56
|
+
|
|
57
|
+
omnischolar mcp install claude
|
|
58
|
+
omnischolar mcp status claude
|
|
59
|
+
omnischolar mcp uninstall claude
|
|
60
|
+
|
|
61
|
+
omnischolar install skills claude
|
|
62
|
+
omnischolar update skills claude
|
|
63
|
+
omnischolar uninstall skills claude
|
|
64
|
+
|
|
65
|
+
omnischolar update pi
|
|
66
|
+
omnischolar uninstall pi
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
A backup is created before each change. If the MCP handshake fails after installation, the previous configuration is restored automatically. To restore a reported backup yourself:
|
|
70
|
+
|
|
71
|
+
```sh
|
|
72
|
+
omnischolar rollback PATH_TO_BACKUP
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Other MCP servers and Skills are left in place. The command stops if an existing `omnischolar` entry was not created by this installer or if a managed Skill was edited locally.
|
|
76
|
+
|
|
77
|
+
## Use the official Skills CLI
|
|
78
|
+
|
|
79
|
+
The Skills CLI is separate from Python and MCP installation. Print the command for an agent with:
|
|
80
|
+
|
|
81
|
+
```sh
|
|
82
|
+
omnischolar npx-skills cursor
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
For example:
|
|
86
|
+
|
|
87
|
+
```sh
|
|
88
|
+
npx skills add luffysolution-svg/omnischolar --skill '*' -a cursor -y
|
|
89
|
+
npx skills update -p -y
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
These commands install Skills only; they do not install the `omnischolar` Python command.
|
|
93
|
+
|
|
94
|
+
## If MCP does not connect
|
|
95
|
+
|
|
96
|
+
1. Run `omnischolar --version` from the environment used by the agent.
|
|
97
|
+
2. Run `omnischolar mcp status HOST` to inspect the installed path.
|
|
98
|
+
3. Run `omnischolar doctor --json` to check configuration and output access.
|
|
99
|
+
4. Restart the agent and inspect its MCP log.
|
|
100
|
+
5. Before reinstalling, run `omnischolar install --dry-run HOST`.
|
|
101
|
+
|
|
102
|
+
The only MCP server entry in this release is local stdio:
|
|
103
|
+
|
|
104
|
+
```sh
|
|
105
|
+
omnischolar mcp
|
|
106
|
+
```
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# 安装与 Agent 配置
|
|
2
|
+
|
|
3
|
+
[English](INSTALLATION.en.md)
|
|
4
|
+
|
|
5
|
+
## 安装 Python 命令
|
|
6
|
+
|
|
7
|
+
需要 Python 3.11 或更高版本,任选一种方式:
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
uv tool install luffysolution-omnischolar
|
|
11
|
+
pipx install luffysolution-omnischolar
|
|
12
|
+
python -m pip install luffysolution-omnischolar
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
如需从源码开发安装,请将包名替换为 `.`。
|
|
16
|
+
|
|
17
|
+
验证命令是否可用:
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
omnischolar --version
|
|
21
|
+
omnischolar doctor --json
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## 安装本地 MCP 与 Skills
|
|
25
|
+
|
|
26
|
+
```sh
|
|
27
|
+
omnischolar install --dry-run claude
|
|
28
|
+
omnischolar install claude
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
`--dry-run` 只显示计划,不写文件。默认安装到当前用户;项目级配置使用 `--scope project`:
|
|
32
|
+
|
|
33
|
+
```sh
|
|
34
|
+
omnischolar install cursor --scope project
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
| Agent | 用户级 MCP | 项目级 MCP | Skills |
|
|
38
|
+
|---|---|---|---|
|
|
39
|
+
| Codex | `~/.codex/config.toml` | `.codex/config.toml` | 支持 |
|
|
40
|
+
| Claude Code | `~/.claude.json` | `.mcp.json` | 支持 |
|
|
41
|
+
| Cursor | `~/.cursor/mcp.json` | `.cursor/mcp.json` | 支持 |
|
|
42
|
+
| OpenCode | `~/.config/opencode/opencode.json` | `opencode.jsonc` | 支持 |
|
|
43
|
+
| Hermes | `~/.hermes/config.yaml` | 需手动设置 MCP | 支持 |
|
|
44
|
+
| Pi | npm Extension | npm Extension | 支持 |
|
|
45
|
+
| WorkBuddy/CodeBuddy | `~/.codebuddy/.mcp.json` | `.mcp.json` | 无官方可移植目录 |
|
|
46
|
+
|
|
47
|
+
对 Pi,`omnischolar install pi` 会通过 Pi 包管理器安装 `npm:@luffysolution/omnischolar-pi`,并把 Skills 复制到所选作用域。Extension 会启动本地 `omnischolar mcp` 进程,因此 `pi` 与 Python 的 `omnischolar` 命令都必须位于 `PATH`。
|
|
48
|
+
|
|
49
|
+
WorkBuddy/CodeBuddy 支持本地 stdio MCP。其官方文档没有定义可移植的 Skills 目录,因此安装器只自动配置 MCP。
|
|
50
|
+
|
|
51
|
+
## 更新、卸载与恢复
|
|
52
|
+
|
|
53
|
+
```sh
|
|
54
|
+
omnischolar update claude
|
|
55
|
+
omnischolar uninstall claude
|
|
56
|
+
|
|
57
|
+
omnischolar mcp install claude
|
|
58
|
+
omnischolar mcp status claude
|
|
59
|
+
omnischolar mcp uninstall claude
|
|
60
|
+
|
|
61
|
+
omnischolar install skills claude
|
|
62
|
+
omnischolar update skills claude
|
|
63
|
+
omnischolar uninstall skills claude
|
|
64
|
+
|
|
65
|
+
omnischolar update pi
|
|
66
|
+
omnischolar uninstall pi
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
修改前会创建备份。若安装后的 MCP 握手失败,原配置会自动恢复。也可手动恢复命令返回的备份:
|
|
70
|
+
|
|
71
|
+
```sh
|
|
72
|
+
omnischolar rollback PATH_TO_BACKUP
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
已有的其他 MCP 服务和 Skills 不会被删除。若同名配置不属于 OmniScholar,或已安装的 Skill 被手工改过,命令会停止并说明冲突。
|
|
76
|
+
|
|
77
|
+
## 使用官方 Skills CLI
|
|
78
|
+
|
|
79
|
+
Skills CLI 与 Python/MCP 安装相互独立。先查看适合目标 Agent 的命令:
|
|
80
|
+
|
|
81
|
+
```sh
|
|
82
|
+
omnischolar npx-skills cursor
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
例如:
|
|
86
|
+
|
|
87
|
+
```sh
|
|
88
|
+
npx skills add luffysolution-svg/omnischolar --skill '*' -a cursor -y
|
|
89
|
+
npx skills update -p -y
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
这组命令只安装 Skills,不会安装 `omnischolar` Python 命令。
|
|
93
|
+
|
|
94
|
+
## MCP 连接失败
|
|
95
|
+
|
|
96
|
+
1. 运行 `omnischolar --version`,确认 Agent 的 PATH 能找到该命令。
|
|
97
|
+
2. 运行 `omnischolar mcp status HOST` 查看安装位置。
|
|
98
|
+
3. 运行 `omnischolar doctor --json` 检查配置和输出目录。
|
|
99
|
+
4. 重启 Agent,再查看其 MCP 日志。
|
|
100
|
+
5. 若需重新安装,先运行 `omnischolar install --dry-run HOST`。
|
|
101
|
+
|
|
102
|
+
OmniScholar 的 MCP 入口只有本地 stdio:
|
|
103
|
+
|
|
104
|
+
```sh
|
|
105
|
+
omnischolar mcp
|
|
106
|
+
```
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Materials and chemistry data
|
|
2
|
+
|
|
3
|
+
[简体中文](MATERIALS.md)
|
|
4
|
+
|
|
5
|
+
## Materials Project
|
|
6
|
+
|
|
7
|
+
Materials Project uses these tools:
|
|
8
|
+
|
|
9
|
+
| Tool | Use |
|
|
10
|
+
|---|---|
|
|
11
|
+
| `materials_capabilities` | Show supported data types, fields, and filters without a network call |
|
|
12
|
+
| `materials_search` | Filter summary records by formula, elements, chemical system, stability, and related fields |
|
|
13
|
+
| `materials_route_search` | Query specialized collections such as thermo |
|
|
14
|
+
| `materials_get` | Retrieve one material by ID and data type |
|
|
15
|
+
| `materials_advanced` | Retrieve phase data and, with a local backend, calculate XRD |
|
|
16
|
+
| `materials_export` | Save existing results as JSON, CSV, Markdown, or CIF |
|
|
17
|
+
|
|
18
|
+
Example:
|
|
19
|
+
|
|
20
|
+
```json
|
|
21
|
+
{
|
|
22
|
+
"schemaVersion": 1,
|
|
23
|
+
"data": {
|
|
24
|
+
"materialsProject": {
|
|
25
|
+
"enabled": true,
|
|
26
|
+
"apiKeyEnv": "OMNISCHOLAR_MATERIALS_PROJECT_API_KEY",
|
|
27
|
+
"maxPages": 5
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Keep formulas, element sets, chemical systems, material IDs, and task IDs distinct. Each collection accepts different filters; call `materials_capabilities` before building a specialized query.
|
|
34
|
+
|
|
35
|
+
CIF export uses lattice and site data returned by the service and checks numeric values, occupancy, and coordinates. The exported P1 structure is an exchange representation, not a new symmetry analysis. Computed stability also does not establish experimental synthesizability.
|
|
36
|
+
|
|
37
|
+
XRD needs an additional local calculation backend. Without it, `materials_advanced` returns `local_backend_required` rather than creating a plausible-looking diffraction curve.
|
|
38
|
+
|
|
39
|
+
## CAS Common Chemistry
|
|
40
|
+
|
|
41
|
+
CAS queries are enabled only when the config includes an endpoint and request/response description supplied by the service provider. An API key or website login alone is not enough.
|
|
42
|
+
|
|
43
|
+
Without that information, `chemical_sources` reports `contract_blocked`; `chemical_search` and `chemical_get` do not guess an endpoint.
|
|
44
|
+
|
|
45
|
+
CAS data remains subject to CAS licensing, including non-commercial restrictions where applicable.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# 材料与化学数据
|
|
2
|
+
|
|
3
|
+
[English](MATERIALS.en.md)
|
|
4
|
+
|
|
5
|
+
## Materials Project
|
|
6
|
+
|
|
7
|
+
Materials Project 使用以下工具:
|
|
8
|
+
|
|
9
|
+
| 工具 | 用途 |
|
|
10
|
+
|---|---|
|
|
11
|
+
| `materials_capabilities` | 查看当前支持的数据类型、字段和筛选条件,不联网 |
|
|
12
|
+
| `materials_search` | 按化学式、元素、化学体系、稳定性等条件筛选材料概览 |
|
|
13
|
+
| `materials_route_search` | 查询 thermo 等专用数据集合 |
|
|
14
|
+
| `materials_get` | 按材料 ID 和指定数据类型获取单条记录 |
|
|
15
|
+
| `materials_advanced` | 获取相图数据;配置本地后端后可计算 XRD |
|
|
16
|
+
| `materials_export` | 将已有结果保存为 JSON、CSV、Markdown 或 CIF |
|
|
17
|
+
|
|
18
|
+
配置示例:
|
|
19
|
+
|
|
20
|
+
```json
|
|
21
|
+
{
|
|
22
|
+
"schemaVersion": 1,
|
|
23
|
+
"data": {
|
|
24
|
+
"materialsProject": {
|
|
25
|
+
"enabled": true,
|
|
26
|
+
"apiKeyEnv": "OMNISCHOLAR_MATERIALS_PROJECT_API_KEY",
|
|
27
|
+
"maxPages": 5
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
查询时要分清化学式、元素集合、化学体系、material ID 和 task ID。不同数据集合支持的筛选字段并不相同,可先调用 `materials_capabilities`。
|
|
34
|
+
|
|
35
|
+
CIF 导出只使用返回记录中的晶格和位点数据,并检查数值、占位率和坐标。导出的 P1 结构用于数据交换,不代表已经完成对称性分析。数据库计算得到的稳定性也不等同于实验可合成性。
|
|
36
|
+
|
|
37
|
+
XRD 需要额外的本地计算后端。未安装时,`materials_advanced` 会返回 `local_backend_required`,不会生成一条看似真实的衍射曲线。
|
|
38
|
+
|
|
39
|
+
## CAS Common Chemistry
|
|
40
|
+
|
|
41
|
+
当前版本只有在配置中提供服务商正式给出的接口地址和请求/响应说明文件后,才会启用 CAS 查询。仅有 API key 或网页登录权限不够。
|
|
42
|
+
|
|
43
|
+
未提供这些信息时,`chemical_sources` 会显示 `contract_blocked`,`chemical_search` 和 `chemical_get` 不会猜测接口地址。
|
|
44
|
+
|
|
45
|
+
CAS 数据仍受 CAS 的许可条款约束,其中可能包含非商业使用限制。
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# Literature, Zotero, and PDFs
|
|
2
|
+
|
|
3
|
+
[简体中文](RESEARCH.md)
|
|
4
|
+
|
|
5
|
+
## Literature search
|
|
6
|
+
|
|
7
|
+
| Tool | Use |
|
|
8
|
+
|---|---|
|
|
9
|
+
| `research_sources` | Show enabled sources and available operations |
|
|
10
|
+
| `literature_search` | Search papers by year, type, or open-access status |
|
|
11
|
+
| `literature_get` | Retrieve details by DOI, PMID/PMCID, arXiv ID, or source ID |
|
|
12
|
+
| `literature_graph` | Find references, citations, or recommendations |
|
|
13
|
+
| `journal_metrics` | Retrieve supported journal metrics |
|
|
14
|
+
| `literature_fulltext` | Find lawful full-text locations or save an accessible file under the output directory |
|
|
15
|
+
|
|
16
|
+
The sources serve different purposes:
|
|
17
|
+
|
|
18
|
+
- Semantic Scholar and OpenAlex cover broad literature and citation relationships.
|
|
19
|
+
- PubMed/PMC focuses on biomedical records; PMC also supplies licensed open full text.
|
|
20
|
+
- arXiv preserves preprint identifiers and versions.
|
|
21
|
+
- Crossref is useful for checking DOI registration metadata.
|
|
22
|
+
- Unpaywall finds open-access copies without bypassing subscriptions or access controls.
|
|
23
|
+
- easyScholar supplies journal metrics supported by its current interface.
|
|
24
|
+
- Ai4Scholar also covers Google Scholar, Google Patents, authors, datasets, and journals. Some calls use account credit.
|
|
25
|
+
|
|
26
|
+
Start with a small `limit`. Deduplicate by DOI when possible; otherwise compare normalized title, year, and first author. Title similarity can shortlist a paper but cannot establish that it supports a claim.
|
|
27
|
+
|
|
28
|
+
On HTTP 429, OmniScholar returns a rate-limit result. Wait for the provider's backoff period or choose another source that supports the same operation. Do not submit the same request in a tight loop.
|
|
29
|
+
|
|
30
|
+
## Zotero
|
|
31
|
+
|
|
32
|
+
OmniScholar connects only to the local Zotero API:
|
|
33
|
+
|
|
34
|
+
```text
|
|
35
|
+
http://127.0.0.1:23119/api
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Enable “Allow other applications on this computer to communicate with Zotero” and keep Zotero Desktop running.
|
|
39
|
+
|
|
40
|
+
| Tool | Content |
|
|
41
|
+
|---|---|
|
|
42
|
+
| `zotero_collections` | Collections and collection items |
|
|
43
|
+
| `zotero_search` | Bibliographic items, notes, annotations, and attachments |
|
|
44
|
+
| `zotero_item` | A raw item or a combined paper view |
|
|
45
|
+
|
|
46
|
+
The combined view can include metadata, notes, annotations, attachment details, indexed text, and a local PDF path. OmniScholar never creates, updates, moves, tags, or deletes Zotero data.
|
|
47
|
+
|
|
48
|
+
Notes and annotations are personal reading context, not evidence from the publication. Check the paper itself before citing a claim.
|
|
49
|
+
|
|
50
|
+
## MinerU parsing
|
|
51
|
+
|
|
52
|
+
`omnischolar_parse` validates the PDF, computes SHA-256, and asks MinerU to return text, formulas, tables, and figures. Results are cached; the same file and parser settings can return a cache hit.
|
|
53
|
+
|
|
54
|
+
Upload requires both approvals:
|
|
55
|
+
|
|
56
|
+
1. `mineru.allowExternalUpload` is `true` in the config;
|
|
57
|
+
2. `allowExternalUpload` is `true` in the individual `omnischolar_parse` call.
|
|
58
|
+
|
|
59
|
+
OmniScholar does not upload a Zotero attachment automatically. Confirm the exact item and file, then approve that upload separately. `force` creates a new parse and upload, so it needs fresh approval.
|
|
60
|
+
|
|
61
|
+
Before extraction, MinerU archives are checked for unsafe paths, symlinks, excessive entries, and excessive expansion. Failed archives are not published.
|
|
62
|
+
|
|
63
|
+
## Citations
|
|
64
|
+
|
|
65
|
+
Citation work has two steps: establish that a source supports the claim, then format its bibliographic record.
|
|
66
|
+
|
|
67
|
+
1. Find sources with `literature_search` and `literature_get`.
|
|
68
|
+
2. Check DOI, PMID, arXiv ID, title, authors, and year.
|
|
69
|
+
3. Read the passage relevant to the claim.
|
|
70
|
+
4. If paid use is approved, `ai4scholar_citation_candidates` can suggest more candidates.
|
|
71
|
+
5. Use `ai4scholar_cite` only for records you have accepted.
|
|
72
|
+
|
|
73
|
+
A correctly formatted reference does not prove the claim. Ai4Scholar's Google Scholar citation formatter may lack a result ID required by the upstream interface; if it reports `blocked`, do not invent an ID.
|
|
74
|
+
|
|
75
|
+
## Markdown and Obsidian output
|
|
76
|
+
|
|
77
|
+
`omnischolar_sync` shows a plan before writing under `output.rootDirectory`. The directory can be a regular folder or part of an Obsidian vault.
|
|
78
|
+
|
|
79
|
+
Sync distinguishes new content, no change, metadata changes, parse changes, render changes, missing files, conflicts, exclusions, and interrupted recovery. Metadata repair, rerendering, and transaction recovery do not upload a PDF.
|
|
80
|
+
|
|
81
|
+
If managed Markdown was edited by hand, the default policy keeps it and writes the incoming version under `.conflicts/`. Review both files before merging.
|
|
82
|
+
|
|
83
|
+
Before using a real vault, point `output.rootDirectory` at a temporary directory and inspect the folder names, Markdown, and image links.
|
package/docs/RESEARCH.md
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# 文献、Zotero 与 PDF
|
|
2
|
+
|
|
3
|
+
[English](RESEARCH.en.md)
|
|
4
|
+
|
|
5
|
+
## 文献检索
|
|
6
|
+
|
|
7
|
+
| 工具 | 用途 |
|
|
8
|
+
|---|---|
|
|
9
|
+
| `research_sources` | 查看已启用的数据源和可用功能 |
|
|
10
|
+
| `literature_search` | 检索论文,可限制年份、类型和开放获取状态 |
|
|
11
|
+
| `literature_get` | 按 DOI、PMID/PMCID、arXiv ID 或数据源 ID 获取详情 |
|
|
12
|
+
| `literature_graph` | 查询参考文献、施引文献或推荐论文 |
|
|
13
|
+
| `journal_metrics` | 查询已支持的期刊指标 |
|
|
14
|
+
| `literature_fulltext` | 查找合法全文地址,或将允许访问的文件保存到输出目录 |
|
|
15
|
+
|
|
16
|
+
各数据源侧重点不同:
|
|
17
|
+
|
|
18
|
+
- Semantic Scholar 和 OpenAlex 适合跨学科检索与引用关系。
|
|
19
|
+
- PubMed/PMC 适合生物医学文献,PMC 还能提供带许可信息的开放全文。
|
|
20
|
+
- arXiv 保留预印本标识符和版本信息。
|
|
21
|
+
- Crossref 适合核对 DOI 注册元数据。
|
|
22
|
+
- Unpaywall 用于查找开放获取版本,不绕过订阅或访问控制。
|
|
23
|
+
- easyScholar 提供当前接口支持的期刊指标。
|
|
24
|
+
- Ai4Scholar 还可查询 Google Scholar、Google Patents、作者、数据集和期刊信息,部分调用会消耗额度。
|
|
25
|
+
|
|
26
|
+
检索时先用较小的 `limit`。优先按 DOI 去重;没有 DOI 时,再比较标题、年份和第一作者。标题相似只能用于筛选,不能代替正文证据。
|
|
27
|
+
|
|
28
|
+
遇到 HTTP 429 时,OmniScholar 会返回限流信息。等待服务商给出的时间后再试,或改用支持同一查询的数据源。不要连续提交相同请求。
|
|
29
|
+
|
|
30
|
+
## Zotero
|
|
31
|
+
|
|
32
|
+
OmniScholar 只连接本机 Zotero API:
|
|
33
|
+
|
|
34
|
+
```text
|
|
35
|
+
http://127.0.0.1:23119/api
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
需要在 Zotero 中开启“允许其他应用程序与 Zotero 通信”,并保持 Zotero Desktop 运行。
|
|
39
|
+
|
|
40
|
+
| 工具 | 可读取内容 |
|
|
41
|
+
|---|---|
|
|
42
|
+
| `zotero_collections` | 收藏夹及其条目 |
|
|
43
|
+
| `zotero_search` | 文献条目、笔记、批注和附件 |
|
|
44
|
+
| `zotero_item` | 单个条目或聚合后的论文视图 |
|
|
45
|
+
|
|
46
|
+
聚合视图可包含书目信息、笔记、批注、附件信息、索引文本和本地 PDF 路径。OmniScholar 不会创建、修改、移动、加标签或删除 Zotero 数据。
|
|
47
|
+
|
|
48
|
+
Zotero 笔记和批注属于个人阅读记录,不应当作论文原文证据。需要引用论文结论时,仍要核对原文。
|
|
49
|
+
|
|
50
|
+
## MinerU 解析
|
|
51
|
+
|
|
52
|
+
`omnischolar_parse` 检查 PDF 文件、计算 SHA-256,并使用 MinerU 返回正文、公式、表格和图片。解析结果会缓存;同一文件和解析设置再次调用时可直接命中缓存。
|
|
53
|
+
|
|
54
|
+
上传必须同时得到两次确认:
|
|
55
|
+
|
|
56
|
+
1. 配置中的 `mineru.allowExternalUpload` 为 `true`;
|
|
57
|
+
2. 本次 `omnischolar_parse` 调用中的 `allowExternalUpload` 为 `true`。
|
|
58
|
+
|
|
59
|
+
OmniScholar 不会自动把 Zotero 附件上传到 MinerU。应先确认具体条目和文件,再单独批准上传。`force` 会重新解析并产生一次新上传,因此也需要新的授权。
|
|
60
|
+
|
|
61
|
+
下载的 MinerU 压缩包会在解压前检查路径、符号链接、文件数量和展开大小。检查失败时不写入输出目录。
|
|
62
|
+
|
|
63
|
+
## 引用
|
|
64
|
+
|
|
65
|
+
引用工作分为两步:先确认来源是否支持论点,再格式化书目信息。
|
|
66
|
+
|
|
67
|
+
1. 用 `literature_search` 和 `literature_get` 查找来源。
|
|
68
|
+
2. 核对 DOI、PMID、arXiv ID、标题、作者和年份。
|
|
69
|
+
3. 阅读与论点相关的正文段落。
|
|
70
|
+
4. 使用 `ai4scholar_citation_candidates` 补充候选时,先确认付费调用。
|
|
71
|
+
5. 只对已核对的记录使用 `ai4scholar_cite`。
|
|
72
|
+
|
|
73
|
+
格式正确的参考文献不代表论点已经得到支持。Ai4Scholar 的 Google Scholar 引用格式化目前可能缺少接口要求的结果 ID;遇到 `blocked` 时,不要自行拼接 ID。
|
|
74
|
+
|
|
75
|
+
## 保存到 Markdown 或 Obsidian
|
|
76
|
+
|
|
77
|
+
`omnischolar_sync` 会先给出计划,再写入 `output.rootDirectory`。该目录可以是普通文件夹,也可以位于 Obsidian Vault 中。
|
|
78
|
+
|
|
79
|
+
同步会区分新建、无需更新、元数据变化、解析变化、渲染变化、文件缺失、冲突、排除和中断恢复。仅修复元数据、渲染或中断事务时不会上传 PDF。
|
|
80
|
+
|
|
81
|
+
若已生成的 Markdown 被手工修改,默认策略会保留现有文件,并把新版本写入 `.conflicts/`。检查两份内容后再决定如何合并。
|
|
82
|
+
|
|
83
|
+
首次写入真实 Vault 前,可先把 `output.rootDirectory` 指向临时目录,确认目录名、Markdown 和图片路径符合预期。
|
package/docs/TOOLS.en.md
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Tool list
|
|
2
|
+
|
|
3
|
+
[简体中文](TOOLS.md)
|
|
4
|
+
|
|
5
|
+
Tool and capability names match the values returned to agents.
|
|
6
|
+
|
|
7
|
+
| Tool | Group | Capabilities | Side effects | Network | Credentials | Cost |
|
|
8
|
+
|---|---|---|---|---:|---|---|
|
|
9
|
+
| `omnischolar_status` | runtime | `runtime.status` | none | no | none | free |
|
|
10
|
+
| `omnischolar_capabilities` | runtime | `runtime.capabilities` | none | no | none | free |
|
|
11
|
+
| `research_sources` | literature | `literature.sources` | none | no | none | free |
|
|
12
|
+
| `literature_search` | literature | `literature.search` | none | yes | none | free |
|
|
13
|
+
| `literature_get` | literature | `literature.lookup` | none | yes | none | free |
|
|
14
|
+
| `literature_graph` | literature | `literature.references`, `literature.citations`, `literature.recommendations` | none | yes | none | free |
|
|
15
|
+
| `journal_metrics` | literature | `journal.metrics` | none | yes | none | free |
|
|
16
|
+
| `literature_fulltext` | literature | `fulltext.resolve`, `fulltext.fetch` | filesystem | yes | none | free |
|
|
17
|
+
| `zotero_collections` | zotero | `zotero.collections` | none | yes | none | free |
|
|
18
|
+
| `zotero_search` | zotero | `zotero.search` | none | yes | none | free |
|
|
19
|
+
| `zotero_item` | zotero | `zotero.item`, `zotero.aggregate` | none | yes | none | free |
|
|
20
|
+
| `omnischolar_parse` | parsing | `pdf.parse`, `sync.publish` | external-upload | yes | mineru | metered |
|
|
21
|
+
| `omnischolar_sync` | parsing | `sync.plan`, `sync.apply`, `sync.recovery` | filesystem | yes | none | free |
|
|
22
|
+
| `ai4scholar_search` | ai4scholar | `ai4scholar.search` | paid | yes | ai4scholar | paid |
|
|
23
|
+
| `ai4scholar_paper` | ai4scholar | `ai4scholar.paper` | paid | yes | ai4scholar | paid |
|
|
24
|
+
| `ai4scholar_author` | ai4scholar | `ai4scholar.author` | paid | yes | ai4scholar | paid |
|
|
25
|
+
| `ai4scholar_batch` | ai4scholar | `ai4scholar.batch` | paid | yes | ai4scholar | paid |
|
|
26
|
+
| `ai4scholar_recommend` | ai4scholar | `ai4scholar.recommend` | paid | yes | ai4scholar | paid |
|
|
27
|
+
| `ai4scholar_cite` | citation | `citation.format` | paid | yes | ai4scholar | paid |
|
|
28
|
+
| `ai4scholar_snippets` | ai4scholar | `ai4scholar.snippets` | paid | yes | ai4scholar | paid |
|
|
29
|
+
| `ai4scholar_credits` | ai4scholar | `ai4scholar.credits` | none | yes | ai4scholar | free |
|
|
30
|
+
| `ai4scholar_dataset` | ai4scholar | `ai4scholar.dataset` | paid | yes | ai4scholar | paid |
|
|
31
|
+
| `ai4scholar_journal` | ai4scholar | `ai4scholar.journal` | paid | yes | ai4scholar | paid |
|
|
32
|
+
| `ai4scholar_citation_candidates` | citation | `citation.candidates` | paid | yes | ai4scholar | paid |
|
|
33
|
+
| `ai4scholar_figure` | media | `media.generate`, `media.edit`, `media.vectorize` | paid | yes | ai4scholar | paid |
|
|
34
|
+
| `materials_capabilities` | materials | `materials.capabilities` | none | no | materials-project | free |
|
|
35
|
+
| `materials_search` | materials | `materials.search` | none | yes | materials-project | free |
|
|
36
|
+
| `materials_route_search` | materials | `materials.route-search` | none | yes | materials-project | free |
|
|
37
|
+
| `materials_get` | materials | `materials.lookup` | none | yes | materials-project | free |
|
|
38
|
+
| `materials_advanced` | materials | `materials.phase-diagram`, `materials.xrd` | none | yes | materials-project | free |
|
|
39
|
+
| `materials_export` | materials | `materials.export` | filesystem | no | none | free |
|
|
40
|
+
| `chemical_sources` | chemistry | `chemistry.sources` | none | no | none | free |
|
|
41
|
+
| `chemical_search` | chemistry | `chemistry.search` | none | yes | cas | free |
|
|
42
|
+
| `chemical_get` | chemistry | `chemistry.lookup` | none | yes | cas | free |
|
|
43
|
+
| `omnischolar_image_models` | media | `media.models` | none | yes | none | free |
|
|
44
|
+
| `omnischolar_image_generate` | media | `text-to-image`, `image-to-image`, `multi-reference` | paid | yes | none | paid |
|
|
45
|
+
| `omnischolar_image_edit` | media | `media.edit`, `multi-reference` | paid | yes | none | paid |
|
|
46
|
+
| `omnischolar_image_service` | media | `media.service` | none | yes | none | free |
|
|
47
|
+
|
|
48
|
+
Arguments not declared in a tool's input schema are rejected.
|
|
49
|
+
Paid or upload-capable tools require both configuration and per-call authorization.
|
package/docs/TOOLS.md
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# 工具目录
|
|
2
|
+
|
|
3
|
+
[English](TOOLS.en.md)
|
|
4
|
+
|
|
5
|
+
工具名和功能标识保留英文,便于与 Agent 返回结果对照。
|
|
6
|
+
|
|
7
|
+
| 工具 | 分组 | 功能 | 可能产生的操作 | 联网 | 所需凭据 | 费用类型 |
|
|
8
|
+
|---|---|---|---|---:|---|---|
|
|
9
|
+
| `omnischolar_status` | runtime | `runtime.status` | none | no | none | free |
|
|
10
|
+
| `omnischolar_capabilities` | runtime | `runtime.capabilities` | none | no | none | free |
|
|
11
|
+
| `research_sources` | literature | `literature.sources` | none | no | none | free |
|
|
12
|
+
| `literature_search` | literature | `literature.search` | none | yes | none | free |
|
|
13
|
+
| `literature_get` | literature | `literature.lookup` | none | yes | none | free |
|
|
14
|
+
| `literature_graph` | literature | `literature.references`, `literature.citations`, `literature.recommendations` | none | yes | none | free |
|
|
15
|
+
| `journal_metrics` | literature | `journal.metrics` | none | yes | none | free |
|
|
16
|
+
| `literature_fulltext` | literature | `fulltext.resolve`, `fulltext.fetch` | filesystem | yes | none | free |
|
|
17
|
+
| `zotero_collections` | zotero | `zotero.collections` | none | yes | none | free |
|
|
18
|
+
| `zotero_search` | zotero | `zotero.search` | none | yes | none | free |
|
|
19
|
+
| `zotero_item` | zotero | `zotero.item`, `zotero.aggregate` | none | yes | none | free |
|
|
20
|
+
| `omnischolar_parse` | parsing | `pdf.parse`, `sync.publish` | external-upload | yes | mineru | metered |
|
|
21
|
+
| `omnischolar_sync` | parsing | `sync.plan`, `sync.apply`, `sync.recovery` | filesystem | yes | none | free |
|
|
22
|
+
| `ai4scholar_search` | ai4scholar | `ai4scholar.search` | paid | yes | ai4scholar | paid |
|
|
23
|
+
| `ai4scholar_paper` | ai4scholar | `ai4scholar.paper` | paid | yes | ai4scholar | paid |
|
|
24
|
+
| `ai4scholar_author` | ai4scholar | `ai4scholar.author` | paid | yes | ai4scholar | paid |
|
|
25
|
+
| `ai4scholar_batch` | ai4scholar | `ai4scholar.batch` | paid | yes | ai4scholar | paid |
|
|
26
|
+
| `ai4scholar_recommend` | ai4scholar | `ai4scholar.recommend` | paid | yes | ai4scholar | paid |
|
|
27
|
+
| `ai4scholar_cite` | citation | `citation.format` | paid | yes | ai4scholar | paid |
|
|
28
|
+
| `ai4scholar_snippets` | ai4scholar | `ai4scholar.snippets` | paid | yes | ai4scholar | paid |
|
|
29
|
+
| `ai4scholar_credits` | ai4scholar | `ai4scholar.credits` | none | yes | ai4scholar | free |
|
|
30
|
+
| `ai4scholar_dataset` | ai4scholar | `ai4scholar.dataset` | paid | yes | ai4scholar | paid |
|
|
31
|
+
| `ai4scholar_journal` | ai4scholar | `ai4scholar.journal` | paid | yes | ai4scholar | paid |
|
|
32
|
+
| `ai4scholar_citation_candidates` | citation | `citation.candidates` | paid | yes | ai4scholar | paid |
|
|
33
|
+
| `ai4scholar_figure` | media | `media.generate`, `media.edit`, `media.vectorize` | paid | yes | ai4scholar | paid |
|
|
34
|
+
| `materials_capabilities` | materials | `materials.capabilities` | none | no | materials-project | free |
|
|
35
|
+
| `materials_search` | materials | `materials.search` | none | yes | materials-project | free |
|
|
36
|
+
| `materials_route_search` | materials | `materials.route-search` | none | yes | materials-project | free |
|
|
37
|
+
| `materials_get` | materials | `materials.lookup` | none | yes | materials-project | free |
|
|
38
|
+
| `materials_advanced` | materials | `materials.phase-diagram`, `materials.xrd` | none | yes | materials-project | free |
|
|
39
|
+
| `materials_export` | materials | `materials.export` | filesystem | no | none | free |
|
|
40
|
+
| `chemical_sources` | chemistry | `chemistry.sources` | none | no | none | free |
|
|
41
|
+
| `chemical_search` | chemistry | `chemistry.search` | none | yes | cas | free |
|
|
42
|
+
| `chemical_get` | chemistry | `chemistry.lookup` | none | yes | cas | free |
|
|
43
|
+
| `omnischolar_image_models` | media | `media.models` | none | yes | none | free |
|
|
44
|
+
| `omnischolar_image_generate` | media | `text-to-image`, `image-to-image`, `multi-reference` | paid | yes | none | paid |
|
|
45
|
+
| `omnischolar_image_edit` | media | `media.edit`, `multi-reference` | paid | yes | none | paid |
|
|
46
|
+
| `omnischolar_image_service` | media | `media.service` | none | yes | none | free |
|
|
47
|
+
|
|
48
|
+
未在输入 schema 中声明的参数会被拒绝。
|
|
49
|
+
付费或上传工具必须同时通过配置开关和本次调用的显式授权。
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Agent configuration files
|
|
2
|
+
|
|
3
|
+
- Portable Agent Plugin and Codex: root `plugin.json`, `mcp.json`, and `skills/`
|
|
4
|
+
- Claude Code: `.claude-plugin/plugin.json`, root `.mcp.json`, and `skills/`
|
|
5
|
+
- Cursor: root Agent Plugin files plus `.cursor-plugin/plugin.json`
|
|
6
|
+
- OpenCode: merge `opencode.jsonc` into the project or user OpenCode config
|
|
7
|
+
- Hermes: merge `hermes.yaml` into `~/.hermes/config.yaml`
|
|
8
|
+
- Pi: see `pi.md`; the npm Extension bridges the local MCP server
|
|
9
|
+
- WorkBuddy/CodeBuddy: merge `workbuddy.json` into `~/.codebuddy/.mcp.json` or project `.mcp.json`
|
|
10
|
+
|
|
11
|
+
All supported MCP entries start the local command `omnischolar mcp`. These files contain no provider credentials.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Pi
|
|
2
|
+
|
|
3
|
+
OmniScholar uses the npm-published `@luffysolution/omnischolar-pi` Extension to bridge its local MCP server into Pi. The full installer also copies Skills to `.pi/agent/skills` for user scope or `.pi/skills` for project scope.
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
omnischolar install pi
|
|
7
|
+
# or install only the Extension with Pi's package manager
|
|
8
|
+
pi install npm:@luffysolution/omnischolar-pi
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
The Extension starts `omnischolar mcp`, discovers the server's tools, forwards calls and cancellation signals, and closes the MCP client when the Pi session ends.
|
|
12
|
+
|
|
13
|
+
`omnischolar mcp install pi` remains `manual_required` because Pi uses an Extension instead of a native MCP settings file. Use the full `omnischolar install pi` command.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Tencent WorkBuddy / CodeBuddy
|
|
2
|
+
|
|
3
|
+
WorkBuddy/CodeBuddy CLI and IDE support local stdio MCP servers. Copy [`workbuddy.json`](workbuddy.json) into the MCP editor, or merge it into one of the documented files:
|
|
4
|
+
|
|
5
|
+
- User scope: `~/.codebuddy/.mcp.json`
|
|
6
|
+
- Project scope: `.mcp.json`
|
|
7
|
+
|
|
8
|
+
The installer can write the same entry:
|
|
9
|
+
|
|
10
|
+
```sh
|
|
11
|
+
omnischolar install workbuddy
|
|
12
|
+
omnischolar install workbuddy --scope project
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
The official documentation does not define a portable WorkBuddy Skills directory, so the Skills component remains manual.
|
|
16
|
+
|
|
17
|
+
Official references checked on 2026-09-10:
|
|
18
|
+
|
|
19
|
+
- <https://www.workbuddy.ai/docs/cli/mcp>
|
|
20
|
+
- <https://www.workbuddy.ai/docs/ide/User-guide/MCP>
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"runtime": {
|
|
4
|
+
"cacheDirectory": ".omnischolar/cache",
|
|
5
|
+
"python": "python",
|
|
6
|
+
"logLevel": "info",
|
|
7
|
+
"maxOutputBytes": 51200,
|
|
8
|
+
"maxOutputLines": 2000,
|
|
9
|
+
"maxResponseBytes": 16777216,
|
|
10
|
+
"requestTimeoutSeconds": 30,
|
|
11
|
+
"workspaceRoots": ["."]
|
|
12
|
+
},
|
|
13
|
+
"tools": {
|
|
14
|
+
"groups": {
|
|
15
|
+
"literature": true,
|
|
16
|
+
"ai4scholar": true,
|
|
17
|
+
"zotero": true,
|
|
18
|
+
"parsing": true,
|
|
19
|
+
"citation": true,
|
|
20
|
+
"materials": true,
|
|
21
|
+
"chemistry": true,
|
|
22
|
+
"media": true
|
|
23
|
+
},
|
|
24
|
+
"disabled": []
|
|
25
|
+
},
|
|
26
|
+
"defaults": {
|
|
27
|
+
"language": "en",
|
|
28
|
+
"citationStyle": "apa",
|
|
29
|
+
"literatureLimit": 20,
|
|
30
|
+
"preferredLiteratureProviders": ["semantic-scholar", "openalex", "crossref"],
|
|
31
|
+
"defaultImageProvider": "openai"
|
|
32
|
+
},
|
|
33
|
+
"research": {
|
|
34
|
+
"fallback": true,
|
|
35
|
+
"maxPages": 10,
|
|
36
|
+
"cacheTtlSeconds": 3600,
|
|
37
|
+
"providers": {
|
|
38
|
+
"semantic-scholar": {
|
|
39
|
+
"enabled": true,
|
|
40
|
+
"apiKeyEnv": "OMNISCHOLAR_SEMANTIC_SCHOLAR_API_KEY",
|
|
41
|
+
"maxPages": 10
|
|
42
|
+
},
|
|
43
|
+
"openalex": {
|
|
44
|
+
"enabled": true,
|
|
45
|
+
"email": "researcher@example.edu",
|
|
46
|
+
"maxPages": 10
|
|
47
|
+
},
|
|
48
|
+
"pubmed": {
|
|
49
|
+
"enabled": true,
|
|
50
|
+
"apiKeyEnv": "OMNISCHOLAR_NCBI_API_KEY",
|
|
51
|
+
"email": "researcher@example.edu",
|
|
52
|
+
"tool": "omnischolar",
|
|
53
|
+
"maxPages": 10
|
|
54
|
+
},
|
|
55
|
+
"arxiv": {
|
|
56
|
+
"enabled": true,
|
|
57
|
+
"maxPages": 10
|
|
58
|
+
},
|
|
59
|
+
"crossref": {
|
|
60
|
+
"enabled": true,
|
|
61
|
+
"email": "researcher@example.edu",
|
|
62
|
+
"maxPages": 10
|
|
63
|
+
},
|
|
64
|
+
"unpaywall": {
|
|
65
|
+
"enabled": false,
|
|
66
|
+
"email": "researcher@example.edu",
|
|
67
|
+
"maxPages": 10
|
|
68
|
+
},
|
|
69
|
+
"easyscholar": {
|
|
70
|
+
"enabled": false,
|
|
71
|
+
"apiKeyEnv": "OMNISCHOLAR_EASYSCHOLAR_API_KEY",
|
|
72
|
+
"maxPages": 5
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"ai4scholar": {
|
|
77
|
+
"enabled": false,
|
|
78
|
+
"baseUrl": "https://ai4scholar.net",
|
|
79
|
+
"apiKeyEnv": "OMNISCHOLAR_AI4SCHOLAR_API_KEY",
|
|
80
|
+
"timeoutSeconds": 60,
|
|
81
|
+
"maxResponseBytes": 16777216,
|
|
82
|
+
"allowPaid": false
|
|
83
|
+
},
|
|
84
|
+
"zotero": {
|
|
85
|
+
"enabled": true,
|
|
86
|
+
"baseUrl": "http://127.0.0.1:23119/api",
|
|
87
|
+
"maxItems": 500
|
|
88
|
+
},
|
|
89
|
+
"mineru": {
|
|
90
|
+
"enabled": false,
|
|
91
|
+
"baseUrl": "https://mineru.net/api/v4",
|
|
92
|
+
"lightweightBaseUrl": "https://mineru.net/api/v1/agent",
|
|
93
|
+
"apiKeyEnv": "OMNISCHOLAR_MINERU_API_KEY",
|
|
94
|
+
"model": "pipeline",
|
|
95
|
+
"cacheDirectory": ".omnischolar/mineru",
|
|
96
|
+
"pollIntervalSeconds": 2,
|
|
97
|
+
"pollTimeoutSeconds": 600,
|
|
98
|
+
"maxPdfBytes": 209715200,
|
|
99
|
+
"allowExternalUpload": false,
|
|
100
|
+
"allowLightweightFallback": false
|
|
101
|
+
},
|
|
102
|
+
"data": {
|
|
103
|
+
"materialsProject": {
|
|
104
|
+
"enabled": false,
|
|
105
|
+
"baseUrl": "https://api.materialsproject.org",
|
|
106
|
+
"apiKeyEnv": "OMNISCHOLAR_MATERIALS_PROJECT_API_KEY",
|
|
107
|
+
"maxPages": 10
|
|
108
|
+
},
|
|
109
|
+
"casCommonChemistry": {
|
|
110
|
+
"enabled": false,
|
|
111
|
+
"apiKeyEnv": "OMNISCHOLAR_CAS_API_KEY",
|
|
112
|
+
"baseUrl": null,
|
|
113
|
+
"contractFile": null
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
"media": {
|
|
117
|
+
"allowExternalUpload": false,
|
|
118
|
+
"allowPaid": false,
|
|
119
|
+
"maxInputBytes": 26214400,
|
|
120
|
+
"maxArtifactBytes": 52428800,
|
|
121
|
+
"providers": {
|
|
122
|
+
"openai": {
|
|
123
|
+
"enabled": false,
|
|
124
|
+
"apiKeyEnv": "OMNISCHOLAR_OPENAI_API_KEY",
|
|
125
|
+
"baseUrl": "https://api.openai.com/v1",
|
|
126
|
+
"models": {
|
|
127
|
+
"gpt-image-1": {
|
|
128
|
+
"capabilities": ["text-to-image", "image-to-image", "edit", "multi-reference"],
|
|
129
|
+
"paid": true
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
"options": {}
|
|
133
|
+
},
|
|
134
|
+
"google": {
|
|
135
|
+
"enabled": false,
|
|
136
|
+
"apiKeyEnv": "OMNISCHOLAR_GEMINI_API_KEY",
|
|
137
|
+
"baseUrl": "https://generativelanguage.googleapis.com/v1beta",
|
|
138
|
+
"models": {},
|
|
139
|
+
"options": {}
|
|
140
|
+
},
|
|
141
|
+
"vertex": {
|
|
142
|
+
"enabled": false,
|
|
143
|
+
"apiKeyEnv": "OMNISCHOLAR_VERTEX_ACCESS_TOKEN",
|
|
144
|
+
"project": "your-project",
|
|
145
|
+
"location": "us-central1",
|
|
146
|
+
"models": {},
|
|
147
|
+
"options": {}
|
|
148
|
+
},
|
|
149
|
+
"xai": {
|
|
150
|
+
"enabled": false,
|
|
151
|
+
"apiKeyEnv": "OMNISCHOLAR_XAI_API_KEY",
|
|
152
|
+
"baseUrl": "https://api.x.ai/v1",
|
|
153
|
+
"models": {},
|
|
154
|
+
"options": {}
|
|
155
|
+
},
|
|
156
|
+
"fal": {
|
|
157
|
+
"enabled": false,
|
|
158
|
+
"apiKeyEnv": "OMNISCHOLAR_FAL_API_KEY",
|
|
159
|
+
"baseUrl": "https://fal.run",
|
|
160
|
+
"models": {},
|
|
161
|
+
"options": {}
|
|
162
|
+
},
|
|
163
|
+
"dashscope": {
|
|
164
|
+
"enabled": false,
|
|
165
|
+
"apiKeyEnv": "OMNISCHOLAR_DASHSCOPE_API_KEY",
|
|
166
|
+
"baseUrl": "https://dashscope.aliyuncs.com/api/v1",
|
|
167
|
+
"models": {},
|
|
168
|
+
"options": {}
|
|
169
|
+
},
|
|
170
|
+
"qwen-cloud": {
|
|
171
|
+
"enabled": false,
|
|
172
|
+
"apiKeyEnv": "OMNISCHOLAR_QWEN_API_KEY",
|
|
173
|
+
"baseUrl": "https://dashscope.aliyuncs.com/api/v1",
|
|
174
|
+
"models": {},
|
|
175
|
+
"options": {}
|
|
176
|
+
},
|
|
177
|
+
"atlas": {
|
|
178
|
+
"enabled": false,
|
|
179
|
+
"apiKeyEnv": "OMNISCHOLAR_ATLAS_API_KEY",
|
|
180
|
+
"baseUrl": "https://your-atlas-provider.example/v1",
|
|
181
|
+
"models": {},
|
|
182
|
+
"options": {}
|
|
183
|
+
},
|
|
184
|
+
"custom": {
|
|
185
|
+
"enabled": false,
|
|
186
|
+
"apiKeyEnv": "OMNISCHOLAR_CUSTOM_IMAGE_API_KEY",
|
|
187
|
+
"baseUrl": "https://images.example.edu/v1",
|
|
188
|
+
"models": {
|
|
189
|
+
"explicit-model-id": {
|
|
190
|
+
"capabilities": ["text-to-image"],
|
|
191
|
+
"paid": true
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
"options": {
|
|
195
|
+
"generationEndpoint": "images/generations",
|
|
196
|
+
"editEndpoint": "images/edits"
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
"sync": {
|
|
202
|
+
"namespace": null,
|
|
203
|
+
"cacheDirectory": ".omnischolar/sync",
|
|
204
|
+
"conflictPolicy": "preserve-local",
|
|
205
|
+
"recovery": true,
|
|
206
|
+
"backup": true,
|
|
207
|
+
"avoidUnnecessaryParse": true
|
|
208
|
+
},
|
|
209
|
+
"output": {
|
|
210
|
+
"rootDirectory": "omnischolar-output",
|
|
211
|
+
"conflictDirectory": ".conflicts",
|
|
212
|
+
"safeWrites": true
|
|
213
|
+
}
|
|
214
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@luffysolution/omnischolar-pi",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Pi MCP bridge for the OmniScholar research toolkit",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -29,7 +29,14 @@
|
|
|
29
29
|
"files": [
|
|
30
30
|
"pi-extension/dist",
|
|
31
31
|
"README.md",
|
|
32
|
-
"
|
|
32
|
+
"README.zh-CN.md",
|
|
33
|
+
"LICENSE",
|
|
34
|
+
"PRIVACY.md",
|
|
35
|
+
"TERMS.md",
|
|
36
|
+
"THIRD_PARTY_NOTICES.md",
|
|
37
|
+
"omnischolar.config.example.json",
|
|
38
|
+
"docs",
|
|
39
|
+
"host-configs"
|
|
33
40
|
],
|
|
34
41
|
"pi": {
|
|
35
42
|
"extensions": [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
|
|
2
2
|
import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";
|
|
3
3
|
import { Type } from "typebox";
|
|
4
|
-
const CLIENT_INFO = { name: "omnischolar-pi", version: "0.1.
|
|
4
|
+
const CLIENT_INFO = { name: "omnischolar-pi", version: "0.1.1" };
|
|
5
5
|
export function resultText(result) {
|
|
6
6
|
return result.content
|
|
7
7
|
.map((item) => {
|