dsh-mnemon-source-memory-spaces 0.5.18 → 0.5.20

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.
@@ -1,5 +1,5 @@
1
1
  import { CATEGORIES, EDGE_TYPES, INTENTS, SOURCES } from "./contracts.js";
2
- import { i as NORMALIZED_RELEVANCE_SCORE, n as ProcessError, r as runProcess, t as DEFAULT_MAX_OUTPUT_BYTES } from "./process-DIK9NnTg.js";
2
+ import { i as runProcess, n as DEFAULT_MAX_OUTPUT_BYTES, r as ProcessError, t as NORMALIZED_RELEVANCE_SCORE } from "./adapter-D-BnWkko.js";
3
3
  import { i as defineMemorySpaceProviderDefinition, r as defineMemorySpaceProvider, t as MEMORY_SPACE_PROVIDER_API_VERSION } from "./definitions-DfmOqJjR.js";
4
4
  //#region src/providers/http.ts
5
5
  function jsonObject(value) {
@@ -1,4 +1,4 @@
1
- import type { CreateMemorySpaceRequest, EntityMemoriesView, EntityRelatedView, EntityView, Insight, MemorySpace, MemorySpaceView, MemorySpaceMetadataMaintenanceResult, MemorySpaceCatalog, MemoryGraphSnapshot, MemoryListRequest, MemoryListView, MemoryReadSource, RememberRequest, SearchRequest, UpdateMemorySpaceRequest } from '../contracts.ts';
1
+ import type { CreateMemorySpaceRequest, EntityMemoriesView, EntityRelatedView, EntityView, Insight, MemorySpace, MemorySpaceView, MemorySpaceMetadataMaintenanceResult, MemorySpaceCatalog, MemorySpaceRediscovery, MemoryGraphSnapshot, MemoryListRequest, MemoryListView, MemoryReadSource, RememberRequest, SearchRequest, UpdateMemorySpaceRequest } from '../contracts.ts';
2
2
  /**
3
3
  * Source-owned structural page API; the default bundle may supply agent-assisted callbacks.
4
4
  * body/bodies method and wire-field spellings remain compatible with existing
@@ -26,6 +26,10 @@ export interface MemorySpacesPageClient {
26
26
  summary: string;
27
27
  action: string;
28
28
  memoryBodyIds: string[];
29
+ unembedded?: Array<{
30
+ memoryBodyId?: string;
31
+ id?: string;
32
+ }>;
29
33
  }>;
30
34
  forget(id: string, memoryBodyId?: string): Promise<Record<string, unknown>>;
31
35
  createBody(request: CreateMemorySpaceRequest): Promise<MemorySpace>;
@@ -33,6 +37,8 @@ export interface MemorySpacesPageClient {
33
37
  reconnectBody(memoryBodyId: string): Promise<MemorySpaceView>;
34
38
  maintainBodyMetadata(memoryBodyIds: string[]): Promise<MemorySpaceMetadataMaintenanceResult>;
35
39
  deleteBody(memoryBodyId: string): Promise<MemorySpace>;
40
+ /** Ask every enabled Provider again for namespaces it gained; optional for page clients written against an older Source. */
41
+ rediscoverBodies?(): Promise<MemorySpaceRediscovery>;
36
42
  }
