dsh-mnemon 0.5.3 → 0.5.5
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/README.md +27 -25
- package/README.zh-CN.md +30 -28
- package/lib/client.js +178 -104
- package/lib/index.js +255 -15
- package/lib/testing.js +1 -1
- package/lib/types/src/client/locales.d.ts +24 -0
- package/lib/types/src/host/protocol.d.ts +13 -3
- package/package.json +21 -17
package/lib/index.js
CHANGED
|
@@ -2,6 +2,7 @@ import { i as withMemoryStorageLock, n as memoryStrategyConfigurationValues, r a
|
|
|
2
2
|
import { a as prepareMemoryContributions, i as validateMemoryPluginGraph, n as MemoryCompositionGeneration, r as captureMemoryContributionSnapshot, t as provideMemoryRuntime } from "./runtime-AtIOTeP1.js";
|
|
3
3
|
import { DEFAULT_MEMORY_VIEW_BUDGET, MEMORY_CAPABILITIES } from "./contracts.js";
|
|
4
4
|
import { r as defineMemoryPlugin, t as canonicalMemoryJson } from "./definitions-j0FLgE0-.js";
|
|
5
|
+
import { Context } from "@deepseek-ai/cordis";
|
|
5
6
|
import z from "schemastery";
|
|
6
7
|
import { basename, delimiter, dirname, isAbsolute, join, normalize, resolve } from "node:path";
|
|
7
8
|
import { resolveEmbedding, resolvePersistenceStrategy, resolveRecallQuality } from "dsh-mnemon-source-memory-spaces";
|
|
@@ -15,6 +16,7 @@ import { fileURLToPath } from "node:url";
|
|
|
15
16
|
import { findMnemonCommand, mnemonNpmLauncher } from "dsh-mnemon-source-memory-spaces/native-cli";
|
|
16
17
|
import { spawn } from "node:child_process";
|
|
17
18
|
import { z as z$1 } from "zod";
|
|
19
|
+
import { Remote, TypertRemoteService } from "@deepseek-ai/dsh-typert-protocol";
|
|
18
20
|
//#region src/host/display-mode.ts
|
|
19
21
|
/** Keep the historical misspelling at input boundaries, never in UI or runtime state. */
|
|
20
22
|
function normalizeDisplayMode(value) {
|
|
@@ -38,6 +40,7 @@ const MNEMON_ACTIVATION_CHANNEL = "/dsh-mnemon-activation";
|
|
|
38
40
|
const MNEMON_WRITE_CHANNEL = "/dsh-mnemon-write";
|
|
39
41
|
const MNEMON_PACK_CHANNEL = "/dsh-mnemon-pack";
|
|
40
42
|
const MNEMON_SETTINGS_CHANNEL = "/dsh-mnemon-settings";
|
|
43
|
+
const MNEMON_REMOTE_NAMESPACE = "dshMnemon";
|
|
41
44
|
const MNEMON_SETTINGS_NAMESPACE = "mnemon";
|
|
42
45
|
const CATEGORIES = [
|
|
43
46
|
"preference",
|
|
@@ -1253,7 +1256,7 @@ function runtimeArea(root) {
|
|
|
1253
1256
|
};
|
|
1254
1257
|
}
|
|
1255
1258
|
}
|
|
1256
|
-
function
|
|
1259
|
+
function memorySpacesArea(root) {
|
|
1257
1260
|
const path = join(root, "data");
|
|
1258
1261
|
if (!existsSync(path)) return missing("memory-bodies", path);
|
|
1259
1262
|
try {
|
|
@@ -1275,7 +1278,7 @@ function memoryBodiesArea(root) {
|
|
|
1275
1278
|
databases: databaseCount,
|
|
1276
1279
|
registry: existsSync(registryPath)
|
|
1277
1280
|
},
|
|
1278
|
-
...invalidRegistry ? { issue: "memory-
|
|
1281
|
+
...invalidRegistry ? { issue: "memory-space registry is invalid" } : {}
|
|
1279
1282
|
};
|
|
1280
1283
|
} catch (error) {
|
|
1281
1284
|
return {
|
|
@@ -1374,7 +1377,7 @@ function inspect(kind, rawRoot, activeRoot) {
|
|
|
1374
1377
|
const root = canonical(rawRoot);
|
|
1375
1378
|
const areas = [
|
|
1376
1379
|
runtimeArea(root),
|
|
1377
|
-
|
|
1380
|
+
memorySpacesArea(root),
|
|
1378
1381
|
documentsArea(root),
|
|
1379
1382
|
stateArea(root)
|
|
1380
1383
|
];
|
|
@@ -2273,7 +2276,7 @@ function clip(value, max = 600) {
|
|
|
2273
2276
|
}
|
|
2274
2277
|
function insightLine(insight, index) {
|
|
2275
2278
|
const meta = [
|
|
2276
|
-
insight.memoryBodyId === void 0 ? void 0 : `
|
|
2279
|
+
insight.memoryBodyId === void 0 ? void 0 : `space=${insight.memoryBodyId}`,
|
|
2277
2280
|
insight.category,
|
|
2278
2281
|
insight.score === void 0 ? void 0 : `score=${insight.score.toFixed(3)}`,
|
|
2279
2282
|
insight.depth === void 0 ? void 0 : `depth=${insight.depth}`
|
|
@@ -2359,7 +2362,7 @@ async function execute(serviceOrSource, coordinator, invocation) {
|
|
|
2359
2362
|
}, invocation.signal);
|
|
2360
2363
|
return {
|
|
2361
2364
|
kind: "success",
|
|
2362
|
-
text: `Mnemon 记忆 Agent 已处理:${result.action}${result.memoryBodyIds.length === 0 ? "" : ` ·
|
|
2365
|
+
text: `Mnemon 记忆 Agent 已处理:${result.action}${result.memoryBodyIds.length === 0 ? "" : ` · 记忆空间 ${result.memoryBodyIds.join(", ")}`}${result.summary === "" ? "" : `\n${result.summary}`}`
|
|
2363
2366
|
};
|
|
2364
2367
|
}
|
|
2365
2368
|
case "forget":
|
|
@@ -6508,10 +6511,20 @@ function createPackHandler(input) {
|
|
|
6508
6511
|
}
|
|
6509
6512
|
function registerRpc(connection, input, lifecycle, versions, managementAuthority = "loopback") {
|
|
6510
6513
|
const versionManager = versions ?? new VersionUpdateManager({ mnemonCliPath: () => input.config.cliPath });
|
|
6511
|
-
|
|
6512
|
-
|
|
6513
|
-
|
|
6514
|
-
|
|
6514
|
+
const readHandler = createReadHandler(input, lifecycle, versionManager);
|
|
6515
|
+
const activationHandler = createActivationHandler(input);
|
|
6516
|
+
const writeHandler = createWriteHandler(input, lifecycle, versionManager);
|
|
6517
|
+
const packHandler = createPackHandler(input);
|
|
6518
|
+
connection.rpc.handle(MNEMON_READ_CHANNEL, readHandler, { authority: "trusted-host" });
|
|
6519
|
+
connection.rpc.handle(MNEMON_ACTIVATION_CHANNEL, activationHandler, { authority: "trusted-host" });
|
|
6520
|
+
connection.rpc.handle(MNEMON_WRITE_CHANNEL, writeHandler, { authority: managementAuthority });
|
|
6521
|
+
connection.rpc.handle(MNEMON_PACK_CHANNEL, packHandler, { authority: managementAuthority });
|
|
6522
|
+
return {
|
|
6523
|
+
read: readHandler,
|
|
6524
|
+
activation: activationHandler,
|
|
6525
|
+
write: writeHandler,
|
|
6526
|
+
pack: packHandler
|
|
6527
|
+
};
|
|
6515
6528
|
}
|
|
6516
6529
|
//#endregion
|
|
6517
6530
|
//#region src/host/settings.ts
|
|
@@ -6660,7 +6673,9 @@ function createSettingsHandler(settings) {
|
|
|
6660
6673
|
};
|
|
6661
6674
|
}
|
|
6662
6675
|
function registerSettingsRpc(connection, settings, authority = "loopback") {
|
|
6663
|
-
|
|
6676
|
+
const handler = createSettingsHandler(settings);
|
|
6677
|
+
connection.rpc.handle(MNEMON_SETTINGS_CHANNEL, handler, { authority });
|
|
6678
|
+
return handler;
|
|
6664
6679
|
}
|
|
6665
6680
|
//#endregion
|
|
6666
6681
|
//#region src/host/tools.ts
|
|
@@ -8243,8 +8258,14 @@ function createViewHandler(runtime, engine, management, access, lifecycle, insta
|
|
|
8243
8258
|
};
|
|
8244
8259
|
}
|
|
8245
8260
|
function registerViewRpc(connection, runtime, engine, management, lifecycle, authority, installation) {
|
|
8246
|
-
|
|
8247
|
-
|
|
8261
|
+
const readHandler = createViewHandler(runtime, engine, management, "read", lifecycle, installation);
|
|
8262
|
+
const writeHandler = createViewHandler(runtime, engine, management, "write", lifecycle, installation);
|
|
8263
|
+
connection.rpc.handle(MNEMON_VIEW_CHANNEL, readHandler, { authority: "trusted-host" });
|
|
8264
|
+
connection.rpc.handle(MNEMON_VIEW_WRITE_CHANNEL, writeHandler, { authority });
|
|
8265
|
+
return {
|
|
8266
|
+
read: readHandler,
|
|
8267
|
+
write: writeHandler
|
|
8268
|
+
};
|
|
8248
8269
|
}
|
|
8249
8270
|
//#endregion
|
|
8250
8271
|
//#region src/host/plugin-installation.ts
|
|
@@ -8461,6 +8482,218 @@ var MemoryPluginInstallation = class {
|
|
|
8461
8482
|
}
|
|
8462
8483
|
};
|
|
8463
8484
|
//#endregion
|
|
8485
|
+
//#region src/host/remote-rpc.ts
|
|
8486
|
+
var __runInitializers = function(thisArg, initializers, value) {
|
|
8487
|
+
var useValue = arguments.length > 2;
|
|
8488
|
+
for (var i = 0; i < initializers.length; i++) value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
8489
|
+
return useValue ? value : void 0;
|
|
8490
|
+
};
|
|
8491
|
+
var __esDecorate = function(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
8492
|
+
function accept(f) {
|
|
8493
|
+
if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected");
|
|
8494
|
+
return f;
|
|
8495
|
+
}
|
|
8496
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
8497
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
8498
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
8499
|
+
var _, done = false;
|
|
8500
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
8501
|
+
var context = {};
|
|
8502
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
8503
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
8504
|
+
context.addInitializer = function(f) {
|
|
8505
|
+
if (done) throw new TypeError("Cannot add initializers after decoration has completed");
|
|
8506
|
+
extraInitializers.push(accept(f || null));
|
|
8507
|
+
};
|
|
8508
|
+
var result = (0, decorators[i])(kind === "accessor" ? {
|
|
8509
|
+
get: descriptor.get,
|
|
8510
|
+
set: descriptor.set
|
|
8511
|
+
} : descriptor[key], context);
|
|
8512
|
+
if (kind === "accessor") {
|
|
8513
|
+
if (result === void 0) continue;
|
|
8514
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
8515
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
8516
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
8517
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
8518
|
+
} else if (_ = accept(result)) {
|
|
8519
|
+
if (kind === "field") initializers.unshift(_);
|
|
8520
|
+
else descriptor[key] = _;
|
|
8521
|
+
}
|
|
8522
|
+
}
|
|
8523
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
8524
|
+
done = true;
|
|
8525
|
+
};
|
|
8526
|
+
function denied() {
|
|
8527
|
+
return {
|
|
8528
|
+
ok: false,
|
|
8529
|
+
error: {
|
|
8530
|
+
code: "bad-request",
|
|
8531
|
+
message: "remote Mnemon management requires remoteAccess: trusted-host",
|
|
8532
|
+
details: { issues: [] }
|
|
8533
|
+
}
|
|
8534
|
+
};
|
|
8535
|
+
}
|
|
8536
|
+
function unknownSettingsEndpoint(endpoint) {
|
|
8537
|
+
return {
|
|
8538
|
+
ok: false,
|
|
8539
|
+
error: {
|
|
8540
|
+
code: "bad-request",
|
|
8541
|
+
message: `unknown remote Mnemon settings endpoint: ${endpoint}`,
|
|
8542
|
+
details: { issues: [] }
|
|
8543
|
+
}
|
|
8544
|
+
};
|
|
8545
|
+
}
|
|
8546
|
+
/**
|
|
8547
|
+
* Project Mnemon's existing handlers through DSH API Gateway. The Gateway owns
|
|
8548
|
+
* `/api`, Host/Origin validation, browser pairing, and response envelopes;
|
|
8549
|
+
* this Service retains Mnemon's narrower management grant.
|
|
8550
|
+
*/
|
|
8551
|
+
let MnemonRemoteService = (() => {
|
|
8552
|
+
let _classSuper = TypertRemoteService;
|
|
8553
|
+
let _instanceExtraInitializers = [];
|
|
8554
|
+
let _read_decorators;
|
|
8555
|
+
let _activation_decorators;
|
|
8556
|
+
let _write_decorators;
|
|
8557
|
+
let _pack_decorators;
|
|
8558
|
+
let _settings_decorators;
|
|
8559
|
+
let _view_decorators;
|
|
8560
|
+
let _viewWrite_decorators;
|
|
8561
|
+
return class MnemonRemoteService extends _classSuper {
|
|
8562
|
+
static {
|
|
8563
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
8564
|
+
_read_decorators = [Remote("read")];
|
|
8565
|
+
_activation_decorators = [Remote("activation")];
|
|
8566
|
+
_write_decorators = [Remote("write")];
|
|
8567
|
+
_pack_decorators = [Remote("pack")];
|
|
8568
|
+
_settings_decorators = [Remote("settings")];
|
|
8569
|
+
_view_decorators = [Remote("view")];
|
|
8570
|
+
_viewWrite_decorators = [Remote("viewWrite")];
|
|
8571
|
+
__esDecorate(this, null, _read_decorators, {
|
|
8572
|
+
kind: "method",
|
|
8573
|
+
name: "read",
|
|
8574
|
+
static: false,
|
|
8575
|
+
private: false,
|
|
8576
|
+
access: {
|
|
8577
|
+
has: (obj) => "read" in obj,
|
|
8578
|
+
get: (obj) => obj.read
|
|
8579
|
+
},
|
|
8580
|
+
metadata: _metadata
|
|
8581
|
+
}, null, _instanceExtraInitializers);
|
|
8582
|
+
__esDecorate(this, null, _activation_decorators, {
|
|
8583
|
+
kind: "method",
|
|
8584
|
+
name: "activation",
|
|
8585
|
+
static: false,
|
|
8586
|
+
private: false,
|
|
8587
|
+
access: {
|
|
8588
|
+
has: (obj) => "activation" in obj,
|
|
8589
|
+
get: (obj) => obj.activation
|
|
8590
|
+
},
|
|
8591
|
+
metadata: _metadata
|
|
8592
|
+
}, null, _instanceExtraInitializers);
|
|
8593
|
+
__esDecorate(this, null, _write_decorators, {
|
|
8594
|
+
kind: "method",
|
|
8595
|
+
name: "write",
|
|
8596
|
+
static: false,
|
|
8597
|
+
private: false,
|
|
8598
|
+
access: {
|
|
8599
|
+
has: (obj) => "write" in obj,
|
|
8600
|
+
get: (obj) => obj.write
|
|
8601
|
+
},
|
|
8602
|
+
metadata: _metadata
|
|
8603
|
+
}, null, _instanceExtraInitializers);
|
|
8604
|
+
__esDecorate(this, null, _pack_decorators, {
|
|
8605
|
+
kind: "method",
|
|
8606
|
+
name: "pack",
|
|
8607
|
+
static: false,
|
|
8608
|
+
private: false,
|
|
8609
|
+
access: {
|
|
8610
|
+
has: (obj) => "pack" in obj,
|
|
8611
|
+
get: (obj) => obj.pack
|
|
8612
|
+
},
|
|
8613
|
+
metadata: _metadata
|
|
8614
|
+
}, null, _instanceExtraInitializers);
|
|
8615
|
+
__esDecorate(this, null, _settings_decorators, {
|
|
8616
|
+
kind: "method",
|
|
8617
|
+
name: "settings",
|
|
8618
|
+
static: false,
|
|
8619
|
+
private: false,
|
|
8620
|
+
access: {
|
|
8621
|
+
has: (obj) => "settings" in obj,
|
|
8622
|
+
get: (obj) => obj.settings
|
|
8623
|
+
},
|
|
8624
|
+
metadata: _metadata
|
|
8625
|
+
}, null, _instanceExtraInitializers);
|
|
8626
|
+
__esDecorate(this, null, _view_decorators, {
|
|
8627
|
+
kind: "method",
|
|
8628
|
+
name: "view",
|
|
8629
|
+
static: false,
|
|
8630
|
+
private: false,
|
|
8631
|
+
access: {
|
|
8632
|
+
has: (obj) => "view" in obj,
|
|
8633
|
+
get: (obj) => obj.view
|
|
8634
|
+
},
|
|
8635
|
+
metadata: _metadata
|
|
8636
|
+
}, null, _instanceExtraInitializers);
|
|
8637
|
+
__esDecorate(this, null, _viewWrite_decorators, {
|
|
8638
|
+
kind: "method",
|
|
8639
|
+
name: "viewWrite",
|
|
8640
|
+
static: false,
|
|
8641
|
+
private: false,
|
|
8642
|
+
access: {
|
|
8643
|
+
has: (obj) => "viewWrite" in obj,
|
|
8644
|
+
get: (obj) => obj.viewWrite
|
|
8645
|
+
},
|
|
8646
|
+
metadata: _metadata
|
|
8647
|
+
}, null, _instanceExtraInitializers);
|
|
8648
|
+
if (_metadata) Object.defineProperty(this, Symbol.metadata, {
|
|
8649
|
+
enumerable: true,
|
|
8650
|
+
configurable: true,
|
|
8651
|
+
writable: true,
|
|
8652
|
+
value: _metadata
|
|
8653
|
+
});
|
|
8654
|
+
}
|
|
8655
|
+
handlers = __runInitializers(this, _instanceExtraInitializers);
|
|
8656
|
+
constructor(ctx, handlers) {
|
|
8657
|
+
super(ctx, "mnemonRemote", { namespace: MNEMON_REMOTE_NAMESPACE });
|
|
8658
|
+
this.handlers = handlers;
|
|
8659
|
+
}
|
|
8660
|
+
read(endpoint, payload, signal) {
|
|
8661
|
+
return this.handlers.read(endpoint, payload, signal);
|
|
8662
|
+
}
|
|
8663
|
+
activation(endpoint, payload, signal) {
|
|
8664
|
+
return this.handlers.activation(endpoint, payload, signal);
|
|
8665
|
+
}
|
|
8666
|
+
write(endpoint, payload, signal) {
|
|
8667
|
+
if (!this.handlers.management) return Promise.resolve(denied());
|
|
8668
|
+
return this.handlers.write(endpoint, payload, signal);
|
|
8669
|
+
}
|
|
8670
|
+
pack(endpoint, payload, signal) {
|
|
8671
|
+
if (!this.handlers.management) return Promise.resolve(denied());
|
|
8672
|
+
return this.handlers.pack(endpoint, payload, signal);
|
|
8673
|
+
}
|
|
8674
|
+
async settings(endpoint, payload, signal) {
|
|
8675
|
+
if (endpoint === "mutate" && !this.handlers.management) return denied();
|
|
8676
|
+
if (endpoint !== "get" && endpoint !== "mutate") return unknownSettingsEndpoint(endpoint);
|
|
8677
|
+
const response = await this.handlers.settings(endpoint, payload, signal);
|
|
8678
|
+
if (endpoint !== "get" || this.handlers.management || !response.ok || typeof response.value !== "object" || response.value === null || Array.isArray(response.value)) return response;
|
|
8679
|
+
return {
|
|
8680
|
+
...response,
|
|
8681
|
+
value: {
|
|
8682
|
+
...response.value,
|
|
8683
|
+
writable: false
|
|
8684
|
+
}
|
|
8685
|
+
};
|
|
8686
|
+
}
|
|
8687
|
+
view(endpoint, payload, signal) {
|
|
8688
|
+
return this.handlers.view(endpoint, payload, signal);
|
|
8689
|
+
}
|
|
8690
|
+
viewWrite(endpoint, payload, signal) {
|
|
8691
|
+
if (!this.handlers.management) return Promise.resolve(denied());
|
|
8692
|
+
return this.handlers.viewWrite(endpoint, payload, signal);
|
|
8693
|
+
}
|
|
8694
|
+
};
|
|
8695
|
+
})();
|
|
8696
|
+
//#endregion
|
|
8464
8697
|
//#region src/host/plugin.ts
|
|
8465
8698
|
const name = "dsh-mnemon";
|
|
8466
8699
|
const provide = ["mnemonMemory"];
|
|
@@ -8573,9 +8806,16 @@ function apply(rawContext, config = {}) {
|
|
|
8573
8806
|
ctx.inject(["connection"], (webContext) => {
|
|
8574
8807
|
if (webContext.connection === void 0) return;
|
|
8575
8808
|
const managementAuthority = resolved.remoteAccess === "trusted-host" ? "trusted-host" : "loopback";
|
|
8576
|
-
registerRpc(webContext.connection, runtime, lifecycle, void 0, managementAuthority);
|
|
8577
|
-
registerSettingsRpc(webContext.connection, ctx.settings, managementAuthority);
|
|
8578
|
-
registerViewRpc(webContext.connection, runtime, extensions, memoryPlugins, lifecycle, managementAuthority, pluginInstallation);
|
|
8809
|
+
const rpc = registerRpc(webContext.connection, runtime, lifecycle, void 0, managementAuthority);
|
|
8810
|
+
const settings = registerSettingsRpc(webContext.connection, ctx.settings, managementAuthority);
|
|
8811
|
+
const view = registerViewRpc(webContext.connection, runtime, extensions, memoryPlugins, lifecycle, managementAuthority, pluginInstallation);
|
|
8812
|
+
if (Context.is(webContext)) new MnemonRemoteService(webContext, {
|
|
8813
|
+
...rpc,
|
|
8814
|
+
settings,
|
|
8815
|
+
view: view.read,
|
|
8816
|
+
viewWrite: view.write,
|
|
8817
|
+
management: managementAuthority === "trusted-host"
|
|
8818
|
+
});
|
|
8579
8819
|
});
|
|
8580
8820
|
}
|
|
8581
8821
|
//#endregion
|
package/lib/testing.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as provideMemoryRuntime } from "./runtime-AtIOTeP1.js";
|
|
2
2
|
import { DEFAULT_MEMORY_VIEW_BUDGET } from "./contracts.js";
|
|
3
3
|
import { c as jsonClone } from "./definitions-j0FLgE0-.js";
|
|
4
|
-
import { readFileSync } from "node:fs";
|
|
5
4
|
import { Context } from "@deepseek-ai/cordis";
|
|
5
|
+
import { readFileSync } from "node:fs";
|
|
6
6
|
//#region src/sdk/testing.ts
|
|
7
7
|
/**
|
|
8
8
|
* A test fixture, not a production service or a second Loader. It mounts real
|
|
@@ -256,6 +256,7 @@ export declare const zh: {
|
|
|
256
256
|
'status.storageNotCreated': string;
|
|
257
257
|
'status.storageRuntime': string;
|
|
258
258
|
'status.storageBodies': string;
|
|
259
|
+
'status.storageSpaces': string;
|
|
259
260
|
'status.storageDocuments': string;
|
|
260
261
|
'status.storageState': string;
|
|
261
262
|
'status.storageReady': string;
|
|
@@ -265,6 +266,7 @@ export declare const zh: {
|
|
|
265
266
|
'status.storageItems': string;
|
|
266
267
|
'status.storageRuntimeDetail': string;
|
|
267
268
|
'status.storageBodiesDetail': string;
|
|
269
|
+
'status.storageSpacesDetail': string;
|
|
268
270
|
'status.storageDocumentsDetail': string;
|
|
269
271
|
'status.storageStateReady': string;
|
|
270
272
|
'status.storageStateVolatile': string;
|
|
@@ -853,6 +855,16 @@ export declare const zh: {
|
|
|
853
855
|
"content.showMore": string;
|
|
854
856
|
"content.emptyTitle": string;
|
|
855
857
|
"content.emptyText": string;
|
|
858
|
+
"nav.spaces": string;
|
|
859
|
+
"overview.editSpace": string;
|
|
860
|
+
"overview.editSpaceAria": string;
|
|
861
|
+
"overview.saveSpace": string;
|
|
862
|
+
"overview.savingSpace": string;
|
|
863
|
+
"overview.deleteSpace": string;
|
|
864
|
+
"overview.deleteSpaceAria": string;
|
|
865
|
+
"overview.disconnectSpace": string;
|
|
866
|
+
"overview.disconnectSpaceAria": string;
|
|
867
|
+
"overview.deletingSpace": string;
|
|
856
868
|
"nav.documents": string;
|
|
857
869
|
"documents.title": string;
|
|
858
870
|
"documents.description": string;
|
|
@@ -1217,6 +1229,7 @@ export declare const en: {
|
|
|
1217
1229
|
'status.storageNotCreated': string;
|
|
1218
1230
|
'status.storageRuntime': string;
|
|
1219
1231
|
'status.storageBodies': string;
|
|
1232
|
+
'status.storageSpaces': string;
|
|
1220
1233
|
'status.storageDocuments': string;
|
|
1221
1234
|
'status.storageState': string;
|
|
1222
1235
|
'status.storageReady': string;
|
|
@@ -1226,6 +1239,7 @@ export declare const en: {
|
|
|
1226
1239
|
'status.storageItems': string;
|
|
1227
1240
|
'status.storageRuntimeDetail': string;
|
|
1228
1241
|
'status.storageBodiesDetail': string;
|
|
1242
|
+
'status.storageSpacesDetail': string;
|
|
1229
1243
|
'status.storageDocumentsDetail': string;
|
|
1230
1244
|
'status.storageStateReady': string;
|
|
1231
1245
|
'status.storageStateVolatile': string;
|
|
@@ -1814,6 +1828,16 @@ export declare const en: {
|
|
|
1814
1828
|
"content.showMore": string;
|
|
1815
1829
|
"content.emptyTitle": string;
|
|
1816
1830
|
"content.emptyText": string;
|
|
1831
|
+
"nav.spaces": string;
|
|
1832
|
+
"overview.editSpace": string;
|
|
1833
|
+
"overview.editSpaceAria": string;
|
|
1834
|
+
"overview.saveSpace": string;
|
|
1835
|
+
"overview.savingSpace": string;
|
|
1836
|
+
"overview.deleteSpace": string;
|
|
1837
|
+
"overview.deleteSpaceAria": string;
|
|
1838
|
+
"overview.disconnectSpace": string;
|
|
1839
|
+
"overview.disconnectSpaceAria": string;
|
|
1840
|
+
"overview.deletingSpace": string;
|
|
1817
1841
|
"nav.documents": string;
|
|
1818
1842
|
"documents.title": string;
|
|
1819
1843
|
"documents.description": string;
|
|
@@ -16,7 +16,7 @@ export interface MemoryCompositionStatus {
|
|
|
16
16
|
configuration: ResolvedMemoryTopologyConfig;
|
|
17
17
|
}
|
|
18
18
|
import type { RecallQualityConfig, ResolvedRecallQualityConfig, MnemonEmbeddingConfig, ResolvedMnemonEmbeddingConfig } from 'dsh-mnemon-source-memory-spaces/contracts';
|
|
19
|
-
import type { MemoryPersistenceStrategy, ResolvedMemoryPersistenceStrategy, MemoryProviderRuntimeStatus, MemoryBodyStats, MemoryBodyView } from 'dsh-mnemon-source-memory-spaces/contracts';
|
|
19
|
+
import type { MemoryPersistenceStrategy, ResolvedMemoryPersistenceStrategy, MemoryProviderRuntimeStatus, MemoryBodyStats as MemorySpaceStats, MemoryBodyView as MemorySpaceView } from 'dsh-mnemon-source-memory-spaces/contracts';
|
|
20
20
|
import type { ConnectionHandle as DshClientConnectionHandle } from '@deepseek-ai/dsh-client-connection/client';
|
|
21
21
|
import type { DocumentSnapshot } from 'dsh-mnemon-source-documents/contracts';
|
|
22
22
|
export declare const MNEMON_READ_CHANNEL = "/dsh-mnemon-read";
|
|
@@ -24,6 +24,16 @@ export declare const MNEMON_ACTIVATION_CHANNEL = "/dsh-mnemon-activation";
|
|
|
24
24
|
export declare const MNEMON_WRITE_CHANNEL = "/dsh-mnemon-write";
|
|
25
25
|
export declare const MNEMON_PACK_CHANNEL = "/dsh-mnemon-pack";
|
|
26
26
|
export declare const MNEMON_SETTINGS_CHANNEL = "/dsh-mnemon-settings";
|
|
27
|
+
/** DSH API Gateway endpoints used by paired remote Web clients. */
|
|
28
|
+
export declare const MNEMON_REMOTE_CHANNEL = "/api";
|
|
29
|
+
export declare const MNEMON_REMOTE_NAMESPACE = "dshMnemon";
|
|
30
|
+
export declare const MNEMON_REMOTE_READ_ENDPOINT = "dshMnemon/read";
|
|
31
|
+
export declare const MNEMON_REMOTE_ACTIVATION_ENDPOINT = "dshMnemon/activation";
|
|
32
|
+
export declare const MNEMON_REMOTE_WRITE_ENDPOINT = "dshMnemon/write";
|
|
33
|
+
export declare const MNEMON_REMOTE_PACK_ENDPOINT = "dshMnemon/pack";
|
|
34
|
+
export declare const MNEMON_REMOTE_SETTINGS_ENDPOINT = "dshMnemon/settings";
|
|
35
|
+
export declare const MNEMON_REMOTE_VIEW_ENDPOINT = "dshMnemon/view";
|
|
36
|
+
export declare const MNEMON_REMOTE_VIEW_WRITE_ENDPOINT = "dshMnemon/viewWrite";
|
|
27
37
|
export declare const MNEMON_SETTINGS_NAMESPACE = "mnemon";
|
|
28
38
|
export declare const MNEMON_UI_SETTINGS_NAMESPACE = "mnemon-ui";
|
|
29
39
|
export * from './view-protocol.ts';
|
|
@@ -440,7 +450,7 @@ export interface StatusView {
|
|
|
440
450
|
defaultRecallLimit: number;
|
|
441
451
|
recallQuality: ResolvedRecallQualityConfig;
|
|
442
452
|
memoryBodyDirectory: string;
|
|
443
|
-
memoryBodies:
|
|
453
|
+
memoryBodies: MemorySpaceView[];
|
|
444
454
|
providerServices?: MemoryProviderRuntimeStatus[];
|
|
445
455
|
memorySystem?: MemoryCompositionStatus;
|
|
446
456
|
lifecycle?: LifecycleSnapshot;
|
|
@@ -462,7 +472,7 @@ export interface StatusView {
|
|
|
462
472
|
path: string;
|
|
463
473
|
};
|
|
464
474
|
};
|
|
465
|
-
stats?:
|
|
475
|
+
stats?: MemorySpaceStats & {
|
|
466
476
|
dbPath?: string;
|
|
467
477
|
};
|
|
468
478
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-mnemon",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.5",
|
|
4
4
|
"description": "Composable three-tier memory control plane for DeepSeek Harness: persistent runtime context, searchable project documents, pluggable long-term memory, guarded strategies, WebUI, and headless tools.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"deepseek-harness",
|
|
@@ -138,22 +138,22 @@
|
|
|
138
138
|
"release:check": "node scripts/release.mjs --check"
|
|
139
139
|
},
|
|
140
140
|
"dependencies": {
|
|
141
|
-
"dsh-mnemon-provider-byterover": "0.5.
|
|
142
|
-
"dsh-mnemon-provider-hindsight": "0.5.
|
|
143
|
-
"dsh-mnemon-provider-holographic": "0.5.
|
|
144
|
-
"dsh-mnemon-provider-honcho": "0.5.
|
|
145
|
-
"dsh-mnemon-provider-mem0": "0.5.
|
|
146
|
-
"dsh-mnemon-provider-mnemon-native": "0.5.
|
|
147
|
-
"dsh-mnemon-provider-openviking": "0.5.
|
|
148
|
-
"dsh-mnemon-provider-retaindb": "0.5.
|
|
149
|
-
"dsh-mnemon-provider-supermemory": "0.5.
|
|
150
|
-
"dsh-mnemon-source-documents": "0.5.
|
|
151
|
-
"dsh-mnemon-source-memory-spaces": "0.5.
|
|
152
|
-
"dsh-mnemon-source-runtime": "0.5.
|
|
153
|
-
"dsh-mnemon-strategy-auto-capture": "0.5.
|
|
154
|
-
"dsh-mnemon-strategy-default-three-tier": "0.5.
|
|
155
|
-
"dsh-mnemon-strategy-light-context": "0.5.
|
|
156
|
-
"dsh-mnemon-strategy-scoped": "0.5.
|
|
141
|
+
"dsh-mnemon-provider-byterover": "0.5.4",
|
|
142
|
+
"dsh-mnemon-provider-hindsight": "0.5.4",
|
|
143
|
+
"dsh-mnemon-provider-holographic": "0.5.4",
|
|
144
|
+
"dsh-mnemon-provider-honcho": "0.5.4",
|
|
145
|
+
"dsh-mnemon-provider-mem0": "0.5.4",
|
|
146
|
+
"dsh-mnemon-provider-mnemon-native": "0.5.4",
|
|
147
|
+
"dsh-mnemon-provider-openviking": "0.5.4",
|
|
148
|
+
"dsh-mnemon-provider-retaindb": "0.5.4",
|
|
149
|
+
"dsh-mnemon-provider-supermemory": "0.5.4",
|
|
150
|
+
"dsh-mnemon-source-documents": "0.5.4",
|
|
151
|
+
"dsh-mnemon-source-memory-spaces": "0.5.4",
|
|
152
|
+
"dsh-mnemon-source-runtime": "0.5.4",
|
|
153
|
+
"dsh-mnemon-strategy-auto-capture": "0.5.4",
|
|
154
|
+
"dsh-mnemon-strategy-default-three-tier": "0.5.4",
|
|
155
|
+
"dsh-mnemon-strategy-light-context": "0.5.4",
|
|
156
|
+
"dsh-mnemon-strategy-scoped": "0.5.4",
|
|
157
157
|
"fflate": "^0.8.3",
|
|
158
158
|
"schemastery": "^3.18.0",
|
|
159
159
|
"zod": "^4.4.3"
|
|
@@ -161,6 +161,7 @@
|
|
|
161
161
|
"peerDependencies": {
|
|
162
162
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
163
163
|
"@deepseek-ai/dsh-client-ui-primitives": "^0.1.0-rc.6 || ^0.1.1-rc.1 || ^0.1.2-alpha.1",
|
|
164
|
+
"@deepseek-ai/dsh-typert-protocol": "^0.1.0-rc.6 || ^0.1.1-rc.1 || ^0.1.2-alpha.1",
|
|
164
165
|
"react": "^18.2.0",
|
|
165
166
|
"react-dom": "^18.2.0"
|
|
166
167
|
},
|
|
@@ -171,6 +172,7 @@
|
|
|
171
172
|
"@deepseek-ai/dsh": "0.1.2-rc.1",
|
|
172
173
|
"@deepseek-ai/dsh-agent": "0.1.2-rc.1",
|
|
173
174
|
"@deepseek-ai/dsh-agent-loop": "0.1.2-rc.1",
|
|
175
|
+
"@deepseek-ai/dsh-api-gateway": "0.1.2-rc.1",
|
|
174
176
|
"@deepseek-ai/dsh-client-connection": "0.1.2-rc.1",
|
|
175
177
|
"@deepseek-ai/dsh-client-locale": "0.1.2-rc.1",
|
|
176
178
|
"@deepseek-ai/dsh-client-store": "0.1.2-rc.1",
|
|
@@ -192,6 +194,8 @@
|
|
|
192
194
|
"@deepseek-ai/dsh-subagent-spawn-in-process": "0.1.2-rc.1",
|
|
193
195
|
"@deepseek-ai/dsh-system-prompt": "0.1.2-rc.1",
|
|
194
196
|
"@deepseek-ai/dsh-tools": "0.1.2-rc.1",
|
|
197
|
+
"@deepseek-ai/dsh-typert-protocol": "0.1.2-rc.1",
|
|
198
|
+
"@deepseek-ai/dsh-typert-registry": "0.1.2-rc.1",
|
|
195
199
|
"@testing-library/react": "^16.3.0",
|
|
196
200
|
"@types/node": "^22.0.0",
|
|
197
201
|
"@types/react": "^18.3.0",
|