dsh-moli 1.0.5 → 1.0.6

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.
Files changed (3) hide show
  1. package/README.md +46 -6
  2. package/README.zh.md +44 -5
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -58,17 +58,57 @@ dsh plugin --profile web add github:27painter/dsh-moli
58
58
  ```
59
59
 
60
60
  > [!IMPORTANT]
61
- > **This package is the plugin only — it does not include the Moli engine.** It is 26 kB of
62
- > JavaScript; `moli.exe` is a separate ~101 MB Rust binary with its own release process. Installing the
63
- > plugin does not install Moli, and `moli_fetch` reports that the engine is missing until you install
64
- > it.
61
+ > **The npm package is the plugin only — it does not contain the Moli engine.**
65
62
  >
66
- > **There is no npm package for the engine.** The registry names `moli` and `moli-cli` belong to
63
+ > The npm tarball is 26 kB: eight JavaScript and text files. `moli.exe` is a separate ~101 MB compiled
64
+ > Rust binary, built and released by the Moli project on its own schedule.
65
+ >
66
+ > **Why it cannot be bundled:**
67
+ >
68
+ > - **Size.** The engine is roughly 4,000× the plugin. Every install and every plugin update would
69
+ > carry a browser.
70
+ > - **Ownership.** Moli is `lexmount/moli` under its own MIT copyright. Redistributing its binary
71
+ > through this package would mean re-publishing someone else's artifact as our own.
72
+ > - **Platforms.** The engine ships per OS and per architecture — Windows/Linux/macOS × x64/arm64.
73
+ > Bundling would pin one build into every user's install.
74
+ > - **Versions.** The plugin must work with whatever Moli version a user has, including Moli releases
75
+ > that appear after the plugin was published. Bundling would lock the pair together.
76
+ >
77
+ > **There is no npm package for the engine either.** The registry names `moli` and `moli-cli` belong to
67
78
  > unrelated projects, and `@lexmount/moli` does not exist. Moli ships as prebuilt binaries on
68
79
  > [GitHub Releases](https://github.com/lexmount/moli/releases/latest) — do not install the engine by
69
80
  > guessing a package name.
70
81
 
71
- Either route ends the same way. Restart DSH, then check the engine and fetch a page:
82
+ ## The two situations after installing
83
+
84
+ The two download routes above install the same thing. What differs is whether Moli is already on the
85
+ machine — and that decides whether you are finished or have one more step.
86
+
87
+ ### Situation A — Moli is already installed: nothing else to do
88
+
89
+ The plugin discovers `moli.exe` on its own and both tools work immediately. Just restart DSH and
90
+ confirm:
91
+
92
+ ```
93
+ moli_probe
94
+ ```
95
+
96
+ If the reported version looks right, you are done.
97
+
98
+ ### Situation B — Moli is not installed yet: fetch the engine too
99
+
100
+ `moli_fetch` will keep reporting a missing engine until you install one. Do that with either of:
101
+
102
+ ```
103
+ moli_probe action=install # let the plugin fetch it
104
+ ```
105
+
106
+ ```powershell
107
+ # or run Moli's own installer yourself
108
+ powershell -ExecutionPolicy ByPass -c "irm https://github.com/lexmount/moli/releases/latest/download/moli-installer.ps1 | iex"
109
+ ```
110
+
111
+ Then confirm with `moli_probe` and fetch a page:
72
112
 
73
113
  ```
74
114
  moli_probe
package/README.zh.md CHANGED
@@ -53,14 +53,53 @@ dsh plugin --profile web add github:27painter/dsh-moli
53
53
  ```
54
54
 
55
55
  > [!IMPORTANT]
56
- > **这个包只有插件,不含 Moli 引擎。** 它是 26 kB 的 JavaScript;`moli.exe` 是另一个约 101 MB 的 Rust
57
- > 二进制、有自己的发布流程。装插件**不会**顺带装上 Moli,在你装引擎之前 `moli_fetch` 会一直报"引擎缺失"。
56
+ > **npm 包只有插件,不含 Moli 引擎。**
58
57
  >
59
- > **引擎没有 npm 包。** registry 上的 `moli` 和 `moli-cli` 属于无关项目,`@lexmount/moli` 并不存在。
60
- > Moli 以预编译二进制形式发布在
58
+ > npm tarball 是 26 kB:八个 JavaScript 与文本文件。`moli.exe` 是另外的东西——约 101 MB 的 Rust 编译
59
+ > 产物,由 Moli 项目按自己的节奏构建和发布。
60
+ >
61
+ > **为什么不能打包进来:**
62
+ >
63
+ > - **体积。** 引擎约为插件的 4,000 倍。每次安装、每次插件更新都要顺带搬运一个浏览器。
64
+ > - **归属。** Moli 是 `lexmount/moli`,版权属于它自己的 MIT 署名。把它家的二进制经由本包再分发,等于
65
+ > 把别人的产物当自己的发布。
66
+ > - **平台。** 引擎按操作系统与架构分别发布——Windows/Linux/macOS × x64/arm64。打包进来等于把某一个
67
+ > 构建方式钉死给所有用户。
68
+ > - **版本。** 插件要能配合用户手上**任意** Moli 版本工作,包括插件发布之后才出现的 Moli 新版本。
69
+ > 打包会把两者的版本绑死。
70
+ >
71
+ > **引擎同样没有 npm 包。** registry 上的 `moli` 和 `moli-cli` 属于无关项目,`@lexmount/moli` 并不
72
+ > 存在。Moli 以预编译二进制形式发布在
61
73
  > [GitHub Releases](https://github.com/lexmount/moli/releases/latest)——**不要靠猜包名去装引擎**。
62
74
 
63
- 两种方式都要重启 DSH,然后自检并抓一个页面:
75
+ ## 装好之后的两种情形
76
+
77
+ 上面两条下载路线装的是同一个东西。区别在于**你的机器上有没有 Moli**——这决定你是就此完事,还是还差一步。
78
+
79
+ ### 情形 A —— 已经装了 Moli:不用再做别的
80
+
81
+ 插件自己会找到 `moli.exe`,两个工具立即可用。重启 DSH 然后确认:
82
+
83
+ ```
84
+ moli_probe
85
+ ```
86
+
87
+ 如果报出来的版本正常,就结束了。
88
+
89
+ ### 情形 B —— 还没装 Moli:把引擎也拉下来
90
+
91
+ 在你装上引擎之前,`moli_fetch` 会一直报"引擎缺失"。用下面任一种装上:
92
+
93
+ ```
94
+ moli_probe action=install # 让插件替你拉
95
+ ```
96
+
97
+ ```powershell
98
+ # 或者自己跑 Moli 官方的安装器
99
+ powershell -ExecutionPolicy ByPass -c "irm https://github.com/lexmount/moli/releases/latest/download/moli-installer.ps1 | iex"
100
+ ```
101
+
102
+ 然后用 `moli_probe` 确认并抓一个页面:
64
103
 
65
104
  ```
66
105
  moli_probe
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-moli",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "type": "module",
5
5
  "description": "DeepSeek Harness tools for the local Moli headless browser: rendered fetches, markdown, semantic trees, screenshots, and PDFs.",
6
6
  "license": "MIT",