37
43
  export interface SearchResponse {
38
44
  results: Insight[];
@@ -340,6 +340,35 @@ export interface MemorySpaceCatalog {
340
340
  generatedAt: string;
341
341
  /** Present only when body-directory receives a supported writeScope request. Older Sources omit it. */
342
342
  writeScope?: MemorySpaceWriteScope;
343
+ /** Provider namespaces asked for again in this process: whether a pass is running, and the last one. Older Sources omit it. */
344
+ rediscovery?: {
345
+ running: boolean;
346
+ last?: MemorySpaceRediscovery;
347
+ };
348
+ }
349
+ /** What one Provider answered when its namespaces were asked for again. */
350
+ export interface MemorySpaceRediscoveryResult {
351
+ providerId: MemoryProviderId;
352
+ label: string;
353
+ /** Namespaces the Provider reported. */
354
+ found: number;
355
+ /** Spaces mounted for namespaces this directory had never held. They start inactive. */
356
+ added: Array<{
357
+ id: string;
358
+ name: string;
359
+ }>;
360
+ /** Reported namespaces a person disconnected here; they stay disconnected. */
361
+ disconnected: number;
362
+ /** Why the Provider could not be asked, as it said. Its spaces stay as they were. */
363
+ error?: string;
364
+ /** The Provider said nothing within the time it was given. */
365
+ timedOut?: boolean;
366
+ }
367
+ /** One pass over every enabled Provider service, when the Host starts or from the Memory Spaces page. */
368
+ export interface MemorySpaceRediscovery {
369
+ at: string;
370
+ trigger: 'startup' | 'manual';
371
+ results: MemorySpaceRediscoveryResult[];
343
372
  }
344
373
  export interface MemoryGraphNode extends Insight {
345
374
  color: string;
@@ -496,9 +525,38 @@ export interface MnemonEmbeddingStatus {
496
525
  model: string;
497
526
  /** Protocol Mnemon resolved for the embedding endpoint; omitted when the CLI does not report one. */
498
527
  protocol?: string;
528
+ /** Across the spaces in `spaces` that could be counted; 0 when no space has a database. */
529
+ totalInsights: number;
530
+ embedded: number;
531
+ coverage: string;
532
+ /** Each Mnemon Native space with a database, as `mnemon --store <id> embed --status` counts it (#392). */
533
+ spaces?: MnemonEmbeddingSpaceStatus[];
534
+ }
535
+ /** One Mnemon Native space's vector coverage. */
536
+ export interface MnemonEmbeddingSpaceStatus {
537
+ memoryBodyId: string;
538
+ name: string;
539
+ active: boolean;
499
540
  totalInsights: number;
500
541
  embedded: number;
501
542
  coverage: string;
543
+ /** Why the space could not be counted; its counts are then 0 and stay out of the total. */
544
+ error?: string;
545
+ }
546
+ /** What one fill of a Mnemon Native space's missing vectors did (#392). */
547
+ export interface MnemonEmbeddingFill {
548
+ memoryBodyId: string;
549
+ /** Vectors the fill wrote. */
550
+ filled: number;
551
+ /** Memories of the space still without a vector when it stopped. */
552
+ remaining: number;
553
+ /** The embedding model Mnemon used. */
554
+ model: string;
555
+ /**
556
+ * Why it stopped while memories remain: its minute ran out (`time`), or a step wrote no vector,
557
+ * so the embedding service returned none for the memories left (`refused`).
558
+ */
559
+ stopped?: 'time' | 'refused';
502
560
  }
503
561
  /** Domain status only; workbench/lifecycle status belongs to the default adapter. */
504
562
  export interface MemorySpacesStatus {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-mnemon-source-memory-spaces",
3
- "version": "0.5.18",
3
+ "version": "0.5.20",
4
4
  "description": "Memory Spaces Source and its private Provider SDK.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -65,14 +65,14 @@
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.27",
68
+ "dsh-mnemon": "^0.5.30",
69
69
  "dsh-mnemon-provider-byterover": "^0.5.5",
70
- "dsh-mnemon-provider-hindsight": "^0.5.5",
70
+ "dsh-mnemon-provider-hindsight": "^0.5.6",
71
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.9",
75
- "dsh-mnemon-provider-openviking": "^0.5.7",
75
+ "dsh-mnemon-provider-openviking": "^0.5.8",
76
76
  "dsh-mnemon-provider-retaindb": "^0.5.5",
77
77
  "dsh-mnemon-provider-supermemory": "^0.5.5",
78
78
  "jsdom": "^26.0.0",
@@ -355,7 +355,17 @@
355
355
  "overview.deletingSpace": "删除中…",
356
356
  "common.score": "相关度 {value}",
357
357
  "overview.providerEnableHint": "未启用的 Provider 可在“插件 → 可组合记忆”的“记忆空间”页面中启用。",
358
- "search.citations": "引用"
358
+ "search.citations": "引用",
359
+ "overview.rediscoverAction": "重新发现",
360
+ "overview.rediscovering": "正在发现…",
361
+ "overview.rediscoverHint": "再次询问已启用的 Provider;新出现的空间会挂载,但不加入召回",
362
+ "overview.rediscoveryAdded": "发现 {count} 个新空间,尚未加入召回,打开开关即可启用。",
363
+ "overview.rediscoveryNone": "没有新的空间。",
364
+ "overview.rediscoveryDisconnected": "{count} 个断开过的空间保持断开;重新保存对应 Provider 的设置可以恢复。",
365
+ "overview.rediscoveryFailed": "{provider} 无法完成发现:{error}",
366
+ "overview.rediscoveryTimedOut": "{provider} 没有按时响应,稍后可以再次发现。",
367
+ "overview.rediscoveryDismiss": "知道了",
368
+ "overview.newSpace": "新发现"
359
369
  },
360
370
  "en": {
361
371
  "term.space": "Memory Space",
@@ -713,6 +723,16 @@
713
723
  "overview.deletingSpace": "Deleting…",
714
724
  "common.score": "Score {value}",
715
725
  "overview.providerEnableHint": "Turn on more Providers on Memory Spaces’ page under Plugins → dsh-mnemon.",
716
- "search.citations": "Cites"
726
+ "search.citations": "Cites",
727
+ "overview.rediscoverAction": "Rediscover",
728
+ "overview.rediscovering": "Rediscovering…",
729
+ "overview.rediscoverHint": "Ask the enabled Providers again; new spaces are added without joining recall",
730
+ "overview.rediscoveryAdded": "New spaces found: {count}. They join recall once you switch them on.",
731
+ "overview.rediscoveryNone": "No new spaces.",
732
+ "overview.rediscoveryDisconnected": "Spaces you disconnected stay disconnected: {count}. Save the Provider’s settings again to bring them back.",
733
+ "overview.rediscoveryFailed": "{provider} could not finish discovery: {error}",
734
+ "overview.rediscoveryTimedOut": "{provider} did not answer in time; try Rediscover later.",
735
+ "overview.rediscoveryDismiss": "Dismiss",
736
+ "overview.newSpace": "New"
717
737
  }
718
738
  }
@@ -72,6 +72,13 @@ button.readSourceCard:hover { background: var(--mn-hover); }
72
72
  .bodyCard:not([data-healthy]) .bodyHealth { color: var(--mn-danger); }
73
73
  .bodyCard[data-status-loading] .bodyHealth { color: var(--mn-faint); }
74
74
  .mnemonDefaultBadge { width: fit-content; padding: 1px 8px; border-radius: 999px; color: var(--mn-accent); background: color-mix(in srgb, var(--mn-accent) 10%, transparent); font-size: 11px; font-weight: 500; line-height: 17px; white-space: nowrap; }
75
+ .newSpaceBadge { width: fit-content; padding: 1px 8px; border-radius: 999px; color: var(--mn-accent); background: color-mix(in srgb, var(--mn-accent) 10%, transparent); font-size: 11px; font-weight: 500; line-height: 17px; white-space: nowrap; }
76
+ /* What asking the Providers again found: one row, as a write receipt reads. */
77
+ .rediscoveryNotice { display: flex; min-width: 0; align-items: flex-start; gap: 8px 12px; margin: 0 0 12px; padding: 10px 12px; border-radius: var(--dsw-radius-md); background: var(--dsw-alias-bg-module-platform); }
78
+ .rediscoveryNotice > div { display: grid; flex: 1 1 auto; min-width: 0; gap: 2px; }
79
+ .rediscoveryNotice p { margin: 0; color: var(--dsw-alias-label-secondary); font-size: 13px; line-height: 20px; overflow-wrap: anywhere; }
80
+ .rediscoveryNotice p[data-failed] { color: var(--mn-danger); }
81
+ .rediscoveryNotice > button { flex: none; }
75
82
  /* DSH Tag, neutral tone: the Provider is a fact, not a status. */
76
83
  .providerBadge { display: inline-flex; width: fit-content; max-width: 100%; flex: 0 0 auto; align-items: center; justify-content: center; padding: 1px 8px; overflow: hidden; border-radius: 999px; color: var(--mn-muted); background: var(--mn-fill); font-size: 11px; font-weight: 500; line-height: 17px; text-align: center; text-overflow: ellipsis; vertical-align: middle; white-space: nowrap; }
77
84