knodin 0.8.4 → 0.8.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/bin/cli.js +272 -24
- package/dist/src/cli-model.js +26 -0
- package/dist/src/engine/candidate-database.js +167 -0
- package/dist/src/engine/embeddings.js +8 -5
- package/dist/src/engine/index.js +1244 -305
- package/dist/src/engine/prune.js +8 -0
- package/dist/src/file-metrics.js +153 -0
- package/dist/src/repair-lease.js +8 -5
- package/dist/src/response-budget.js +2 -1
- package/dist/src/shared-index/artifact.js +65 -0
- package/dist/src/shared-index/cache.js +267 -0
- package/dist/src/shared-index/compatibility.js +70 -0
- package/dist/src/shared-index/config.js +224 -0
- package/dist/src/shared-index/contract.js +117 -0
- package/dist/src/shared-index/manifest.js +71 -0
- package/dist/src/shared-index/opportunistic.js +37 -0
- package/dist/src/shared-index/overlay.js +98 -0
- package/dist/src/shared-index/provenance.js +149 -0
- package/dist/src/shared-index/publisher.js +198 -0
- package/dist/src/shared-index/restore.js +209 -0
- package/dist/src/shared-index/s3-client.js +124 -0
- package/dist/src/shared-index/schemas.js +86 -0
- package/dist/src/shared-index/selection.js +111 -0
- package/dist/src/tools/knodin-tools.js +70 -3
- package/docs/CLI.md +39 -0
- package/docs/MCP.md +12 -0
- package/docs/SHARED-INDEX-CONTRACT.md +132 -0
- package/docs/releases/0.8.5.md +25 -0
- package/docs/releases/0.8.6.md +10 -0
- package/package.json +12 -3
- package/schemas/shared-index-branch-pointer-v1.schema.json +66 -0
- package/schemas/shared-index-config-v1.schema.json +97 -0
- package/schemas/shared-index-manifest-v1.schema.json +104 -0
- package/schemas/shared-index-provenance-v1.schema.json +100 -0
|
@@ -15,7 +15,9 @@ let embedderPromise = null;
|
|
|
15
15
|
let embedderOverride = null;
|
|
16
16
|
const embedderProgressListeners = new Set();
|
|
17
17
|
let embedderReady = false;
|
|
18
|
-
const EMBEDDING_DIMENSIONS = 384;
|
|
18
|
+
export const EMBEDDING_DIMENSIONS = 384;
|
|
19
|
+
export const EMBEDDING_MODEL_ID = "Xenova/all-MiniLM-L6-v2";
|
|
20
|
+
export const EMBEDDING_MODEL_REVISION = "751bff37182d3f1213fa05d7196b954e230abad9";
|
|
19
21
|
const DEFAULT_MODEL_REMOTE_HOST = "https://huggingface.co/";
|
|
20
22
|
/**
|
|
21
23
|
* One machine-level model cache shared by every repository and every installed
|
|
@@ -113,7 +115,7 @@ export function getEmbedder(onProgress) {
|
|
|
113
115
|
return Promise.resolve(embedderOverride);
|
|
114
116
|
}
|
|
115
117
|
if (onProgress && embedderReady)
|
|
116
|
-
onProgress({ status: "ready", name:
|
|
118
|
+
onProgress({ status: "ready", name: EMBEDDING_MODEL_ID });
|
|
117
119
|
else if (onProgress)
|
|
118
120
|
embedderProgressListeners.add(onProgress);
|
|
119
121
|
if (!embedderPromise) {
|
|
@@ -132,13 +134,14 @@ export function getEmbedder(onProgress) {
|
|
|
132
134
|
}
|
|
133
135
|
}
|
|
134
136
|
};
|
|
135
|
-
notify({ status: "loading", name:
|
|
136
|
-
const pipe = await pipeline("feature-extraction",
|
|
137
|
+
notify({ status: "loading", name: EMBEDDING_MODEL_ID });
|
|
138
|
+
const pipe = await pipeline("feature-extraction", EMBEDDING_MODEL_ID, {
|
|
139
|
+
revision: EMBEDDING_MODEL_REVISION,
|
|
137
140
|
progress_callback: notify,
|
|
138
141
|
});
|
|
139
142
|
realEmbedderLoadCount++;
|
|
140
143
|
embedderReady = true;
|
|
141
|
-
notify({ status: "ready", name:
|
|
144
|
+
notify({ status: "ready", name: EMBEDDING_MODEL_ID });
|
|
142
145
|
embedderProgressListeners.clear();
|
|
143
146
|
return pipe;
|
|
144
147
|
}
|