threadnote 0.2.1 → 0.2.2
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/dist/threadnote.cjs +25 -7
- package/docs/troubleshooting.md +8 -0
- package/package.json +1 -1
package/dist/threadnote.cjs
CHANGED
|
@@ -6294,16 +6294,20 @@ async function runInstall(config, options) {
|
|
|
6294
6294
|
const serverPath = await findExecutable([OPENVIKING_SERVER_COMMAND]);
|
|
6295
6295
|
if (serverPath) {
|
|
6296
6296
|
console.log(`OpenViking server already installed: ${serverPath}`);
|
|
6297
|
-
const
|
|
6298
|
-
|
|
6297
|
+
const localEmbeddingMissing = await hasLocalEmbeddingDependency(serverPath) === false;
|
|
6298
|
+
const pythonSystemCertificatesMissing = await hasPythonSystemCertificatesPatch(serverPath) === false;
|
|
6299
|
+
if (localEmbeddingMissing) {
|
|
6300
|
+
const repairReasons = [];
|
|
6299
6301
|
repairReasons.push("local embedding extra is missing");
|
|
6300
|
-
|
|
6301
|
-
|
|
6302
|
-
|
|
6303
|
-
}
|
|
6304
|
-
if (repairReasons.length > 0) {
|
|
6302
|
+
if (pythonSystemCertificatesMissing) {
|
|
6303
|
+
repairReasons.push("Python system certificate bridge is missing");
|
|
6304
|
+
}
|
|
6305
6305
|
console.log(`OpenViking install needs repair: ${repairReasons.join("; ")}.`);
|
|
6306
6306
|
await runInstallCommands(config, options.packageManager, true, options.dryRun === true);
|
|
6307
|
+
} else if (pythonSystemCertificatesMissing) {
|
|
6308
|
+
console.log("OpenViking install needs repair: Python system certificate bridge is missing.");
|
|
6309
|
+
const installCommand = await getPythonSystemCertificatesInstallCommand(serverPath);
|
|
6310
|
+
await maybeRun(options.dryRun === true, installCommand.executable, installCommand.args);
|
|
6307
6311
|
}
|
|
6308
6312
|
} else {
|
|
6309
6313
|
await runInstallCommands(config, options.packageManager, false, options.dryRun === true);
|
|
@@ -6980,6 +6984,20 @@ async function runInstallCommands(config, preferred, force, dryRun) {
|
|
|
6980
6984
|
await maybeRun(dryRun, installCommand.executable, installCommand.args);
|
|
6981
6985
|
}
|
|
6982
6986
|
}
|
|
6987
|
+
async function getPythonSystemCertificatesInstallCommand(serverPath) {
|
|
6988
|
+
const pythonPath = await siblingPythonForExecutable(serverPath);
|
|
6989
|
+
if (!pythonPath) {
|
|
6990
|
+
throw new Error(`Could not find the OpenViking Python environment for ${serverPath}`);
|
|
6991
|
+
}
|
|
6992
|
+
const uvPath = await findExecutable(["uv"]);
|
|
6993
|
+
if (uvPath) {
|
|
6994
|
+
return {
|
|
6995
|
+
executable: uvPath,
|
|
6996
|
+
args: ["pip", "install", "--native-tls", "--python", pythonPath, PYTHON_SYSTEM_CERTS_PACKAGE]
|
|
6997
|
+
};
|
|
6998
|
+
}
|
|
6999
|
+
return { executable: pythonPath, args: ["-m", "pip", "install", PYTHON_SYSTEM_CERTS_PACKAGE] };
|
|
7000
|
+
}
|
|
6983
7001
|
async function getInstallCommands(config, preferred, force) {
|
|
6984
7002
|
const packageSpec = `${OPENVIKING_PACKAGE_NAME}==${config.openVikingVersion}`;
|
|
6985
7003
|
const manager = preferred ?? await detectPackageManager();
|
package/docs/troubleshooting.md
CHANGED
|
@@ -42,6 +42,14 @@ threadnote start
|
|
|
42
42
|
Threadnote installs `pip-system-certs` into the OpenViking environment so Python `requests` can use certificates trusted
|
|
43
43
|
by the operating system.
|
|
44
44
|
|
|
45
|
+
If an older Threadnote release tries to reinstall all of OpenViking and fails while fetching packages such as `openai`,
|
|
46
|
+
install the certificate bridge directly into the existing OpenViking environment:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
uv pip install --native-tls --python "$(dirname "$(realpath "$(which openviking-server)")")/python" pip-system-certs
|
|
50
|
+
threadnote start
|
|
51
|
+
```
|
|
52
|
+
|
|
45
53
|
## Local Embedding Extra Missing
|
|
46
54
|
|
|
47
55
|
The default OpenViking config uses the local embedding backend. If the server log says `llama-cpp-python` is missing,
|