dsh-mnemon 0.5.2 → 0.5.3
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 +63 -183
- package/README.zh-CN.md +66 -186
- package/SECURITY.md +6 -6
- package/lib/client.js +1578 -1273
- package/lib/extension-sdk.js +1 -9
- package/lib/index.js +399 -290
- package/lib/strategy-configuration-B_DsZRQG.js +90 -0
- package/lib/types/src/client/locales.d.ts +976 -900
- package/lib/types/src/host/config-values.d.ts +6 -6
- package/lib/types/src/host/config.d.ts +2 -4
- package/lib/types/src/host/protocol.d.ts +10 -1
- package/lib/types/src/sdk/strategy-configuration.d.ts +5 -0
- package/package.json +19 -18
- package/lib/storage-lock-Bqrhkyag.js +0 -20
|
@@ -7,9 +7,9 @@ export declare const MAX_RUNTIME_MAINTENANCE_MAX_TOKENS = 1000000;
|
|
|
7
7
|
export { DEFAULT_EMBEDDING_ENDPOINT, DEFAULT_EMBEDDING_MODEL, DEFAULT_EMBEDDING_PROTOCOL, MNEMON_EMBEDDING_PROTOCOLS } from "./protocol.ts";
|
|
8
8
|
export declare const DEFAULT_TIMEOUT_MS = 10000;
|
|
9
9
|
export declare const DEFAULT_RECALL_LIMIT = 10;
|
|
10
|
-
export declare const DEFAULT_RECALL_QUALITY_POLICY
|
|
11
|
-
export declare const DEFAULT_RECALL_LOW_SCORE_THRESHOLD
|
|
12
|
-
export declare const DEFAULT_RECALL_HIGH_SCORE_THRESHOLD
|
|
13
|
-
export declare const DEFAULT_RECALL_CANDIDATE_MULTIPLIER
|
|
14
|
-
export declare const DEFAULT_RECALL_MAX_MEDIUM_RESULTS
|
|
15
|
-
export declare const DEFAULT_RECALL_MAX_UNKNOWN_RESULTS
|
|
10
|
+
export declare const DEFAULT_RECALL_QUALITY_POLICY: string;
|
|
11
|
+
export declare const DEFAULT_RECALL_LOW_SCORE_THRESHOLD: number;
|
|
12
|
+
export declare const DEFAULT_RECALL_HIGH_SCORE_THRESHOLD: number;
|
|
13
|
+
export declare const DEFAULT_RECALL_CANDIDATE_MULTIPLIER: number;
|
|
14
|
+
export declare const DEFAULT_RECALL_MAX_MEDIUM_RESULTS: number;
|
|
15
|
+
export declare const DEFAULT_RECALL_MAX_UNKNOWN_RESULTS: number;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import z from 'schemastery';
|
|
2
|
-
|
|
2
|
+
export { resolveEmbedding, resolvePersistenceStrategy, resolveRecallQuality } from 'dsh-mnemon-source-memory-spaces';
|
|
3
|
+
import type { Config as SharedConfig, CustomPackConfig as SharedCustomPackConfig, InteractionConfig as SharedInteractionConfig, ResolvedConfig as SharedResolvedConfig, ResolvedInteractionConfig as SharedResolvedInteractionConfig } from "./protocol.ts";
|
|
3
4
|
export { DEFAULT_IDLE_REVIEW_MS, DEFAULT_EMBEDDING_ENDPOINT, DEFAULT_EMBEDDING_MODEL, DEFAULT_EMBEDDING_PROTOCOL, DEFAULT_RECALL_CANDIDATE_MULTIPLIER, DEFAULT_RECALL_HIGH_SCORE_THRESHOLD, DEFAULT_RECALL_LIMIT, DEFAULT_RECALL_LOW_SCORE_THRESHOLD, DEFAULT_RECALL_MAX_MEDIUM_RESULTS, DEFAULT_RECALL_MAX_UNKNOWN_RESULTS, DEFAULT_RECALL_QUALITY_POLICY, DEFAULT_RUNTIME_MAINTENANCE_MAX_TOKENS, DEFAULT_RUNTIME_MEMORY_LIMIT_BYTES, DEFAULT_RUNTIME_USER_LIMIT_BYTES, DEFAULT_TIMEOUT_MS, MAX_RUNTIME_MAINTENANCE_MAX_TOKENS, MAX_RUNTIME_MEMORY_LIMIT_BYTES, } from './config-values.ts';
|
|
4
5
|
export type Config = SharedConfig;
|
|
5
6
|
export type CustomPackConfig = SharedCustomPackConfig;
|
|
@@ -9,7 +10,4 @@ export type ResolvedInteractionConfig = SharedResolvedInteractionConfig;
|
|
|
9
10
|
export declare const InteractionConfig: z<InteractionConfig>;
|
|
10
11
|
export declare const Config: z<Config>;
|
|
11
12
|
export declare function resolveInteractionConfig(config?: InteractionConfig): ResolvedInteractionConfig;
|
|
12
|
-
export declare function resolvePersistenceStrategy(value: MemoryPersistenceStrategy | undefined): ResolvedConfig['persistenceStrategy'];
|
|
13
|
-
export declare function resolveEmbedding(value: Config['embedding']): ResolvedConfig['embedding'];
|
|
14
|
-
export declare function resolveRecallQuality(value: RecallQualityConfig | undefined): ResolvedConfig['recallQuality'];
|
|
15
13
|
export declare function resolveConfig(config?: Config): ResolvedConfig;
|
|
@@ -511,7 +511,8 @@ export interface MnemonPackImportResult {
|
|
|
511
511
|
components: MnemonPackComponent[];
|
|
512
512
|
summary: MnemonPackComponentSummary[];
|
|
513
513
|
}
|
|
514
|
-
export type
|
|
514
|
+
export type VersionPackageId = `dsh-mnemon-${'source' | 'strategy' | 'provider'}-${string}`;
|
|
515
|
+
export type VersionComponentId = 'mnemon' | 'dsh-mnemon' | VersionPackageId;
|
|
515
516
|
export type VersionInstallMode = 'homebrew' | 'go' | 'npm' | 'link' | 'manual' | 'missing';
|
|
516
517
|
export interface VersionComponentStatus {
|
|
517
518
|
id: VersionComponentId;
|
|
@@ -526,6 +527,14 @@ export interface VersionComponentStatus {
|
|
|
526
527
|
updateSupported: boolean;
|
|
527
528
|
updateHint: string;
|
|
528
529
|
checkError?: string;
|
|
530
|
+
restartRequired?: boolean;
|
|
531
|
+
packages?: VersionPackageStatus[];
|
|
532
|
+
}
|
|
533
|
+
export interface VersionPackageStatus extends VersionComponentStatus {
|
|
534
|
+
id: VersionPackageId;
|
|
535
|
+
kind: 'source' | 'strategy' | 'provider';
|
|
536
|
+
managedBy: 'starter' | 'profile';
|
|
537
|
+
expectedVersion?: string;
|
|
529
538
|
}
|
|
530
539
|
export interface VersionStatus {
|
|
531
540
|
checkedAt: string;
|
|
@@ -6,6 +6,7 @@ export interface MemoryStrategyConfigurationField {
|
|
|
6
6
|
key: string;
|
|
7
7
|
label: MemoryLocalizedText;
|
|
8
8
|
description?: MemoryLocalizedText;
|
|
9
|
+
/** Numbers are finite integers; lists have at most 32 unique, nonempty strings. */
|
|
9
10
|
input: 'number' | 'text' | 'textarea' | 'string-list' | 'source-list';
|
|
10
11
|
defaultValue?: MemoryJsonValue;
|
|
11
12
|
minimum?: number;
|
|
@@ -29,3 +30,7 @@ export interface MemoryStrategyConfiguration {
|
|
|
29
30
|
create(config: Record<string, MemoryJsonValue>): MemoryInstallContribution;
|
|
30
31
|
}
|
|
31
32
|
export declare function defineMemoryStrategyConfiguration(value: Omit<MemoryStrategyConfiguration, 'apiVersion'>): MemoryStrategyConfiguration;
|
|
33
|
+
/** Host discovery also validates modules that do not use the author helper. */
|
|
34
|
+
export declare function readMemoryStrategyConfiguration(value: MemoryStrategyConfiguration): MemoryStrategyConfiguration;
|
|
35
|
+
/** Validate and copy supplied values without applying defaults or executing code. */
|
|
36
|
+
export declare function memoryStrategyConfigurationValues(definition: MemoryStrategyConfiguration, input: unknown): Record<string, MemoryJsonValue>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-mnemon",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.3",
|
|
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",
|
|
@@ -126,8 +126,9 @@
|
|
|
126
126
|
"verify:headless": "node scripts/verify-headless-profile.mjs",
|
|
127
127
|
"verify:package": "node scripts/verify-package-contents.mjs && node scripts/verify-public-entries.mjs && pnpm run lint:package",
|
|
128
128
|
"verify:plugins": "node scripts/verify-plugin-artifacts.mjs",
|
|
129
|
+
"verify:docs": "node scripts/verify-docs.mjs",
|
|
129
130
|
"e2e:serve": "node scripts/serve-e2e.mjs",
|
|
130
|
-
"verify": "pnpm run typecheck && pnpm run verify:build && pnpm --workspace-concurrency=4 -r build && pnpm -r typecheck && pnpm -r test && pnpm run test:root && pnpm run verify:headless && pnpm run verify:package",
|
|
131
|
+
"verify": "pnpm run verify:docs && pnpm run typecheck && pnpm run verify:build && pnpm --workspace-concurrency=4 -r build && pnpm -r typecheck && pnpm -r test && pnpm run test:root && pnpm run verify:headless && pnpm run verify:package",
|
|
131
132
|
"changeset": "changeset",
|
|
132
133
|
"release:intent": "node scripts/check-release-intent.mjs",
|
|
133
134
|
"release:status": "changeset status",
|
|
@@ -137,22 +138,22 @@
|
|
|
137
138
|
"release:check": "node scripts/release.mjs --check"
|
|
138
139
|
},
|
|
139
140
|
"dependencies": {
|
|
140
|
-
"dsh-mnemon-provider-byterover": "0.5.
|
|
141
|
-
"dsh-mnemon-provider-hindsight": "0.5.
|
|
142
|
-
"dsh-mnemon-provider-holographic": "0.5.
|
|
143
|
-
"dsh-mnemon-provider-honcho": "0.5.
|
|
144
|
-
"dsh-mnemon-provider-mem0": "0.5.
|
|
145
|
-
"dsh-mnemon-provider-mnemon-native": "0.5.
|
|
146
|
-
"dsh-mnemon-provider-openviking": "0.5.
|
|
147
|
-
"dsh-mnemon-provider-retaindb": "0.5.
|
|
148
|
-
"dsh-mnemon-provider-supermemory": "0.5.
|
|
149
|
-
"dsh-mnemon-source-documents": "0.5.
|
|
150
|
-
"dsh-mnemon-source-memory-spaces": "0.5.
|
|
151
|
-
"dsh-mnemon-source-runtime": "0.5.
|
|
152
|
-
"dsh-mnemon-strategy-auto-capture": "0.5.
|
|
153
|
-
"dsh-mnemon-strategy-default-three-tier": "0.5.
|
|
154
|
-
"dsh-mnemon-strategy-light-context": "0.5.
|
|
155
|
-
"dsh-mnemon-strategy-scoped": "0.5.
|
|
141
|
+
"dsh-mnemon-provider-byterover": "0.5.3",
|
|
142
|
+
"dsh-mnemon-provider-hindsight": "0.5.3",
|
|
143
|
+
"dsh-mnemon-provider-holographic": "0.5.3",
|
|
144
|
+
"dsh-mnemon-provider-honcho": "0.5.3",
|
|
145
|
+
"dsh-mnemon-provider-mem0": "0.5.3",
|
|
146
|
+
"dsh-mnemon-provider-mnemon-native": "0.5.3",
|
|
147
|
+
"dsh-mnemon-provider-openviking": "0.5.3",
|
|
148
|
+
"dsh-mnemon-provider-retaindb": "0.5.3",
|
|
149
|
+
"dsh-mnemon-provider-supermemory": "0.5.3",
|
|
150
|
+
"dsh-mnemon-source-documents": "0.5.3",
|
|
151
|
+
"dsh-mnemon-source-memory-spaces": "0.5.3",
|
|
152
|
+
"dsh-mnemon-source-runtime": "0.5.3",
|
|
153
|
+
"dsh-mnemon-strategy-auto-capture": "0.5.3",
|
|
154
|
+
"dsh-mnemon-strategy-default-three-tier": "0.5.3",
|
|
155
|
+
"dsh-mnemon-strategy-light-context": "0.5.3",
|
|
156
|
+
"dsh-mnemon-strategy-scoped": "0.5.3",
|
|
156
157
|
"fflate": "^0.8.3",
|
|
157
158
|
"schemastery": "^3.18.0",
|
|
158
159
|
"zod": "^4.4.3"
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { resolve } from "node:path";
|
|
2
|
-
//#region src/sdk/storage-lock.ts
|
|
3
|
-
const queues = /* @__PURE__ */ new Map();
|
|
4
|
-
/**
|
|
5
|
-
* Serialize in-process work on one local storage root, including work from
|
|
6
|
-
* independently loaded plugins. File locks still own cross-process safety.
|
|
7
|
-
* Callers must not acquire the same root recursively.
|
|
8
|
-
*/
|
|
9
|
-
function withMemoryStorageLock(directory, operation) {
|
|
10
|
-
const key = resolve(directory);
|
|
11
|
-
const result = (queues.get(key) ?? Promise.resolve()).then(operation);
|
|
12
|
-
const settled = result.then(() => {}, () => {});
|
|
13
|
-
queues.set(key, settled);
|
|
14
|
-
settled.then(() => {
|
|
15
|
-
if (queues.get(key) === settled) queues.delete(key);
|
|
16
|
-
});
|
|
17
|
-
return result;
|
|
18
|
-
}
|
|
19
|
-
//#endregion
|
|
20
|
-
export { withMemoryStorageLock as t };
|