@openclaw/llama-cpp-provider 2026.7.1 → 2026.7.2-beta.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/dist/index.js CHANGED
@@ -6,6 +6,7 @@ import { pathToFileURL } from "node:url";
6
6
  import { createLocalEmbeddingProvider } from "openclaw/plugin-sdk/memory-core-host-engine-embeddings";
7
7
  //#region extensions/llama-cpp/src/embedding-provider.ts
8
8
  const LLAMA_CPP_EMBEDDING_PROVIDER_ID = "local";
9
+ const LOCAL_EMBEDDING_RUNTIME_FACTS = Symbol.for("openclaw.localEmbeddingRuntimeFacts");
9
10
  const DEFAULT_LLAMA_CPP_EMBEDDING_MODEL = "hf:ggml-org/embeddinggemma-300m-qat-q8_0-GGUF/embeddinggemma-300m-qat-Q8_0.gguf";
10
11
  const DEFAULT_LLAMA_CPP_EMBEDDING_MODEL_CACHE_FILE_NAME = "hf_ggml-org_embeddinggemma-300m-qat-Q8_0.gguf";
11
12
  function normalizeOptionalString(value) {
@@ -73,8 +74,15 @@ const requireFromPlugin = createRequire(import.meta.url);
73
74
  function resolveNodeLlamaCppImportUrl() {
74
75
  return pathToFileURL(requireFromPlugin.resolve("node-llama-cpp")).href;
75
76
  }
77
+ function copyLocalRuntimeFacts(source, target) {
78
+ const getRuntimeFacts = Reflect.get(source, LOCAL_EMBEDDING_RUNTIME_FACTS);
79
+ if (typeof getRuntimeFacts === "function") Object.defineProperty(target, LOCAL_EMBEDDING_RUNTIME_FACTS, {
80
+ enumerable: false,
81
+ value: getRuntimeFacts
82
+ });
83
+ }
76
84
  function adaptMemoryEmbeddingProvider(provider) {
77
- return {
85
+ const adapted = {
78
86
  id: LLAMA_CPP_EMBEDDING_PROVIDER_ID,
79
87
  model: provider.model,
80
88
  maxInputTokens: provider.maxInputTokens,
@@ -85,17 +93,21 @@ function adaptMemoryEmbeddingProvider(provider) {
85
93
  },
86
94
  close: provider.close
87
95
  };
96
+ copyLocalRuntimeFacts(provider, adapted);
97
+ return adapted;
88
98
  }
89
99
  async function createLlamaCppMemoryEmbeddingProvider(options, runtimeOptions = {}) {
90
100
  const createOptions = buildMemoryCreateOptions(options, options.outputDimensionality);
91
101
  const local = readLocalOptions(createOptions);
92
102
  const provider = await createLocalEmbeddingProvider(createOptions, { nodeLlamaCppImportUrl: runtimeOptions.nodeLlamaCppImportUrl ?? resolveNodeLlamaCppImportUrl() });
93
103
  const identity = resolveLlamaCppModelIdentity(local, provider.model, createOptions.outputDimensionality);
104
+ const identifiedProvider = identity.model === provider.model ? provider : {
105
+ ...provider,
106
+ model: identity.model
107
+ };
108
+ if (identifiedProvider !== provider) copyLocalRuntimeFacts(provider, identifiedProvider);
94
109
  return {
95
- provider: identity.model === provider.model ? provider : {
96
- ...provider,
97
- model: identity.model
98
- },
110
+ provider: identifiedProvider,
99
111
  runtime: createLlamaCppEmbeddingProviderRuntime(identity)
100
112
  };
101
113
  }
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@openclaw/llama-cpp-provider",
3
- "version": "2026.7.1",
3
+ "version": "2026.7.2-beta.1",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@openclaw/llama-cpp-provider",
9
- "version": "2026.7.1",
9
+ "version": "2026.7.2-beta.1",
10
10
  "optionalDependencies": {
11
11
  "node-llama-cpp": "3.19.0"
12
12
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/llama-cpp-provider",
3
- "version": "2026.7.1",
3
+ "version": "2026.7.2-beta.1",
4
4
  "description": "OpenClaw llama.cpp embedding provider plugin",
5
5
  "repository": {
6
6
  "type": "git",
@@ -23,10 +23,10 @@
23
23
  "minHostVersion": ">=2026.6.2"
24
24
  },
25
25
  "compat": {
26
- "pluginApi": ">=2026.7.1"
26
+ "pluginApi": ">=2026.7.2-beta.1"
27
27
  },
28
28
  "build": {
29
- "openclawVersion": "2026.7.1"
29
+ "openclawVersion": "2026.7.2-beta.1"
30
30
  },
31
31
  "release": {
32
32
  "bundleRuntimeDependencies": false,
@@ -44,7 +44,7 @@
44
44
  "README.md"
45
45
  ],
46
46
  "peerDependencies": {
47
- "openclaw": ">=2026.7.1"
47
+ "openclaw": ">=2026.7.2-beta.1"
48
48
  },
49
49
  "peerDependenciesMeta": {
50
50
  "openclaw": {