dsh-mnemon-source-memory-spaces 0.5.14 → 0.5.16

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.
@@ -235,6 +235,11 @@ export declare const EDGE_TYPES: readonly ["temporal", "semantic", "causal", "en
235
235
  export type Intent = 'WHY' | 'WHEN' | 'ENTITY' | 'GENERAL';
236
236
  export declare const INTENTS: readonly ["WHY", "WHEN", "ENTITY", "GENERAL"];
237
237
  export type RecallRelevanceTier = 'high' | 'medium' | 'low' | 'unknown';
238
+ /**
239
+ * One spelling-insensitive key per entity. The Host's entity index and the Client's graph
240
+ * both count an entity's memories by it, so their numbers agree.
241
+ */
242
+ export declare function normalizeEntityKey(entity: string): string;
238
243
  export interface Insight {
239
244
  id: string;
240
245
  content: string;
@@ -353,7 +358,8 @@ export interface MemoryGraphSnapshot {
353
358
  sources?: MemoryReadSource[];
354
359
  }
355
360
  export type MemoryReadMode = 'search' | 'graph' | 'projection' | 'enumerable' | 'query-only' | 'entities' | 'unsupported';
356
- export type MemoryReadStatus = 'ready' | 'empty' | 'query-required' | 'unsupported' | 'unavailable';
361
+ /** 'loading' is client-only: a page shows its spaces from the directory while the read runs. */
362
+ export type MemoryReadStatus = 'ready' | 'empty' | 'query-required' | 'unsupported' | 'unavailable' | 'loading';
357
363
  /**
358
364
  * One provider-backed Memory Space participating in a read surface.
359
365
  *
@@ -371,6 +377,10 @@ export interface MemoryReadSource {
371
377
  status: MemoryReadStatus;
372
378
  itemCount: number;
373
379
  edgeCount?: number;
380
+ /** Entity reads: the memories the entity index covers in this space. */
381
+ memoryCount?: number;
382
+ /** Entity reads: false when the Provider could not index every memory of this space. */
383
+ complete?: boolean;
374
384
  hint?: string;
375
385
  quality?: RecallQualityStats;
376
386
  }
@@ -505,15 +515,40 @@ export interface MemorySpacesStatus {
505
515
  dbPath?: string;
506
516
  };
507
517
  }
518
+ /**
519
+ * The entities of the active spaces. Each count is the number of memories that
520
+ * carry the entity, the same set entity-memories lists.
521
+ */
508
522
  export interface EntityView {
509
523
  items: Array<{
510
524
  entity: string;
511
525
  count: number;
512
526
  }>;
527
+ /** With a selected entity: the first page of entity-memories, kept for existing callers. */
513
528
  insights: Insight[];
514
529
  selected?: string;
515
530
  /** Omitted only when talking to a pre-provider-aware Host. */
516
531
  sources?: MemoryReadSource[];
532
+ /** Distinct entities across the active spaces; items may be capped below it. Omitted by older Hosts. */
533
+ total?: number;
534
+ /** False when a space's Provider could not index every memory. Omitted by older Hosts. */
535
+ complete?: boolean;
536
+ }
537
+ /** One page of the memories that carry an entity, by importance and then recency. */
538
+ export interface EntityMemoriesView {
539
+ /** The entity's most common spelling, or the requested name when no memory carries it. */
540
+ entity: string;
541
+ total: number;
542
+ offset: number;
543
+ items: Insight[];
544
+ complete: boolean;
545
+ sources: MemoryReadSource[];
546
+ }
547
+ /** Memories recall relates to an entity that do not carry it themselves. */
548
+ export interface EntityRelatedView {
549
+ entity: string;
550
+ items: Insight[];
551
+ sources: MemoryReadSource[];
517
552
  }
518
553
  /** @deprecated Use CreateMemorySpaceRequest. The wire shape is unchanged. */
519
554
  export type CreateMemoryBodyRequest = CreateMemorySpaceRequest;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-mnemon-source-memory-spaces",
3
- "version": "0.5.14",
3
+ "version": "0.5.16",
4
4
  "description": "Memory Spaces Source and its private Provider SDK.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -65,10 +65,10 @@
65
65
  "@types/node": "^22.0.0",
66
66
  "@types/react": "^18.3.0",
67
67
  "@types/react-dom": "^18.3.0",
68
- "dsh-mnemon": "^0.5.21",
68
+ "dsh-mnemon": "^0.5.24",
69
69
  "dsh-mnemon-provider-byterover": "^0.5.5",
70
70
  "dsh-mnemon-provider-hindsight": "^0.5.5",
71
- "dsh-mnemon-provider-holographic": "^0.5.5",
71
+ "dsh-mnemon-provider-holographic": "^0.5.6",
72
72
  "dsh-mnemon-provider-honcho": "^0.5.5",
73
73
  "dsh-mnemon-provider-mem0": "^0.5.5",
74
74
  "dsh-mnemon-provider-mnemon-native": "^0.5.8",
@@ -291,11 +291,23 @@
291
291
  "entities.filterHint": "输入时即时过滤左侧列表(按 Esc 清空)",
292
292
  "entities.emptyRail": "写入带实体的记忆后,这里会形成入口。",
293
293
  "entities.filterEmpty": "本地无匹配。点“查阅”向宿主发起查询。",
294
- "entities.loading": "正在沿实体关系召回…",
294
+ "entities.loading": "正在读取实体的记忆…",
295
295
  "entities.selectTitle": "选择或输入一个实体",
296
- "entities.selectText": "实体视图会聚合与它相关的记忆,而不是只做字面匹配。",
296
+ "entities.selectText": "选中后列出带有它的全部记忆;需要时,可再查找召回认为相关的其他记忆。",
297
297
  "entities.emptyTitle": "没有关联记忆",
