@luffysolution/omnischolar-pi 0.1.13 → 0.1.14

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.en.md CHANGED
@@ -93,7 +93,9 @@ You are my research assistant using OmniScholar. Search and cite reliable schola
93
93
 
94
94
  ## Configuration and examples
95
95
 
96
- On the first MCP start or installer run, OmniScholar creates a complete user-level `omnischolar.config.json` template. API keys can be entered directly as `apiKey`, or supplied through the named `apiKeyEnv` environment variable.
96
+ On the first MCP start or installer run, OmniScholar creates a complete user-level `omnischolar.config.json` template. Services in the template are enabled by default; after you provide an API key, the corresponding service is ready to use, while services without credentials do not make requests automatically. API keys can be entered directly as `apiKey`, or supplied through the named `apiKeyEnv` environment variable.
97
+
98
+ Enable the service and fill in its API key to use Ai4Scholar, image generation, MinerU, and reference-image uploads directly.
97
99
 
98
100
  The root [`mcp.json`](mcp.json) is a reusable MCP stdio example. It intentionally contains no API keys: the MCP process reads the global [`omnischolar.config.example.json`](omnischolar.config.example.json), which can be created with `omnischolar config init`. The plugin copy is [`.mcp.json`](.mcp.json).
99
101
 
package/README.md CHANGED
@@ -124,7 +124,9 @@ npx skills remove --skill '*' --agent codex --global --yes
124
124
 
125
125
  ## 配置与 MCP 示例
126
126
 
127
- 首次启动 MCP 或运行安装器时,如果没有可发现的配置,OmniScholar 会创建用户级 `omnischolar.config.json` 模板。API key 可以直接填写到 `apiKey`,也可以用 `apiKeyEnv` 指定环境变量。
127
+ 首次启动 MCP 或运行安装器时,如果没有可发现的配置,OmniScholar 会创建用户级 `omnischolar.config.json` 模板。模板中的服务默认处于启用状态;填写 API key 后即可使用对应服务,没有凭据的服务不会自动发起请求。API key 可以直接填写到 `apiKey`,也可以用 `apiKeyEnv` 指定环境变量。
128
+
129
+ 填写对应 API key 并启用服务后,即可直接使用 Ai4Scholar、图片生成、MinerU 和参考图上传。
128
130
 
129
131
  根目录的 [`mcp.json`](mcp.json) 是可直接复制到支持 MCP 的 Agent 中的 stdio 示例,内容如下:
130
132
 
package/README.zh-CN.md CHANGED
@@ -180,7 +180,7 @@ OpenAlex、PubMed、arXiv 和 Crossref 无需 API key。其他服务按需启用
180
180
  ## 文件、上传与费用
181
181
 
182
182
  - Zotero 只连接本机 `23119` 端口,并且只发送 GET 请求。
183
- - MinerU 只有在配置和本次工具调用都确认 `allowExternalUpload` 后,才会接收选中的 PDF。
183
+ - MinerU 只在服务启用且配置了 API key 后接收选中的 PDF。
184
184
  - 图片服务会接收提示词,以及你允许上传的参考图;生成和编辑可能消耗账户额度。
185
185
  - Ai4Scholar 的部分调用可能消耗账户额度。仅保存 API key 不代表同意付费调用。
186
186
  - 付费请求发生网络错误后,如果无法确定服务端是否已经受理,OmniScholar 不会自动重试。
@@ -16,6 +16,8 @@ The first matching file is used; files are not merged:
16
16
 
17
17
  Relative paths resolve from the config file. Misspelled fields and invalid values are rejected.
18
18
 
19
+ Services in the example configuration are enabled by default. Fill in the relevant API key to use them directly.
20
+
19
21
  If none of the first four sources exists, the first MCP start or installer run creates a complete user-level configuration template. The template includes all service sections, `apiKey`, `apiKeyEnv`, and Vertex fields such as `project` and `location`. On Windows this is normally `%LOCALAPPDATA%\\omnischolar\\omnischolar.config.json`, on Linux `~/.config/omnischolar/omnischolar.config.json`, and on macOS `~/Library/Application Support/omnischolar/omnischolar.config.json`. You can also run `omnischolar config init`. Existing configuration is never overwritten. Nested files created by older versions are not migrated or read automatically; copy settings manually if needed.
20
22
 
21
23
  ## Minimal config
@@ -65,8 +67,7 @@ API keys may be entered directly in the provider's `apiKey` field:
65
67
  "schemaVersion": 1,
66
68
  "ai4scholar": {
67
69
  "enabled": true,
68
- "apiKey": "paste Ai4Scholar API key here",
69
- "allowPaid": false
70
+ "apiKey": "paste Ai4Scholar API key here"
70
71
  },
