@openclaw/llama-cpp-provider 2026.9.5 → 2026.9.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.
- package/dist/index.js +4 -10
- package/package.json +7 -4
package/dist/index.js
CHANGED
|
@@ -12,6 +12,7 @@ import { fetchWithSsrFGuard, ssrfPolicyFromHttpBaseUrlAllowedOrigin } from "open
|
|
|
12
12
|
import { fetchConfiguredLocalOriginWithSsrFGuard } from "openclaw/plugin-sdk/ssrf-runtime-internal";
|
|
13
13
|
import { execFile } from "node:child_process";
|
|
14
14
|
import fs$1, { constants } from "node:fs";
|
|
15
|
+
import { sha256File } from "@openclaw/fs-safe/durability";
|
|
15
16
|
import { toErrorObject } from "openclaw/plugin-sdk/error-runtime";
|
|
16
17
|
import { ARCHIVE_LIMIT_ERROR_CODE, ArchiveLimitError, extractArchive } from "openclaw/plugin-sdk/archive";
|
|
17
18
|
import { CUSTOM_LOCAL_AUTH_MARKER, applyAuthProfileConfig, buildApiKeyCredential, ensureApiKeyFromEnvOrPrompt, hasConfiguredSecretInput, isNonSecretApiKeyMarker, normalizeOptionalSecretInput, upsertAuthProfileWithLock } from "openclaw/plugin-sdk/provider-auth";
|
|
@@ -304,7 +305,7 @@ function rememberVerifiedFile(filePath, stat, sha256) {
|
|
|
304
305
|
if (oldest !== void 0) verifiedFiles.delete(oldest);
|
|
305
306
|
}
|
|
306
307
|
}
|
|
307
|
-
async function sha256File(filePath, signal) {
|
|
308
|
+
async function sha256File$1(filePath, signal) {
|
|
308
309
|
signal?.throwIfAborted();
|
|
309
310
|
try {
|
|
310
311
|
const identity = fileIdentity(await fs.stat(filePath, { bigint: true }));
|
|
@@ -314,16 +315,9 @@ async function sha256File(filePath, signal) {
|
|
|
314
315
|
const handle = await fs.open(filePath, "r");
|
|
315
316
|
try {
|
|
316
317
|
const before = fileIdentity(await handle.stat({ bigint: true }));
|
|
317
|
-
const
|
|
318
|
-
const input = handle.createReadStream({
|
|
319
|
-
autoClose: false,
|
|
320
|
-
highWaterMark: 1048576,
|
|
321
|
-
signal
|
|
322
|
-
});
|
|
323
|
-
for await (const chunk of input) hash.update(chunk);
|
|
318
|
+
const { digest: sha256 } = await sha256File(handle, { signal });
|
|
324
319
|
const after = await handle.stat({ bigint: true });
|
|
325
320
|
if (before !== fileIdentity(after) || before !== fileIdentity(await fs.stat(filePath, { bigint: true }))) throw new Error(`File changed during integrity verification: ${filePath}. Retry setup.`);
|
|
326
|
-
const sha256 = hash.digest("hex");
|
|
327
321
|
rememberVerifiedFile(filePath, after, sha256);
|
|
328
322
|
return sha256;
|
|
329
323
|
} finally {
|
|
@@ -1062,7 +1056,7 @@ async function ensureLlamaCppModel(params) {
|
|
|
1062
1056
|
const destination = path.join(params.cacheDir, artifact.fileName);
|
|
1063
1057
|
const load = modelPromises.get(destination) ?? (async () => {
|
|
1064
1058
|
const exists = await fs.stat(destination).then((stat) => stat.isFile()).catch(() => false);
|
|
1065
|
-
if (exists && artifact.expectedSha256 && await sha256File(destination, params.signal) === artifact.expectedSha256) return destination;
|
|
1059
|
+
if (exists && artifact.expectedSha256 && await sha256File$1(destination, params.signal) === artifact.expectedSha256) return destination;
|
|
1066
1060
|
if (exists && !artifact.expectedSha256) {
|
|
1067
1061
|
await assertGguf(destination);
|
|
1068
1062
|
return destination;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/llama-cpp-provider",
|
|
3
|
-
"version": "2026.9.
|
|
3
|
+
"version": "2026.9.6",
|
|
4
4
|
"description": "OpenClaw provider for managed and external llama.cpp servers",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
"minHostVersion": ">=2026.6.2"
|
|
22
22
|
},
|
|
23
23
|
"compat": {
|
|
24
|
-
"pluginApi": ">=2026.9.
|
|
24
|
+
"pluginApi": ">=2026.9.6"
|
|
25
25
|
},
|
|
26
26
|
"build": {
|
|
27
|
-
"openclawVersion": "2026.9.
|
|
27
|
+
"openclawVersion": "2026.9.6"
|
|
28
28
|
},
|
|
29
29
|
"release": {
|
|
30
30
|
"bundleRuntimeDependencies": false,
|
|
@@ -35,6 +35,9 @@
|
|
|
35
35
|
"./dist/index.js"
|
|
36
36
|
]
|
|
37
37
|
},
|
|
38
|
+
"dependencies": {
|
|
39
|
+
"@openclaw/fs-safe": "0.18.1"
|
|
40
|
+
},
|
|
38
41
|
"files": [
|
|
39
42
|
"dist/**",
|
|
40
43
|
"openclaw.plugin.json",
|
|
@@ -43,7 +46,7 @@
|
|
|
43
46
|
"assets/activity.svg"
|
|
44
47
|
],
|
|
45
48
|
"peerDependencies": {
|
|
46
|
-
"openclaw": ">=2026.9.
|
|
49
|
+
"openclaw": ">=2026.9.6"
|
|
47
50
|
},
|
|
48
51
|
"peerDependenciesMeta": {
|
|
49
52
|
"openclaw": {
|