dsh-mnemon 0.5.30 → 0.5.32

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.
Files changed (31) hide show
  1. package/README.md +12 -12
  2. package/README.zh-CN.md +12 -12
  3. package/SECURITY.md +4 -4
  4. package/lib/bundle.js +1 -1
  5. package/lib/client.js +4021 -3355
  6. package/lib/contracts.js +3 -1
  7. package/lib/core.js +1 -1
  8. package/lib/{definitions-j9QPbrXb.js → definitions-DU7MLBhu.js} +3 -1
  9. package/lib/extension-sdk.js +2 -2
  10. package/lib/index.js +11049 -10764
  11. package/lib/{runtime-Bk6lFgxd.js → runtime-zuuBe8x1.js} +1 -1
  12. package/lib/{starter-resolution-CKedUNe4.js → starter-resolution-DoFp9FLr.js} +5 -5
  13. package/lib/starter.js +1 -1
  14. package/lib/{strategy-configuration-sVkKToSW.js → strategy-configuration-CLHxaPOb.js} +1 -1
  15. package/lib/testing.js +2 -2
  16. package/lib/types/src/client/GlobalLocationSetting.d.ts +19 -0
  17. package/lib/types/src/client/component-ui.d.ts +68 -0
  18. package/lib/types/src/client/extension-sdk.d.ts +5 -1
  19. package/lib/types/src/client/feedback.d.ts +65 -0
  20. package/lib/types/src/client/locales.d.ts +130 -127
  21. package/lib/types/src/client/page-controls.d.ts +7 -0
  22. package/lib/types/src/client/settings-controls.d.ts +66 -0
  23. package/lib/types/src/client/settings-panel.d.ts +58 -0
  24. package/lib/types/src/client/ui-icons.d.ts +0 -1
  25. package/lib/types/src/core/contracts/view.d.ts +9 -0
  26. package/lib/types/src/host/config-values.d.ts +1 -1
  27. package/lib/types/src/host/memory-tools.d.ts +139 -0
  28. package/lib/types/src/host/protocol.d.ts +112 -24
  29. package/lib/types/src/host/starter-components.d.ts +20 -0
  30. package/lib/types/src/host/sync-rules.d.ts +30 -0
  31. package/package.json +45 -45
@@ -0,0 +1,58 @@
1
+ import { type JSX } from 'react';
2
+ import type { MnemonTranslate } from './locales.ts';
3
+ /**
4
+ * The two ways a group of settings saves. A choice (switch or selector)
5
+ * applies when it is made; edits that need checking, or that move data, wait
6
+ * for their group's Apply. No group joins another group's save.
7
+ */
8
+ export declare function useScope<S>(scope: {
9
+ getSnapshot(): S;
10
+ subscribe(listener: () => void): () => void;
11
+ }): S;
12
+ /**
13
+ * One group's staged edits, applied together with its own button. Edits that
14
+ * come back to the saved values leave nothing to apply.
15
+ */
16
+ export declare function useStaged<D>(value: D, write: (draft: D) => Promise<void>): {
17
+ draft: D;
18
+ dirty: boolean;
19
+ saving: boolean;
20
+ failed: string | null;
21
+ applied: boolean;
22
+ edit: (next: Partial<D>) => void;
23
+ discard: () => void;
24
+ apply: () => Promise<void>;
25
+ };
26
+ /**
27
+ * A choice that saves when it is made: it shows the chosen value at once, and
28
+ * the saved one again if the write fails.
29
+ */
30
+ export declare function useLive<T>(saved: T, write: (value: T) => Promise<void>): {
31
+ value: T;
32
+ failed: string | null;
33
+ set: (value: T) => void;
34
+ };
35
+ /**
36
+ * A failed write, beside the controls that made it. `t` is the translation the
37
+ * settings use: the configuration page sets none around a component's settings.
38
+ */
39
+ export declare function WriteFailure(props: {
40
+ error: string | null;
41
+ t: MnemonTranslate;
42
+ }): JSX.Element | null;
43
+ /**
44
+ * Discard and Apply for one group, shown while it has edits; `note` says what
45
+ * applying does. `t` is the translation the settings use, as for WriteFailure.
46
+ */
47
+ export declare function PanelActions(props: {
48
+ dirty: boolean;
49
+ saving: boolean;
50
+ invalid: string | null;
51
+ failed: string | null;
52
+ applied: boolean;
53
+ disabled: boolean;
54
+ note?: string;
55
+ t: MnemonTranslate;
56
+ onDiscard: () => void;
57
+ onApply: () => void;
58
+ }): JSX.Element | null;
@@ -1,3 +1,2 @@
1
1
  export { IconCloseOutlineRegular, IconRefreshOutlineRegular, IconSettingsOutlineRegular } from '@deepseek-ai/dsh-client-ui-primitives';
2
2
  export declare const IconChevronLeftOutline14: (props: import("@deepseek-ai/dsh-client-ui-primitives").IconProps) => import("react").JSX.Element;
3
- export declare const IconDataOutline16: (props: import("@deepseek-ai/dsh-client-ui-primitives").IconProps) => import("react").JSX.Element;
@@ -110,6 +110,9 @@ export interface MemorySourceManifest {
110
110
  actions?: MemorySourceActionManifest[];
111
111
  management?: MemoryManagementDescriptor;
112
112
  }