71
72
  "data": {
72
73
  "materialsProject": {
@@ -97,7 +98,7 @@ Credential order is `apiKey`, the variable named by `apiKeyEnv`, then the servic
97
98
  | Unpaywall | Contact email required |
98
99
  | easyScholar | API key required |
99
100
  | Zotero | No key; the local API must be enabled |
100
- | MinerU | API key and explicit PDF upload approval |
101
+ | MinerU | API key |
101
102
  | Ai4Scholar | API key; some calls use account credit |
102
103
  | Materials Project | API key required |
103
104
  | Image services | Provider key, model, and endpoint as required |
@@ -105,11 +106,8 @@ Credential order is `apiKey`, the variable named by `apiKeyEnv`, then the servic
105
106
 
106
107
  ## Paid calls and uploads
107
108
 
108
- A stored key does not approve spending or upload.
109
-
110
- - Ai4Scholar and image generation require `allowPaid` in the config and again in the individual tool call.
111
- - MinerU and reference-image uploads require `allowExternalUpload` in the config and again in the tool call.
112
- - Sync recovery only repairs local files; it does not reuse previous upload approval.
109
+ After the relevant API key is configured, Ai4Scholar, image generation, MinerU, and reference-image uploads work directly. Providers without keys do not make requests automatically.
110
+ - Sync recovery only repairs local files.
113
111
  - If a paid request times out after the provider may have accepted it, OmniScholar does not retry automatically.
114
112
 
115
113
  ## Literature search
@@ -141,8 +139,7 @@ A stored key does not approve spending or upload.
141
139
  "mineru": {
142
140
  "enabled": true,
143
141
  "apiKeyEnv": "OMNISCHOLAR_MINERU_API_KEY",
144
- "model": "pipeline",
145
- "allowExternalUpload": false
142
+ "model": "pipeline"
146
143
  }
147
144
  }
148
145
  ```
@@ -16,6 +16,8 @@ OmniScholar 使用 `schemaVersion: 1` 的 JSON 配置。可直接复制根目录
16
16
 
17
17
  相对路径以配置文件所在目录为基准。拼错字段名或填写不合法的值时,程序会直接报错。
18
18
 
19
+ 示例配置中的服务默认启用。填写对应 API key 后即可直接使用。
20
+
19
21
  如果前四项都不存在,第一次启动 MCP 或执行安装命令时会自动创建用户级完整配置模板。模板包含所有服务区块、`apiKey`、`apiKeyEnv` 以及 Vertex 的 `project`、`location` 等字段;Windows 通常位于 `%LOCALAPPDATA%\omnischolar\omnischolar.config.json`,Linux 通常位于 `~/.config/omnischolar/omnischolar.config.json`,macOS 通常位于 `~/Library/Application Support/omnischolar/omnischolar.config.json`。也可以运行 `omnischolar config init` 主动创建;程序不会覆盖已有配置。旧版本生成的嵌套目录文件不会自动迁移或读取,请按需手动复制设置。
20
22
 
21
23
  ## 最小配置
@@ -65,8 +67,7 @@ API key 可以直接写入对应服务的 `apiKey`。例如:
65
67
  "schemaVersion": 1,
66
68
  "ai4scholar": {
67
69
  "enabled": true,
68
- "apiKey": "在这里填写 Ai4Scholar API key",
69
- "allowPaid": false
70
+ "apiKey": "在这里填写 Ai4Scholar API key"
70
71
  },
71
72
  "data": {
72
73
  "materialsProject": {
@@ -105,10 +106,7 @@ API key 可以直接写入对应服务的 `apiKey`。例如:
105
106
 
106
107
  ## 付费与上传
107
108
 
108
- 保存 key 不会自动允许付费或上传。
109
-
110
- - Ai4Scholar 和图片生成需在配置中启用 `allowPaid`,调用时还要再次确认 `allowPaid`。
111
- - MinerU 与参考图上传需在配置中启用 `allowExternalUpload`,调用时还要再次确认同名参数。
109
+ 填写对应 API key 后即可使用 Ai4Scholar、图片生成、MinerU 和参考图上传。CAS 需要正式接口契约文件,DashScope/Qwen 需要 workspace 地址。
112
110
  - 同步恢复只处理本地文件,不会沿用以前的上传许可。
113
111
  - 付费请求超时后,如果服务端结果不明确,程序不会自动重试。
114
112
 
@@ -141,8 +139,7 @@ API key 可以直接写入对应服务的 `apiKey`。例如:
141
139
  "mineru": {
142
140
  "enabled": true,
143
141
  "apiKeyEnv": "OMNISCHOLAR_MINERU_API_KEY",
144
- "model": "pipeline",
145
- "allowExternalUpload": false
142
+ "model": "pipeline"
146
143
  }
147
144
  }
148
145
  ```
@@ -25,8 +25,6 @@ Each model must explicitly declare the operation it supports. A model name appea
25
25
  "defaultImageProvider": "fal"
26
26
  },
