@deepsweet/mdn 0.1.3 → 0.2.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.md +6 -2
- package/dist/index.js +8 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -22,7 +22,7 @@ See [dataset repo](https://huggingface.co/datasets/deepsweet/mdn) on HuggigFace
|
|
|
22
22
|
### 1. Download dataset and embedding model
|
|
23
23
|
|
|
24
24
|
```sh
|
|
25
|
-
npx -y @deepsweet/mdn download
|
|
25
|
+
npx -y @deepsweet/mdn@latest download
|
|
26
26
|
```
|
|
27
27
|
|
|
28
28
|
Both [dataset](https://huggingface.co/datasets/deepsweet/mdn) (\~260 MB) and the [embedding model GGUF file](https://huggingface.co/deepsweet/bge-m3-GGUF-Q4_K_M) (\~438 MB) will be downloaded directly from HugginFace and stored in its default cache location (typically `~/.cache/huggingface/`), just like the `hf download` command does.
|
|
@@ -35,7 +35,8 @@ Both [dataset](https://huggingface.co/datasets/deepsweet/mdn) (\~260 MB) and the
|
|
|
35
35
|
"mdn": {
|
|
36
36
|
"command": "npx",
|
|
37
37
|
"args": [
|
|
38
|
-
"
|
|
38
|
+
"-y",
|
|
39
|
+
"@deepsweet/mdn@latest",
|
|
39
40
|
"server"
|
|
40
41
|
],
|
|
41
42
|
"env": {}
|
|
@@ -44,6 +45,9 @@ Both [dataset](https://huggingface.co/datasets/deepsweet/mdn) (\~260 MB) and the
|
|
|
44
45
|
}
|
|
45
46
|
```
|
|
46
47
|
|
|
48
|
+
> [!TIP]
|
|
49
|
+
> Remove `@latest` for a full offline experience, but keep in mind that this will cache a fixed version without auto-updating.
|
|
50
|
+
|
|
47
51
|
The `stdio` server will spawn [llama.cpp](https://github.com/ggml-org/llama.cpp) under the hood, load the embedding model (~655 MB RAM/VRAM), and query the dataset – all on demand.
|
|
48
52
|
|
|
49
53
|
## Settings
|
package/dist/index.js
CHANGED
|
@@ -134,7 +134,7 @@ var createReranker = async () => {
|
|
|
134
134
|
|
|
135
135
|
// package.json
|
|
136
136
|
var name = "@deepsweet/mdn";
|
|
137
|
-
var version = "0.
|
|
137
|
+
var version = "0.2.0";
|
|
138
138
|
|
|
139
139
|
// src/server.ts
|
|
140
140
|
var startMcpServer = async () => {
|
|
@@ -152,6 +152,9 @@ var startMcpServer = async () => {
|
|
|
152
152
|
description: "Reference documentation for Web API, JavaScript, HTML, CSS, SVG and HTTP",
|
|
153
153
|
inputSchema: z2.object({
|
|
154
154
|
query: z2.string().describe(env.MDN_QUERY_DESCRIPTION)
|
|
155
|
+
}),
|
|
156
|
+
outputSchema: z2.object({
|
|
157
|
+
results: z2.array(z2.string())
|
|
155
158
|
})
|
|
156
159
|
}, async ({ query }) => {
|
|
157
160
|
llamaContext ??= await getLlamaContext(modelPath);
|
|
@@ -170,7 +173,10 @@ var startMcpServer = async () => {
|
|
|
170
173
|
content: results.map((result) => ({
|
|
171
174
|
type: "text",
|
|
172
175
|
text: result.text
|
|
173
|
-
}))
|
|
176
|
+
})),
|
|
177
|
+
structuredContent: {
|
|
178
|
+
results: results.map((result) => result.text)
|
|
179
|
+
}
|
|
174
180
|
};
|
|
175
181
|
});
|
|
176
182
|
const transport = new StdioServerTransport;
|