@restregular/dsh-memory 0.30.0 → 0.31.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/CHANGELOG.md +20 -0
- package/README.md +18 -0
- package/lib/client.js +6786 -6236
- package/lib/provider/embed-install.js +26 -19
- package/package.json +6 -1
|
@@ -213,8 +213,13 @@ export function detectInstalled(root , modelFile = MODEL_FILE_NAM
|
|
|
213
213
|
* cuda `-bin-win-cuda-12.4-x64.zip` / `-bin-ubuntu-cuda-12.8-x64.tar.gz` —— **还需要 cudart 伴随包**
|
|
214
214
|
* metal macOS 构建自带 Metal,资产与 cpu 相同
|
|
215
215
|
*
|
|
216
|
-
*
|
|
217
|
-
*
|
|
216
|
+
* 正则**首尾都要锚定**:同一批资产里还有 cuda/vulkan/sycl/openvino/rocm/adreno 变体,
|
|
217
|
+
* 首端不锚定就会误命中——`cudart-llama-bin-win-cuda-12.4-x64.zip` 和
|
|
218
|
+
* `llama-b12023-bin-win-cuda-12.4-x64.zip` 共享同一段后缀,而 release 的 assets
|
|
219
|
+
* 数组顺序**不保证**主包在前(b12023 实测 cudart 排在前面),只锚 `$` 会把 CUDA
|
|
220
|
+
* 运行库当成运行时下下来,解压后当然找不到 llama-server.exe(issue #4)。
|
|
221
|
+
* 主包一律以 `llama-` 开头(构建号写在中间,不硬编码),伴生包一律以 `cudart-`
|
|
222
|
+
* 开头,两个正则互不重叠。
|
|
218
223
|
* CUDA 的次版本号写进正则是有意的:不同 CUDA 版本需要不同的 cudart 与之配对,
|
|
219
224
|
* 让它们一起被选中才能保证两个包属于同一套工具链。
|
|
220
225
|
*/
|
|
@@ -226,12 +231,12 @@ export function runtimeAssetPattern(
|
|
|
226
231
|
const key = `${platform}-${arch}`
|
|
227
232
|
const cpu = () => {
|
|
228
233
|
switch (key) {
|
|
229
|
-
case 'win32-x64': return
|
|
230
|
-
case 'win32-arm64': return
|
|
231
|
-
case 'linux-x64': return
|
|
232
|
-
case 'linux-arm64': return
|
|
233
|
-
case 'darwin-arm64': return
|
|
234
|
-
case 'darwin-x64': return
|
|
234
|
+
case 'win32-x64': return /^llama-.*-bin-win-cpu-x64\.zip$/
|
|
235
|
+
case 'win32-arm64': return /^llama-.*-bin-win-cpu-arm64\.zip$/
|
|
236
|
+
case 'linux-x64': return /^llama-.*-bin-ubuntu-x64\.(?:zip|tar\.gz)$/
|
|
237
|
+
case 'linux-arm64': return /^llama-.*-bin-ubuntu-arm64\.(?:zip|tar\.gz)$/
|
|
238
|
+
case 'darwin-arm64': return /^llama-.*-bin-macos-arm64\.(?:zip|tar\.gz)$/
|
|
239
|
+
case 'darwin-x64': return /^llama-.*-bin-macos-x64\.(?:zip|tar\.gz)$/
|
|
235
240
|
default:
|
|
236
241
|
throw new Error(
|
|
237
242
|
`资产匹配失败:${key}(暂不支持该平台;已支持 win32-x64 / win32-arm64 / linux-x64 / linux-arm64 / darwin-arm64 / darwin-x64)`,
|
|
@@ -241,20 +246,20 @@ export function runtimeAssetPattern(
|
|
|
241
246
|
if (flavor === 'cpu' || flavor === 'metal') return cpu()
|
|
242
247
|
if (flavor === 'vulkan') {
|
|
243
248
|
switch (key) {
|
|
244
|
-
case 'win32-x64': return
|
|
245
|
-
case 'win32-arm64': return
|
|
246
|
-
case 'linux-x64': return
|
|
247
|
-
case 'linux-arm64': return
|
|
249
|
+
case 'win32-x64': return /^llama-.*-bin-win-vulkan-x64\.zip$/
|
|
250
|
+
case 'win32-arm64': return /^llama-.*-bin-win-vulkan-arm64\.zip$/
|
|
251
|
+
case 'linux-x64': return /^llama-.*-bin-ubuntu-vulkan-x64\.tar\.gz$/
|
|
252
|
+
case 'linux-arm64': return /^llama-.*-bin-ubuntu-vulkan-arm64\.tar\.gz$/
|
|
248
253
|
// macOS 没有独立的 Vulkan 包(Metal 就是它的 GPU 路径),退回 CPU 构建。
|
|
249
254
|
default: return cpu()
|
|
250
255
|
}
|
|
251
256
|
}
|
|
252
257
|
// cuda
|
|
253
258
|
switch (key) {
|
|
254
|
-
case 'win32-x64': return
|
|
255
|
-
case 'win32-arm64': return
|
|
256
|
-
case 'linux-x64': return
|
|
257
|
-
case 'linux-arm64': return
|
|
259
|
+
case 'win32-x64': return /^llama-.*-bin-win-cuda-12\.4-x64\.zip$/
|
|
260
|
+
case 'win32-arm64': return /^llama-.*-bin-win-cuda-13\.4-arm64\.zip$/
|
|
261
|
+
case 'linux-x64': return /^llama-.*-bin-ubuntu-cuda-12\.8-x64\.tar\.gz$/
|
|
262
|
+
case 'linux-arm64': return /^llama-.*-bin-ubuntu-cuda-13\.4-arm64\.tar\.gz$/
|
|
258
263
|
default: return cpu()
|
|
259
264
|
}
|
|
260
265
|
}
|
|
@@ -262,9 +267,11 @@ export function runtimeAssetPattern(
|
|
|
262
267
|
/**
|
|
263
268
|
* CUDA 风味需要的伴随资产(cudart:运行时 + cuBLAS 等),没有它 llama-server 起不来。
|
|
264
269
|
*
|
|
265
|
-
*
|
|
266
|
-
*
|
|
267
|
-
*
|
|
270
|
+
* 注意它的命名和主包**不一致**:Windows 的 cudart 包一律不带构建号
|
|
271
|
+
* (`cudart-llama-bin-win-cuda-12.4-x64.zip`),Linux 的带
|
|
272
|
+
* (`cudart-llama-b12023-bin-ubuntu-cuda-12.8-x64.tar.gz`),而且 Windows 的
|
|
273
|
+
* 13.4 也会沿用 `cudart-llama-bin-win-cuda-13.4-…` 这种无构建号形态。所以正则
|
|
274
|
+
* 不能要求 `b<号>`,只能靠 cuda 次版本号把主包与伴生包配对。
|
|
268
275
|
*/
|
|
269
276
|
export function runtimeCompanionPattern(
|
|
270
277
|
platform ,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@restregular/dsh-memory",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.31.0",
|
|
4
4
|
"description": "DeepSeek Harness 记忆系统(单包单入口):JSONL 存储 + 本地向量检索(BGE-M3)+ 五个模型工具 + 自动召回注入 + 管理面板。",
|
|
5
5
|
"icon": "./icon.svg",
|
|
6
6
|
"type": "module",
|
|
@@ -47,6 +47,11 @@
|
|
|
47
47
|
"optional": true
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
|
+
"repository": {
|
|
51
|
+
"type": "git",
|
|
52
|
+
"url": "git+https://github.com/RestRegular/dsh-memory",
|
|
53
|
+
"directory": "packages/dsh-memory"
|
|
54
|
+
},
|
|
50
55
|
"publishConfig": {
|
|
51
56
|
"access": "public"
|
|
52
57
|
},
|