dsh-fulltext 0.0.0-stage → 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/CHANGELOG.md +28 -0
- package/LICENSE +21 -0
- package/README.md +77 -2
- package/README_CN.md +78 -0
- package/RELEASING.md +17 -0
- package/assets/icon.svg +9 -0
- package/assets/report.css +588 -0
- package/assets/report.html +354 -0
- package/cordis.patch.yml +3 -0
- package/lib/client-types/client/Workspace.d.ts +14 -0
- package/lib/client-types/client/controller.d.ts +57 -0
- package/lib/client-types/client/credentials-port.d.ts +94 -0
- package/lib/client-types/client/handoff.d.ts +7 -0
- package/lib/client-types/client/index.d.ts +3 -0
- package/lib/client-types/client/styles.d.ts +1 -0
- package/lib/client-types/shared/types.d.ts +59 -0
- package/lib/client.js +952 -0
- package/lib/client.js.map +1 -0
- package/lib/index.d.ts +14 -0
- package/lib/index.js +53 -0
- package/lib/report.d.ts +6 -0
- package/lib/report.js +69 -0
- package/lib/routes.d.ts +18 -0
- package/lib/routes.js +62 -0
- package/lib/search.d.ts +16 -0
- package/lib/search.js +147 -0
- package/lib/shared/types.d.ts +59 -0
- package/lib/shared/types.js +23 -0
- package/lib/store.d.ts +13 -0
- package/lib/store.js +59 -0
- package/lib/tools.d.ts +4 -0
- package/lib/tools.js +122 -0
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +114 -4
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## Unreleased
|
|
4
|
+
|
|
5
|
+
## 0.1.1 — 2026-11-09
|
|
6
|
+
|
|
7
|
+
- Adopted the selected original-evidence icon: paired quotation marks and a lime excerpt on the Ai4Scholar dark rounded tile. Package, sidebar and workspace marks share the same design.
|
|
8
|
+
|
|
9
|
+
## 0.1.0 — 2026-11-09
|
|
10
|
+
|
|
11
|
+
- First public release as **Ai4Scholar Fulltext**, package `dsh-fulltext`, command `/fulltext`.
|
|
12
|
+
- Indexed title, abstract and body excerpt search with optional paper metadata enrichment; persistent local reports and the original interactive HTML reading design.
|
|
13
|
+
- HTML / CSV exports, offline reading, native deliverable previews, optional model-generated summaries and Chinese titles.
|
|
14
|
+
- Independent Key settings in the workbench, plugin detail page and system Settings; automatically reuses an existing Ai4Scholar Key when no independent Key is set.
|
|
15
|
+
- Show save/remove errors and status on every settings surface; use compact configuration summaries on plugin cards.
|
|
16
|
+
|
|
17
|
+
### Validation and limits
|
|
18
|
+
- Real API checks covered title, abstract and body excerpts, metadata enrichment and returned charges. Reopening, filtering and export made no new search requests.
|
|
19
|
+
- Native command/report delivery was checked with a simulated model; model output quality depends on the chosen model.
|
|
20
|
+
- Search coverage depends on the Semantic Scholar index. Results are excerpts; PDF links are available only when supplied by the paper metadata. The current workspace interface is in Chinese.
|
|
21
|
+
|
|
22
|
+
## 0.1.0-beta.1 — local prototype
|
|
23
|
+
|
|
24
|
+
- Added the Fulltext sidebar workspace, indexed excerpt search, optional paper metadata enrichment, and persistent local report history.
|
|
25
|
+
- Preserved the `ai4s-fulltext` skill's interactive HTML report design, filters, details and six reading themes; the same report is available in the workspace, native deliverables, a separate window and offline exports.
|
|
26
|
+
- Added HTML / CSV / JSON outputs, `/ai4s-fulltext`, and free report read/update tools for model-generated summaries and Chinese titles.
|
|
27
|
+
- Added independent credentials with automatic fallback to an existing Ai4Scholar key. Shared credentials are never edited by the settings page.
|
|
28
|
+
- Validated real title, abstract and body excerpts, metadata enrichment and fees. Mocked model checks cover report updates and native artifact delivery.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 ai4scholar
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,78 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Ai4Scholar Fulltext
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**Find evidence in the original paper.** A DeepSeek Harness plugin for indexed full-text excerpts, interactive HTML reports, and offline HTML/CSV delivery.
|
|
4
|
+
|
|
5
|
+
[中文说明](README_CN.md) · [AI4Scholar](https://ai4scholar.net/?src=dsh_fulltext)
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
In Harness, open **Plugins**, install `dsh-fulltext`, then restart Harness. From the CLI:
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
dsh plugin add dsh-fulltext
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
The workspace interface is currently in Chinese. Native pages and authenticated report access have been checked with Harness `0.2.2-rc.1`; use a current Harness release for these features.
|
|
16
|
+
|
|
17
|
+
## Configure your Key
|
|
18
|
+
|
|
19
|
+
Use any of these entrances:
|
|
20
|
+
|
|
21
|
+
- Sidebar **全文搜索 → 设置** (Full-text Search → Settings).
|
|
22
|
+
- **Plugins → Installed → dsh-fulltext**.
|
|
23
|
+
- **Settings → 全文搜索**.
|
|
24
|
+
|
|
25
|
+
Save an independent AI4Scholar Key there, or reuse an existing `AI4SCHOLAR_API_KEY` automatically. The independent `FULLTEXT_API_KEY` takes precedence. Removing it restores the shared Key. Saving/removing an independent Key leaves the shared Key untouched. Keys are stored through the native Harness credentials service; environment variables with these names also work.
|
|
26
|
+
|
|
27
|
+
Get a Key at [ai4scholar.net](https://ai4scholar.net/?src=dsh_fulltext). You can install this plugin without the comprehensive Ai4Scholar plugin.
|
|
28
|
+
|
|
29
|
+
## Search and read
|
|
30
|
+
|
|
31
|
+
Open **全文搜索** for direct searches, or send:
|
|
32
|
+
|
|
33
|
+
```text
|
|
34
|
+
/fulltext Find experimental descriptions of solid-state battery interfacial resistance. Return 5 excerpts and generate HTML and CSV reports.
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
- Search indexed titles, abstracts and body passages in Semantic Scholar, with year, field, venue and minimum-citation filters.
|
|
38
|
+
- Optionally enrich unique source papers with year, venue and available open-access PDF links in one batch request.
|
|
39
|
+
- Read the same interactive HTML in the workspace, a native deliverable preview, a separate window or a saved offline file. Report filters, sort, source details, copy and six reading themes work locally.
|
|
40
|
+
- Use **AI 整理** to prepare a conversation draft for an existing report. The model can add a numbered synthesis and Chinese titles while preserving original excerpts and source metadata. Drafts are never sent automatically or overwritten.
|
|
41
|
+
|
|
42
|
+
Search coverage depends on the index; results may come from titles, abstracts or body text. This plugin retrieves excerpts. A listed PDF link is a separate source, not a promise that a complete PDF was downloaded.
|
|
43
|
+
|
|
44
|
+
## Files and fees
|
|
45
|
+
|
|
46
|
+
Each search saves `report.html`, `report.csv` and `report.json` in `$DSH_HOME/fulltext/reports/<report-id>/` (default: `~/.dsh/fulltext/reports/`). The workspace lists the newest 100 reports; older files remain on disk. HTML includes its styles/scripts and needs no remote assets. CSV is UTF-8 with a BOM and spreadsheet-formula protection.
|
|
47
|
+
|
|
48
|
+
Search and optional metadata enrichment are billed by AI4Scholar. Every report records the returned charges. Disable enrichment for a search-only request. Opening, filtering, updating and exporting saved reports make no new search requests. Model usage for synthesis/translation is separate.
|
|
49
|
+
|
|
50
|
+
| Tool | Purpose |
|
|
51
|
+
| --- | --- |
|
|
52
|
+
| `search_fulltext` | Search excerpts and save HTML/CSV/JSON |
|
|
53
|
+
| `get_fulltext_report` | Read an existing report without another search |
|
|
54
|
+
| `update_fulltext_report` | Add synthesis/title translations and regenerate existing files |
|
|
55
|
+
|
|
56
|
+
## Advanced configuration
|
|
57
|
+
|
|
58
|
+
```yaml
|
|
59
|
+
- id: fulltext
|
|
60
|
+
config:
|
|
61
|
+
defaultLimit: 10
|
|
62
|
+
apiKeyEnv: FULLTEXT_API_KEY
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Also supports `baseUrl`, `requestTimeoutMs` and `reportDirectory`. Keep secrets in the credentials service or environment, rather than the patch file. Report previews/downloads use the host's authenticated owner-only channel and a sandboxed HTML view.
|
|
66
|
+
|
|
67
|
+
## Development
|
|
68
|
+
|
|
69
|
+
```sh
|
|
70
|
+
pnpm install --frozen-lockfile
|
|
71
|
+
pnpm run typecheck
|
|
72
|
+
pnpm test
|
|
73
|
+
pnpm pack --pack-destination /tmp
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Release checks cover Node 22/24 and the current published Harness page contracts. Real API checks covered title, abstract and body excerpts, enrichment and returned fees; simulated model checks covered report updates and native HTML/CSV delivery. See [release policy](RELEASING.md).
|
|
77
|
+
|
|
78
|
+
The report design is adapted from Ai4Scholar's original `ai4s-fulltext` skill. MIT licensed.
|
package/README_CN.md
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# Ai4Scholar Fulltext · 全文搜索
|
|
2
|
+
|
|
3
|
+
**从论文原文中,找到证据。** 面向 DeepSeek Harness 的全文片段检索插件,提供交互式 HTML 阅读工作台和离线 HTML / CSV 报告。
|
|
4
|
+
|
|
5
|
+
[English](README.md) · [AI4Scholar](https://ai4scholar.net/?src=dsh_fulltext)
|
|
6
|
+
|
|
7
|
+
## 安装
|
|
8
|
+
|
|
9
|
+
在 Harness 的「插件」页安装 `dsh-fulltext`,然后重启。命令行也可以执行:
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
dsh plugin add dsh-fulltext
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
原生页面和已认证的报告访问通道已在 Harness `0.2.2-rc.1` 验证;请使用支持这些能力的新版 Harness。当前工作台界面为中文。
|
|
16
|
+
|
|
17
|
+
## 设置密钥
|
|
18
|
+
|
|
19
|
+
以下三个入口共用同一份设置:
|
|
20
|
+
|
|
21
|
+
- **侧栏「全文搜索」→「设置」**。
|
|
22
|
+
- **插件 → 已安装 → dsh-fulltext**。
|
|
23
|
+
- **设置 → 全文搜索**。
|
|
24
|
+
|
|
25
|
+
可以独立保存 AI4Scholar API Key,也可以自动沿用已有 `AI4SCHOLAR_API_KEY`,不要求安装综合版插件。独立凭据 `FULLTEXT_API_KEY` 优先,移除后恢复使用已有 Key。设置页只修改独立 Key,不修改共享的 Ai4Scholar Key。密钥保存在 Harness 原生凭据服务中;同名环境变量也可使用。
|
|
26
|
+
|
|
27
|
+
在 [ai4scholar.net](https://ai4scholar.net/?src=dsh_fulltext) 获取 Key。
|
|
28
|
+
|
|
29
|
+
## 使用
|
|
30
|
+
|
|
31
|
+
打开侧栏「全文搜索」直接检索,或者在对话中发送:
|
|
32
|
+
|
|
33
|
+
```text
|
|
34
|
+
/fulltext 查找固态电池界面阻抗的实验方法,返回5个片段,整理主要发现,生成HTML和CSV报告
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
- 在 Semantic Scholar 已索引的标题、摘要和正文片段中查找方法、参数与论述,支持年份、学科、期刊和最低引用数条件。
|
|
38
|
+
- 可选信息补全会去重同篇论文的 ID,批量查询年份、期刊和可用的开放 PDF 链接。
|
|
39
|
+
- 同一份交互 HTML 可以在工作台、原生产物预览、独立窗口和离线文件中阅读;保留原文、来源类型、章节、片段详情、复制、筛选、排序和六种阅读主题。
|
|
40
|
+
- 「AI 整理」把已有报告的整理请求放入对话草稿,模型可补充有片段编号的总结和中文标题,原文与来源信息保留。不会自动发送或覆盖草稿。
|
|
41
|
+
|
|
42
|
+
覆盖范围以索引为准,结果可能来自标题、摘要或正文。这是片段检索;PDF 链接是单独的来源,不代表已经下载完整论文。
|
|
43
|
+
|
|
44
|
+
## 文件与费用
|
|
45
|
+
|
|
46
|
+
每次搜索保存 `report.html`、`report.csv` 和 `report.json`,目录为 `$DSH_HOME/fulltext/reports/<report-id>/`,默认位于 `~/.dsh/fulltext/reports/`。工作台显示最新 100 份报告,旧文件仍保留。HTML 的样式和脚本内嵌,无远程资源依赖;CSV 使用 UTF-8 BOM,并对可能被表格软件当作公式的文本做保护。
|
|
47
|
+
|
|
48
|
+
搜索和可选的信息补全由 AI4Scholar 接口计费,报告保留实际返回的扣费。关闭「补全」可只发出检索请求。重新打开、报告内筛选、更新和导出不会新增检索费用。模型总结、翻译的用量另计。
|
|
49
|
+
|
|
50
|
+
| 工具 | 用途 |
|
|
51
|
+
| --- | --- |
|
|
52
|
+
| `search_fulltext` | 检索并保存 HTML / CSV / JSON |
|
|
53
|
+
| `get_fulltext_report` | 读取已有报告,不重复检索 |
|
|
54
|
+
| `update_fulltext_report` | 补充总结 / 标题翻译并更新原文件 |
|
|
55
|
+
|
|
56
|
+
## 高级配置
|
|
57
|
+
|
|
58
|
+
```yaml
|
|
59
|
+
- id: fulltext
|
|
60
|
+
config:
|
|
61
|
+
defaultLimit: 10
|
|
62
|
+
apiKeyEnv: FULLTEXT_API_KEY
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
另支持 `baseUrl`、`requestTimeoutMs` 和 `reportDirectory`。密钥放在凭据服务或环境变量中,不写入配置文件。预览和下载走宿主已认证、仅所有者可用的通道,HTML 在沙箱中运行。
|
|
66
|
+
|
|
67
|
+
## 开发与来源
|
|
68
|
+
|
|
69
|
+
```sh
|
|
70
|
+
pnpm install --frozen-lockfile
|
|
71
|
+
pnpm run typecheck
|
|
72
|
+
pnpm test
|
|
73
|
+
pnpm pack --pack-destination /tmp
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
发布检查覆盖 Node 22 / 24 及当前发布的 Harness 页面契约。真实接口验证覆盖标题、摘要、正文片段、信息补全与扣费;模拟模型验证覆盖报告整理和原生产物交付。版本规则见 [RELEASING.md](RELEASING.md)。
|
|
77
|
+
|
|
78
|
+
报告设计来自 Ai4Scholar 原 `ai4s-fulltext` skill,保留阅读设计并补充离线资源、文本转义、字面关键词高亮和 CSV 单元格保护。MIT 许可证。
|
package/RELEASING.md
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Release policy
|
|
2
|
+
|
|
3
|
+
- Routine edits stay under `Unreleased`; do not bump a version for every local installation.
|
|
4
|
+
- Use distinct `beta.N` / `rc.N` versions for distinct prerelease distributions. Public prereleases use `--tag beta` or `--tag rc`, leaving `latest` on a stable release.
|
|
5
|
+
- Publish a stable version only when requested by the user. Patch versions fix compatible behavior; minor versions add capabilities. A 0.x release may introduce schema changes, which must be explained.
|
|
6
|
+
- Published versions and their tags are immutable. Compare release notes with the previous public release, not the last local archive.
|
|
7
|
+
|
|
8
|
+
Before publishing:
|
|
9
|
+
|
|
10
|
+
1. Update package metadata, README files and CHANGELOG. Record actual limitations and separate real API checks from simulated model/UI checks.
|
|
11
|
+
2. Run `pnpm run prepublishOnly` and native page checks. Inspect the package allowlist; report files, credentials, development fixtures and local profiles must never be shipped.
|
|
12
|
+
3. Run Node 22/24 and native-page checks on the exact release commit. Publish source and tags only when the user explicitly requests that destination; npm-only releases may keep the source repository local.
|
|
13
|
+
4. Publish npm; complete any required official login/second-factor authorization. Do not repeat a pending publish.
|
|
14
|
+
5. Verify the registry version, `latest`, downloaded tarball integrity and source bytes. Check npmmirror separately; a mirror delay is not an npm publication failure.
|
|
15
|
+
6. Include release notes in the package and update any requested directory entry only after the package is available. Verify the public page/feed and install identity.
|
|
16
|
+
|
|
17
|
+
Creating a local test package is not an npm release. A readiness question alone is not a publication request.
|
package/assets/icon.svg
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" role="img" aria-label="Ai4Scholar Fulltext">
|
|
2
|
+
<rect width="100" height="100" rx="22" fill="#0a0a0a"/>
|
|
3
|
+
<g fill="#f5f5f5">
|
|
4
|
+
<path d="M41 19C44 18 47 21 44 24C37 30 33 36 32 40C40 38 46 43 46 50C46 57 41 62 34 62C27 62 22 57 22 50C22 37 29 26 41 19Z"/>
|
|
5
|
+
<path d="M73 19C76 18 79 21 76 24C69 30 65 36 64 40C72 38 78 43 78 50C78 57 73 62 66 62C59 62 54 57 54 50C54 37 61 26 73 19Z"/>
|
|
6
|
+
</g>
|
|
7
|
+
<rect x="19" y="70" width="62" height="8" rx="4" fill="#9be22c"/>
|
|
8
|
+
<rect x="23" y="83" width="54" height="7" rx="3.5" fill="#f5f5f5"/>
|
|
9
|
+
</svg>
|