dsh-mnemon 0.5.31 → 0.5.33
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 +24 -10
- package/README.zh-CN.md +24 -10
- package/SECURITY.md +2 -2
- package/lib/bundle.js +1 -1
- package/lib/client.js +4235 -3646
- package/lib/contracts.js +3 -1
- package/lib/core.js +1 -1
- package/lib/{definitions-j9QPbrXb.js → definitions-DU7MLBhu.js} +3 -1
- package/lib/extension-sdk.js +2 -2
- package/lib/index.js +1920 -1788
- package/lib/{runtime-Bk6lFgxd.js → runtime-zuuBe8x1.js} +1 -1
- package/lib/{starter-resolution-DXcN5HsU.js → starter-resolution-DoFp9FLr.js} +5 -5
- package/lib/starter.js +1 -1
- package/lib/{strategy-configuration-sVkKToSW.js → strategy-configuration-CLHxaPOb.js} +1 -1
- package/lib/testing.js +2 -2
- package/lib/types/src/client/GlobalLocationSetting.d.ts +19 -0
- package/lib/types/src/client/component-ui.d.ts +68 -0
- package/lib/types/src/client/extension-sdk.d.ts +5 -1
- package/lib/types/src/client/feedback.d.ts +65 -0
- package/lib/types/src/client/locales.d.ts +128 -122
- package/lib/types/src/client/page-controls.d.ts +7 -0
- package/lib/types/src/client/settings-controls.d.ts +66 -0
- package/lib/types/src/client/settings-panel.d.ts +58 -0
- package/lib/types/src/core/contracts/view.d.ts +9 -0
- package/lib/types/src/host/config-values.d.ts +1 -1
- package/lib/types/src/host/memory-tools.d.ts +139 -0
- package/lib/types/src/host/protocol.d.ts +59 -13
- package/lib/types/src/host/starter-components.d.ts +20 -0
- package/lib/types/src/host/sync-rules.d.ts +32 -0
- package/package.json +39 -39
|
@@ -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;
|
|
@@ -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
|
|
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]>;
|
|
@@ -21,9 +21,11 @@ export interface MemoryCompositionStatus {
|
|
|
21
21
|
configuration: ResolvedMemoryTopologyConfig;
|
|
22
22
|
}
|
|
23
23
|
import type { RecallQualityConfig, ResolvedRecallQualityConfig, MnemonEmbeddingConfig, ResolvedMnemonEmbeddingConfig } from 'dsh-mnemon-source-memory-spaces/contracts';
|
|
24
|
-
import type { MemoryPersistenceStrategy, ResolvedMemoryPersistenceStrategy, MemoryProviderRuntimeStatus,
|
|
24
|
+
import type { MemoryPersistenceStrategy, ResolvedMemoryPersistenceStrategy, MemoryProviderRuntimeStatus, MemorySpaceStats, MemorySpaceView } from 'dsh-mnemon-source-memory-spaces/contracts';
|
|
25
25
|
import type { ConnectionHandle as DshClientConnectionHandle } from '@deepseek-ai/dsh-client-connection/client';
|
|
26
|
-
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';
|
|
27
29
|
export declare const MNEMON_READ_CHANNEL = "/dsh-mnemon-read";
|
|
28
30
|
export declare const MNEMON_ACTIVATION_CHANNEL = "/dsh-mnemon-activation";
|
|
29
31
|
export declare const MNEMON_WRITE_CHANNEL = "/dsh-mnemon-write";
|
|
@@ -67,6 +69,28 @@ export declare const MNEMON_REMOTE_REVIEW_ENDPOINT = "dshMnemon/review";
|
|
|
67
69
|
export declare const MNEMON_SETTINGS_NAMESPACE = "mnemon";
|
|
68
70
|
export declare const MNEMON_UI_SETTINGS_NAMESPACE = "mnemon-ui";
|
|
69
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];
|
|
70
94
|
export type JsonPrimitive = string | number | boolean | null;
|
|
71
95
|
export type JsonValue = JsonPrimitive | JsonValue[] | {
|
|
72
96
|
[key: string]: JsonValue;
|
|
@@ -201,6 +225,7 @@ export interface ResolvedRuntimeMemoryConfig {
|
|
|
201
225
|
userLimitBytes: number;
|
|
202
226
|
maintenanceMaxTokens: number;
|
|
203
227
|
}
|
|
228
|
+
export { STARTER_COMPONENT_ROWS } from './starter-components.ts';
|
|
204
229
|
export { normalizeDisplayMode } from './display-mode.ts';
|
|
205
230
|
export type MnemonDisplayMode = 'sidebar' | 'builtin';
|
|
206
231
|
export declare const DEFAULT_IDLE_REVIEW: {
|
|
@@ -261,6 +286,7 @@ export interface Config {
|
|
|
261
286
|
idleReviewMs?: number;
|
|
262
287
|
idleReview?: Partial<ResolvedIdleReviewConfig>;
|
|
263
288
|
conversationInteraction?: {
|
|
289
|
+
/** @deprecated Switches nothing. Stored profiles may still hold it; the resolved config leaves it out. */
|
|
264
290
|
toolviews?: boolean;
|
|
265
291
|
turnBar?: boolean;
|
|
266
292
|
saveAction?: boolean;
|
|
@@ -372,7 +398,6 @@ export interface ResolvedConfig {
|
|
|
372
398
|
idleReviewMs: number;
|
|
373
399
|
idleReview: ResolvedIdleReviewConfig;
|
|
374
400
|
conversationInteraction: {
|
|
375
|
-
toolviews: boolean;
|
|
376
401
|
turnBar: boolean;
|
|
377
402
|
saveAction: boolean;
|
|
378
403
|
};
|
|
@@ -515,6 +540,37 @@ export interface DelegatedWriteResult {
|
|
|
515
540
|
export interface SupervisedWritebackResult extends DelegatedWriteResult {
|
|
516
541
|
sessionId: string;
|
|
517
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
|
+
};
|
|
518
574
|
export type LifecyclePhase = 'idle' | 'prime' | 'recall' | 'writeback' | 'review' | 'supervised' | 'error';
|
|
519
575
|
export interface LifecycleCounters {
|
|
520
576
|
primes: number;
|
|
@@ -698,8 +754,6 @@ export interface MnemonMachineIdentity {
|
|
|
698
754
|
* which the name then follows, or a name a person typed, which stays as given.
|
|
699
755
|
*/
|
|
700
756
|
export type MnemonMachineLabelSource = 'hostname' | 'custom';
|
|
701
|
-
/** The longest name an installation carries; a host name past it is shortened. */
|
|
702
|
-
export declare const MNEMON_MACHINE_LABEL_MAX = 120;
|
|
703
757
|
/** Which machine wrote one runtime entry, so a merge can tell two installations apart. */
|
|
704
758
|
export interface MnemonEntryOrigin {
|
|
705
759
|
machine: string;
|
|
@@ -1227,11 +1281,3 @@ export interface VersionUpdateResult {
|
|
|
1227
1281
|
restartRequired: boolean;
|
|
1228
1282
|
output?: string;
|
|
1229
1283
|
}
|
|
1230
|
-
export declare const CATEGORIES: readonly ["preference", "decision", "fact", "insight", "context", "general"];
|
|
1231
|
-
export declare const SOURCES: readonly ["user", "agent", "external"];
|
|
1232
|
-
export declare const EDGE_TYPES: readonly ["temporal", "semantic", "causal", "entity"];
|
|
1233
|
-
export declare const INTENTS: readonly ["WHY", "WHEN", "ENTITY", "GENERAL"];
|
|
1234
|
-
export declare const DEFAULT_EMBEDDING_ENDPOINT = "http://localhost:11434";
|
|
1235
|
-
export declare const DEFAULT_EMBEDDING_MODEL = "nomic-embed-text";
|
|
1236
|
-
export declare const DEFAULT_EMBEDDING_PROTOCOL = "auto";
|
|
1237
|
-
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,32 @@
|
|
|
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. An HTTPS
|
|
17
|
+
* address may name the user a host wants its token offered under, as Bitbucket's do, but never a
|
|
18
|
+
* password, nor a token written where that name goes.
|
|
19
|
+
*/
|
|
20
|
+
export declare function syncRepositoryProblem(url: string, localPath: (path: string) => boolean): MnemonSyncRepositoryProblem | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* A local path that is absolute on POSIX or on Windows, for the browser, which cannot tell which
|
|
23
|
+
* platform the Host runs on: a POSIX path, a Windows path on a drive, or a UNC share. The Host
|
|
24
|
+
* checks a path by its own platform's rule instead.
|
|
25
|
+
*/
|
|
26
|
+
export declare function portableAbsolutePath(path: string): boolean;
|
|
27
|
+
/** A commit author's address. */
|
|
28
|
+
export declare function syncEmailValid(email: string): boolean;
|
|
29
|
+
/** A name for this machine, as it is stored and shown: one line of at most MNEMON_MACHINE_LABEL_MAX characters. */
|
|
30
|
+
export declare function machineLabelValid(label: string): boolean;
|
|
31
|
+
/** A GitHub repository name, as GitHub accepts one. */
|
|
32
|
+
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.
|
|
3
|
+
"version": "0.5.33",
|
|
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",
|
|
@@ -164,13 +164,13 @@
|
|
|
164
164
|
"dsh-mnemon-provider-openviking": "0.5.8",
|
|
165
165
|
"dsh-mnemon-provider-retaindb": "0.5.6",
|
|
166
166
|
"dsh-mnemon-provider-supermemory": "0.5.5",
|
|
167
|
-
"dsh-mnemon-source-documents": "0.5.
|
|
168
|
-
"dsh-mnemon-source-memory-spaces": "0.5.
|
|
169
|
-
"dsh-mnemon-source-runtime": "0.5.
|
|
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
170
|
"dsh-mnemon-strategy-auto-capture": "0.5.5",
|
|
171
|
-
"dsh-mnemon-strategy-default-three-tier": "0.5.
|
|
171
|
+
"dsh-mnemon-strategy-default-three-tier": "0.5.10",
|
|
172
172
|
"dsh-mnemon-strategy-general": "0.5.1",
|
|
173
|
-
"dsh-mnemon-strategy-light-context": "0.5.
|
|
173
|
+
"dsh-mnemon-strategy-light-context": "0.5.6",
|
|
174
174
|
"dsh-mnemon-strategy-scoped": "0.5.5",
|
|
175
175
|
"fflate": "^0.8.3",
|
|
176
176
|
"yaml": "^2.9.0",
|
|
@@ -187,39 +187,39 @@
|
|
|
187
187
|
"@arethetypeswrong/cli": "^0.18.5",
|
|
188
188
|
"@changesets/cli": "^2.31.1",
|
|
189
189
|
"@deepseek-ai/cordis": "^4.0.5",
|
|
190
|
-
"@deepseek-ai/dsh": "0.2.1-rc.
|
|
191
|
-
"@deepseek-ai/dsh-agent": "0.2.1-rc.
|
|
192
|
-
"@deepseek-ai/dsh-agent-loop": "0.2.1-rc.
|
|
193
|
-
"@deepseek-ai/dsh-api-gateway": "0.2.1-rc.
|
|
194
|
-
"@deepseek-ai/dsh-app-boot": "0.2.1-rc.
|
|
195
|
-
"@deepseek-ai/dsh-client-connection": "0.2.1-rc.
|
|
196
|
-
"@deepseek-ai/dsh-client-locale": "0.2.1-rc.
|
|
197
|
-
"@deepseek-ai/dsh-client-store": "0.2.1-rc.
|
|
198
|
-
"@deepseek-ai/dsh-client-ui-chat": "0.2.1-rc.
|
|
199
|
-
"@deepseek-ai/dsh-client-ui-conversation": "0.2.1-rc.
|
|
200
|
-
"@deepseek-ai/dsh-client-ui-layout": "0.2.1-rc.
|
|
201
|
-
"@deepseek-ai/dsh-client-ui-plugin-manager": "0.2.1-rc.
|
|
202
|
-
"@deepseek-ai/dsh-client-ui-primitives": "0.2.1-rc.
|
|
203
|
-
"@deepseek-ai/dsh-client-ui-renderer": "0.2.1-rc.
|
|
204
|
-
"@deepseek-ai/dsh-client-ui-session": "0.2.1-rc.
|
|
205
|
-
"@deepseek-ai/dsh-client-ui-settings": "0.2.1-rc.
|
|
206
|
-
"@deepseek-ai/dsh-client-ui-sidebar": "0.2.1-rc.
|
|
207
|
-
"@deepseek-ai/dsh-client-ui-slots": "0.2.1-rc.
|
|
208
|
-
"@deepseek-ai/dsh-client-ui-tool": "0.2.1-rc.
|
|
209
|
-
"@deepseek-ai/dsh-llm": "0.2.1-rc.
|
|
210
|
-
"@deepseek-ai/dsh-session": "0.2.1-rc.
|
|
211
|
-
"@deepseek-ai/dsh-session-format-v0-to-v1": "0.2.1-rc.
|
|
212
|
-
"@deepseek-ai/dsh-session-persistence-jsonl": "0.2.1-rc.
|
|
213
|
-
"@deepseek-ai/dsh-session-projection": "0.2.1-rc.
|
|
214
|
-
"@deepseek-ai/dsh-session-query": "0.2.1-rc.
|
|
215
|
-
"@deepseek-ai/dsh-subagent": "0.2.1-rc.
|
|
216
|
-
"@deepseek-ai/dsh-subagent-spawn-in-process": "0.2.1-rc.
|
|
217
|
-
"@deepseek-ai/dsh-system-prompt": "0.2.1-rc.
|
|
218
|
-
"@deepseek-ai/dsh-tools": "0.2.1-rc.
|
|
219
|
-
"@deepseek-ai/dsh-typert-protocol": "0.2.1-rc.
|
|
220
|
-
"@deepseek-ai/dsh-typert-registry": "0.2.1-rc.
|
|
221
|
-
"@deepseek-ai/dsh-util-code-language": "0.2.1-rc.
|
|
222
|
-
"@deepseek-ai/dsh-util-workspace-path": "0.2.1-rc.
|
|
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",
|