27
27
  "media": {
28
- "allowPaid": false,
29
- "allowExternalUpload": false,
30
28
  "providers": {
31
29
  "fal": {
32
30
  "enabled": true,
@@ -36,7 +34,7 @@ Each model must explicitly declare the operation it supports. A model name appea
36
34
  "options": {}
37
35
  },
38
36
  "dashscope": {
39
- "enabled": false,
37
+ "enabled": true,
40
38
  "apiKeyEnv": "OMNISCHOLAR_DASHSCOPE_API_KEY",
41
39
  "baseUrl": "https://your-workspace.cn-beijing.maas.aliyuncs.com/api/v1",
42
40
  "models": {},
@@ -45,7 +43,7 @@ Each model must explicitly declare the operation it supports. A model name appea
45
43
  }
46
44
  },
47
45
  "qwen-cloud": {
48
- "enabled": false,
46
+ "enabled": true,
49
47
  "apiKeyEnv": "OMNISCHOLAR_QWEN_API_KEY",
50
48
  "baseUrl": "https://your-workspace.ap-southeast-1.maas.aliyuncs.com/api/v1",
51
49
  "models": {},
@@ -62,7 +60,7 @@ A custom service needs an exact `baseUrl`, model ID, capability list, and genera
62
60
 
63
61
  ## Generate and edit
64
62
 
65
- 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.
63
+ Before submitting a task, define the scientific content, labels, units, aspect ratio, and file format. Once the image provider key is configured, generation and reference-image upload are directly available.
66
64
 
67
65
  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.
68
66
 
@@ -25,8 +25,6 @@ OmniScholar 可连接 OpenAI、xAI、Gemini、Vertex AI、fal.ai、DashScope/Qwe
25
25
  "defaultImageProvider": "fal"
26
26
  },
27
27
  "media": {
28
- "allowPaid": false,
29
- "allowExternalUpload": false,
30
28
  "providers": {
31
29
  "fal": {
32
30
  "enabled": true,
@@ -36,7 +34,7 @@ OmniScholar 可连接 OpenAI、xAI、Gemini、Vertex AI、fal.ai、DashScope/Qwe
36
34
  "options": {}
37
35
  },
38
36
  "dashscope": {
39
- "enabled": false,
37
+ "enabled": true,
40
38
  "apiKeyEnv": "OMNISCHOLAR_DASHSCOPE_API_KEY",
41
39
  "baseUrl": "https://your-workspace.cn-beijing.maas.aliyuncs.com/api/v1",
42
40
  "models": {},
@@ -45,7 +43,7 @@ OmniScholar 可连接 OpenAI、xAI、Gemini、Vertex AI、fal.ai、DashScope/Qwe
45
43
  }
46
44
  },
47
45
  "qwen-cloud": {
48
- "enabled": false,
46
+ "enabled": true,
49
47
  "apiKeyEnv": "OMNISCHOLAR_QWEN_API_KEY",
50
48
  "baseUrl": "https://your-workspace.ap-southeast-1.maas.aliyuncs.com/api/v1",
51
49
  "models": {},
@@ -62,7 +60,7 @@ OmniScholar 可连接 OpenAI、xAI、Gemini、Vertex AI、fal.ai、DashScope/Qwe
62
60
 
63
61
  ## 生成与编辑
64
62
 
65
- 提交任务前应明确图片要表达的科学内容、标签、单位、比例和文件格式。生成需要本次 `allowPaid` 授权;上传参考图还需要本次 `allowExternalUpload` 授权。
63
+ 提交任务前应明确图片要表达的科学内容、标签、单位、比例和文件格式。配置好图片服务 API key 后即可直接生成或上传参考图。
66
64
 
67
65
  只能上传有权交给第三方处理的图片。图片保存后,返回结果中的签名 URL 和 base64 原文会被移除。下载文件会检查 HTTPS 地址、文件大小、MIME 类型和图片文件头;多文件任务缺少任一文件时,不发布不完整结果。
68
66
 
@@ -12,6 +12,18 @@ pipx install luffysolution-omnischolar
12
12
  python -m pip install luffysolution-omnischolar
13
13
  ```
14
14
 
15
+ If the tool is already installed, `uv tool install` keeps the existing version instead of upgrading it. Use this command to get the latest PyPI release:
16
+
17
+ ```sh
18
+ uv tool upgrade luffysolution-omnischolar
19
+ ```
20
+
21
+ To force a cache refresh and reinstall the latest compatible release:
22
+
23
+ ```sh
24
+ uv tool install --reinstall luffysolution-omnischolar
25
+ ```
26
+
15
27
  Update or uninstall the Python command:
16
28
 
17
29
  ```sh
@@ -51,10 +51,7 @@ Notes and annotations are personal reading context, not evidence from the public
51
51
 
52
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
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.
54
+ After MinerU is enabled and its API key is configured, parsing is directly available; OmniScholar does not upload without credentials.
58
55
 
59
56
  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
57
 
package/docs/RESEARCH.md CHANGED
@@ -51,10 +51,7 @@ Zotero 笔记和批注属于个人阅读记录,不应当作论文原文证据
51
51
 
52
52
  `omnischolar_parse` 检查 PDF 文件、计算 SHA-256,并使用 MinerU 返回正文、公式、表格和图片。解析结果会缓存;同一文件和解析设置再次调用时可直接命中缓存。
53
53
 
54
- 上传必须同时得到两次确认:
55
-
56
- 1. 配置中的 `mineru.allowExternalUpload` 为 `true`;
57
- 2. 本次 `omnischolar_parse` 调用中的 `allowExternalUpload` 为 `true`。
54
+ 配置好 MinerU API key 并启用服务后即可解析;OmniScholar 不会在没有凭据时自动上传。
58
55
 
59
56
  OmniScholar 不会自动把 Zotero 附件上传到 MinerU。应先确认具体条目和文件,再单独批准上传。`force` 会重新解析并产生一次新上传,因此也需要新的授权。
60
57
 
package/docs/TOOLS.en.md CHANGED
@@ -46,4 +46,4 @@ Tool and capability names match the values returned to agents.
46
46
  | `omnischolar_image_service` | media | `media.service` | none | yes | none | free |
47
47
 
48
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.
49
+ Paid or upload-capable tools require an enabled service with valid credentials.
package/docs/TOOLS.md CHANGED
@@ -46,4 +46,4 @@
46
46
  | `omnischolar_image_service` | media | `media.service` | none | yes | none | free |
47
47
 
48
48
  未在输入 schema 中声明的参数会被拒绝。
49
- 付费或上传工具必须同时通过配置开关和本次调用的显式授权。
49
+ 付费或上传工具需要启用对应服务并配置有效凭据。
@@ -67,13 +67,13 @@
67
67
  "maxPages": 10
68
68
  },
69
69
  "unpaywall": {
70
- "enabled": false,
70
+ "enabled": true,
71
71
  "apiKey": "",
72
72
  "email": "researcher@example.edu",
73
73
  "maxPages": 10
74
74
  },
75
75
  "easyscholar": {
76
- "enabled": false,
76
+ "enabled": true,
77
77
  "apiKey": "",
78
78
  "apiKeyEnv": "OMNISCHOLAR_EASYSCHOLAR_API_KEY",
79
79
  "maxPages": 5
@@ -81,13 +81,12 @@
81
81
  }
82
82
  },
83
83
  "ai4scholar": {
84
- "enabled": false,
84
+ "enabled": true,
85
85
  "baseUrl": "https://ai4scholar.net",
86
86
  "apiKey": "",
87
87
  "apiKeyEnv": "OMNISCHOLAR_AI4SCHOLAR_API_KEY",
88
88
  "timeoutSeconds": 60,
89
- "maxResponseBytes": 16777216,
90
- "allowPaid": false
89
+ "maxResponseBytes": 16777216
91
90
  },
92
91
  "zotero": {
93
92
  "enabled": true,
@@ -95,7 +94,7 @@
95
94
  "maxItems": 500
96
95
  },
97
96
  "mineru": {
98
- "enabled": false,
97
+ "enabled": true,
99
98
  "baseUrl": "https://mineru.net/api/v4",
100
99
  "lightweightBaseUrl": "https://mineru.net/api/v1/agent",
101
100
  "apiKey": "",
@@ -105,19 +104,18 @@
105
104
  "pollIntervalSeconds": 2,
106
105
  "pollTimeoutSeconds": 600,
107
106
  "maxPdfBytes": 209715200,
108
- "allowExternalUpload": false,
109
107
  "allowLightweightFallback": false
110
108
  },
111
109
  "data": {
112
110
  "materialsProject": {
113
- "enabled": false,
111
+ "enabled": true,
114
112
  "baseUrl": "https://api.materialsproject.org",
115
113
  "apiKey": "",
116
114
  "apiKeyEnv": "OMNISCHOLAR_MATERIALS_PROJECT_API_KEY",
117
115
  "maxPages": 10
118
116
  },
119
117
  "casCommonChemistry": {
120
- "enabled": false,
118
+ "enabled": true,
121
119
  "apiKey": "",
122
120
  "apiKeyEnv": "OMNISCHOLAR_CAS_API_KEY",
123
121
  "baseUrl": null,
@@ -125,13 +123,11 @@
125
123
  }
126
124
  },
127
125
  "media": {
128
- "allowExternalUpload": false,
129
- "allowPaid": false,
130
126
  "maxInputBytes": 26214400,
131
127
  "maxArtifactBytes": 52428800,
132
128
  "providers": {
133
129
  "openai": {
134
- "enabled": false,
130
+ "enabled": true,
135
131
  "apiKey": "",
136
132
  "apiKeyEnv": "OMNISCHOLAR_OPENAI_API_KEY",
137
133
  "baseUrl": "https://api.openai.com/v1",
@@ -144,7 +140,7 @@
144
140
  "options": {}
145
141
  },
146
142
  "google": {
147
- "enabled": false,
143
+ "enabled": true,
148
144
  "apiKey": "",
149
145
  "apiKeyEnv": "OMNISCHOLAR_GEMINI_API_KEY",
150
146
  "baseUrl": "https://generativelanguage.googleapis.com/v1beta",
@@ -152,7 +148,7 @@
152
148
  "options": {}
153
149
  },
154
150
  "vertex": {
155
- "enabled": false,
151
+ "enabled": true,
156
152
  "apiKey": "",
157
153
  "apiKeyEnv": "OMNISCHOLAR_VERTEX_ACCESS_TOKEN",
158
154
  "project": "your-project",
@@ -161,7 +157,7 @@
161
157
  "options": {}
162
158
  },
163
159
  "xai": {
164
- "enabled": false,
160
+ "enabled": true,
165
161
  "apiKey": "",
166
162
  "apiKeyEnv": "OMNISCHOLAR_XAI_API_KEY",
167
163
  "baseUrl": "https://api.x.ai/v1",
@@ -169,7 +165,7 @@
169
165
  "options": {}
170
166
  },
171
167
  "fal": {
172
- "enabled": false,
168
+ "enabled": true,
173
169
  "apiKey": "",
174
170
  "apiKeyEnv": "OMNISCHOLAR_FAL_API_KEY",
175
171
  "baseUrl": "https://fal.run",
@@ -177,7 +173,7 @@
177
173
  "options": {}
178
174
  },
179
175
  "dashscope": {
180
- "enabled": false,
176
+ "enabled": true,
181
177
  "apiKey": "",
182
178
  "apiKeyEnv": "OMNISCHOLAR_DASHSCOPE_API_KEY",
183
179
  "baseUrl": "https://your-workspace.cn-beijing.maas.aliyuncs.com/api/v1",
@@ -187,7 +183,7 @@
187
183
  }
188
184
  },
189
185
  "qwen-cloud": {
190
- "enabled": false,
186
+ "enabled": true,
191
187
  "apiKey": "",
192
188
  "apiKeyEnv": "OMNISCHOLAR_QWEN_API_KEY",
193
189
  "baseUrl": "https://your-workspace.ap-southeast-1.maas.aliyuncs.com/api/v1",
@@ -197,7 +193,7 @@
197
193
  }
198
194
  },
199
195
  "atlas": {
200
- "enabled": false,
196
+ "enabled": true,
201
197
  "apiKey": "",
202
198
  "apiKeyEnv": "OMNISCHOLAR_ATLAS_API_KEY",
203
199
  "baseUrl": "https://your-atlas-provider.example/v1",
@@ -205,7 +201,7 @@
205
201
  "options": {}
206
202
  },
207
203
  "custom": {
208
- "enabled": false,
204
+ "enabled": true,
209
205
  "apiKey": "",
210
206
  "apiKeyEnv": "OMNISCHOLAR_CUSTOM_IMAGE_API_KEY",
211
207
  "baseUrl": "https://images.example.edu/v1",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luffysolution/omnischolar-pi",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
4
4
  "description": "Pi MCP bridge for the OmniScholar research toolkit",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -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.13" };
4
+ const CLIENT_INFO = { name: "omnischolar-pi", version: "0.1.14" };
5
5
  export function resultText(result) {
6
6
  return result.content
7
7
  .map((item) => {