botholomew 0.11.0 → 0.11.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/package.json +6 -3
- package/src/context/embedder-impl.ts +16 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "botholomew",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.1",
|
|
4
4
|
"description": "An autonomous AI agent for knowledge work — works your task queue while you sleep.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
"ink-text-input": "^6.0.0",
|
|
39
39
|
"istextorbinary": "^9.5.0",
|
|
40
40
|
"nanospinner": "^1.2.2",
|
|
41
|
+
"onnxruntime-web": "1.26.0-dev.20260416-b7804b056c",
|
|
41
42
|
"react": "^19.2.0",
|
|
42
43
|
"uuid": "^14.0.0",
|
|
43
44
|
"zod": "^4.4.2"
|
|
@@ -53,7 +54,9 @@
|
|
|
53
54
|
"vue": "^3.5.0"
|
|
54
55
|
},
|
|
55
56
|
"trustedDependencies": [
|
|
56
|
-
"onnxruntime-node",
|
|
57
57
|
"protobufjs"
|
|
58
|
-
]
|
|
58
|
+
],
|
|
59
|
+
"patchedDependencies": {
|
|
60
|
+
"@huggingface/transformers@4.2.0": "patches/@huggingface%2Ftransformers@4.2.0.patch"
|
|
61
|
+
}
|
|
59
62
|
}
|
|
@@ -8,6 +8,22 @@ import {
|
|
|
8
8
|
import type { BotholomewConfig } from "../config/schemas.ts";
|
|
9
9
|
import { logger } from "../utils/logger.ts";
|
|
10
10
|
|
|
11
|
+
// We patch @huggingface/transformers to use onnxruntime-web (WASM) instead of
|
|
12
|
+
// onnxruntime-node (which segfaults under Bun — oven-sh/bun#26081). By default
|
|
13
|
+
// transformers.js then points the WASM loader at jsDelivr; pin it to the
|
|
14
|
+
// onnxruntime-web copy already on disk so the chat path stays offline-capable.
|
|
15
|
+
const ortWasm = env.backends.onnx?.wasm;
|
|
16
|
+
if (ortWasm) {
|
|
17
|
+
ortWasm.wasmPaths = {
|
|
18
|
+
mjs: import.meta.resolve(
|
|
19
|
+
"onnxruntime-web/ort-wasm-simd-threaded.asyncify.mjs",
|
|
20
|
+
),
|
|
21
|
+
wasm: import.meta.resolve(
|
|
22
|
+
"onnxruntime-web/ort-wasm-simd-threaded.asyncify.wasm",
|
|
23
|
+
),
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
|
|
11
27
|
type EmbedFn = (
|
|
12
28
|
texts: string[],
|
|
13
29
|
config: Required<BotholomewConfig>,
|