298
298
  "entities.emptyText": "尝试更完整的名称或另一个实体别名。",
299
+ "entities.railLoading": "正在读取实体…",
300
+ "entities.memoriesHint": "带有此实体的记忆",
301
+ "entities.relatedTitle": "相关记忆",
302
+ "entities.relatedHint": "召回认为相关、但不带此实体的记忆",
303
+ "entities.findRelated": "查找相关记忆",
304
+ "entities.hideRelated": "收起",
305
+ "entities.noCarrying": "没有记忆带有此实体。",
306
+ "entities.noRelated": "没有其他相关记忆。",
307
+ "entities.retry": "重试",
308
+ "entities.sourceReady": "{count} 个实体",
309
+ "entities.sourcePartial": "{count} 个实体 · 部分",
310
+ "readSources.status.loading": "正在读取",
299
311
  "remember.title": "存入记忆",
300
312
  "remember.description": "任务 Agent 会判断是否值得保存,去重、提炼后写入合适的记忆空间,不占用当前对话。",
301
313
  "remember.readOnlyTitle": "当前为只读模式",
@@ -637,11 +649,23 @@
637
649
  "entities.filterHint": "Type to filter the rail locally (Esc to clear).",
638
650
  "entities.emptyRail": "Entities appear here after memories with entity metadata are stored.",
639
651
  "entities.filterEmpty": "No local match. Press Explore to query the host.",
640
- "entities.loading": "Recalling entity relations…",
652
+ "entities.loading": "Reading the entity's memories…",
641
653
  "entities.selectTitle": "Select or enter an entity",
642
- "entities.selectText": "The entity view aggregates related memories instead of relying on literal matching.",
654
+ "entities.selectText": "Selecting one lists every memory that carries it; Find related memories then adds others recall relates to it.",
643
655
  "entities.emptyTitle": "No related memories",
644
656
  "entities.emptyText": "Try the full name or another entity alias.",
657
+ "entities.railLoading": "Reading entities…",
658
+ "entities.memoriesHint": "Memories that carry this entity",
659
+ "entities.relatedTitle": "Related memories",
660
+ "entities.relatedHint": "Recalled as related, without this entity",
661
+ "entities.findRelated": "Find related memories",
662
+ "entities.hideRelated": "Hide",
663
+ "entities.noCarrying": "No memory carries this entity.",
664
+ "entities.noRelated": "No other related memories.",
665
+ "entities.retry": "Retry",
666
+ "entities.sourceReady": "{count} entities",
667
+ "entities.sourcePartial": "{count} entities · partial",
668
+ "readSources.status.loading": "Reading",
645
669
  "remember.title": "Save to memory",
646
670
  "remember.description": "A task Agent decides whether this is worth keeping, removes duplicates, distills it and writes it to the right Memory Space, outside this conversation.",
647
671
  "remember.readOnlyTitle": "Read-only mode",
@@ -376,6 +376,26 @@ button.readSourceCard:hover { background: var(--mn-hover); }
376
376
  .entityList button > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
377
377
  .entityList strong { flex: none; color: var(--mn-faint); font-size: 12px; font-weight: 400; font-variant-numeric: tabular-nums; }
378
378
  .entityResults > .emptyState { min-height: 360px; }
379
+ .entitySection { min-width: 0; }
380
+ .entitySection + .entitySection { margin-top: 24px; }
381
+ /* A section keeps its height while it loads, so the one below does not jump. */
382
+ .entitySectionBody { min-height: 116px; }
383
+ .entityQuiet { margin: 0 0 8px; padding: 12px 2px; color: var(--mn-faint); font-size: 13px; line-height: 20px; }
384
+ .entityRetry { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
385
+ .entityRelatedHead { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
386
+ .entityRelatedHead > div:first-child { flex: 1; min-width: 0; }
387
+ .entityRelatedHead > button { flex: none; margin-top: 2px; }
388
+ .insightSkeleton { position: relative; display: grid; min-height: 108px; align-content: start; gap: 12px; overflow: hidden; margin-bottom: 8px; padding: 16px; border: .5px solid var(--mn-card-line); border-radius: var(--dsw-radius-lg); }
389
+ .insightSkeleton > span { display: block; height: 10px; border-radius: 999px; background: var(--mn-fill); }
390
+ .insightSkeleton > span:nth-child(1) { width: 36%; }
391
+ .insightSkeleton > span:nth-child(2) { width: 94%; }
392
+ .insightSkeleton > span:nth-child(3) { width: 68%; }
393
+ .entityRailSkeleton { position: relative; display: block; height: 32px; overflow: hidden; border-radius: var(--dsw-radius-sm); background: color-mix(in srgb, var(--mn-fill) 55%, transparent); }
394
+ .insightSkeleton::after,
395
+ .entityRailSkeleton::after { position: absolute; inset: 0; content: ""; background: linear-gradient(105deg, transparent 20%, color-mix(in srgb, var(--mn-text) 5%, transparent) 45%, transparent 70%); transform: translateX(-120%); animation: entity-skeleton-sweep 1.2s ease-in-out infinite; pointer-events: none; }
396
+ @keyframes entity-skeleton-sweep { to { transform: translateX(120%); } }
397
+ @media (prefers-reduced-motion: reduce) { .insightSkeleton::after, .entityRailSkeleton::after { animation: none; } }
398
+ .readSourceCard[data-status="loading"] .readSourceSignal { background: var(--mn-idle); }
379
399
 
380
400
  .supervisedComposer { border: .5px solid var(--mn-card-line); border-radius: var(--dsw-radius-lg); }
381
401
  .supervisedComposer { overflow: hidden; }