113
+ /** Background work a Host runs for the turns of a Strategy that declares it. */
114
+ export declare const MEMORY_STRATEGY_WORKFLOWS: readonly ["idle-review", "runtime-capacity"];
115
+ export type MemoryStrategyWorkflow = typeof MEMORY_STRATEGY_WORKFLOWS[number];
113
116
  export interface MemoryStrategyManifest {
114
117
  apiVersion: typeof COMPOSABLE_MEMORY_API_VERSION;
115
118
  kind: 'strategy';
@@ -123,6 +126,12 @@ export interface MemoryStrategyManifest {
123
126
  maxActions: number;
124
127
  /** Exclusive contribution slots this Strategy accepts; standard slots follow Core's value contracts. */
125
128
  extensionSlots?: string[];
129
+ /**
130
+ * Background work the Host runs for the turns this Strategy composes: `idle-review` reviews an idle
131
+ * conversation, `runtime-capacity` archives older Runtime entries before a write would overflow it.
132
+ * A Host ignores workflows it does not know.
133
+ */
134
+ workflows?: MemoryStrategyWorkflow[];
126
135
  }
127
136
  /** Extension target for every selected Strategy that declares the extension's standard slot. */
128
137
  export declare const ANY_MEMORY_STRATEGY: "*";
@@ -4,7 +4,7 @@ export declare const DEFAULT_RUNTIME_USER_LIMIT_BYTES: number;
4
4
  export declare const MAX_RUNTIME_MEMORY_LIMIT_BYTES: number;
5
5
  export declare const DEFAULT_RUNTIME_MAINTENANCE_MAX_TOKENS = 8192;
6
6
  export declare const MAX_RUNTIME_MAINTENANCE_MAX_TOKENS = 1000000;
7
- export { DEFAULT_EMBEDDING_ENDPOINT, DEFAULT_EMBEDDING_MODEL, DEFAULT_EMBEDDING_PROTOCOL, MNEMON_EMBEDDING_PROTOCOLS } from "./protocol.ts";
7
+ export { DEFAULT_EMBEDDING_ENDPOINT, DEFAULT_EMBEDDING_MODEL, DEFAULT_EMBEDDING_PROTOCOL, MNEMON_EMBEDDING_PROTOCOLS } from 'dsh-mnemon-source-memory-spaces/contracts';
8
8
  export declare const DEFAULT_TIMEOUT_MS = 10000;
9
9
  export declare const DEFAULT_RECALL_LIMIT = 10;
10
10
  export declare const DEFAULT_RECALL_QUALITY_POLICY: string;
@@ -0,0 +1,139 @@
1
+ /**
2
+ * One row for each memory tool the Host registers: the Source Route or Action a named tool runs,
3
+ * whether it reads, inspects or writes, and how the turn memory bar shows it. The result tool that
4
+ * delegated children finish with runs no Source operation and has no row. Host modules and the
5
+ * browser client read this table; each tool's model-visible description and schemas stay with its
6
+ * registration in tools.ts. The two generic View tools run whichever Route or Action of the turn's
7
+ * View a call names, so their rows name no Source and no page.
8
+ */
9
+ /** A Memory System page the turn memory bar opens: Status, or a Source page id. */
10
+ export type MemoryToolPage = 'status' | `${string}/${string}`;
11
+ export interface MemoryToolEntry {
12
+ /** The Source type whose Route or Action the tool runs. */
13
+ readonly sourceTypeId?: string;
14
+ /** The id of that Route or Action. */
15
+ readonly operation?: string;
16
+ /** `read` returns evidence, `inspect` health or a catalog, and `write` changes memory. */
17
+ readonly kind: 'read' | 'inspect' | 'write';
18
+ /** The page the tool's chip in the turn memory bar opens. */
19
+ readonly page?: MemoryToolPage;
20
+ /** The locale key that says what the tool did. */
21
+ readonly label: `turnTail.tool.${string}`;
22
+ }
23
+ /** In registration order, which is also the order the View lists tools that share an operation. */
24
+ export declare const MEMORY_TOOLS: {
25
+ readonly mnemon_view_route: {
26
+ readonly kind: "read";
27
+ readonly label: "turnTail.tool.viewRoute";
28
+ };
29
+ readonly mnemon_view_action: {
30
+ readonly kind: "write";
31
+ readonly label: "turnTail.tool.viewAction";
32
+ };
33
+ readonly mnemon_memory_bodies: {
34
+ readonly sourceTypeId: "memory-spaces";
35
+ readonly operation: "inspect";
36
+ readonly kind: "inspect";
37
+ readonly page: "memory-spaces/spaces";
38
+ readonly label: "turnTail.tool.spaces";
39
+ };
40
+ readonly mnemon_recall: {
41
+ readonly sourceTypeId: "memory-spaces";
42
+ readonly operation: "recall";
43
+ readonly kind: "read";
44
+ readonly page: "memory-spaces/explore";
45
+ readonly label: "turnTail.tool.recall";
46
+ };
47
+ readonly mnemon_related: {
48
+ readonly sourceTypeId: "memory-spaces";
49
+ readonly operation: "related";
50
+ readonly kind: "read";
51
+ readonly page: "memory-spaces/explore";
52
+ readonly label: "turnTail.tool.related";
53
+ };
54
+ readonly mnemon_status: {
55
+ readonly sourceTypeId: "memory-spaces";
56
+ readonly operation: "inspect";
57
+ readonly kind: "inspect";
58
+ readonly page: "status";
59
+ readonly label: "turnTail.tool.status";
60
+ };
61
+ readonly mnemon_document_search: {
62
+ readonly sourceTypeId: "documents";
63
+ readonly operation: "search";
64
+ readonly kind: "read";
65
+ readonly page: "documents/library";
66
+ readonly label: "turnTail.tool.documentSearch";
67
+ };
68
+ readonly mnemon_document_create: {
69
+ readonly sourceTypeId: "documents";
70
+ readonly operation: "create";
71
+ readonly kind: "write";
72
+ readonly page: "documents/library";
73
+ readonly label: "turnTail.tool.documentCreate";
74
+ };
75
+ readonly mnemon_document_manage: {
76
+ readonly sourceTypeId: "documents";
77
+ readonly operation: "manage";
78
+ readonly kind: "write";
79
+ readonly page: "documents/library";
80
+ readonly label: "turnTail.tool.documentManage";
81
+ };
82
+ readonly mnemon_runtime_memory: {
83
+ readonly sourceTypeId: "runtime";
84
+ readonly operation: "mutate";
85
+ readonly kind: "write";
86
+ readonly page: "runtime/entries";
87
+ readonly label: "turnTail.tool.runtime";
88
+ };
89
+ readonly mnemon_remember: {
90
+ readonly sourceTypeId: "memory-spaces";
91
+ readonly operation: "remember";
92
+ readonly kind: "write";
93
+ readonly page: "memory-spaces/spaces";
94
+ readonly label: "turnTail.tool.remember";
95
+ };
96
+ readonly mnemon_link: {
97
+ readonly sourceTypeId: "memory-spaces";
98
+ readonly operation: "link";
99
+ readonly kind: "write";
100
+ readonly page: "memory-spaces/spaces";
101
+ readonly label: "turnTail.tool.link";
102
+ };
103
+ readonly mnemon_forget: {
104
+ readonly sourceTypeId: "memory-spaces";
105
+ readonly operation: "forget";
106
+ readonly kind: "write";
107
+ readonly page: "memory-spaces/spaces";
108
+ readonly label: "turnTail.tool.forget";
109
+ };
110
+ readonly mnemon_memory_body_create: {
111
+ readonly sourceTypeId: "memory-spaces";
112
+ readonly operation: "manage-spaces";
113
+ readonly kind: "write";
114
+ readonly page: "memory-spaces/spaces";
115
+ readonly label: "turnTail.tool.spaceCreate";
116
+ };
117
+ readonly mnemon_memory_body_update: {
118
+ readonly sourceTypeId: "memory-spaces";
119
+ readonly operation: "manage-spaces";
120
+ readonly kind: "write";
121
+ readonly page: "memory-spaces/spaces";
122
+ readonly label: "turnTail.tool.spaceUpdate";
123
+ };
124
+ readonly mnemon_memory_body_merge: {
125
+ readonly sourceTypeId: "memory-spaces";
126
+ readonly operation: "manage-spaces";
127
+ readonly kind: "write";
128
+ readonly page: "memory-spaces/spaces";
129
+ readonly label: "turnTail.tool.spaceMerge";
130
+ };
131
+ };
132
+ export type MemoryToolName = keyof typeof MEMORY_TOOLS;
133
+ export type MemoryToolLabel = (typeof MEMORY_TOOLS)[MemoryToolName]['label'];
134
+ /** The row of one memory tool, or undefined for any other tool name. */
135
+ export declare function memoryTool(name: string): (MemoryToolEntry & {
136
+ readonly label: MemoryToolLabel;
137
+ }) | undefined;
138
+ /** Every memory tool name with its row, in table order. */
139
+ export declare function memoryTools(): Array<[MemoryToolName, MemoryToolEntry]>;
@@ -11,13 +11,6 @@ export declare function namedToolInstance<T extends {
11
11
  export type MemoryParticipationMode = 'off' | 'manual' | 'automatic';
12
12
  export type MemoryParticipationChannel = 'recall' | 'write' | 'projection' | 'maintenance';
13
13
  export type MemoryLayerParticipation = Record<MemoryParticipationChannel, MemoryParticipationMode>;
14
- export interface MemoryTopologyDefinition {
15
- id: string;
16
- strategyId: string;
17
- layers: Array<ResolvedMemoryLayerConfig & {
18
- id: string;
19
- }>;
20
- }
21
14
  export interface MemoryCompositionStatus {
22
15
  /** Whether a composition serves new turns. A rejected change can leave the previous one serving. */
23
16
  serving: boolean;
@@ -28,9 +21,11 @@ export interface MemoryCompositionStatus {
28
21
  configuration: ResolvedMemoryTopologyConfig;
29
22
  }
30
23
  import type { RecallQualityConfig, ResolvedRecallQualityConfig, MnemonEmbeddingConfig, ResolvedMnemonEmbeddingConfig } from 'dsh-mnemon-source-memory-spaces/contracts';
31
- import type { MemoryPersistenceStrategy, ResolvedMemoryPersistenceStrategy, MemoryProviderRuntimeStatus, MemoryBodyStats as MemorySpaceStats, MemoryBodyView as MemorySpaceView } from 'dsh-mnemon-source-memory-spaces/contracts';
24
+ import type { MemoryPersistenceStrategy, ResolvedMemoryPersistenceStrategy, MemoryProviderRuntimeStatus, MemorySpaceStats, MemorySpaceView } from 'dsh-mnemon-source-memory-spaces/contracts';
32
25
  import type { ConnectionHandle as DshClientConnectionHandle } from '@deepseek-ai/dsh-client-connection/client';
33
- import type { DocumentSnapshot } from 'dsh-mnemon-source-documents/contracts';
26
+ import type { DocumentMutationResult, DocumentSnapshot } from 'dsh-mnemon-source-documents/contracts';
27
+ import type { RuntimeMemoryMutationResult } from 'dsh-mnemon-source-runtime/contracts';
28
+ import type { MemoryMigrationLineage, MemoryMutationReceipt } from '../core/contracts/index.ts';
34
29
  export declare const MNEMON_READ_CHANNEL = "/dsh-mnemon-read";
35
30
  export declare const MNEMON_ACTIVATION_CHANNEL = "/dsh-mnemon-activation";
36
31
  export declare const MNEMON_WRITE_CHANNEL = "/dsh-mnemon-write";
@@ -74,6 +69,28 @@ export declare const MNEMON_REMOTE_REVIEW_ENDPOINT = "dshMnemon/review";
74
69
  export declare const MNEMON_SETTINGS_NAMESPACE = "mnemon";
75
70
  export declare const MNEMON_UI_SETTINGS_NAMESPACE = "mnemon-ui";
76
71
  export * from './view-protocol.ts';
72
+ export * from './memory-tools.ts';
73
+ export * from './sync-rules.ts';
74
+ /**
75
+ * Every endpoint the Host serves on each channel, by the names both sides use: the client's calls
76
+ * are typed against this list, and tests/rpc-endpoints.spec.ts checks that each Host handler serves
77
+ * exactly these names.
78
+ */
79
+ export declare const MNEMON_RPC_ENDPOINTS: {
80
+ readonly "/dsh-mnemon-read": readonly ["status", "status-summary", "memory-system", "versions", "task-agent-models", "runtime-memory", "documents", "document", "document-search", "graph", "bodies", "body-directory", "body-reconnect", "provider-services", "embedding-status", "list", "entities", "search", "agent-search", "related", "turn-activities", "turn-activity", "assistant-message", "source-management-catalog", "source-management-read", "source-assistance"];
81
+ readonly "/dsh-mnemon-activation": readonly ["body", "source-assistance"];
82
+ readonly "/dsh-mnemon-write": readonly ["runtime-memory", "document", "supervise", "remember", "link", "forget", "body-create", "body-update", "body-delete", "body-merge", "body-metadata-maintain", "provider-service-update", "embedding-fill", "source-management-mutate", "source-assistance", "version-update"];
83
+ readonly "/dsh-mnemon-pack": readonly ["target", "export", "inspect", "import"];
84
+ readonly "/dsh-mnemon-sync": readonly ["status", "configure", "push", "preview", "backups", "diff", "pull", "github-status", "github-start", "github-poll", "github-cancel", "github-signout", "github-repositories", "github-create"];
85
+ readonly "/dsh-mnemon-review": readonly ["view", "opinion", "decide", "reopen", "reconcile", "apply"];
86
+ readonly "/dsh-mnemon-settings": readonly ["get", "mutate"];
87
+ readonly "/dsh-mnemon-view": readonly ["dashboard", "preview", "inspect-plugin"];
88
+ readonly "/dsh-mnemon-view-settings": readonly ["apply", "install-plugin"];
89
+ };
90
+ /** A channel the Host serves. */
91
+ export type MnemonRpcChannel = keyof typeof MNEMON_RPC_ENDPOINTS;
92
+ /** An endpoint the Host serves on a channel, or on any of several. */
93
+ export type MnemonRpcEndpoint<Channel extends MnemonRpcChannel = MnemonRpcChannel> = (typeof MNEMON_RPC_ENDPOINTS)[Channel][number];
77
94
  export type JsonPrimitive = string | number | boolean | null;
78
95
  export type JsonValue = JsonPrimitive | JsonValue[] | {
79
96
  [key: string]: JsonValue;
@@ -208,6 +225,7 @@ export interface ResolvedRuntimeMemoryConfig {
208
225
  userLimitBytes: number;
209
226
  maintenanceMaxTokens: number;
210
227
  }
228
+ export { STARTER_COMPONENT_ROWS } from './starter-components.ts';
211
229
  export { normalizeDisplayMode } from './display-mode.ts';
212
230
  export type MnemonDisplayMode = 'sidebar' | 'builtin';
213
231
  export declare const DEFAULT_IDLE_REVIEW: {
@@ -250,7 +268,7 @@ export interface Config {
250
268
  /** Optional DSH-owned overrides injected into every Mnemon CLI process. */
251
269
  embedding?: MnemonEmbeddingConfig;
252
270
  memoryTopology?: MemoryTopologyConfig;
253
- /** Profile-owned plugin choices on DSH 0.1.7 and newer. */
271
+ /** Profile-owned plugin choices. */
254
272
  memoryView?: import('./view-protocol.ts').MemoryViewPreferences;
255
273
  /** Successful import of this profile's removed settings namespaces. */
256
274
  legacySettingsImported?: boolean;
@@ -268,6 +286,7 @@ export interface Config {
268
286
  idleReviewMs?: number;
269
287
  idleReview?: Partial<ResolvedIdleReviewConfig>;
270
288
  conversationInteraction?: {
289
+ /** @deprecated Switches nothing. Stored profiles may still hold it; the resolved config leaves it out. */
271
290
  toolviews?: boolean;
272
291
  turnBar?: boolean;
273
292
  saveAction?: boolean;
@@ -287,11 +306,20 @@ export interface TaskAgentModelConfig {
287
306
  mode?: 'inherit' | 'fixed';
288
307
  provider?: string;
289
308
  model?: string;
309
+ /**
310
+ * With `inherit`, run on the model the conversation that asked for the work
311
+ * last used, while that conversation is open. Off by default; a switch
312
+ * rather than a third mode, so a release that does not know it keeps
313
+ * reading `inherit` as before.
314
+ */
315
+ followConversation?: boolean;
290
316
  }
291
317
  export interface ResolvedTaskAgentModelConfig {
292
318
  mode: 'inherit' | 'fixed';
293
319
  provider?: string;
294
320
  model?: string;
321
+ /** Present, and true, only on an inherited route that follows its conversation. */
322
+ followConversation?: true;
295
323
  }
296
324
  export interface TaskAgentModelCatalogModel {
297
325
  id: string;
@@ -314,12 +342,31 @@ export interface TaskAgentModelCatalog {
314
342
  effective?: {
315
343
  provider: string;
316
344
  model: string;
317
- source: 'fixed' | 'dsh-default' | 'active-agent';
345
+ source: 'fixed' | 'session' | 'dsh-default' | 'active-agent';
318
346
  };
319
347
  defaultSelection?: {
320
348
  provider: string;
321
349
  model: string;
322
350
  };
351
+ /**
352
+ * The route the asking conversation's own delegated work takes while it is
353
+ * open: the model of its last request, or the one it was created with before
354
+ * its first. An inherited setting that follows its conversation takes it too;
355
+ * it is reported whether or not that switch is on.
356
+ */
357
+ session?: {
358
+ provider: string;
359
+ model: string;
360
+ };
361
+ /**
362
+ * The route an inherited setting takes without following a conversation: the
363
+ * DSH new-session default, else an open Agent's creation route.
364
+ */
365
+ inherited?: {
366
+ provider: string;
367
+ model: string;
368
+ source: 'dsh-default' | 'active-agent';
369
+ };
323
370
  groups: TaskAgentModelCatalogGroup[];
324
371
  failures: TaskAgentModelCatalogFailure[];
325
372
  }
@@ -351,7 +398,6 @@ export interface ResolvedConfig {
351
398
  idleReviewMs: number;
352
399
  idleReview: ResolvedIdleReviewConfig;
353
400
  conversationInteraction: {
354
- toolviews: boolean;
355
401
  turnBar: boolean;
356
402
  saveAction: boolean;
357
403
  };
@@ -471,6 +517,60 @@ export interface SubagentCounters {
471
517
  lastOperation?: 'recall' | 'write' | 'review' | 'placement' | 'migration' | 'compaction' | 'document-archive' | 'metadata-maintenance' | 'reconcile';
472
518
  lastAt?: string;
473
519
  }
520
+ /** What a delegated memory write did, as the write task Agent's receipts show it. */
521
+ export interface DelegatedWriteResult {
522
+ delegated: true;
523
+ runId: string;
524
+ provider: string;
525
+ summary: string;
526
+ action: string;
527
+ /** Where the memory went: the spaces its receipts name, else what the writer reported. */
528
+ memoryBodyIds: string[];
529
+ /** Spaces that were inactive and that this write switched on. */
530
+ activatedMemoryBodyIds?: string[];
531
+ documentIds?: string[];
532
+ /** Memories saved without a vector, as the Provider's receipt says (#388). */
533
+ unembedded?: Array<{
534
+ memoryBodyId?: string;
535
+ id?: string;
536
+ }>;
537
+ hint?: string;
538
+ }
539
+ /** The `supervise` RPC result: a delegated write for the conversation that asked for it. */
540
+ export interface SupervisedWritebackResult extends DelegatedWriteResult {
541
+ sessionId: string;
542
+ }
543
+ /** What a task Agent answered from the evidence a search recalled, as `agent-search` adds it to the results. */
544
+ export interface DelegatedAnswerResult {
545
+ answer: string;
546
+ citations: string[];
547
+ delegation: {
548
+ runId: string;
549
+ provider: string;
550
+ };
551
+ }
552
+ /** A Document write or archive the Host ran: the Documents Source's result, and the archival it ran, for the archive or to make room for the write. */
553
+ export type CoordinatedDocumentResult = DocumentMutationResult & {
554
+ lineage?: MemoryMigrationLineage[];
555
+ maintenance?: {
556
+ runId: string;
557
+ provider: string;
558
+ summary: string;
559
+ memoryBodyIds: string[];
560
+ archivedDocumentIds: string[];
561
+ };
562
+ };
563
+ /** A runtime memory write the Host ran: the Runtime Source's result, and the capacity maintenance that ran with it. */
564
+ export type CoordinatedRuntimeMemoryResult = RuntimeMemoryMutationResult & {
565
+ revision?: string;
566
+ maintenance?: {
567
+ runId: string;
568
+ provider: string;
569
+ summary: string;
570
+ memoryBodyIds: string[];
571
+ };
572
+ memoryReceipt?: Pick<MemoryMutationReceipt, 'status' | 'completion' | 'committedAt'>;
573
+ };
474
574
  export type LifecyclePhase = 'idle' | 'prime' | 'recall' | 'writeback' | 'review' | 'supervised' | 'error';
475
575
  export interface LifecycleCounters {
476
576
  primes: number;
@@ -654,8 +754,6 @@ export interface MnemonMachineIdentity {
654
754
  * which the name then follows, or a name a person typed, which stays as given.
655
755
  */
656
756
  export type MnemonMachineLabelSource = 'hostname' | 'custom';
657
- /** The longest name an installation carries; a host name past it is shortened. */
658
- export declare const MNEMON_MACHINE_LABEL_MAX = 120;
659
757
  /** Which machine wrote one runtime entry, so a merge can tell two installations apart. */
660
758
  export interface MnemonEntryOrigin {
661
759
  machine: string;
@@ -806,8 +904,6 @@ export interface MnemonSyncConfigView {
806
904
  * when neither is set: the order here is the order of resolution.
807
905
  */
808
906
  export type MnemonSyncCredentialSource = 'environment' | 'token' | 'github' | 'none';
809
- /** How far the browser step of a GitHub sign-in has come. */
810
- export type MnemonSyncGitHubFlowStatus = 'pending' | 'expired' | 'denied' | 'error';
811
907
  export interface MnemonSyncGitHubFlow {
812
908
  userCode: string;
813
909
  verificationUri: string;
@@ -1185,11 +1281,3 @@ export interface VersionUpdateResult {
1185
1281
  restartRequired: boolean;
1186
1282
  output?: string;
1187
1283
  }
1188
- export declare const CATEGORIES: readonly ["preference", "decision", "fact", "insight", "context", "general"];
1189
- export declare const SOURCES: readonly ["user", "agent", "external"];
1190
- export declare const EDGE_TYPES: readonly ["temporal", "semantic", "causal", "entity"];
1191
- export declare const INTENTS: readonly ["WHY", "WHEN", "ENTITY", "GENERAL"];
1192
- export declare const DEFAULT_EMBEDDING_ENDPOINT = "http://localhost:11434";
1193
- export declare const DEFAULT_EMBEDDING_MODEL = "nomic-embed-text";
1194
- export declare const DEFAULT_EMBEDDING_PROTOCOL = "auto";
1195
- export declare const MNEMON_EMBEDDING_PROTOCOLS: readonly ["auto", "ollama", "openai"];
@@ -0,0 +1,20 @@
1
+ /**
2
+ * The component rows the Starter's bundle patch (cordis.patch.yml) declares,
3
+ * in its order: each row's id and the package it names. DSH lists them under
4
+ * the bundle's page. Tests keep this list equal to that patch and to the
5
+ * versions package.json pins.
6
+ */
7
+ export declare const STARTER_COMPONENT_ROWS: ReadonlyArray<{
8
+ rowId: string;
9
+ packageName: string;
10
+ }>;
11
+ /** The three enhancements the Starter ships switched off, in the order the Host suggests them for installation. */
12
+ export declare const STARTER_ENHANCEMENT_PACKAGES: readonly string[];
13
+ /**
14
+ * The shipped packages that carry a bundle patch of their own, so that one
15
+ * installed alone registers its row itself: the enhancements and the General
16
+ * strategy. Under the Starter its rows own them, so a profile that also linked
17
+ * them as separate bundles would declare those ids twice. A literal, not a
18
+ * spread of the list above, so that a bundle that does not use it drops it.
19
+ */
20
+ export declare const STARTER_SELF_REGISTERING_PACKAGES: readonly string[];
@@ -0,0 +1,30 @@
1
+ /**
2
+ * The rules a Git sync setting meets, shared by the settings form, which checks a field as the user
3
+ * types it, and the Host, which checks what it saves and what it reads back. They import nothing,
4
+ * so the browser bundle takes them too; each side keeps its own messages.
5
+ */
6
+ /** The longest name an installation carries; a host name past it is shortened. */
7
+ export declare const MNEMON_MACHINE_LABEL_MAX = 120;
8
+ /** A Git branch name: no revision syntax, no empty path segment, no trailing dot or lock suffix. */
9
+ export declare function syncBranchValid(name: string): boolean;
10
+ /** The parts of a directory inside the branch, or undefined when it is not one: relative, with no `.`, `..` or drive. */
11
+ export declare function syncDirectoryParts(value: string): string[] | undefined;
12
+ /** What is wrong with a repository address. */
13
+ export type MnemonSyncRepositoryProblem = 'format' | 'credentials';
14
+ /**
15
+ * What is wrong with a repository address, or nothing for an https:// or ssh:// URL without
16
+ * credentials in it, a git@host:path address, or a local path that `localPath` takes.
17
+ */
18
+ export declare function syncRepositoryProblem(url: string, localPath: (path: string) => boolean): MnemonSyncRepositoryProblem | undefined;
19
+ /**
20
+ * A local path that is absolute on POSIX or on Windows, for the browser, which cannot tell which
21
+ * platform the Host runs on: a POSIX path, a Windows path on a drive, or a UNC share. The Host
22
+ * checks a path by its own platform's rule instead.
23
+ */
24
+ export declare function portableAbsolutePath(path: string): boolean;
25
+ /** A commit author's address. */
26
+ export declare function syncEmailValid(email: string): boolean;
27
+ /** A name for this machine, as it is stored and shown: one line of at most MNEMON_MACHINE_LABEL_MAX characters. */
28
+ export declare function machineLabelValid(label: string): boolean;
29
+ /** A GitHub repository name, as GitHub accepts one. */
30
+ export declare function githubRepositoryNameValid(name: string): boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-mnemon",
3
- "version": "0.5.30",
3
+ "version": "0.5.32",
4
4
  "description": "Composable, view-based memory for DeepSeek Harness. Pluggable sources and strategies, with layered memory out of the box.",
5
5
  "keywords": [
6
6
  "deepseek-harness",
@@ -48,7 +48,8 @@
48
48
  "tag": "latest"
49
49
  },
50
50
  "engines": {
51
- "node": ">=20"
51
+ "node": ">=20",
52
+ "dsh": ">=0.2.0-rc.2 <0.2.1-0 || >=0.2.1-rc.1 <0.3.0-0"
52
53
  },
53
54
  "type": "module",
54
55
  "main": "lib/index.js",
@@ -135,6 +136,7 @@
135
136
  "typecheck": "tsc -p tsconfig.json --noEmit",
136
137
  "test": "vitest run",
137
138
  "test:root": "vitest run --dir tests",
139
+ "test:installed-dsh": "vitest run --config scripts/installed-dsh.config.ts",
138
140
  "bench:algorithms": "vitest run --config scripts/benchmark-algorithms.config.ts",
139
141
  "verify:build": "node scripts/verify-deterministic-build.mjs",
140
142
  "verify:headless": "node scripts/verify-headless-profile.mjs",
@@ -162,13 +164,13 @@
162
164
  "dsh-mnemon-provider-openviking": "0.5.8",
163
165
  "dsh-mnemon-provider-retaindb": "0.5.6",
164
166
  "dsh-mnemon-provider-supermemory": "0.5.5",
165
- "dsh-mnemon-source-documents": "0.5.10",
166
- "dsh-mnemon-source-memory-spaces": "0.5.20",
167
- "dsh-mnemon-source-runtime": "0.5.14",
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",
168
170
  "dsh-mnemon-strategy-auto-capture": "0.5.5",
169
- "dsh-mnemon-strategy-default-three-tier": "0.5.9",
171
+ "dsh-mnemon-strategy-default-three-tier": "0.5.10",
170
172
  "dsh-mnemon-strategy-general": "0.5.1",
171
- "dsh-mnemon-strategy-light-context": "0.5.5",
173
+ "dsh-mnemon-strategy-light-context": "0.5.6",
172
174
  "dsh-mnemon-strategy-scoped": "0.5.5",
173
175
  "fflate": "^0.8.3",
174
176
  "yaml": "^2.9.0",
@@ -176,50 +178,48 @@
176
178
  },
177
179
  "peerDependencies": {
178
180
  "@deepseek-ai/cordis": "^4.0.4",
179
- "@deepseek-ai/dsh-app-boot": "^0.1.7-rc.2 || ^0.2.0-rc.1",
180
- "@deepseek-ai/dsh-client-ui-primitives": "^0.1.7-rc.2 || ^0.2.0-rc.1",
181
- "@deepseek-ai/dsh-typert-protocol": "^0.1.7-rc.2 || ^0.2.0-rc.1",
181
+ "@deepseek-ai/dsh-app-boot": ">=0.2.0-rc.2 <0.2.1-0 || >=0.2.1-rc.1 <0.3.0-0",
182
+ "@deepseek-ai/dsh-typert-protocol": ">=0.2.0-rc.2 <0.2.1-0 || >=0.2.1-rc.1 <0.3.0-0",
182
183
  "react": "^18.2.0",
183
184
  "react-dom": "^18.2.0"
184
185
  },
185
186
  "devDependencies": {
186
187
  "@arethetypeswrong/cli": "^0.18.5",
187
188
  "@changesets/cli": "^2.31.1",
188
- "@deepseek-ai/cordis": "^4.0.4",
189
- "@deepseek-ai/dsh": "0.1.7-rc.2",
190
- "@deepseek-ai/dsh-agent": "0.1.7-rc.2",
191
- "@deepseek-ai/dsh-agent-loop": "0.1.7-rc.2",
192
- "@deepseek-ai/dsh-api-gateway": "0.1.7-rc.2",
193
- "@deepseek-ai/dsh-app-boot": "0.1.7-rc.2",
194
- "@deepseek-ai/dsh-client-connection": "0.1.7-rc.2",
195
- "@deepseek-ai/dsh-client-locale": "0.1.7-rc.2",
196
- "@deepseek-ai/dsh-client-store": "0.1.7-rc.2",
197
- "@deepseek-ai/dsh-client-ui-chat": "0.1.7-rc.2",
198
- "@deepseek-ai/dsh-client-ui-conversation": "0.1.7-rc.2",
199
- "@deepseek-ai/dsh-client-ui-layout": "0.1.7-rc.2",
200
- "@deepseek-ai/dsh-client-ui-plugin-manager": "0.1.7-rc.2",
201
- "@deepseek-ai/dsh-client-ui-primitives": "0.1.7-rc.2",
202
- "@deepseek-ai/dsh-client-ui-renderer": "0.1.7-rc.2",
203
- "@deepseek-ai/dsh-client-ui-session": "0.1.7-rc.2",
204
- "@deepseek-ai/dsh-client-ui-settings": "0.1.7-rc.2",
205
- "@deepseek-ai/dsh-client-ui-sidebar": "0.1.7-rc.2",
206
- "@deepseek-ai/dsh-client-ui-slots": "0.1.7-rc.2",
207
- "@deepseek-ai/dsh-client-ui-tool": "0.1.7-rc.2",
208
- "@deepseek-ai/dsh-invariants": "0.1.7-rc.2",
209
- "@deepseek-ai/dsh-llm": "0.1.7-rc.2",
210
- "@deepseek-ai/dsh-session": "0.1.7-rc.2",
211
- "@deepseek-ai/dsh-session-format-v0-to-v1": "0.1.7-rc.2",
212
- "@deepseek-ai/dsh-session-persistence-jsonl": "0.1.7-rc.2",
213
- "@deepseek-ai/dsh-session-projection": "0.1.7-rc.2",
214
- "@deepseek-ai/dsh-session-query": "0.1.7-rc.2",
215
- "@deepseek-ai/dsh-subagent": "0.1.7-rc.2",
216
- "@deepseek-ai/dsh-subagent-spawn-in-process": "0.1.7-rc.2",
217
- "@deepseek-ai/dsh-system-prompt": "0.1.7-rc.2",
218
- "@deepseek-ai/dsh-tools": "0.1.7-rc.2",
219
- "@deepseek-ai/dsh-typert-protocol": "0.1.7-rc.2",
220
- "@deepseek-ai/dsh-typert-registry": "0.1.7-rc.2",
221
- "@deepseek-ai/dsh-util-code-language": "0.1.7-rc.2",
222
- "@deepseek-ai/dsh-util-workspace-path": "0.1.7-rc.2",
189
+ "@deepseek-ai/cordis": "^4.0.5",
190
+ "@deepseek-ai/dsh": "0.2.1-rc.2",
191
+ "@deepseek-ai/dsh-agent": "0.2.1-rc.2",
192
+ "@deepseek-ai/dsh-agent-loop": "0.2.1-rc.2",
193
+ "@deepseek-ai/dsh-api-gateway": "0.2.1-rc.2",
194
+ "@deepseek-ai/dsh-app-boot": "0.2.1-rc.2",
195
+ "@deepseek-ai/dsh-client-connection": "0.2.1-rc.2",
196
+ "@deepseek-ai/dsh-client-locale": "0.2.1-rc.2",
197
+ "@deepseek-ai/dsh-client-store": "0.2.1-rc.2",
198
+ "@deepseek-ai/dsh-client-ui-chat": "0.2.1-rc.2",
199
+ "@deepseek-ai/dsh-client-ui-conversation": "0.2.1-rc.2",
200
+ "@deepseek-ai/dsh-client-ui-layout": "0.2.1-rc.2",
201
+ "@deepseek-ai/dsh-client-ui-plugin-manager": "0.2.1-rc.2",
202
+ "@deepseek-ai/dsh-client-ui-primitives": "0.2.1-rc.2",
203
+ "@deepseek-ai/dsh-client-ui-renderer": "0.2.1-rc.2",
204
+ "@deepseek-ai/dsh-client-ui-session": "0.2.1-rc.2",
205
+ "@deepseek-ai/dsh-client-ui-settings": "0.2.1-rc.2",
206
+ "@deepseek-ai/dsh-client-ui-sidebar": "0.2.1-rc.2",
207
+ "@deepseek-ai/dsh-client-ui-slots": "0.2.1-rc.2",
208
+ "@deepseek-ai/dsh-client-ui-tool": "0.2.1-rc.2",
209
+ "@deepseek-ai/dsh-llm": "0.2.1-rc.2",
210
+ "@deepseek-ai/dsh-session": "0.2.1-rc.2",
211
+ "@deepseek-ai/dsh-session-format-v0-to-v1": "0.2.1-rc.2",
212
+ "@deepseek-ai/dsh-session-persistence-jsonl": "0.2.1-rc.2",
213
+ "@deepseek-ai/dsh-session-projection": "0.2.1-rc.2",
214
+ "@deepseek-ai/dsh-session-query": "0.2.1-rc.2",
215
+ "@deepseek-ai/dsh-subagent": "0.2.1-rc.2",
216
+ "@deepseek-ai/dsh-subagent-spawn-in-process": "0.2.1-rc.2",
217
+ "@deepseek-ai/dsh-system-prompt": "0.2.1-rc.2",
218
+ "@deepseek-ai/dsh-tools": "0.2.1-rc.2",
219
+ "@deepseek-ai/dsh-typert-protocol": "0.2.1-rc.2",
220
+ "@deepseek-ai/dsh-typert-registry": "0.2.1-rc.2",
221
+ "@deepseek-ai/dsh-util-code-language": "0.2.1-rc.2",
222
+ "@deepseek-ai/dsh-util-workspace-path": "0.2.1-rc.2",
223
223
  "@shikijs/langs": "^4.3.1",
224
224
  "@testing-library/react": "^16.3.0",
225
225
  "@types/node": "^22.0.0",