dsh-mnemon 0.5.34 → 0.5.36

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.
@@ -6,20 +6,20 @@ var dependencies = {
6
6
  "@deepseek-ai/cosmokit": "^1.8.5",
7
7
  "@deepseek-ai/schemastery": "^3.18.4",
8
8
  "dsh-mnemon-provider-byterover": "0.5.5",
9
- "dsh-mnemon-provider-hindsight": "0.5.6",
10
- "dsh-mnemon-provider-holographic": "0.5.6",
9
+ "dsh-mnemon-provider-hindsight": "0.5.7",
10
+ "dsh-mnemon-provider-holographic": "0.5.7",
11
11
  "dsh-mnemon-provider-honcho": "0.5.5",
12
12
  "dsh-mnemon-provider-mem0": "0.5.5",
13
- "dsh-mnemon-provider-mnemon-native": "0.5.9",
14
- "dsh-mnemon-provider-openviking": "0.5.8",
13
+ "dsh-mnemon-provider-mnemon-native": "0.5.10",
14
+ "dsh-mnemon-provider-openviking": "0.5.10",
15
15
  "dsh-mnemon-provider-retaindb": "0.5.6",
16
16
  "dsh-mnemon-provider-supermemory": "0.5.5",
17
17
  "dsh-mnemon-source-documents": "0.5.11",
18
- "dsh-mnemon-source-memory-spaces": "0.5.22",
19
- "dsh-mnemon-source-runtime": "0.5.15",
20
- "dsh-mnemon-source-skills": "0.5.1",
18
+ "dsh-mnemon-source-memory-spaces": "0.5.23",
19
+ "dsh-mnemon-source-runtime": "0.5.16",
20
+ "dsh-mnemon-source-skills": "0.5.3",
21
21
  "dsh-mnemon-strategy-auto-capture": "0.5.5",
22
- "dsh-mnemon-strategy-default-three-tier": "0.5.10",
22
+ "dsh-mnemon-strategy-default-three-tier": "0.5.11",
23
23
  "dsh-mnemon-strategy-general": "0.5.1",
24
24
  "dsh-mnemon-strategy-light-context": "0.5.6",
25
25
  "dsh-mnemon-strategy-scoped": "0.5.5",
package/lib/starter.js CHANGED
@@ -1,4 +1,4 @@
1
- import { t as prepareStarterResolution } from "./starter-resolution-C2TDVxDr.js";
1
+ import { t as prepareStarterResolution } from "./starter-resolution-BVUz3pw4.js";
2
2
  //#region src/starter.ts
3
3
  const name = "dsh-mnemon-starter";
4
4
  const provide = ["mnemonStarterReady"];
@@ -1,6 +1,7 @@
1
1
  import { n as deepFreeze, t as canonicalMemoryJson } from "./definitions-DU7MLBhu.js";
2
- import { resolve } from "node:path";
2
+ import { dirname, isAbsolute, join, resolve } from "node:path";
3
3
  import { createHash, randomUUID } from "node:crypto";
4
+ import { realpathSync, statSync } from "node:fs";
4
5
  //#region src/sdk/storage-lock.ts
5
6
  const queues = /* @__PURE__ */ new Map();
6
7
  /**
@@ -19,6 +20,37 @@ function withMemoryStorageLock(directory, operation) {
19
20
  return result;
20
21
  }
21
22
  //#endregion
23
+ //#region src/sdk/workspace-storage.ts
24
+ /** Local workspace identity, including aliases with not-yet-created descendants. */
25
+ function canonicalWorkspacePath(workspacePath) {
26
+ if (!isAbsolute(workspacePath) || workspacePath.includes("\0")) throw new Error("Workspace path must be absolute");
27
+ let parent = resolve(workspacePath);
28
+ const suffix = [];
29
+ for (;;) {
30
+ let real;
31
+ try {
32
+ real = realpathSync.native(parent);
33
+ } catch (error) {
34
+ if (error.code !== "ENOENT") throw error;
35
+ const next = dirname(parent);
36
+ if (next === parent) throw error;
37
+ suffix.unshift(parent.slice(next.length).replace(/^[/\\]+/u, ""));
38
+ parent = next;
39
+ continue;
40
+ }
41
+ if (suffix.length > 0 && !statSync(real).isDirectory()) throw Object.assign(/* @__PURE__ */ new Error(`ENOTDIR: not a directory, realpath '${parent}'`), {
42
+ code: "ENOTDIR",
43
+ path: parent,
44
+ syscall: "realpath"
45
+ });
46
+ return join(real, ...suffix);
47
+ }
48
+ }
49
+ /** A rename or move selects a new directory; resolving identity never writes. */
50
+ function workspaceStorageId(workspacePath) {
51
+ return createHash("sha256").update(canonicalWorkspacePath(workspacePath)).digest("hex");
52
+ }
53
+ //#endregion
22
54
  //#region src/sdk/input.ts
23
55
  /** Stable digest of validated configuration; raw values never enter diagnostics. */
24
56
  function memoryConfigurationDigest(value) {
@@ -156,4 +188,4 @@ function memoryStrategyConfigurationValues(definition, input) {
156
188
  return config;
157
189
  }
158
190
  //#endregion
159
- export { memoryConfigurationDigest as a, record as c, truncate as d, withMemoryStorageLock as f, integer as i, stringArray as l, memoryStrategyConfigurationValues as n, migrationLineage as o, readMemoryStrategyConfiguration as r, receipt as s, defineMemoryStrategyConfiguration as t, text as u };
191
+ export { memoryConfigurationDigest as a, record as c, truncate as d, canonicalWorkspacePath as f, integer as i, stringArray as l, withMemoryStorageLock as m, memoryStrategyConfigurationValues as n, migrationLineage as o, workspaceStorageId as p, readMemoryStrategyConfiguration as r, receipt as s, defineMemoryStrategyConfiguration as t, text as u };
@@ -328,6 +328,8 @@ export declare const zh: {
328
328
  'storage.directoryExample': string;
329
329
  'storage.thisWorkspace': string;
330
330
  'storage.moveNote': string;
331
+ 'storage.chooseDirectory': string;
332
+ 'storage.pickFailed': string;
331
333
  'config.scopeTitle': string;
332
334
  'config.global': string;
333
335
  'config.workspace': string;
@@ -615,6 +617,7 @@ export declare const zh: {
615
617
  'config.syncNow': string;
616
618
  'config.syncNowRunning': string;
617
619
  'config.syncDone': string;
620
+ 'config.runtimeMergeArchived': string;
618
621
  'config.syncDoneMerged': string;
619
622
  'config.syncUpToDate': string;
620
623
  'config.syncUpToDateMerged': string;
@@ -756,6 +759,10 @@ export declare const zh: {
756
759
  'review.rejectedHint': string;
757
760
  'skills.label': string;
758
761
  'skills.evolution': string;
762
+ 'skills.allowCreate': string;
763
+ 'skills.allowCreateHint': string;
764
+ 'skills.allowUpdate': string;
765
+ 'skills.allowUpdateHint': string;
759
766
  'skills.evolutionHint': string;
760
767
  'skills.autoBacktest': string;
761
768
  'skills.autoBacktestHint': string;
@@ -12,4 +12,5 @@ export declare const DEFAULT_RECALL_LOW_SCORE_THRESHOLD: number;
12
12
  export declare const DEFAULT_RECALL_HIGH_SCORE_THRESHOLD: number;
13
13
  export declare const DEFAULT_RECALL_CANDIDATE_MULTIPLIER: number;
14
14
  export declare const DEFAULT_RECALL_MAX_MEDIUM_RESULTS: number;
15
+ export declare const DEFAULT_RECALL_MAX_RANKED_RESULTS: number;
15
16
  export declare const DEFAULT_RECALL_MAX_UNKNOWN_RESULTS: number;
@@ -1,7 +1,7 @@
1
1
  import z from '@deepseek-ai/schemastery';
2
2
  export { resolveEmbedding, resolvePersistenceStrategy, resolveRecallQuality } from 'dsh-mnemon-source-memory-spaces';
3
3
  import type { Config as SharedConfig, CustomPackConfig as SharedCustomPackConfig, InteractionConfig as SharedInteractionConfig, ResolvedConfig as SharedResolvedConfig, ResolvedInteractionConfig as SharedResolvedInteractionConfig, ResolvedSkillsConfig } from "./protocol.ts";
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
+ 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_RANKED_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';
5
5
  export type Config = SharedConfig;
6
6
  export type CustomPackConfig = SharedCustomPackConfig;
7
7
  export type InteractionConfig = SharedInteractionConfig;
@@ -418,6 +418,10 @@ export type SkillsConfig = Partial<ResolvedSkillsConfig>;
418
418
  export interface ResolvedSkillsConfig {
419
419
  /** Review finished conversations in the background and suggest new or better skills. */
420
420
  evolution: boolean;
421
+ /** Allow reviews to suggest new skills. Existing suggestions remain actionable. */
422
+ allowCreate: boolean;
423
+ /** Allow reviews to suggest changes to existing skills. */
424
+ allowUpdate: boolean;
421
425
  /** Backtest a draft against the current version as soon as it is written. */
422
426
  autoBacktest: boolean;
423
427
  /** The one-line skills bar under a finished turn. */
@@ -772,6 +776,8 @@ export interface MnemonPackTarget {
772
776
  root: string;
773
777
  scope: StorageScopeKind;
774
778
  defaultRoot: string;
779
+ /** Optional on older Hosts; only a native DSH backend can open an OS chooser. */
780
+ nativeDirectoryPicker?: boolean;
775
781
  }
776
782
  export interface MnemonPackExport {
777
783
  fileName: string;
@@ -796,10 +802,12 @@ export interface MnemonPackPreview {
796
802
  * leaves an entry out because a tombstone still hides it has to say how many.
797
803
  */
798
804
  export interface MnemonRuntimeMergeReport {
799
- /** Incoming entries this merge wrote into the data directory. */
805
+ /** Incoming entries this merge admitted to hot runtime memory. */
800
806
  added: number;
801
807
  /** Incoming entries a tombstone still hides, so the merge left them out. */
802
808
  held: number;
809
+ /** Exact MEMORY records newly saved in the local import-overflow archive. */
810
+ archived?: number;
803
811
  }
804
812
  export interface MnemonPackImportResult {
805
813
  imported: true;
@@ -7,4 +7,5 @@ export { defineMemoryStrategyConfiguration } from './strategy-configuration.ts';
7
7
  export { defineMemoryViewExtension, memoryViewExtensionValues, validateMemoryViewExtension } from './view-extensions.ts';
8
8
  export type { MemoryStrategyConfiguration, MemoryStrategyConfigurationField, MemoryLocalizedText } from './strategy-configuration.ts';
9
9
  export { withMemoryStorageLock } from './storage-lock.ts';
10
+ export { canonicalWorkspacePath, workspaceStorageId } from './workspace-storage.ts';
10
11
  export type { ComposableMemoryView, MemoryActionOffer, MemoryCompositionEvaluationReport, MemoryEvidence, MemoryMutationReceipt, MemoryPluginDescriptor, MemoryPluginLocalizedText, MemoryPluginProvidedCapability, MemoryPluginRole, MemoryMutationCompletion, MemoryReadGrant, MemorySourceDefinition, MemorySourceFacts, MemoryAvailableSource, MemorySourceManifest, MemorySourcePresentation, MemorySourcePresentationItem, MemorySourceRuntime, MemorySourceViewContext, MemoryStrategyDefinition, MemoryStrategyExtensionDefinition, MemoryStrategyExtensionManifest, MemoryStrategyContribution, MemoryStrategyTurn, MemoryStrategyReadRequest, MemoryStrategyRead, MemoryStrategyManifest, MemoryViewRequest, MemoryViewSourcePresentation, MemoryViewSpec, MemoryViewGuidance, MemoryViewExtensionSlot, MemoryViewExtensionValues, } from "../core/contracts/index.ts";
@@ -0,0 +1,4 @@
1
+ /** Local workspace identity, including aliases with not-yet-created descendants. */
2
+ export declare function canonicalWorkspacePath(workspacePath: string): string;
3
+ /** A rename or move selects a new directory; resolving identity never writes. */
4
+ export declare function workspaceStorageId(workspacePath: string): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-mnemon",
3
- "version": "0.5.34",
3
+ "version": "0.5.36",
4
4
  "description": "Composable, view-based context for DeepSeek Harness. Pluggable sources and strategies, with layered memory and self-evolving skills out of the box.",
5
5
  "keywords": [
6
6
  "deepseek-harness",
@@ -156,20 +156,20 @@
156
156
  "@deepseek-ai/cosmokit": "^1.8.5",
157
157
  "@deepseek-ai/schemastery": "^3.18.4",
158
158
  "dsh-mnemon-provider-byterover": "0.5.5",
159
- "dsh-mnemon-provider-hindsight": "0.5.6",
160
- "dsh-mnemon-provider-holographic": "0.5.6",
159
+ "dsh-mnemon-provider-hindsight": "0.5.7",
160
+ "dsh-mnemon-provider-holographic": "0.5.7",
161
161
  "dsh-mnemon-provider-honcho": "0.5.5",
162
162
  "dsh-mnemon-provider-mem0": "0.5.5",
163
- "dsh-mnemon-provider-mnemon-native": "0.5.9",
164
- "dsh-mnemon-provider-openviking": "0.5.8",
163
+ "dsh-mnemon-provider-mnemon-native": "0.5.10",
164
+ "dsh-mnemon-provider-openviking": "0.5.10",
165
165
  "dsh-mnemon-provider-retaindb": "0.5.6",
166
166
  "dsh-mnemon-provider-supermemory": "0.5.5",
167
167
  "dsh-mnemon-source-documents": "0.5.11",
168
- "dsh-mnemon-source-memory-spaces": "0.5.22",
169
- "dsh-mnemon-source-runtime": "0.5.15",
170
- "dsh-mnemon-source-skills": "0.5.1",
168
+ "dsh-mnemon-source-memory-spaces": "0.5.23",
169
+ "dsh-mnemon-source-runtime": "0.5.16",
170
+ "dsh-mnemon-source-skills": "0.5.3",
171
171
  "dsh-mnemon-strategy-auto-capture": "0.5.5",
172
- "dsh-mnemon-strategy-default-three-tier": "0.5.10",
172
+ "dsh-mnemon-strategy-default-three-tier": "0.5.11",
173
173
  "dsh-mnemon-strategy-general": "0.5.1",
174
174
  "dsh-mnemon-strategy-light-context": "0.5.6",
175
175
  "dsh-mnemon-strategy-scoped": "0.5.5",