dsh-mnemon-source-memory-spaces 0.5.23 → 0.5.25
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/lib/client.js +18 -15
- package/lib/contracts.d.ts +1 -0
- package/lib/index.js +10 -4
- package/lib/types/client/overview-page.d.ts +1 -0
- package/lib/types/contracts.d.ts +1 -0
- package/package.json +3 -3
- package/presentation/locales.json +8 -8
package/lib/client.js
CHANGED
|
@@ -476,10 +476,10 @@ window.__ModuleLoader__.load({
|
|
|
476
476
|
"config.embeddingSaveBeforeTest": "请先保存嵌入配置,再测试实际运行值。",
|
|
477
477
|
"config.embeddingTestUnavailable": "当前 DSH Host 不提供嵌入状态检查。",
|
|
478
478
|
"config.embeddingCliMissing": "测试需要 Mnemon CLI;向量设置只作用于 Mnemon Native。",
|
|
479
|
-
"config.embeddingStatusAvailable": "
|
|
480
|
-
"config.embeddingStatusAvailableWithProtocol": "
|
|
481
|
-
"config.embeddingStatusUnavailable": "
|
|
482
|
-
"config.embeddingStatusUnavailableWithProtocol": "
|
|
479
|
+
"config.embeddingStatusAvailable": "嵌入模型可用 · {model} · 已嵌入 {embedded}/{total}({coverage})",
|
|
480
|
+
"config.embeddingStatusAvailableWithProtocol": "嵌入模型可用 · {model} · 协议 {protocol} · 已嵌入 {embedded}/{total}({coverage})",
|
|
481
|
+
"config.embeddingStatusUnavailable": "嵌入模型不可用 · {model} · 已嵌入 {embedded}/{total}({coverage})",
|
|
482
|
+
"config.embeddingStatusUnavailableWithProtocol": "嵌入模型不可用 · {model} · 协议 {protocol} · 已嵌入 {embedded}/{total}({coverage})",
|
|
483
483
|
"config.embeddingStatusFailed": "嵌入状态检查失败:{error}",
|
|
484
484
|
"config.embeddingSpaces": "各 Mnemon Native 空间",
|
|
485
485
|
"config.embeddingSpaceCounts": "已嵌入 {embedded}/{total}({coverage})",
|
|
@@ -966,10 +966,10 @@ window.__ModuleLoader__.load({
|
|
|
966
966
|
"config.embeddingSaveBeforeTest": "Save the embedding settings before testing their effective runtime values.",
|
|
967
967
|
"config.embeddingTestUnavailable": "This DSH Host does not provide embedding status checks.",
|
|
968
968
|
"config.embeddingCliMissing": "Testing needs the Mnemon CLI; these embedding settings only apply to Mnemon Native.",
|
|
969
|
-
"config.embeddingStatusAvailable": "Embedding
|
|
970
|
-
"config.embeddingStatusAvailableWithProtocol": "Embedding
|
|
971
|
-
"config.embeddingStatusUnavailable": "Embedding
|
|
972
|
-
"config.embeddingStatusUnavailableWithProtocol": "Embedding
|
|
969
|
+
"config.embeddingStatusAvailable": "Embedding model available · {model} · {embedded}/{total} embedded ({coverage})",
|
|
970
|
+
"config.embeddingStatusAvailableWithProtocol": "Embedding model available · {model} · protocol {protocol} · {embedded}/{total} embedded ({coverage})",
|
|
971
|
+
"config.embeddingStatusUnavailable": "Embedding model unavailable · {model} · {embedded}/{total} embedded ({coverage})",
|
|
972
|
+
"config.embeddingStatusUnavailableWithProtocol": "Embedding model unavailable · {model} · protocol {protocol} · {embedded}/{total} embedded ({coverage})",
|
|
973
973
|
"config.embeddingStatusFailed": "Embedding status check failed: {error}",
|
|
974
974
|
"config.embeddingSpaces": "Each Mnemon Native space",
|
|
975
975
|
"config.embeddingSpaceCounts": "{embedded}/{total} embedded ({coverage})",
|
|
@@ -2538,15 +2538,16 @@ window.__ModuleLoader__.load({
|
|
|
2538
2538
|
props.catalogKnown
|
|
2539
2539
|
]);
|
|
2540
2540
|
(0, react.useEffect)(() => {
|
|
2541
|
+
if (props.active === false) return;
|
|
2541
2542
|
const timer = window.setInterval(() => setSyncClock(Date.now()), 1e3);
|
|
2542
2543
|
return () => window.clearInterval(timer);
|
|
2543
|
-
}, []);
|
|
2544
|
+
}, [props.active]);
|
|
2544
2545
|
(0, react.useEffect)(() => {
|
|
2545
2546
|
setSpaceProviderId((current) => readyProviderId(catalog?.providers ?? [], current) ?? current);
|
|
2546
2547
|
}, [catalog]);
|
|
2547
2548
|
const hostRediscovering = catalog?.rediscovery?.running === true && !rediscovering;
|
|
2548
2549
|
(0, react.useEffect)(() => {
|
|
2549
|
-
if (!hostRediscovering) return;
|
|
2550
|
+
if (!hostRediscovering || props.active === false) return;
|
|
2550
2551
|
let active = true;
|
|
2551
2552
|
const timer = window.setInterval(() => {
|
|
2552
2553
|
props.client.bodyDirectory().then((next) => {
|
|
@@ -2564,6 +2565,7 @@ window.__ModuleLoader__.load({
|
|
|
2564
2565
|
}, [
|
|
2565
2566
|
hostRediscovering,
|
|
2566
2567
|
load,
|
|
2568
|
+
props.active,
|
|
2567
2569
|
props.client,
|
|
2568
2570
|
props.onMutate
|
|
2569
2571
|
]);
|
|
@@ -5844,7 +5846,7 @@ window.__ModuleLoader__.load({
|
|
|
5844
5846
|
})]
|
|
5845
5847
|
});
|
|
5846
5848
|
}
|
|
5847
|
-
/**
|
|
5849
|
+
/** Selected-model usability and stored-vector coverage; the protocol appears only when the Host reports one. */
|
|
5848
5850
|
function embeddingStatusText(t, status) {
|
|
5849
5851
|
const coverage = {
|
|
5850
5852
|
embedded: status.embedded,
|
|
@@ -6064,10 +6066,10 @@ window.__ModuleLoader__.load({
|
|
|
6064
6066
|
const input = (value) => JSON.parse(JSON.stringify(value));
|
|
6065
6067
|
return {
|
|
6066
6068
|
canAssist: client.canAssist,
|
|
6067
|
-
status: () => client.read("status-summary"),
|
|
6068
|
-
bodies: () => client.read("bodies"),
|
|
6069
|
-
bodyDirectory: () => client.read("body-directory"),
|
|
6070
|
-
graph: (memoryBodyIds) => client.read("graph", input({ memoryBodyIds })),
|
|
6069
|
+
status: () => client.read("status-summary", null, { coalesce: true }),
|
|
6070
|
+
bodies: () => client.read("bodies", null, { coalesce: true }),
|
|
6071
|
+
bodyDirectory: () => client.read("body-directory", null, { coalesce: true }),
|
|
6072
|
+
graph: (memoryBodyIds) => client.read("graph", input({ memoryBodyIds }), { coalesce: true }),
|
|
6071
6073
|
list: (request) => client.read("list", input(request ?? {})),
|
|
6072
6074
|
entities: (entity, limit) => client.read("entities", input({
|
|
6073
6075
|
entity,
|
|
@@ -6248,6 +6250,7 @@ window.__ModuleLoader__.load({
|
|
|
6248
6250
|
})]
|
|
6249
6251
|
}),
|
|
6250
6252
|
page === "spaces" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(OverviewPage, {
|
|
6253
|
+
active: props.active ?? true,
|
|
6251
6254
|
client,
|
|
6252
6255
|
metadataClient: client,
|
|
6253
6256
|
revision,
|
package/lib/contracts.d.ts
CHANGED
|
@@ -536,6 +536,7 @@ interface ResolvedMnemonEmbeddingConfig {
|
|
|
536
536
|
protocol: MnemonEmbeddingProtocol;
|
|
537
537
|
}
|
|
538
538
|
interface MnemonEmbeddingStatus {
|
|
539
|
+
/** Whether Mnemon 0.2.13+ produced a nonempty probe vector with the selected model. */
|
|
539
540
|
available: boolean;
|
|
540
541
|
model: string;
|
|
541
542
|
/** Protocol Mnemon resolved for the embedding endpoint; omitted when the CLI does not report one. */
|
package/lib/index.js
CHANGED
|
@@ -1889,9 +1889,9 @@ function mutationResultCommitted(result) {
|
|
|
1889
1889
|
return mutationResultCompletion(result) === "committed";
|
|
1890
1890
|
}
|
|
1891
1891
|
/** One `mnemon embed --status` answer, strictly validated. */
|
|
1892
|
-
function embeddingCounts(value) {
|
|
1892
|
+
function embeddingCounts(value, requireModelProbe = false) {
|
|
1893
1893
|
const output = record(value);
|
|
1894
|
-
const available = output?.embedding_available ?? output?.ollama_available;
|
|
1894
|
+
const available = requireModelProbe ? output?.embedding_available : output?.embedding_available ?? output?.ollama_available;
|
|
1895
1895
|
const model = text(output?.model)?.trim();
|
|
1896
1896
|
const protocol = text(output?.protocol)?.trim();
|
|
1897
1897
|
const totalInsights = number(output?.total_insights);
|
|
@@ -2154,6 +2154,12 @@ var MemorySpacesService = class {
|
|
|
2154
2154
|
* health of every space while another one lacked vectors (#392).
|
|
2155
2155
|
*/
|
|
2156
2156
|
async embeddingStatus(signal) {
|
|
2157
|
+
const version = (await this.runner.runText(["--version"], {
|
|
2158
|
+
globalFlags: false,
|
|
2159
|
+
...signal === void 0 ? {} : { signal }
|
|
2160
|
+
})).trim();
|
|
2161
|
+
const parts = /^(?:mnemon version\s+)?v?(\d+)\.(\d+)\.(\d+)(?:\+[0-9A-Za-z.-]+)?$/u.exec(version)?.slice(1).map(Number);
|
|
2162
|
+
if (parts === void 0 || !parts.every(Number.isSafeInteger) || !(parts[0] > 0 || parts[1] > 2 || parts[1] === 2 && parts[2] >= 13)) throw new Error("Embedding model checks require Mnemon CLI 0.2.13 or newer. Update the configured CLI and test again.");
|
|
2157
2163
|
const native = this.memorySpaces.list().filter((body) => this.isNativeSpace(body) && existsSync(body.dbPath));
|
|
2158
2164
|
let runtime;
|
|
2159
2165
|
const spaces = [];
|
|
@@ -2168,7 +2174,7 @@ var MemorySpacesService = class {
|
|
|
2168
2174
|
store: body.id,
|
|
2169
2175
|
database: body.dbPath,
|
|
2170
2176
|
...signal === void 0 ? {} : { signal }
|
|
2171
|
-
}));
|
|
2177
|
+
}), true);
|
|
2172
2178
|
runtime ??= counts;
|
|
2173
2179
|
spaces.push({
|
|
2174
2180
|
...space,
|
|
@@ -2212,7 +2218,7 @@ var MemorySpacesService = class {
|
|
|
2212
2218
|
], {
|
|
2213
2219
|
globalFlags: false,
|
|
2214
2220
|
...signal === void 0 ? {} : { signal }
|
|
2215
|
-
}));
|
|
2221
|
+
}), true);
|
|
2216
2222
|
} catch (error) {
|
|
2217
2223
|
throw new Error(cliReason(error), { cause: error });
|
|
2218
2224
|
} finally {
|
|
@@ -3,6 +3,7 @@ import { type MemorySpaceMetadataUpdate, type MemorySpaceView } from '../contrac
|
|
|
3
3
|
import type { MemorySpacesPageClient } from './api.ts';
|
|
4
4
|
export declare function OverviewPage(props: {
|
|
5
5
|
client: MemorySpacesPageClient;
|
|
6
|
+
active?: boolean;
|
|
6
7
|
metadataClient: MemorySpacesPageClient;
|
|
7
8
|
revision: number;
|
|
8
9
|
reloadKey?: number;
|
package/lib/types/contracts.d.ts
CHANGED
|
@@ -542,6 +542,7 @@ export interface ResolvedMnemonEmbeddingConfig {
|
|
|
542
542
|
protocol: MnemonEmbeddingProtocol;
|
|
543
543
|
}
|
|
544
544
|
export interface MnemonEmbeddingStatus {
|
|
545
|
+
/** Whether Mnemon 0.2.13+ produced a nonempty probe vector with the selected model. */
|
|
545
546
|
available: boolean;
|
|
546
547
|
model: string;
|
|
547
548
|
/** Protocol Mnemon resolved for the embedding endpoint; omitted when the CLI does not report one. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-mnemon-source-memory-spaces",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.25",
|
|
4
4
|
"description": "Memory Spaces Source and its private Provider SDK.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -68,8 +68,8 @@
|
|
|
68
68
|
"@types/node": "^22.0.0",
|
|
69
69
|
"@types/react": "^18.3.0",
|
|
70
70
|
"@types/react-dom": "^18.3.0",
|
|
71
|
-
"dsh-mnemon": "^0.5.
|
|
72
|
-
"dsh-mnemon-provider-byterover": "^0.5.
|
|
71
|
+
"dsh-mnemon": "^0.5.38",
|
|
72
|
+
"dsh-mnemon-provider-byterover": "^0.5.6",
|
|
73
73
|
"dsh-mnemon-provider-hindsight": "^0.5.7",
|
|
74
74
|
"dsh-mnemon-provider-holographic": "^0.5.7",
|
|
75
75
|
"dsh-mnemon-provider-honcho": "^0.5.5",
|
|
@@ -443,10 +443,10 @@
|
|
|
443
443
|
"config.embeddingSaveBeforeTest": "请先保存嵌入配置,再测试实际运行值。",
|
|
444
444
|
"config.embeddingTestUnavailable": "当前 DSH Host 不提供嵌入状态检查。",
|
|
445
445
|
"config.embeddingCliMissing": "测试需要 Mnemon CLI;向量设置只作用于 Mnemon Native。",
|
|
446
|
-
"config.embeddingStatusAvailable": "
|
|
447
|
-
"config.embeddingStatusAvailableWithProtocol": "
|
|
448
|
-
"config.embeddingStatusUnavailable": "
|
|
449
|
-
"config.embeddingStatusUnavailableWithProtocol": "
|
|
446
|
+
"config.embeddingStatusAvailable": "嵌入模型可用 · {model} · 已嵌入 {embedded}/{total}({coverage})",
|
|
447
|
+
"config.embeddingStatusAvailableWithProtocol": "嵌入模型可用 · {model} · 协议 {protocol} · 已嵌入 {embedded}/{total}({coverage})",
|
|
448
|
+
"config.embeddingStatusUnavailable": "嵌入模型不可用 · {model} · 已嵌入 {embedded}/{total}({coverage})",
|
|
449
|
+
"config.embeddingStatusUnavailableWithProtocol": "嵌入模型不可用 · {model} · 协议 {protocol} · 已嵌入 {embedded}/{total}({coverage})",
|
|
450
450
|
"config.embeddingStatusFailed": "嵌入状态检查失败:{error}",
|
|
451
451
|
"config.embeddingSpaces": "各 Mnemon Native 空间",
|
|
452
452
|
"config.embeddingSpaceCounts": "已嵌入 {embedded}/{total}({coverage})",
|
|
@@ -933,10 +933,10 @@
|
|
|
933
933
|
"config.embeddingSaveBeforeTest": "Save the embedding settings before testing their effective runtime values.",
|
|
934
934
|
"config.embeddingTestUnavailable": "This DSH Host does not provide embedding status checks.",
|
|
935
935
|
"config.embeddingCliMissing": "Testing needs the Mnemon CLI; these embedding settings only apply to Mnemon Native.",
|
|
936
|
-
"config.embeddingStatusAvailable": "Embedding
|
|
937
|
-
"config.embeddingStatusAvailableWithProtocol": "Embedding
|
|
938
|
-
"config.embeddingStatusUnavailable": "Embedding
|
|
939
|
-
"config.embeddingStatusUnavailableWithProtocol": "Embedding
|
|
936
|
+
"config.embeddingStatusAvailable": "Embedding model available · {model} · {embedded}/{total} embedded ({coverage})",
|
|
937
|
+
"config.embeddingStatusAvailableWithProtocol": "Embedding model available · {model} · protocol {protocol} · {embedded}/{total} embedded ({coverage})",
|
|
938
|
+
"config.embeddingStatusUnavailable": "Embedding model unavailable · {model} · {embedded}/{total} embedded ({coverage})",
|
|
939
|
+
"config.embeddingStatusUnavailableWithProtocol": "Embedding model unavailable · {model} · protocol {protocol} · {embedded}/{total} embedded ({coverage})",
|
|
940
940
|
"config.embeddingStatusFailed": "Embedding status check failed: {error}",
|
|
941
941
|
"config.embeddingSpaces": "Each Mnemon Native space",
|
|
942
942
|
"config.embeddingSpaceCounts": "{embedded}/{total} embedded ({coverage})",
|