dsh-mnemon 0.1.5 → 0.2.0
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 +125 -104
- package/README.zh-CN.md +130 -109
- package/THIRD_PARTY_NOTICES.md +7 -0
- package/lib/client.js +4193 -1128
- package/lib/index.js +4326 -307
- package/lib/types/activity.d.ts +2 -18
- package/lib/types/channels.d.ts +1 -4
- package/lib/types/client/GlobalLocationSetting.d.ts +19 -0
- package/lib/types/client/MnemonLogo.d.ts +0 -1
- package/lib/types/client/MnemonPackSection.d.ts +5 -3
- package/lib/types/client/MnemonSaveAction.d.ts +1 -2
- package/lib/types/client/MnemonSettingsCard.d.ts +5 -4
- package/lib/types/client/MnemonTurnTail.d.ts +1 -2
- package/lib/types/client/MnemonView.d.ts +1 -3
- package/lib/types/client/MnemonViewAppearance.d.ts +0 -1
- package/lib/types/client/ProviderIcon.d.ts +8 -0
- package/lib/types/client/ProviderSettingsSection.d.ts +16 -0
- package/lib/types/client/anchor.d.ts +0 -1
- package/lib/types/client/api.d.ts +12 -19
- package/lib/types/client/dsh-compat.d.ts +0 -1
- package/lib/types/client/index.d.ts +0 -1
- package/lib/types/client/locales.d.ts +552 -1
- package/lib/types/client/settings.d.ts +4 -3
- package/lib/types/client/sidebar-entry.d.ts +0 -1
- package/lib/types/client/workspace-controller.d.ts +0 -1
- package/lib/types/client/workspace-mount.d.ts +1 -3
- package/lib/types/commands.d.ts +0 -1
- package/lib/types/config-values.d.ts +0 -1
- package/lib/types/config.d.ts +6 -80
- package/lib/types/contracts.d.ts +38 -62
- package/lib/types/documents.d.ts +2 -79
- package/lib/types/guidance.d.ts +0 -1
- package/lib/types/index.d.ts +0 -1
- package/lib/types/lifecycle.d.ts +32 -47
- package/lib/types/live-runtime.d.ts +0 -1
- package/lib/types/memory-bodies.d.ts +27 -23
- package/lib/types/pack.d.ts +2 -48
- package/lib/types/process.d.ts +4 -2
- package/lib/types/provider-placement.d.ts +26 -0
- package/lib/types/providers/byterover.d.ts +31 -0
- package/lib/types/providers/catalog.d.ts +23 -0
- package/lib/types/providers/hindsight.d.ts +19 -0
- package/lib/types/providers/holographic.d.ts +22 -0
- package/lib/types/providers/honcho.d.ts +18 -0
- package/lib/types/providers/http.d.ts +32 -0
- package/lib/types/providers/mem0.d.ts +17 -0
- package/lib/types/providers/openviking.d.ts +31 -0
- package/lib/types/providers/provider.d.ts +38 -0
- package/lib/types/providers/retaindb.d.ts +16 -0
- package/lib/types/providers/supermemory.d.ts +16 -0
- package/lib/types/review-activity.d.ts +2 -16
- package/lib/types/rpc.d.ts +1 -2
- package/lib/types/runner.d.ts +15 -11
- package/lib/types/runtime-memory.d.ts +2 -59
- package/lib/types/service.d.ts +54 -152
- package/lib/types/settings.d.ts +1 -4
- package/lib/types/shared/contracts.d.ts +869 -0
- package/lib/types/storage-scope.d.ts +2 -29
- package/lib/types/subagent.d.ts +11 -16
- package/lib/types/tools.d.ts +0 -1
- package/lib/types/version-updates.d.ts +2 -29
- package/package.json +22 -9
- package/docs/README.md +0 -8
- package/docs/assets/diagrams/en/memory-system-flow.png +0 -0
- package/docs/assets/diagrams/en/project-architecture.svg +0 -182
- package/docs/assets/diagrams/zh-CN/memory-system-flow.png +0 -0
- package/docs/assets/diagrams/zh-CN/project-architecture.svg +0 -182
- package/docs/assets/media/dsh-mnemon-memory-system-demo-poster.jpg +0 -0
- package/docs/assets/media/dsh-mnemon-memory-system-demo.gif +0 -0
- package/docs/assets/media/dsh-mnemon-memory-system-demo.mp4 +0 -0
- package/docs/assets/screenshots/conversation-memory-jump.png +0 -0
- package/docs/assets/screenshots/conversation-save-dialog.png +0 -0
- package/docs/assets/screenshots/conversation-turn-memory.png +0 -0
- package/docs/assets/screenshots/document-create-dialog.png +0 -0
- package/docs/assets/screenshots/documents-markdown.png +0 -0
- package/docs/assets/screenshots/entities-context.png +0 -0
- package/docs/assets/screenshots/memory-content.png +0 -0
- package/docs/assets/screenshots/overview-memory-graph.png +0 -0
- package/docs/assets/screenshots/recall-agent-answer.png +0 -0
- package/docs/assets/screenshots/remember-dialog.png +0 -0
- package/docs/assets/screenshots/runtime-memory-add.png +0 -0
- package/docs/assets/screenshots/runtime-memory.png +0 -0
- package/docs/assets/screenshots/settings-memory-system.png +0 -0
- package/docs/assets/screenshots/status-overview.png +0 -0
- package/docs/assets/screenshots/version-check.png +0 -0
- package/docs/en/README.md +0 -48
- package/docs/en/architecture.md +0 -133
- package/docs/en/configuration.md +0 -234
- package/docs/en/development.md +0 -198
- package/docs/en/getting-started.md +0 -199
- package/docs/en/interfaces.md +0 -181
- package/docs/en/operations.md +0 -173
- package/docs/en/project-overview.md +0 -145
- package/docs/en/roadmap.md +0 -41
- package/docs/en/storage-model.md +0 -185
- package/docs/en/ui-guide.md +0 -156
- package/docs/en/workflows.md +0 -290
- package/docs/zh-CN/README.md +0 -48
- package/docs/zh-CN/architecture.md +0 -133
- package/docs/zh-CN/configuration.md +0 -234
- package/docs/zh-CN/development.md +0 -198
- package/docs/zh-CN/getting-started.md +0 -199
- package/docs/zh-CN/interfaces.md +0 -181
- package/docs/zh-CN/operations.md +0 -173
- package/docs/zh-CN/project-overview.md +0 -145
- package/docs/zh-CN/roadmap.md +0 -41
- package/docs/zh-CN/storage-model.md +0 -185
- package/docs/zh-CN/ui-guide.md +0 -160
- package/docs/zh-CN/workflows.md +0 -290
- package/lib/client.js.map +0 -1
- package/lib/types/activity.d.ts.map +0 -1
- package/lib/types/activity.js +0 -93
- package/lib/types/activity.js.map +0 -1
- package/lib/types/channels.d.ts.map +0 -1
- package/lib/types/channels.js +0 -4
- package/lib/types/channels.js.map +0 -1
- package/lib/types/client/MnemonLogo.d.ts.map +0 -1
- package/lib/types/client/MnemonLogo.js +0 -6
- package/lib/types/client/MnemonLogo.js.map +0 -1
- package/lib/types/client/MnemonPackSection.d.ts.map +0 -1
- package/lib/types/client/MnemonPackSection.js +0 -136
- package/lib/types/client/MnemonPackSection.js.map +0 -1
- package/lib/types/client/MnemonSaveAction.d.ts.map +0 -1
- package/lib/types/client/MnemonSaveAction.js +0 -90
- package/lib/types/client/MnemonSaveAction.js.map +0 -1
- package/lib/types/client/MnemonSettingsCard.d.ts.map +0 -1
- package/lib/types/client/MnemonSettingsCard.js +0 -155
- package/lib/types/client/MnemonSettingsCard.js.map +0 -1
- package/lib/types/client/MnemonTurnTail.d.ts.map +0 -1
- package/lib/types/client/MnemonTurnTail.js +0 -56
- package/lib/types/client/MnemonTurnTail.js.map +0 -1
- package/lib/types/client/MnemonView.d.ts.map +0 -1
- package/lib/types/client/MnemonView.js +0 -1594
- package/lib/types/client/MnemonView.js.map +0 -1
- package/lib/types/client/MnemonViewAppearance.d.ts.map +0 -1
- package/lib/types/client/MnemonViewAppearance.js +0 -67
- package/lib/types/client/MnemonViewAppearance.js.map +0 -1
- package/lib/types/client/anchor.d.ts.map +0 -1
- package/lib/types/client/anchor.js +0 -46
- package/lib/types/client/anchor.js.map +0 -1
- package/lib/types/client/api.d.ts.map +0 -1
- package/lib/types/client/api.js +0 -150
- package/lib/types/client/api.js.map +0 -1
- package/lib/types/client/dsh-compat.d.ts.map +0 -1
- package/lib/types/client/dsh-compat.js +0 -2
- package/lib/types/client/dsh-compat.js.map +0 -1
- package/lib/types/client/index.d.ts.map +0 -1
- package/lib/types/client/index.js +0 -161
- package/lib/types/client/index.js.map +0 -1
- package/lib/types/client/locales.d.ts.map +0 -1
- package/lib/types/client/locales.js +0 -1172
- package/lib/types/client/locales.js.map +0 -1
- package/lib/types/client/settings.d.ts.map +0 -1
- package/lib/types/client/settings.js +0 -70
- package/lib/types/client/settings.js.map +0 -1
- package/lib/types/client/sidebar-entry.d.ts.map +0 -1
- package/lib/types/client/sidebar-entry.js +0 -134
- package/lib/types/client/sidebar-entry.js.map +0 -1
- package/lib/types/client/workspace-controller.d.ts.map +0 -1
- package/lib/types/client/workspace-controller.js +0 -21
- package/lib/types/client/workspace-controller.js.map +0 -1
- package/lib/types/client/workspace-mount.d.ts.map +0 -1
- package/lib/types/client/workspace-mount.js +0 -138
- package/lib/types/client/workspace-mount.js.map +0 -1
- package/lib/types/commands.d.ts.map +0 -1
- package/lib/types/commands.js +0 -104
- package/lib/types/commands.js.map +0 -1
- package/lib/types/config-values.d.ts.map +0 -1
- package/lib/types/config-values.js +0 -4
- package/lib/types/config-values.js.map +0 -1
- package/lib/types/config.d.ts.map +0 -1
- package/lib/types/config.js +0 -127
- package/lib/types/config.js.map +0 -1
- package/lib/types/contracts.d.ts.map +0 -1
- package/lib/types/contracts.js +0 -2
- package/lib/types/contracts.js.map +0 -1
- package/lib/types/documents.d.ts.map +0 -1
- package/lib/types/documents.js +0 -495
- package/lib/types/documents.js.map +0 -1
- package/lib/types/guidance.d.ts.map +0 -1
- package/lib/types/guidance.js +0 -34
- package/lib/types/guidance.js.map +0 -1
- package/lib/types/index.d.ts.map +0 -1
- package/lib/types/index.js +0 -55
- package/lib/types/index.js.map +0 -1
- package/lib/types/lifecycle.d.ts.map +0 -1
- package/lib/types/lifecycle.js +0 -456
- package/lib/types/lifecycle.js.map +0 -1
- package/lib/types/live-runtime.d.ts.map +0 -1
- package/lib/types/live-runtime.js +0 -146
- package/lib/types/live-runtime.js.map +0 -1
- package/lib/types/memory-bodies.d.ts.map +0 -1
- package/lib/types/memory-bodies.js +0 -186
- package/lib/types/memory-bodies.js.map +0 -1
- package/lib/types/pack.d.ts.map +0 -1
- package/lib/types/pack.js +0 -709
- package/lib/types/pack.js.map +0 -1
- package/lib/types/process.d.ts.map +0 -1
- package/lib/types/process.js +0 -65
- package/lib/types/process.js.map +0 -1
- package/lib/types/review-activity.d.ts.map +0 -1
- package/lib/types/review-activity.js +0 -37
- package/lib/types/review-activity.js.map +0 -1
- package/lib/types/rpc.d.ts.map +0 -1
- package/lib/types/rpc.js +0 -384
- package/lib/types/rpc.js.map +0 -1
- package/lib/types/runner.d.ts.map +0 -1
- package/lib/types/runner.js +0 -198
- package/lib/types/runner.js.map +0 -1
- package/lib/types/runtime-memory.d.ts.map +0 -1
- package/lib/types/runtime-memory.js +0 -415
- package/lib/types/runtime-memory.js.map +0 -1
- package/lib/types/service.d.ts.map +0 -1
- package/lib/types/service.js +0 -512
- package/lib/types/service.js.map +0 -1
- package/lib/types/settings.d.ts.map +0 -1
- package/lib/types/settings.js +0 -103
- package/lib/types/settings.js.map +0 -1
- package/lib/types/storage-scope.d.ts.map +0 -1
- package/lib/types/storage-scope.js +0 -179
- package/lib/types/storage-scope.js.map +0 -1
- package/lib/types/subagent.d.ts.map +0 -1
- package/lib/types/subagent.js +0 -624
- package/lib/types/subagent.js.map +0 -1
- package/lib/types/tools.d.ts.map +0 -1
- package/lib/types/tools.js +0 -341
- package/lib/types/tools.js.map +0 -1
- package/lib/types/version-updates.d.ts.map +0 -1
- package/lib/types/version-updates.js +0 -383
- package/lib/types/version-updates.js.map +0 -1
|
@@ -1,33 +1,7 @@
|
|
|
1
1
|
import type { ResolvedConfig } from './config.ts';
|
|
2
2
|
import type { MnemonRunner } from './runner.ts';
|
|
3
|
-
|
|
4
|
-
export type StorageAreaKind
|
|
5
|
-
export type StorageAreaStatus = 'ready' | 'empty' | 'missing' | 'invalid';
|
|
6
|
-
export interface StorageAreaInventory {
|
|
7
|
-
kind: StorageAreaKind;
|
|
8
|
-
path: string;
|
|
9
|
-
status: StorageAreaStatus;
|
|
10
|
-
bytes: number;
|
|
11
|
-
itemCount: number;
|
|
12
|
-
details: Record<string, number | string | boolean>;
|
|
13
|
-
issue?: string;
|
|
14
|
-
}
|
|
15
|
-
export interface StorageScopeInventory {
|
|
16
|
-
kind: StorageScopeKind;
|
|
17
|
-
root?: string;
|
|
18
|
-
configured: boolean;
|
|
19
|
-
active: boolean;
|
|
20
|
-
available: boolean;
|
|
21
|
-
totalBytes: number;
|
|
22
|
-
areas: StorageAreaInventory[];
|
|
23
|
-
issue?: string;
|
|
24
|
-
}
|
|
25
|
-
export interface StorageScopeCatalog {
|
|
26
|
-
activeKind: StorageScopeKind;
|
|
27
|
-
activeRoot: string;
|
|
28
|
-
scopes: StorageScopeInventory[];
|
|
29
|
-
generatedAt: string;
|
|
30
|
-
}
|
|
3
|
+
import type { StorageScopeCatalog } from './shared/contracts.ts';
|
|
4
|
+
export type { StorageAreaInventory, StorageAreaKind, StorageAreaStatus, StorageScopeCatalog, StorageScopeInventory, StorageScopeKind } from './shared/contracts.ts';
|
|
31
5
|
/** Read-only catalog of the three storage domains. It never creates, moves, or repairs files. */
|
|
32
6
|
export declare class StorageScopeInspector {
|
|
33
7
|
private readonly runner;
|
|
@@ -36,4 +10,3 @@ export declare class StorageScopeInspector {
|
|
|
36
10
|
catalog(workspaceRoot?: string): StorageScopeCatalog;
|
|
37
11
|
}
|
|
38
12
|
export declare function validateCustomStorageRoot(value: string): string;
|
|
39
|
-
//# sourceMappingURL=storage-scope.d.ts.map
|
package/lib/types/subagent.d.ts
CHANGED
|
@@ -1,28 +1,19 @@
|
|
|
1
1
|
import type { HostAgent, HostSubagentsService } from './contracts.ts';
|
|
2
2
|
import { type DocumentManager, type DocumentMutation, type DocumentMutationResult, type DocumentView } from './documents.ts';
|
|
3
3
|
import { type RuntimeMemoryController, type RuntimeMemoryMutation, type RuntimeMemoryMutationResult } from './runtime-memory.ts';
|
|
4
|
-
import type { Insight, RememberRequest, SearchRequest } from './service.ts';
|
|
4
|
+
import type { Insight, MnemonService, RememberRequest, SearchRequest } from './service.ts';
|
|
5
|
+
import { type PreparedMemoryPlacement } from './provider-placement.ts';
|
|
6
|
+
import type { MemoryBodyMetadataMaintenanceResult, MemoryPlacementDecision, SubagentCounters } from './shared/contracts.ts';
|
|
7
|
+
export type { SubagentCounters } from './shared/contracts.ts';
|
|
5
8
|
interface AgentRuntimeSource {
|
|
6
9
|
forAgent(agent: HostAgent): {
|
|
10
|
+
service: MnemonService;
|
|
7
11
|
runtimeMemory: RuntimeMemoryController;
|
|
8
12
|
documents: DocumentManager;
|
|
9
13
|
};
|
|
10
14
|
}
|
|
11
15
|
/** Rejects schema keywords that DSH structured-output tools cannot compile. */
|
|
12
16
|
export declare function assertDshOutputSchema(schema: unknown, path?: string): void;
|
|
13
|
-
export interface SubagentCounters {
|
|
14
|
-
recalls: number;
|
|
15
|
-
writes: number;
|
|
16
|
-
answers: number;
|
|
17
|
-
reviews: number;
|
|
18
|
-
migrations: number;
|
|
19
|
-
compactions: number;
|
|
20
|
-
documentArchives: number;
|
|
21
|
-
failures: number;
|
|
22
|
-
lastRunId?: string;
|
|
23
|
-
lastOperation?: 'recall' | 'write' | 'review' | 'migration' | 'compaction' | 'document-archive';
|
|
24
|
-
lastAt?: string;
|
|
25
|
-
}
|
|
26
17
|
export interface DelegatedRecallResult {
|
|
27
18
|
query: string;
|
|
28
19
|
mode: string;
|
|
@@ -85,6 +76,11 @@ export declare class MnemonSubagentCoordinator {
|
|
|
85
76
|
documentSearch(parent: HostAgent, query: string, includeArchived?: boolean, limit?: number): Promise<import("./documents.ts").DocumentSearchResult>;
|
|
86
77
|
recall(parent: HostAgent, request: SearchRequest, signal: AbortSignal): Promise<DelegatedRecallResult>;
|
|
87
78
|
related(parent: HostAgent, id: string, memoryBodyId: string | undefined, signal: AbortSignal): Promise<DelegatedRecallResult>;
|
|
79
|
+
placeProvider(parent: HostAgent, body: {
|
|
80
|
+
name: string;
|
|
81
|
+
description: string;
|
|
82
|
+
}, prepared: PreparedMemoryPlacement, signal: AbortSignal): Promise<MemoryPlacementDecision>;
|
|
83
|
+
maintainMetadata(parent: HostAgent, memoryBodyIds: readonly string[], signal: AbortSignal): Promise<MemoryBodyMetadataMaintenanceResult>;
|
|
88
84
|
remember(parent: HostAgent, request: RememberRequest, signal: AbortSignal): Promise<DelegatedWriteResult>;
|
|
89
85
|
runtime(parent: HostAgent, request: RuntimeMemoryMutation, signal: AbortSignal): Promise<CoordinatedRuntimeMemoryResult>;
|
|
90
86
|
document(parent: HostAgent, request: DocumentMutation, signal: AbortSignal): Promise<CoordinatedDocumentResult>;
|
|
@@ -100,7 +96,6 @@ export declare class MnemonSubagentCoordinator {
|
|
|
100
96
|
private delegate;
|
|
101
97
|
private provider;
|
|
102
98
|
private runtimeMemoryFor;
|
|
99
|
+
private serviceFor;
|
|
103
100
|
private documentsFor;
|
|
104
101
|
}
|
|
105
|
-
export {};
|
|
106
|
-
//# sourceMappingURL=subagent.d.ts.map
|
package/lib/types/tools.d.ts
CHANGED
|
@@ -15,4 +15,3 @@ interface AgentRuntimeSource {
|
|
|
15
15
|
/** Root calls delegate to a bounded child; memory-worker calls reach the deterministic service. */
|
|
16
16
|
export declare function registerTools(ctx: HostContextShape, serviceOrSource: MnemonService | AgentRuntimeSource, coordinator: MnemonSubagentCoordinator, runtimeMemory?: RuntimeMemoryController, documents?: DocumentManager): void;
|
|
17
17
|
export {};
|
|
18
|
-
//# sourceMappingURL=tools.d.ts.map
|
|
@@ -1,32 +1,6 @@
|
|
|
1
1
|
import { type ProcessRunner } from './process.ts';
|
|
2
|
-
|
|
3
|
-
export type
|
|
4
|
-
export interface VersionComponentStatus {
|
|
5
|
-
id: VersionComponentId;
|
|
6
|
-
name: string;
|
|
7
|
-
executablePath?: string;
|
|
8
|
-
installPath?: string;
|
|
9
|
-
installProfile?: string;
|
|
10
|
-
current?: string;
|
|
11
|
-
latest?: string;
|
|
12
|
-
outdated: boolean;
|
|
13
|
-
installMode: VersionInstallMode;
|
|
14
|
-
updateSupported: boolean;
|
|
15
|
-
updateHint: string;
|
|
16
|
-
checkError?: string;
|
|
17
|
-
}
|
|
18
|
-
export interface VersionStatus {
|
|
19
|
-
checkedAt: string;
|
|
20
|
-
components: VersionComponentStatus[];
|
|
21
|
-
}
|
|
22
|
-
export interface VersionUpdateResult {
|
|
23
|
-
component: VersionComponentId;
|
|
24
|
-
previousVersion?: string;
|
|
25
|
-
currentVersion?: string;
|
|
26
|
-
updated: boolean;
|
|
27
|
-
restartRequired: boolean;
|
|
28
|
-
output?: string;
|
|
29
|
-
}
|
|
2
|
+
import type { VersionComponentId, VersionStatus, VersionUpdateResult } from './shared/contracts.ts';
|
|
3
|
+
export type { VersionComponentId, VersionComponentStatus, VersionInstallMode, VersionStatus, VersionUpdateResult } from './shared/contracts.ts';
|
|
30
4
|
export interface VersionUpdateDependencies {
|
|
31
5
|
packageManifestPath?: string;
|
|
32
6
|
dshHome?: string;
|
|
@@ -61,4 +35,3 @@ export declare class VersionUpdateManager {
|
|
|
61
35
|
check(): Promise<VersionStatus>;
|
|
62
36
|
update(component: VersionComponentId): Promise<VersionUpdateResult>;
|
|
63
37
|
}
|
|
64
|
-
//# sourceMappingURL=version-updates.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,13 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-mnemon",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Three-tier memory system for DeepSeek Harness with nine pluggable providers, smart routing, independent task Agents, WebUI, and headless tools.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"deepseek-harness",
|
|
7
7
|
"deepseek-harness-plugin",
|
|
8
8
|
"dsh",
|
|
9
9
|
"dsh-plugin",
|
|
10
10
|
"mnemon",
|
|
11
|
+
"openviking",
|
|
12
|
+
"honcho",
|
|
13
|
+
"mem0",
|
|
14
|
+
"hindsight",
|
|
15
|
+
"holographic-memory",
|
|
16
|
+
"retaindb",
|
|
17
|
+
"byterover",
|
|
18
|
+
"supermemory",
|
|
19
|
+
"memory-provider",
|
|
11
20
|
"memory-system",
|
|
12
21
|
"memory-plugin",
|
|
13
22
|
"agent-memory",
|
|
@@ -25,7 +34,7 @@
|
|
|
25
34
|
"semantic-recall",
|
|
26
35
|
"memory-space",
|
|
27
36
|
"workspace-memory",
|
|
28
|
-
"
|
|
37
|
+
"task-agent",
|
|
29
38
|
"knowledge-graph",
|
|
30
39
|
"ai-agent",
|
|
31
40
|
"llm-agent",
|
|
@@ -35,6 +44,7 @@
|
|
|
35
44
|
"typescript",
|
|
36
45
|
"cordis",
|
|
37
46
|
"web-ui",
|
|
47
|
+
"headless",
|
|
38
48
|
"sidebar"
|
|
39
49
|
],
|
|
40
50
|
"repository": {
|
|
@@ -71,11 +81,8 @@
|
|
|
71
81
|
"cordis.patch.yml",
|
|
72
82
|
"README.md",
|
|
73
83
|
"README.zh-CN.md",
|
|
84
|
+
"THIRD_PARTY_NOTICES.md",
|
|
74
85
|
"SECURITY.md",
|
|
75
|
-
"docs/README.md",
|
|
76
|
-
"docs/assets",
|
|
77
|
-
"docs/zh-CN",
|
|
78
|
-
"docs/en",
|
|
79
86
|
"LICENSE"
|
|
80
87
|
],
|
|
81
88
|
"dsh": {
|
|
@@ -94,12 +101,16 @@
|
|
|
94
101
|
}
|
|
95
102
|
},
|
|
96
103
|
"scripts": {
|
|
97
|
-
"build": "tsc -p tsconfig.
|
|
104
|
+
"build": "tsdown && tsc -p tsconfig.types.json",
|
|
98
105
|
"bundle": "tsdown",
|
|
99
106
|
"prepublishOnly": "pnpm run verify",
|
|
107
|
+
"lint:package": "publint --strict && attw --pack . --profile esm-only --quiet",
|
|
100
108
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
101
109
|
"test": "vitest run",
|
|
102
|
-
"verify": "
|
|
110
|
+
"verify:build": "node scripts/verify-deterministic-build.mjs",
|
|
111
|
+
"verify:headless": "node scripts/verify-headless-profile.mjs",
|
|
112
|
+
"verify:package": "node scripts/verify-package-contents.mjs && pnpm run lint:package",
|
|
113
|
+
"verify": "pnpm run typecheck && pnpm run test && pnpm run verify:build && pnpm run verify:headless && pnpm run verify:package"
|
|
103
114
|
},
|
|
104
115
|
"dependencies": {
|
|
105
116
|
"fflate": "^0.8.3",
|
|
@@ -112,6 +123,7 @@
|
|
|
112
123
|
"react-dom": "^18.2.0"
|
|
113
124
|
},
|
|
114
125
|
"devDependencies": {
|
|
126
|
+
"@arethetypeswrong/cli": "^0.18.5",
|
|
115
127
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
116
128
|
"@deepseek-ai/dsh": "0.1.0-rc.6",
|
|
117
129
|
"@deepseek-ai/dsh-client-connection": "0.1.0-rc.6",
|
|
@@ -128,6 +140,7 @@
|
|
|
128
140
|
"@types/react-dom": "^18.3.0",
|
|
129
141
|
"jsdom": "^26.1.0",
|
|
130
142
|
"lightningcss": "^1.29.0",
|
|
143
|
+
"publint": "^0.3.23",
|
|
131
144
|
"react": "^18.2.0",
|
|
132
145
|
"react-dom": "^18.2.0",
|
|
133
146
|
"tsdown": "^0.22.0",
|
package/docs/README.md
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
# dsh-mnemon Documentation / 文档
|
|
2
|
-
|
|
3
|
-
- [English](./en/README.md)
|
|
4
|
-
- [简体中文](./zh-CN/README.md)
|
|
5
|
-
|
|
6
|
-
The root README stays focused on orientation and quick start. Architecture, data model, lifecycle, interfaces, operations, and development details live here.
|
|
7
|
-
|
|
8
|
-
根目录 README 只保留项目概览和快速开始;架构、数据模型、生命周期、接口、运维和开发细节在此维护。
|
|
Binary file
|
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="1600" height="1040" viewBox="0 0 1600 1040" role="img" aria-labelledby="title description" lang="en">
|
|
2
|
-
<title id="title">dsh-mnemon runtime architecture</title>
|
|
3
|
-
<desc id="description">DSH Web, the root Agent, and tools and commands enter the dsh-mnemon control and supervision layer, which connects to Runtime Memory, Project Documents, and long-term Mnemon Memory Spaces.</desc>
|
|
4
|
-
<style>
|
|
5
|
-
text { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Arial, sans-serif; fill: #172033; }
|
|
6
|
-
.canvas { fill: #f7f9fc; }
|
|
7
|
-
.section { fill: #f0f3f8; stroke: #d7deea; stroke-width: 1.5; }
|
|
8
|
-
.card { fill: #ffffff; stroke: #d7deea; stroke-width: 1.5; filter: url(#shadow); }
|
|
9
|
-
.card-hot { fill: #fff3df; stroke: #c66a09; }
|
|
10
|
-
.card-doc { fill: #e8f1ff; stroke: #2563be; }
|
|
11
|
-
.card-long { fill: #e2f7ef; stroke: #087c5b; }
|
|
12
|
-
.title { font-size: 34px; font-weight: 720; letter-spacing: -0.6px; }
|
|
13
|
-
.subtitle { font-size: 17px; fill: #647086; }
|
|
14
|
-
.section-title { font-size: 17px; font-weight: 700; fill: #6558d9; letter-spacing: 0.4px; }
|
|
15
|
-
.node-title { font-size: 21px; font-weight: 700; }
|
|
16
|
-
.node-copy { font-size: 15px; fill: #647086; }
|
|
17
|
-
.node-code { font-family: "SFMono-Regular", Consolas, monospace; font-size: 14px; fill: #647086; }
|
|
18
|
-
.store-title { font-size: 23px; font-weight: 740; }
|
|
19
|
-
.store-copy { font-size: 15px; fill: #647086; }
|
|
20
|
-
.pill { fill: #f0f3f8; stroke: #d7deea; }
|
|
21
|
-
.pill-text { font-size: 13px; font-weight: 650; fill: #647086; }
|
|
22
|
-
.flow { fill: none; stroke: #aeb9ca; stroke-width: 2.5; marker-end: url(#arrow); }
|
|
23
|
-
.flow-hot { stroke: #c66a09; marker-end: url(#arrow-hot); }
|
|
24
|
-
.flow-doc { stroke: #2563be; marker-end: url(#arrow-doc); }
|
|
25
|
-
.flow-long { stroke: #087c5b; marker-end: url(#arrow-long); }
|
|
26
|
-
.flow-supervised { stroke: #6558d9; stroke-dasharray: 8 7; marker-end: url(#arrow-accent); }
|
|
27
|
-
.flow-label { font-size: 13px; font-weight: 650; fill: #647086; }
|
|
28
|
-
.legend { font-size: 13px; fill: #647086; }
|
|
29
|
-
.legend-line, .bus-line { marker-end: none; }
|
|
30
|
-
.bar-hot { fill: #c66a09; }
|
|
31
|
-
.bar-doc { fill: #2563be; }
|
|
32
|
-
.bar-long { fill: #087c5b; }
|
|
33
|
-
</style>
|
|
34
|
-
<defs>
|
|
35
|
-
<filter id="shadow" x="-10%" y="-20%" width="120%" height="150%">
|
|
36
|
-
<feDropShadow dx="0" dy="7" stdDeviation="10" flood-color="#21314d" flood-opacity="0.08"/>
|
|
37
|
-
</filter>
|
|
38
|
-
<marker id="arrow" viewBox="0 0 10 10" refX="8.5" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
|
|
39
|
-
<path d="M 0 0 L 10 5 L 0 10 z" fill="#aeb9ca"/>
|
|
40
|
-
</marker>
|
|
41
|
-
<marker id="arrow-hot" viewBox="0 0 10 10" refX="8.5" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
|
|
42
|
-
<path d="M 0 0 L 10 5 L 0 10 z" fill="#c66a09"/>
|
|
43
|
-
</marker>
|
|
44
|
-
<marker id="arrow-doc" viewBox="0 0 10 10" refX="8.5" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
|
|
45
|
-
<path d="M 0 0 L 10 5 L 0 10 z" fill="#2563be"/>
|
|
46
|
-
</marker>
|
|
47
|
-
<marker id="arrow-long" viewBox="0 0 10 10" refX="8.5" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
|
|
48
|
-
<path d="M 0 0 L 10 5 L 0 10 z" fill="#087c5b"/>
|
|
49
|
-
</marker>
|
|
50
|
-
<marker id="arrow-accent" viewBox="0 0 10 10" refX="8.5" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
|
|
51
|
-
<path d="M 0 0 L 10 5 L 0 10 z" fill="#6558d9"/>
|
|
52
|
-
</marker>
|
|
53
|
-
</defs>
|
|
54
|
-
|
|
55
|
-
<rect class="canvas" width="1600" height="1040" rx="24"/>
|
|
56
|
-
<text class="title" x="64" y="58">dsh-mnemon runtime architecture</text>
|
|
57
|
-
<text class="subtitle" x="64" y="87">DSH supervises and orchestrates · Mnemon provides deterministic durable storage · all three tiers stay local</text>
|
|
58
|
-
<rect class="section" x="48" y="300" width="1504" height="394" rx="24"/>
|
|
59
|
-
|
|
60
|
-
<g aria-label="DSH interaction surfaces">
|
|
61
|
-
<rect class="card" x="64" y="124" width="430" height="126" rx="18"/>
|
|
62
|
-
<rect class="pill" x="88" y="146" width="96" height="27" rx="13.5"/>
|
|
63
|
-
<text class="pill-text" x="136" y="165" text-anchor="middle">DSH WEB</text>
|
|
64
|
-
<text class="node-title" x="88" y="204">Memory workspace and settings</text>
|
|
65
|
-
<text class="node-copy" x="88" y="231">Eight pages · Chinese/English · global theme</text>
|
|
66
|
-
|
|
67
|
-
<rect class="card" x="585" y="124" width="430" height="126" rx="18"/>
|
|
68
|
-
<rect class="pill" x="609" y="146" width="112" height="27" rx="13.5"/>
|
|
69
|
-
<text class="pill-text" x="665" y="165" text-anchor="middle">ROOT AGENT</text>
|
|
70
|
-
<text class="node-title" x="609" y="204">Current task and main context</text>
|
|
71
|
-
<text class="node-copy" x="609" y="231">Current instructions and live facts stay authoritative</text>
|
|
72
|
-
|
|
73
|
-
<rect class="card" x="1106" y="124" width="430" height="126" rx="18"/>
|
|
74
|
-
<rect class="pill" x="1130" y="146" width="142" height="27" rx="13.5"/>
|
|
75
|
-
<text class="pill-text" x="1201" y="165" text-anchor="middle">TOOLS · COMMANDS</text>
|
|
76
|
-
<text class="node-title" x="1130" y="204">Model tools and /mnemon</text>
|
|
77
|
-
<text class="node-copy" x="1130" y="231">Explicit recall, distill, links, status, maintenance</text>
|
|
78
|
-
</g>
|
|
79
|
-
|
|
80
|
-
<g aria-hidden="true">
|
|
81
|
-
<path class="flow" d="M279 250 V281 H1298 V350"/>
|
|
82
|
-
<path class="flow flow-supervised" d="M800 250 V350"/>
|
|
83
|
-
<path class="flow" d="M1321 250 V292 H800 V350"/>
|
|
84
|
-
<text class="flow-label" x="1042" y="276">typed RPC</text>
|
|
85
|
-
<text class="flow-label" x="815" y="302">tool calls</text>
|
|
86
|
-
</g>
|
|
87
|
-
|
|
88
|
-
<text class="section-title" x="80" y="337">DSH HOST · DSH-MNEMON CONTROL AND SUPERVISION LAYER</text>
|
|
89
|
-
|
|
90
|
-
<g aria-hidden="true">
|
|
91
|
-
<path class="flow bus-line" d="M300 476 V498"/>
|
|
92
|
-
<path class="flow flow-supervised bus-line" d="M800 476 V498"/>
|
|
93
|
-
<path class="flow bus-line" d="M1300 476 V498"/>
|
|
94
|
-
<path class="flow bus-line" d="M245 498 H1300"/>
|
|
95
|
-
<path class="flow" d="M245 498 V520"/>
|
|
96
|
-
<path class="flow" d="M615 498 V520"/>
|
|
97
|
-
<path class="flow" d="M985 498 V520"/>
|
|
98
|
-
<path class="flow" d="M990 630 H1190"/>
|
|
99
|
-
</g>
|
|
100
|
-
|
|
101
|
-
<g aria-label="Supervision and permission components">
|
|
102
|
-
<rect class="card" x="100" y="350" width="400" height="126" rx="17"/>
|
|
103
|
-
<text class="node-title" x="126" y="390">Prompt and lifecycle</text>
|
|
104
|
-
<text class="node-copy" x="126" y="420">Hot-context injection · short cues · activity score</text>
|
|
105
|
-
<text class="node-code" x="126" y="448">pre-step · turn/end · idle review</text>
|
|
106
|
-
|
|
107
|
-
<rect class="card" x="600" y="350" width="400" height="126" rx="17"/>
|
|
108
|
-
<text class="node-title" x="626" y="390">Subagent Coordinator</text>
|
|
109
|
-
<text class="node-copy" x="626" y="420">isolated spawn · completed-checkpoint fork</text>
|
|
110
|
-
<text class="node-code" x="626" y="448">persona · allowlist · schema · depth=1</text>
|
|
111
|
-
|
|
112
|
-
<rect class="card" x="1100" y="350" width="400" height="126" rx="17"/>
|
|
113
|
-
<text class="node-title" x="1126" y="390">RPC and permission boundary</text>
|
|
114
|
-
<text class="node-copy" x="1126" y="420">trusted-host reads · loopback writes</text>
|
|
115
|
-
<text class="node-code" x="1126" y="448">read · write · settings channels</text>
|
|
116
|
-
</g>
|
|
117
|
-
|
|
118
|
-
<g aria-label="Deterministic control components">
|
|
119
|
-
<rect class="card" x="80" y="520" width="330" height="110" rx="16"/>
|
|
120
|
-
<text class="node-title" x="104" y="559">Runtime Memory</text>
|
|
121
|
-
<text class="node-copy" x="104" y="587">JSON authority · Markdown projections</text>
|
|
122
|
-
<text class="node-code" x="104" y="612">lock · revision · UTF-8</text>
|
|
123
|
-
|
|
124
|
-
<rect class="card" x="450" y="520" width="330" height="110" rx="16"/>
|
|
125
|
-
<text class="node-title" x="474" y="559">Documents</text>
|
|
126
|
-
<text class="node-copy" x="474" y="587">index · search · active / archived</text>
|
|
127
|
-
<text class="node-code" x="474" y="612">path boundary · LRU · SHA-256</text>
|
|
128
|
-
|
|
129
|
-
<rect class="card" x="820" y="520" width="330" height="110" rx="16"/>
|
|
130
|
-
<text class="node-title" x="844" y="559">Mnemon Service</text>
|
|
131
|
-
<text class="node-copy" x="844" y="587">space routing · recall · links · graph</text>
|
|
132
|
-
<text class="node-code" x="844" y="612">active read · targeted write</text>
|
|
133
|
-
|
|
134
|
-
<rect class="card" x="1190" y="520" width="280" height="110" rx="16"/>
|
|
135
|
-
<text class="node-title" x="1214" y="559">CLI Runner</text>
|
|
136
|
-
<text class="node-copy" x="1214" y="587">argument arrays · no shell</text>
|
|
137
|
-
<text class="node-code" x="1214" y="612">serialized · timeout</text>
|
|
138
|
-
</g>
|
|
139
|
-
|
|
140
|
-
<g aria-hidden="true">
|
|
141
|
-
<path class="flow flow-hot" d="M245 630 V760"/>
|
|
142
|
-
<path class="flow flow-doc" d="M615 630 V724 H800 V760"/>
|
|
143
|
-
<path class="flow flow-long" d="M1330 630 V724 H1310 V760"/>
|
|
144
|
-
<text class="flow-label" x="262" y="718">every-turn projection</text>
|
|
145
|
-
<text class="flow-label" x="632" y="714">managed Markdown</text>
|
|
146
|
-
<text class="flow-label" x="1344" y="713">local CLI</text>
|
|
147
|
-
</g>
|
|
148
|
-
|
|
149
|
-
<g aria-label="Three local storage tiers">
|
|
150
|
-
<rect class="card card-hot" x="64" y="760" width="440" height="194" rx="20"/>
|
|
151
|
-
<rect class="bar-hot" x="88" y="784" width="9" height="48" rx="4.5"/>
|
|
152
|
-
<text class="store-title" x="116" y="809">Runtime hot memory</text>
|
|
153
|
-
<text class="node-code" x="116" y="834"><storageRoot>/runtime</text>
|
|
154
|
-
<text class="store-copy" x="88" y="870">memories.json is the only authority</text>
|
|
155
|
-
<text class="store-copy" x="88" y="898">USER.md 4 KiB · MEMORY.md 10 KiB</text>
|
|
156
|
-
<text class="store-copy" x="88" y="926">compact context enters every root turn</text>
|
|
157
|
-
|
|
158
|
-
<rect class="card card-doc" x="580" y="760" width="440" height="194" rx="20"/>
|
|
159
|
-
<rect class="bar-doc" x="604" y="784" width="9" height="48" rx="4.5"/>
|
|
160
|
-
<text class="store-title" x="632" y="809">Project Documents</text>
|
|
161
|
-
<text class="node-code" x="632" y="834"><storageRoot>/documents</text>
|
|
162
|
-
<text class="store-copy" x="604" y="870">index.json · active/ · archived/</text>
|
|
163
|
-
<text class="store-copy" x="604" y="898">complete Markdown narrative and provenance</text>
|
|
164
|
-
<text class="store-copy" x="604" y="926">cold-reference first, then move the original</text>
|
|
165
|
-
|
|
166
|
-
<rect class="card card-long" x="1096" y="760" width="440" height="194" rx="20"/>
|
|
167
|
-
<rect class="bar-long" x="1120" y="784" width="9" height="48" rx="4.5"/>
|
|
168
|
-
<text class="store-title" x="1148" y="809">Mnemon Memory Spaces</text>
|
|
169
|
-
<text class="node-code" x="1148" y="834"><storageRoot>/data/<space-id>/mnemon.db</text>
|
|
170
|
-
<text class="store-copy" x="1120" y="870">isolated SQLite Stores · active read boundary</text>
|
|
171
|
-
<text class="store-copy" x="1120" y="898">temporal · semantic · causal · entity</text>
|
|
172
|
-
<text class="store-copy" x="1120" y="926">cross-session, on-demand, attributed evidence</text>
|
|
173
|
-
</g>
|
|
174
|
-
|
|
175
|
-
<g aria-label="Legend">
|
|
176
|
-
<line x1="70" y1="996" x2="112" y2="996" class="flow legend-line"/>
|
|
177
|
-
<text class="legend" x="124" y="1001">deterministic data / control path</text>
|
|
178
|
-
<line x1="390" y1="996" x2="432" y2="996" class="flow flow-supervised legend-line"/>
|
|
179
|
-
<text class="legend" x="444" y="1001">LLM-supervised path</text>
|
|
180
|
-
<text class="legend" x="1532" y="1001" text-anchor="end">all persistent data stays under the selected storageRoot</text>
|
|
181
|
-
</g>
|
|
182
|
-
</svg>
|
|
Binary file
|
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="1600" height="1040" viewBox="0 0 1600 1040" role="img" aria-labelledby="title description" lang="zh-CN">
|
|
2
|
-
<title id="title">dsh-mnemon 运行时架构</title>
|
|
3
|
-
<desc id="description">DSH Web、主 Agent 和工具命令进入 dsh-mnemon 控制与监督层,再分别连接运行时热记忆、项目档案和 Mnemon 长期记忆体。</desc>
|
|
4
|
-
<style>
|
|
5
|
-
text { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif; fill: #172033; }
|
|
6
|
-
.canvas { fill: #f7f9fc; }
|
|
7
|
-
.section { fill: #f0f3f8; stroke: #d7deea; stroke-width: 1.5; }
|
|
8
|
-
.card { fill: #ffffff; stroke: #d7deea; stroke-width: 1.5; filter: url(#shadow); }
|
|
9
|
-
.card-hot { fill: #fff3df; stroke: #c66a09; }
|
|
10
|
-
.card-doc { fill: #e8f1ff; stroke: #2563be; }
|
|
11
|
-
.card-long { fill: #e2f7ef; stroke: #087c5b; }
|
|
12
|
-
.title { font-size: 34px; font-weight: 720; letter-spacing: -0.6px; }
|
|
13
|
-
.subtitle { font-size: 17px; fill: #647086; }
|
|
14
|
-
.section-title { font-size: 17px; font-weight: 700; fill: #6558d9; letter-spacing: 0.4px; }
|
|
15
|
-
.node-title { font-size: 21px; font-weight: 700; }
|
|
16
|
-
.node-copy { font-size: 15px; fill: #647086; }
|
|
17
|
-
.node-code { font-family: "SFMono-Regular", Consolas, monospace; font-size: 14px; fill: #647086; }
|
|
18
|
-
.store-title { font-size: 23px; font-weight: 740; }
|
|
19
|
-
.store-copy { font-size: 15px; fill: #647086; }
|
|
20
|
-
.pill { fill: #f0f3f8; stroke: #d7deea; }
|
|
21
|
-
.pill-text { font-size: 13px; font-weight: 650; fill: #647086; }
|
|
22
|
-
.flow { fill: none; stroke: #aeb9ca; stroke-width: 2.5; marker-end: url(#arrow); }
|
|
23
|
-
.flow-hot { stroke: #c66a09; marker-end: url(#arrow-hot); }
|
|
24
|
-
.flow-doc { stroke: #2563be; marker-end: url(#arrow-doc); }
|
|
25
|
-
.flow-long { stroke: #087c5b; marker-end: url(#arrow-long); }
|
|
26
|
-
.flow-supervised { stroke: #6558d9; stroke-dasharray: 8 7; marker-end: url(#arrow-accent); }
|
|
27
|
-
.flow-label { font-size: 13px; font-weight: 650; fill: #647086; }
|
|
28
|
-
.legend { font-size: 13px; fill: #647086; }
|
|
29
|
-
.legend-line, .bus-line { marker-end: none; }
|
|
30
|
-
.bar-hot { fill: #c66a09; }
|
|
31
|
-
.bar-doc { fill: #2563be; }
|
|
32
|
-
.bar-long { fill: #087c5b; }
|
|
33
|
-
</style>
|
|
34
|
-
<defs>
|
|
35
|
-
<filter id="shadow" x="-10%" y="-20%" width="120%" height="150%">
|
|
36
|
-
<feDropShadow dx="0" dy="7" stdDeviation="10" flood-color="#21314d" flood-opacity="0.08"/>
|
|
37
|
-
</filter>
|
|
38
|
-
<marker id="arrow" viewBox="0 0 10 10" refX="8.5" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
|
|
39
|
-
<path d="M 0 0 L 10 5 L 0 10 z" fill="#aeb9ca"/>
|
|
40
|
-
</marker>
|
|
41
|
-
<marker id="arrow-hot" viewBox="0 0 10 10" refX="8.5" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
|
|
42
|
-
<path d="M 0 0 L 10 5 L 0 10 z" fill="#c66a09"/>
|
|
43
|
-
</marker>
|
|
44
|
-
<marker id="arrow-doc" viewBox="0 0 10 10" refX="8.5" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
|
|
45
|
-
<path d="M 0 0 L 10 5 L 0 10 z" fill="#2563be"/>
|
|
46
|
-
</marker>
|
|
47
|
-
<marker id="arrow-long" viewBox="0 0 10 10" refX="8.5" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
|
|
48
|
-
<path d="M 0 0 L 10 5 L 0 10 z" fill="#087c5b"/>
|
|
49
|
-
</marker>
|
|
50
|
-
<marker id="arrow-accent" viewBox="0 0 10 10" refX="8.5" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
|
|
51
|
-
<path d="M 0 0 L 10 5 L 0 10 z" fill="#6558d9"/>
|
|
52
|
-
</marker>
|
|
53
|
-
</defs>
|
|
54
|
-
|
|
55
|
-
<rect class="canvas" width="1600" height="1040" rx="24"/>
|
|
56
|
-
<text class="title" x="64" y="58">dsh-mnemon 运行时架构</text>
|
|
57
|
-
<text class="subtitle" x="64" y="87">DSH 负责监督与编排 · Mnemon 负责确定性长期存储 · 三层数据保留在本地</text>
|
|
58
|
-
<rect class="section" x="48" y="300" width="1504" height="394" rx="24"/>
|
|
59
|
-
|
|
60
|
-
<g aria-label="DSH 交互入口">
|
|
61
|
-
<rect class="card" x="64" y="124" width="430" height="126" rx="18"/>
|
|
62
|
-
<rect class="pill" x="88" y="146" width="96" height="27" rx="13.5"/>
|
|
63
|
-
<text class="pill-text" x="136" y="165" text-anchor="middle">DSH WEB</text>
|
|
64
|
-
<text class="node-title" x="88" y="204">记忆体工作台与插件设置</text>
|
|
65
|
-
<text class="node-copy" x="88" y="231">八个页面 · 中文/英文 · 全局明暗主题</text>
|
|
66
|
-
|
|
67
|
-
<rect class="card" x="585" y="124" width="430" height="126" rx="18"/>
|
|
68
|
-
<rect class="pill" x="609" y="146" width="112" height="27" rx="13.5"/>
|
|
69
|
-
<text class="pill-text" x="665" y="165" text-anchor="middle">ROOT AGENT</text>
|
|
70
|
-
<text class="node-title" x="609" y="204">当前任务与主上下文</text>
|
|
71
|
-
<text class="node-copy" x="609" y="231">当前指令和实时事实始终优先</text>
|
|
72
|
-
|
|
73
|
-
<rect class="card" x="1106" y="124" width="430" height="126" rx="18"/>
|
|
74
|
-
<rect class="pill" x="1130" y="146" width="142" height="27" rx="13.5"/>
|
|
75
|
-
<text class="pill-text" x="1201" y="165" text-anchor="middle">TOOLS · COMMANDS</text>
|
|
76
|
-
<text class="node-title" x="1130" y="204">模型工具与 /mnemon 命令</text>
|
|
77
|
-
<text class="node-copy" x="1130" y="231">显式召回、沉淀、关系、状态与维护</text>
|
|
78
|
-
</g>
|
|
79
|
-
|
|
80
|
-
<g aria-hidden="true">
|
|
81
|
-
<path class="flow" d="M279 250 V281 H1298 V350"/>
|
|
82
|
-
<path class="flow flow-supervised" d="M800 250 V350"/>
|
|
83
|
-
<path class="flow" d="M1321 250 V292 H800 V350"/>
|
|
84
|
-
<text class="flow-label" x="1042" y="276">typed RPC</text>
|
|
85
|
-
<text class="flow-label" x="815" y="302">工具调用</text>
|
|
86
|
-
</g>
|
|
87
|
-
|
|
88
|
-
<text class="section-title" x="80" y="337">DSH HOST · DSH-MNEMON 控制与监督层</text>
|
|
89
|
-
|
|
90
|
-
<g aria-hidden="true">
|
|
91
|
-
<path class="flow bus-line" d="M300 476 V498"/>
|
|
92
|
-
<path class="flow flow-supervised bus-line" d="M800 476 V498"/>
|
|
93
|
-
<path class="flow bus-line" d="M1300 476 V498"/>
|
|
94
|
-
<path class="flow bus-line" d="M245 498 H1300"/>
|
|
95
|
-
<path class="flow" d="M245 498 V520"/>
|
|
96
|
-
<path class="flow" d="M615 498 V520"/>
|
|
97
|
-
<path class="flow" d="M985 498 V520"/>
|
|
98
|
-
<path class="flow" d="M990 630 H1190"/>
|
|
99
|
-
</g>
|
|
100
|
-
|
|
101
|
-
<g aria-label="监督与权限组件">
|
|
102
|
-
<rect class="card" x="100" y="350" width="400" height="126" rx="17"/>
|
|
103
|
-
<text class="node-title" x="126" y="390">Prompt 与 Lifecycle</text>
|
|
104
|
-
<text class="node-copy" x="126" y="420">热记忆注入 · 短提示 · 活动评分</text>
|
|
105
|
-
<text class="node-code" x="126" y="448">pre-step · turn/end · idle review</text>
|
|
106
|
-
|
|
107
|
-
<rect class="card" x="600" y="350" width="400" height="126" rx="17"/>
|
|
108
|
-
<text class="node-title" x="626" y="390">Subagent Coordinator</text>
|
|
109
|
-
<text class="node-copy" x="626" y="420">spawn 隔离任务 · fork 已完成 checkpoint</text>
|
|
110
|
-
<text class="node-code" x="626" y="448">persona · allowlist · schema · depth=1</text>
|
|
111
|
-
|
|
112
|
-
<rect class="card" x="1100" y="350" width="400" height="126" rx="17"/>
|
|
113
|
-
<text class="node-title" x="1126" y="390">RPC 与权限边界</text>
|
|
114
|
-
<text class="node-copy" x="1126" y="420">trusted-host 读取 · loopback 写入</text>
|
|
115
|
-
<text class="node-code" x="1126" y="448">read · write · settings channels</text>
|
|
116
|
-
</g>
|
|
117
|
-
|
|
118
|
-
<g aria-label="确定性控制组件">
|
|
119
|
-
<rect class="card" x="80" y="520" width="330" height="110" rx="16"/>
|
|
120
|
-
<text class="node-title" x="104" y="559">Runtime Memory</text>
|
|
121
|
-
<text class="node-copy" x="104" y="587">JSON 事实源 · Markdown 投影</text>
|
|
122
|
-
<text class="node-code" x="104" y="612">lock · revision · UTF-8</text>
|
|
123
|
-
|
|
124
|
-
<rect class="card" x="450" y="520" width="330" height="110" rx="16"/>
|
|
125
|
-
<text class="node-title" x="474" y="559">Documents</text>
|
|
126
|
-
<text class="node-copy" x="474" y="587">索引 · 检索 · active / archived</text>
|
|
127
|
-
<text class="node-code" x="474" y="612">path boundary · LRU · SHA-256</text>
|
|
128
|
-
|
|
129
|
-
<rect class="card" x="820" y="520" width="330" height="110" rx="16"/>
|
|
130
|
-
<text class="node-title" x="844" y="559">Mnemon Service</text>
|
|
131
|
-
<text class="node-copy" x="844" y="587">记忆体路由 · 召回 · 关系 · 图谱</text>
|
|
132
|
-
<text class="node-code" x="844" y="612">active read · targeted write</text>
|
|
133
|
-
|
|
134
|
-
<rect class="card" x="1190" y="520" width="280" height="110" rx="16"/>
|
|
135
|
-
<text class="node-title" x="1214" y="559">CLI Runner</text>
|
|
136
|
-
<text class="node-copy" x="1214" y="587">参数数组 · 禁用 shell</text>
|
|
137
|
-
<text class="node-code" x="1214" y="612">serialized · timeout</text>
|
|
138
|
-
</g>
|
|
139
|
-
|
|
140
|
-
<g aria-hidden="true">
|
|
141
|
-
<path class="flow flow-hot" d="M245 630 V760"/>
|
|
142
|
-
<path class="flow flow-doc" d="M615 630 V724 H800 V760"/>
|
|
143
|
-
<path class="flow flow-long" d="M1330 630 V724 H1310 V760"/>
|
|
144
|
-
<text class="flow-label" x="262" y="718">每轮投影</text>
|
|
145
|
-
<text class="flow-label" x="632" y="714">受管 Markdown</text>
|
|
146
|
-
<text class="flow-label" x="1344" y="713">本地 CLI</text>
|
|
147
|
-
</g>
|
|
148
|
-
|
|
149
|
-
<g aria-label="三层本地存储">
|
|
150
|
-
<rect class="card card-hot" x="64" y="760" width="440" height="194" rx="20"/>
|
|
151
|
-
<rect class="bar-hot" x="88" y="784" width="9" height="48" rx="4.5"/>
|
|
152
|
-
<text class="store-title" x="116" y="809">运行时热记忆</text>
|
|
153
|
-
<text class="node-code" x="116" y="834"><storageRoot>/runtime</text>
|
|
154
|
-
<text class="store-copy" x="88" y="870">memories.json 是唯一事实源</text>
|
|
155
|
-
<text class="store-copy" x="88" y="898">USER.md 4 KiB · MEMORY.md 10 KiB</text>
|
|
156
|
-
<text class="store-copy" x="88" y="926">紧凑内容每轮直接进入主上下文</text>
|
|
157
|
-
|
|
158
|
-
<rect class="card card-doc" x="580" y="760" width="440" height="194" rx="20"/>
|
|
159
|
-
<rect class="bar-doc" x="604" y="784" width="9" height="48" rx="4.5"/>
|
|
160
|
-
<text class="store-title" x="632" y="809">项目档案</text>
|
|
161
|
-
<text class="node-code" x="632" y="834"><storageRoot>/documents</text>
|
|
162
|
-
<text class="store-copy" x="604" y="870">index.json · active/ · archived/</text>
|
|
163
|
-
<text class="store-copy" x="604" y="898">保留完整 Markdown 叙事与来源</text>
|
|
164
|
-
<text class="store-copy" x="604" y="926">先建立冷引用,再迁移原文</text>
|
|
165
|
-
|
|
166
|
-
<rect class="card card-long" x="1096" y="760" width="440" height="194" rx="20"/>
|
|
167
|
-
<rect class="bar-long" x="1120" y="784" width="9" height="48" rx="4.5"/>
|
|
168
|
-
<text class="store-title" x="1148" y="809">Mnemon 记忆体</text>
|
|
169
|
-
<text class="node-code" x="1148" y="834"><storageRoot>/data/<space-id>/mnemon.db</text>
|
|
170
|
-
<text class="store-copy" x="1120" y="870">独立 SQLite Store · active 读取边界</text>
|
|
171
|
-
<text class="store-copy" x="1120" y="898">temporal · semantic · causal · entity</text>
|
|
172
|
-
<text class="store-copy" x="1120" y="926">跨会话、按需、带来源的长期证据</text>
|
|
173
|
-
</g>
|
|
174
|
-
|
|
175
|
-
<g aria-label="图例">
|
|
176
|
-
<line x1="70" y1="996" x2="112" y2="996" class="flow legend-line"/>
|
|
177
|
-
<text class="legend" x="124" y="1001">确定性数据 / 控制路径</text>
|
|
178
|
-
<line x1="346" y1="996" x2="388" y2="996" class="flow flow-supervised legend-line"/>
|
|
179
|
-
<text class="legend" x="400" y="1001">LLM 监督路径</text>
|
|
180
|
-
<text class="legend" x="1532" y="1001" text-anchor="end">所有持久数据位于选定 storageRoot</text>
|
|
181
|
-
</g>
|
|
182
|
-
</svg>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|