dsh-grove 0.2.0 → 0.5.0
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 +34 -74
- package/README.md +35 -77
- package/client.js +760 -143
- package/package.json +3 -2
- package/src/adapters/models/http.js +24 -0
- package/src/adapters/parsers/documents.js +31 -0
- package/src/adapters/storage/obsidian/backup.js +104 -0
- package/src/cli.js +11 -3
- package/src/modules/evidence.js +38 -0
- package/src/modules/inspirations.js +18 -0
- package/src/modules/knowledge.js +29 -0
- package/src/modules/model-research.js +27 -0
- package/src/modules/reports.js +57 -0
- package/src/modules/research.js +17 -0
- package/src/modules/version-reference.js +4 -0
- package/src/modules/works.js +27 -0
- package/src/plugin.js +10 -2
- package/src/proposals.js +1 -1
- package/src/server.js +234 -2
- package/src/vault.js +16 -1
package/README.en.md
CHANGED
|
@@ -2,102 +2,62 @@
|
|
|
2
2
|
|
|
3
3
|

|
|
4
4
|
|
|
5
|
-
[简体中文](README.md) · [English](README.en.md)
|
|
5
|
+
[简体中文](README.md) · [English](README.en.md) · [MIT license](LICENSE)
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
[](package.json)
|
|
9
|
-
[](package.json)
|
|
7
|
+
## Why Grove exists
|
|
10
8
|
|
|
11
|
-
|
|
9
|
+
Grove started with a question. How can an idea, a conversation, or a round of research become knowledge you can find, verify, and revise later? Grove connects DeepSeek Harness to your own Obsidian vault so that work stays with you as Markdown.
|
|
12
10
|
|
|
13
|
-
|
|
11
|
+
The Personal Knowledge & Growth System (PKGS) connects exploration, learning, research, creation, and reflection. You can jot down a sentence or revise a judgment after trying it in practice, then carry that understanding into your next study. AI can compare explanations, ask questions, and draft. You decide what to believe, keep, and share. [PKGS guide](docs/PKGS.en.md)
|
|
14
12
|
|
|
15
|
-
|
|
13
|
+
## Core features
|
|
16
14
|
|
|
17
|
-
|
|
18
|
-
- **Knowledge growth** starts by explaining an idea in your own words. Connect concepts, examples, and questions, then test your understanding through use and review.
|
|
19
|
-
- **Research and creation** start with a question worth investigating. Preserve sources, counterexamples, and versions of your judgment. When useful, turn what you learned into an article, report, or proposal. Reflection can give you a starting point for the next exploration.
|
|
15
|
+
The features below describe this repository. Installations from npm use the version published in the registry. [npm package](https://www.npmjs.com/package/dsh-grove)
|
|
20
16
|
|
|
21
|
-
|
|
17
|
+
- **Capture ideas.** Jot down a thought, find it by keyword, and reopen an earlier version.
|
|
18
|
+
- **Research with evidence.** Start an independent study or configure a model to analyze selected excerpts. Import Markdown or PDFs with a text layer, save passages with paragraph or page locations, and confirm a report after review.
|
|
19
|
+
- **Build knowledge and create works.** Turn findings into concepts or methods, and use your knowledge to draft a work. Record why your understanding changed while keeping earlier references readable.
|
|
20
|
+
- **Keep your data locally.** Notes and versions live in the vault’s `Grove/` folder. The CLI can verify a backup and restore it to a separate directory.
|
|
22
21
|
|
|
23
|
-
##
|
|
22
|
+
## Install and use
|
|
24
23
|
|
|
25
|
-
|
|
24
|
+
Have an Obsidian vault ready. Check [`engines` in package.json](package.json) for the supported Node.js and DeepSeek Harness versions.
|
|
26
25
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
### Install in an existing Harness
|
|
32
|
-
|
|
33
|
-
| Entry point | Steps |
|
|
34
|
-
| --- | --- |
|
|
35
|
-
| Desktop | Open **Plugins → Add plugin** and select this repository directory. The host installs a `link:` dependency. Restart the host after editing the source. |
|
|
36
|
-
| In a session | Ask the agent to call `plugin_manager` with `install_bundle` and pass the directory’s absolute path as `target`. |
|
|
37
|
-
| npm | `dsh plugin --profile <profile> add dsh-grove` (published to npm since 0.2.0). |
|
|
38
|
-
| CLI | Run `dsh plugin --profile <profile> add <directory-or-tgz>`. The Desktop app manages its own profile. Packages installed into `profiles/web` do not appear there. |
|
|
39
|
-
|
|
40
|
-
After installing, **Grove** appears in the left sidebar: open it, choose a vault, and capture a first idea. Check that Grove also appears on the **Plugins** page, then ask the model to call `grove_role` in a new session to confirm the tool is registered.
|
|
41
|
-
|
|
42
|
-
### Try a separate profile
|
|
43
|
-
|
|
44
|
-
```sh
|
|
45
|
-
export GROVE_VAULT="/absolute/path/to/Obsidian vault"
|
|
46
|
-
npx --yes @deepseek-ai/dsh@0.2.2-rc.3 plugin --profile grove add "$PWD"
|
|
47
|
-
npx --yes @deepseek-ai/dsh@0.2.2-rc.3 --profile grove
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
Initialize a separate profile once. If the `grove` profile already exists, install or launch directly. In your trial profile, keep host shell access, file editing, general automation, and other extensions from accessing the vault or running confirmation commands on your behalf. Grove’s model tools provide role guidance, drafts, and allowlisted reads. Harness sessions also follow the host’s routing, permissions, and history settings.
|
|
51
|
-
|
|
52
|
-
### Install the command-line tool
|
|
53
|
-
|
|
54
|
-
A global installation puts the package’s `grove` executable on PATH. Installing the plugin in a profile registers it with the host.
|
|
26
|
+
- **Install from npm.** Run `dsh plugin --profile <profile> add dsh-grove`.
|
|
27
|
+
- **Try the source in Desktop.** Open **Plugins → Add plugin** and select this repository directory. Restart the host after editing the source. Desktop manages its own profile.
|
|
28
|
+
- **Try the source in a separate profile.** From the repository root, run the following commands.
|
|
55
29
|
|
|
56
30
|
```sh
|
|
57
|
-
|
|
58
|
-
|
|
31
|
+
dsh plugin --profile grove-trial add "$PWD"
|
|
32
|
+
dsh --profile grove-trial
|
|
59
33
|
```
|
|
60
34
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
1. Open **Grove** in the left sidebar, choose your Obsidian vault, and capture a first idea. You can also keep using the terminal: `grove capture --body 'Why might coordination costs increase as an organization grows?'`. Open the `Grove` folder in Obsidian to see the Markdown note.
|
|
64
|
-
2. Explore in Harness. Use `grove_role` for a thinking partner, knowledge assistant, research assistant, critical reviewer, or creation assistant. Ask `grove_propose` to draft a note when you want to keep something, and supply the conversation reference you want to save. You can also end the exploration there.
|
|
65
|
-
3. Run `grove preview DRAFT_ID` in your terminal. Use `grove accept DRAFT_ID` and type `SAVE`, or run `grove discard DRAFT_ID`. Pass `--file` when accepting to supply your edited body.
|
|
66
|
-
4. Use `grove list` and `grove show ASSET_ID --version 1` to revisit your notes. To share selected notes with the model, set `GROVE_READABLE_IDS` to a comma-separated list of asset IDs before starting the host. Restart the host after revoking that access. Content already shared in a session follows the host’s history settings.
|
|
35
|
+
Open **Grove** (or **知林** in Chinese) in the sidebar, choose your vault, and save an idea. Open **Research** to save a question and observations, then add sources, capture evidence, or confirm a report as needed. For AI research, enter a Chat Completions-compatible HTTPS endpoint and model name in the research panel, and set `GROVE_MODEL_KEY` in the host environment.
|
|
67
36
|
|
|
68
|
-
|
|
37
|
+
Install the CLI separately with `npm install --global .` from the repository root, or run `npm install --global dsh-grove` for the published CLI.
|
|
69
38
|
|
|
70
39
|
```sh
|
|
71
|
-
|
|
72
|
-
grove
|
|
73
|
-
grove
|
|
74
|
-
grove
|
|
75
|
-
grove update CLAIM_ID --version 1 --link EVIDENCE_ID --relation supports
|
|
76
|
-
grove update RESEARCH_ID --version 1 --link CLAIM_ID --relation related
|
|
77
|
-
grove update RESEARCH_ID --version 2 --stage analysis
|
|
78
|
-
grove update RESEARCH_ID --version 3 --stage review --status closed
|
|
40
|
+
export GROVE_VAULT="/absolute/path/to/Obsidian vault"
|
|
41
|
+
grove capture --body 'Why do the two sides of this street feel so different?'
|
|
42
|
+
grove list
|
|
43
|
+
grove show ASSET_ID --version 1
|
|
79
44
|
```
|
|
80
45
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
## Data and removal
|
|
46
|
+
In a Harness session, use `grove_role` for collaboration guidance and `grove_propose` for drafts. Back in your terminal, run `grove preview DRAFT_ID`, then `grove accept DRAFT_ID` to confirm or `grove discard DRAFT_ID` to discard. To share selected assets with the model, configure the read allowlist. [Tools and permissions](docs/DETAIL.en.md)
|
|
84
47
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
To remove the host plugin, run `npx --yes @deepseek-ai/dsh@0.2.2-rc.3 plugin --profile grove remove dsh-grove`. Your vault data stays in place. Remove the command separately with `npm uninstall --global dsh-grove`.
|
|
88
|
-
|
|
89
|
-
## Brand assets
|
|
90
|
-
|
|
91
|
-
See the [brand assets](brand/README.en.md) and the visual identity guide ([English](brand/VI.en.md) · [简体中文](brand/VI.md)). Tests check that the package’s `icon.svg` matches `brand/mark.svg` byte for byte.
|
|
48
|
+
Before upgrading, pause writes and run `grove backup /absolute/path/to/snapshot`. To restore, run `grove restore /absolute/path/to/snapshot --destination /absolute/path/to/new-vault`, check the restored files, and switch the panel to that directory. To remove the plugin, run `dsh plugin --profile <profile> remove dsh-grove`. Your vault data stays in place.
|
|
92
49
|
|
|
93
50
|
## Contributing
|
|
94
51
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
52
|
+
1. Check open issues. For a bug, include reproduction steps and the expected and actual behavior. For a feature, describe what the user needs and how to verify it. [Issues](https://github.com/kmeng/dsh-grove/issues)
|
|
53
|
+
2. Read the development contract and open a branch for a change reviewers can verify in one PR. Use a temporary vault and include actual test results and any gaps. [Development contract](AGENTS.en.md) · [Development guide](docs/development/README.md)
|
|
54
|
+
3. Run the checks below. Documentation and brand-only changes need the first two. Host checks use an installed dsh and a temporary profile.
|
|
98
55
|
|
|
99
56
|
```sh
|
|
100
|
-
npm ci
|
|
101
|
-
npm
|
|
102
|
-
|
|
57
|
+
npm ci && npm test
|
|
58
|
+
npm pack --dry-run --json
|
|
59
|
+
bash scripts/check-compat.sh
|
|
60
|
+
bash scripts/verify-install.sh
|
|
103
61
|
```
|
|
62
|
+
|
|
63
|
+
See the [journal](docs/journal/) for handoffs and release history and the [brand guide](brand/README.en.md) for logos and visual identity.
|
package/README.md
CHANGED
|
@@ -2,104 +2,62 @@
|
|
|
2
2
|
|
|
3
3
|

|
|
4
4
|
|
|
5
|
-
[简体中文](README.md) · [English](README.en.md)
|
|
5
|
+
[简体中文](README.md) · [English](README.en.md) · [MIT 许可](LICENSE)
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
[](package.json)
|
|
9
|
-
[](package.json)
|
|
7
|
+
## 缘起
|
|
10
8
|
|
|
11
|
-
|
|
9
|
+
知林源于一个问题:怎样让一次对话、一条灵感或一轮研究,成为以后还能找回、核对和修正的知识?Grove 把 DeepSeek Harness 与你自己的 Obsidian vault 连起来,让这些内容以 Markdown 留在手边。
|
|
12
10
|
|
|
13
|
-
|
|
11
|
+
背后的 PKGS(Personal Knowledge & Growth System)把思想探索、学习、研究、创作和反思连在一起。你可以只记一句话,也可以在实践后修正自己的判断,把更新后的理解带进下一轮研究。AI 可以帮你比较解释、追问和起草,你决定相信什么、留下什么以及分享什么。 [PKGS 方法指南](docs/PKGS.zh.md)
|
|
14
12
|
|
|
15
|
-
|
|
13
|
+
## 核心功能
|
|
16
14
|
|
|
17
|
-
-
|
|
18
|
-
- **知识成长**从用自己的话解释开始。把概念、例子和疑问连起来,在应用和回顾中检验理解。
|
|
19
|
-
- **研究与创造**从值得核查的问题开始。保留来源、反例和判断的不同版本,需要时把形成的认识写成文章、报告或方案。复盘所得可以成为下一轮探索的起点。
|
|
15
|
+
以下功能以本仓库源码为准。通过 npm 安装时,以注册表已发布的版本为准。 [npm 包](https://www.npmjs.com/package/dsh-grove)
|
|
20
16
|
|
|
21
|
-
|
|
17
|
+
- **叮一下**。记下一句灵感,之后按关键词找回,也能打开历史版本。
|
|
18
|
+
- **研究与证据**。直接发起独立研究,或配置模型分析选定的摘录。导入 Markdown 和有文本层的 PDF,给摘录留下段落或页码,核对后保存报告。
|
|
19
|
+
- **知识与作品**。从报告提炼概念或方法,用已有知识起草作品。修订知识时记录原因,旧作品仍可回查当时使用的版本。
|
|
20
|
+
- **本地数据**。笔记和历史版本保存在 vault 的 `Grove/` 目录。CLI 可创建校验过的备份并恢复到独立目录。
|
|
22
21
|
|
|
23
|
-
##
|
|
22
|
+
## 安装与使用
|
|
24
23
|
|
|
25
|
-
|
|
24
|
+
准备一个 Obsidian vault。Node.js 与 DeepSeek Harness 的兼容要求见 [package.json 的 `engines`](package.json)。
|
|
26
25
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
### 装进现有的 Harness
|
|
32
|
-
|
|
33
|
-
| 入口 | 做法 |
|
|
34
|
-
| --- | --- |
|
|
35
|
-
| Desktop | **Plugins → Add plugin**,选择本仓库目录;按目录安装会装成 `link:`,改完代码重启宿主即生效 |
|
|
36
|
-
| 会话里 | 让 agent 调用 `plugin_manager` 的 `install_bundle`,`target` 传目录绝对路径 |
|
|
37
|
-
| npm | `dsh plugin --profile <profile> add dsh-grove`(0.2.0 起已发布到 npm) |
|
|
38
|
-
| CLI | `dsh plugin --profile <profile> add <目录或 tgz>`。Desktop 的 profile 由 App 管理,命令行装进 `profiles/web` 不会出现在 Desktop |
|
|
39
|
-
|
|
40
|
-
装完左侧菜单出现 **Grove**:点开选择 vault,写下第一条灵感。再到 **Plugins** 页确认 Grove 这一条出现,并在新会话里让模型调用 `grove_role`——工具真的注册上才算装好。
|
|
41
|
-
|
|
42
|
-
### 独立 profile 试用(不碰日常配置)
|
|
26
|
+
- **从 npm 安装**。运行 `dsh plugin --profile <profile> add dsh-grove`。
|
|
27
|
+
- **在 Desktop 试用源码**。在 **Plugins → Add plugin** 选择本仓库目录。修改源码后重启宿主。Desktop 使用自己管理的 profile。
|
|
28
|
+
- **用独立 profile 试用源码**。在仓库根目录执行以下命令。
|
|
43
29
|
|
|
44
30
|
```sh
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
npx --yes @deepseek-ai/dsh@0.2.2-rc.3 --profile grove
|
|
31
|
+
dsh plugin --profile grove-trial add "$PWD"
|
|
32
|
+
dsh --profile grove-trial
|
|
48
33
|
```
|
|
49
34
|
|
|
50
|
-
|
|
35
|
+
装好后,从左侧打开中文界面的 **知林** 或英文界面的 **Grove**,选择 vault,写下一句并点「💡叮~」。想研究一个问题时,打开「研究」,保存问题和观察,再按需上传资料、保存摘录与确认报告。使用「AI 深挖」前,在研究面板填写兼容 Chat Completions 的 HTTPS 接口和模型名称,并在宿主环境设置 `GROVE_MODEL_KEY`。
|
|
51
36
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
`grove` 命令来自包里的 `bin`,要全局安装才有;把插件装进某个 profile **不会**把它加进 PATH:
|
|
37
|
+
也可以单独安装终端命令。在仓库根目录执行 `npm install --global .` 可安装源码中的 CLI。执行 `npm install --global dsh-grove` 可安装 npm 已发布的 CLI。
|
|
55
38
|
|
|
56
39
|
```sh
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
## 日常使用
|
|
62
|
-
|
|
63
|
-
1. 点开左侧菜单的 **Grove**,选择你的 Obsidian vault,写下第一条灵感。也可以继续用终端:`grove capture --body '为什么组织扩大后协调成本会上升?'`。在 Obsidian 中打开 vault 的 `Grove` 文件夹可看到 Markdown 笔记。
|
|
64
|
-
2. 在 Harness 中自由对话。可要求使用 `grove_role` 作为思想伙伴、知识助手、研究助手、批判性审查者或创造助手。想保留一段讨论时,请求 `grove_propose` 起草,并提供你愿意保存的会话引用。探索可以直接结束。
|
|
65
|
-
3. 在自己的终端执行 `grove preview 草稿ID`。用 `grove accept 草稿ID` 查看并输入 `SAVE`,或执行 `grove discard 草稿ID`。确认时也可用 `--file` 提供你编辑过的正文。
|
|
66
|
-
4. 用 `grove list` 查询资产,用 `grove show 资产ID --version 1` 回看具体版本。默认 Grove 不向模型提供资产正文。若希望分享指定笔记,启动宿主前将 `GROVE_READABLE_IDS` 设为逗号分隔的资产 ID。取消分享后重新启动宿主。已进入宿主会话的内容仍受宿主历史设置约束。
|
|
67
|
-
|
|
68
|
-
## 基础研究
|
|
69
|
-
|
|
70
|
-
```sh
|
|
71
|
-
grove add question --body '团队规模如何影响决策效率?'
|
|
72
|
-
grove add research --question QUESTION_ID --body '比较决策权限和协调成本'
|
|
73
|
-
grove add evidence --body '粘贴可核对的摘录' --source 'https://example.org/report' --locator '第12页第2段'
|
|
74
|
-
grove add claim --body '我目前的判断'
|
|
75
|
-
grove update CLAIM_ID --version 1 --link EVIDENCE_ID --relation supports
|
|
76
|
-
grove update RESEARCH_ID --version 1 --link CLAIM_ID --relation related
|
|
77
|
-
grove update RESEARCH_ID --version 2 --stage analysis
|
|
78
|
-
grove update RESEARCH_ID --version 3 --stage review --status closed
|
|
40
|
+
export GROVE_VAULT="/absolute/path/to/Obsidian vault"
|
|
41
|
+
grove capture --body '同一条街,为什么两边走起来差这么多?'
|
|
42
|
+
grove list
|
|
43
|
+
grove show ASSET_ID --version 1
|
|
79
44
|
```
|
|
80
45
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
## 数据和卸载
|
|
84
|
-
|
|
85
|
-
`Grove/` 内的版本文件使用 YAML 属性、Markdown 正文和 Obsidian 双链。Grove 不读 vault 中其他笔记。复制整个 `Grove/` 文件夹即可备份或迁移,点号开头的草稿文件也会随整目录迁移。可在 Obsidian 阅读及编辑正文,保留文件名和 Grove 元数据。要保留更改前的版本,使用 `grove update`。本版证据使用用户填写的来源标识与定位。当前能力的边界见[插件详情](docs/DETAIL.zh.md)。
|
|
46
|
+
在 Harness 会话中,可用 `grove_role` 选协作角色,用 `grove_propose` 起草。回到终端用 `grove preview DRAFT_ID` 查看,再用 `grove accept DRAFT_ID` 确认或用 `grove discard DRAFT_ID` 丢弃。向模型开放指定资产时,按插件详情配置读取白名单。 [工具与权限说明](docs/DETAIL.zh.md)
|
|
86
47
|
|
|
87
|
-
|
|
48
|
+
升级前暂停对库的写入,用 `grove backup /absolute/path/to/snapshot` 校验备份。需要恢复时运行 `grove restore /absolute/path/to/snapshot --destination /absolute/path/to/new-vault`,检查后在面板切换到恢复目录。卸载可用 `dsh plugin --profile <profile> remove dsh-grove`,vault 数据保留。
|
|
88
49
|
|
|
89
|
-
##
|
|
50
|
+
## 贡献代码
|
|
90
51
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
规则只有一份:[`AGENTS.md`](AGENTS.md)([English](AGENTS.en.md))。Claude Code、Cursor、GitHub Copilot 分别读 `CLAUDE.md`、`.cursor/rules/project.mdc`、`.github/copilot-instructions.md`,三者都只指向 `AGENTS.md`。
|
|
96
|
-
|
|
97
|
-
理念、任务分层、DoD 与评审清单在 [`docs/development/`](docs/development/README.md);会话交接在 [`docs/journal/`](docs/journal/)。改动前先跑 `npm test` 与 `bash scripts/check-compat.sh`。
|
|
98
|
-
|
|
99
|
-
## 从源代码验证
|
|
52
|
+
1. 先看开放 issue。修 bug 时写清复现步骤、预期结果和实际结果。提功能时说明用户场景和可验证的验收条件。 [Issues](https://github.com/kmeng/dsh-grove/issues)
|
|
53
|
+
2. 阅读开发契约,从分支提交一个可独立验收的 PR。用临时 vault 验证,附上实际测试结果和未覆盖的情况。 [开发契约](AGENTS.md) · [开发指南](docs/development/README.md)
|
|
54
|
+
3. 本地运行下列检查。只改文档或品牌素材时跑前两项。宿主验证用已安装的 dsh 和临时 profile。
|
|
100
55
|
|
|
101
56
|
```sh
|
|
102
|
-
npm ci
|
|
103
|
-
npm
|
|
104
|
-
|
|
57
|
+
npm ci && npm test
|
|
58
|
+
npm pack --dry-run --json
|
|
59
|
+
bash scripts/check-compat.sh
|
|
60
|
+
bash scripts/verify-install.sh
|
|
105
61
|
```
|
|
62
|
+
|
|
63
|
+
项目交接与发布记录见 [journal](docs/journal/)。标志和视觉规范见 [品牌资产](brand/README.md)。
|