dsh-mnemon 0.1.5 → 0.2.0
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 +125 -104
- package/README.zh-CN.md +130 -109
- package/THIRD_PARTY_NOTICES.md +7 -0
- package/lib/client.js +4193 -1128
- package/lib/index.js +4326 -307
- package/lib/types/activity.d.ts +2 -18
- package/lib/types/channels.d.ts +1 -4
- package/lib/types/client/GlobalLocationSetting.d.ts +19 -0
- package/lib/types/client/MnemonLogo.d.ts +0 -1
- package/lib/types/client/MnemonPackSection.d.ts +5 -3
- package/lib/types/client/MnemonSaveAction.d.ts +1 -2
- package/lib/types/client/MnemonSettingsCard.d.ts +5 -4
- package/lib/types/client/MnemonTurnTail.d.ts +1 -2
- package/lib/types/client/MnemonView.d.ts +1 -3
- package/lib/types/client/MnemonViewAppearance.d.ts +0 -1
- package/lib/types/client/ProviderIcon.d.ts +8 -0
- package/lib/types/client/ProviderSettingsSection.d.ts +16 -0
- package/lib/types/client/anchor.d.ts +0 -1
- package/lib/types/client/api.d.ts +12 -19
- package/lib/types/client/dsh-compat.d.ts +0 -1
- package/lib/types/client/index.d.ts +0 -1
- package/lib/types/client/locales.d.ts +552 -1
- package/lib/types/client/settings.d.ts +4 -3
- package/lib/types/client/sidebar-entry.d.ts +0 -1
- package/lib/types/client/workspace-controller.d.ts +0 -1
- package/lib/types/client/workspace-mount.d.ts +1 -3
- package/lib/types/commands.d.ts +0 -1
- package/lib/types/config-values.d.ts +0 -1
- package/lib/types/config.d.ts +6 -80
- package/lib/types/contracts.d.ts +38 -62
- package/lib/types/documents.d.ts +2 -79
- package/lib/types/guidance.d.ts +0 -1
- package/lib/types/index.d.ts +0 -1
- package/lib/types/lifecycle.d.ts +32 -47
- package/lib/types/live-runtime.d.ts +0 -1
- package/lib/types/memory-bodies.d.ts +27 -23
- package/lib/types/pack.d.ts +2 -48
- package/lib/types/process.d.ts +4 -2
- package/lib/types/provider-placement.d.ts +26 -0
- package/lib/types/providers/byterover.d.ts +31 -0
- package/lib/types/providers/catalog.d.ts +23 -0
- package/lib/types/providers/hindsight.d.ts +19 -0
- package/lib/types/providers/holographic.d.ts +22 -0
- package/lib/types/providers/honcho.d.ts +18 -0
- package/lib/types/providers/http.d.ts +32 -0
- package/lib/types/providers/mem0.d.ts +17 -0
- package/lib/types/providers/openviking.d.ts +31 -0
- package/lib/types/providers/provider.d.ts +38 -0
- package/lib/types/providers/retaindb.d.ts +16 -0
- package/lib/types/providers/supermemory.d.ts +16 -0
- package/lib/types/review-activity.d.ts +2 -16
- package/lib/types/rpc.d.ts +1 -2
- package/lib/types/runner.d.ts +15 -11
- package/lib/types/runtime-memory.d.ts +2 -59
- package/lib/types/service.d.ts +54 -152
- package/lib/types/settings.d.ts +1 -4
- package/lib/types/shared/contracts.d.ts +869 -0
- package/lib/types/storage-scope.d.ts +2 -29
- package/lib/types/subagent.d.ts +11 -16
- package/lib/types/tools.d.ts +0 -1
- package/lib/types/version-updates.d.ts +2 -29
- package/package.json +22 -9
- package/docs/README.md +0 -8
- package/docs/assets/diagrams/en/memory-system-flow.png +0 -0
- package/docs/assets/diagrams/en/project-architecture.svg +0 -182
- package/docs/assets/diagrams/zh-CN/memory-system-flow.png +0 -0
- package/docs/assets/diagrams/zh-CN/project-architecture.svg +0 -182
- package/docs/assets/media/dsh-mnemon-memory-system-demo-poster.jpg +0 -0
- package/docs/assets/media/dsh-mnemon-memory-system-demo.gif +0 -0
- package/docs/assets/media/dsh-mnemon-memory-system-demo.mp4 +0 -0
- package/docs/assets/screenshots/conversation-memory-jump.png +0 -0
- package/docs/assets/screenshots/conversation-save-dialog.png +0 -0
- package/docs/assets/screenshots/conversation-turn-memory.png +0 -0
- package/docs/assets/screenshots/document-create-dialog.png +0 -0
- package/docs/assets/screenshots/documents-markdown.png +0 -0
- package/docs/assets/screenshots/entities-context.png +0 -0
- package/docs/assets/screenshots/memory-content.png +0 -0
- package/docs/assets/screenshots/overview-memory-graph.png +0 -0
- package/docs/assets/screenshots/recall-agent-answer.png +0 -0
- package/docs/assets/screenshots/remember-dialog.png +0 -0
- package/docs/assets/screenshots/runtime-memory-add.png +0 -0
- package/docs/assets/screenshots/runtime-memory.png +0 -0
- package/docs/assets/screenshots/settings-memory-system.png +0 -0
- package/docs/assets/screenshots/status-overview.png +0 -0
- package/docs/assets/screenshots/version-check.png +0 -0
- package/docs/en/README.md +0 -48
- package/docs/en/architecture.md +0 -133
- package/docs/en/configuration.md +0 -234
- package/docs/en/development.md +0 -198
- package/docs/en/getting-started.md +0 -199
- package/docs/en/interfaces.md +0 -181
- package/docs/en/operations.md +0 -173
- package/docs/en/project-overview.md +0 -145
- package/docs/en/roadmap.md +0 -41
- package/docs/en/storage-model.md +0 -185
- package/docs/en/ui-guide.md +0 -156
- package/docs/en/workflows.md +0 -290
- package/docs/zh-CN/README.md +0 -48
- package/docs/zh-CN/architecture.md +0 -133
- package/docs/zh-CN/configuration.md +0 -234
- package/docs/zh-CN/development.md +0 -198
- package/docs/zh-CN/getting-started.md +0 -199
- package/docs/zh-CN/interfaces.md +0 -181
- package/docs/zh-CN/operations.md +0 -173
- package/docs/zh-CN/project-overview.md +0 -145
- package/docs/zh-CN/roadmap.md +0 -41
- package/docs/zh-CN/storage-model.md +0 -185
- package/docs/zh-CN/ui-guide.md +0 -160
- package/docs/zh-CN/workflows.md +0 -290
- package/lib/client.js.map +0 -1
- package/lib/types/activity.d.ts.map +0 -1
- package/lib/types/activity.js +0 -93
- package/lib/types/activity.js.map +0 -1
- package/lib/types/channels.d.ts.map +0 -1
- package/lib/types/channels.js +0 -4
- package/lib/types/channels.js.map +0 -1
- package/lib/types/client/MnemonLogo.d.ts.map +0 -1
- package/lib/types/client/MnemonLogo.js +0 -6
- package/lib/types/client/MnemonLogo.js.map +0 -1
- package/lib/types/client/MnemonPackSection.d.ts.map +0 -1
- package/lib/types/client/MnemonPackSection.js +0 -136
- package/lib/types/client/MnemonPackSection.js.map +0 -1
- package/lib/types/client/MnemonSaveAction.d.ts.map +0 -1
- package/lib/types/client/MnemonSaveAction.js +0 -90
- package/lib/types/client/MnemonSaveAction.js.map +0 -1
- package/lib/types/client/MnemonSettingsCard.d.ts.map +0 -1
- package/lib/types/client/MnemonSettingsCard.js +0 -155
- package/lib/types/client/MnemonSettingsCard.js.map +0 -1
- package/lib/types/client/MnemonTurnTail.d.ts.map +0 -1
- package/lib/types/client/MnemonTurnTail.js +0 -56
- package/lib/types/client/MnemonTurnTail.js.map +0 -1
- package/lib/types/client/MnemonView.d.ts.map +0 -1
- package/lib/types/client/MnemonView.js +0 -1594
- package/lib/types/client/MnemonView.js.map +0 -1
- package/lib/types/client/MnemonViewAppearance.d.ts.map +0 -1
- package/lib/types/client/MnemonViewAppearance.js +0 -67
- package/lib/types/client/MnemonViewAppearance.js.map +0 -1
- package/lib/types/client/anchor.d.ts.map +0 -1
- package/lib/types/client/anchor.js +0 -46
- package/lib/types/client/anchor.js.map +0 -1
- package/lib/types/client/api.d.ts.map +0 -1
- package/lib/types/client/api.js +0 -150
- package/lib/types/client/api.js.map +0 -1
- package/lib/types/client/dsh-compat.d.ts.map +0 -1
- package/lib/types/client/dsh-compat.js +0 -2
- package/lib/types/client/dsh-compat.js.map +0 -1
- package/lib/types/client/index.d.ts.map +0 -1
- package/lib/types/client/index.js +0 -161
- package/lib/types/client/index.js.map +0 -1
- package/lib/types/client/locales.d.ts.map +0 -1
- package/lib/types/client/locales.js +0 -1172
- package/lib/types/client/locales.js.map +0 -1
- package/lib/types/client/settings.d.ts.map +0 -1
- package/lib/types/client/settings.js +0 -70
- package/lib/types/client/settings.js.map +0 -1
- package/lib/types/client/sidebar-entry.d.ts.map +0 -1
- package/lib/types/client/sidebar-entry.js +0 -134
- package/lib/types/client/sidebar-entry.js.map +0 -1
- package/lib/types/client/workspace-controller.d.ts.map +0 -1
- package/lib/types/client/workspace-controller.js +0 -21
- package/lib/types/client/workspace-controller.js.map +0 -1
- package/lib/types/client/workspace-mount.d.ts.map +0 -1
- package/lib/types/client/workspace-mount.js +0 -138
- package/lib/types/client/workspace-mount.js.map +0 -1
- package/lib/types/commands.d.ts.map +0 -1
- package/lib/types/commands.js +0 -104
- package/lib/types/commands.js.map +0 -1
- package/lib/types/config-values.d.ts.map +0 -1
- package/lib/types/config-values.js +0 -4
- package/lib/types/config-values.js.map +0 -1
- package/lib/types/config.d.ts.map +0 -1
- package/lib/types/config.js +0 -127
- package/lib/types/config.js.map +0 -1
- package/lib/types/contracts.d.ts.map +0 -1
- package/lib/types/contracts.js +0 -2
- package/lib/types/contracts.js.map +0 -1
- package/lib/types/documents.d.ts.map +0 -1
- package/lib/types/documents.js +0 -495
- package/lib/types/documents.js.map +0 -1
- package/lib/types/guidance.d.ts.map +0 -1
- package/lib/types/guidance.js +0 -34
- package/lib/types/guidance.js.map +0 -1
- package/lib/types/index.d.ts.map +0 -1
- package/lib/types/index.js +0 -55
- package/lib/types/index.js.map +0 -1
- package/lib/types/lifecycle.d.ts.map +0 -1
- package/lib/types/lifecycle.js +0 -456
- package/lib/types/lifecycle.js.map +0 -1
- package/lib/types/live-runtime.d.ts.map +0 -1
- package/lib/types/live-runtime.js +0 -146
- package/lib/types/live-runtime.js.map +0 -1
- package/lib/types/memory-bodies.d.ts.map +0 -1
- package/lib/types/memory-bodies.js +0 -186
- package/lib/types/memory-bodies.js.map +0 -1
- package/lib/types/pack.d.ts.map +0 -1
- package/lib/types/pack.js +0 -709
- package/lib/types/pack.js.map +0 -1
- package/lib/types/process.d.ts.map +0 -1
- package/lib/types/process.js +0 -65
- package/lib/types/process.js.map +0 -1
- package/lib/types/review-activity.d.ts.map +0 -1
- package/lib/types/review-activity.js +0 -37
- package/lib/types/review-activity.js.map +0 -1
- package/lib/types/rpc.d.ts.map +0 -1
- package/lib/types/rpc.js +0 -384
- package/lib/types/rpc.js.map +0 -1
- package/lib/types/runner.d.ts.map +0 -1
- package/lib/types/runner.js +0 -198
- package/lib/types/runner.js.map +0 -1
- package/lib/types/runtime-memory.d.ts.map +0 -1
- package/lib/types/runtime-memory.js +0 -415
- package/lib/types/runtime-memory.js.map +0 -1
- package/lib/types/service.d.ts.map +0 -1
- package/lib/types/service.js +0 -512
- package/lib/types/service.js.map +0 -1
- package/lib/types/settings.d.ts.map +0 -1
- package/lib/types/settings.js +0 -103
- package/lib/types/settings.js.map +0 -1
- package/lib/types/storage-scope.d.ts.map +0 -1
- package/lib/types/storage-scope.js +0 -179
- package/lib/types/storage-scope.js.map +0 -1
- package/lib/types/subagent.d.ts.map +0 -1
- package/lib/types/subagent.js +0 -624
- package/lib/types/subagent.js.map +0 -1
- package/lib/types/tools.d.ts.map +0 -1
- package/lib/types/tools.js +0 -341
- package/lib/types/tools.js.map +0 -1
- package/lib/types/version-updates.d.ts.map +0 -1
- package/lib/types/version-updates.js +0 -383
- package/lib/types/version-updates.js.map +0 -1
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ClientConnectionHandle, type ClientSettingsScope, type ClientSettingsSnapshot, type SettingsOperation } from '../shared/contracts.ts';
|
|
2
2
|
export declare class MnemonSettingsScope<T extends object> implements ClientSettingsScope<T> {
|
|
3
3
|
private readonly connection;
|
|
4
4
|
private readonly namespace;
|
|
5
|
+
private readonly requestTimeoutMs;
|
|
5
6
|
private snapshot;
|
|
6
7
|
private readonly listeners;
|
|
7
8
|
private tail;
|
|
8
|
-
constructor(connection: ClientConnectionHandle, namespace?: string);
|
|
9
|
+
constructor(connection: ClientConnectionHandle, namespace?: string, requestTimeoutMs?: number);
|
|
9
10
|
getSnapshot: () => ClientSettingsSnapshot<T>;
|
|
10
11
|
subscribe: (listener: () => void) => (() => void);
|
|
11
12
|
set(field: string, value: unknown): Promise<void>;
|
|
@@ -17,6 +18,6 @@ export declare class MnemonSettingsScope<T extends object> implements ClientSett
|
|
|
17
18
|
mutate(ops: SettingsOperation[]): Promise<void>;
|
|
18
19
|
private load;
|
|
19
20
|
private write;
|
|
21
|
+
private call;
|
|
20
22
|
private publish;
|
|
21
23
|
}
|
|
22
|
-
//# sourceMappingURL=settings.d.ts.map
|
|
@@ -3,4 +3,3 @@ import type { MnemonWorkspaceController } from './workspace-controller.ts';
|
|
|
3
3
|
export declare const MNEMON_ENTRY_SELECTOR = "[data-dsh-mnemon-entry]";
|
|
4
4
|
/** Mount a self-healing official-style entry under the New Session row. */
|
|
5
5
|
export declare function mountMnemonSidebarEntry(controller: MnemonWorkspaceController, t: MnemonTranslate, subscribeLocale?: (listener: () => void) => () => void): () => void;
|
|
6
|
-
//# sourceMappingURL=sidebar-entry.d.ts.map
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import type { Config } from '../
|
|
2
|
-
import type { ClientSettingsScope } from '../contracts.ts';
|
|
1
|
+
import type { ClientSettingsScope, Config } from '../shared/contracts.ts';
|
|
3
2
|
import type { MnemonClientContext } from './dsh-compat.ts';
|
|
4
3
|
import type { MnemonTranslate } from './locales.ts';
|
|
5
4
|
export declare const MNEMON_VIEW_SELECTOR = "[data-dsh-mnemon-view]";
|
|
6
5
|
/** Mount the sidebar row and its stateful center-column workspace as one unit. */
|
|
7
6
|
export declare function mountMnemonWorkspace(ctx: MnemonClientContext, settings: ClientSettingsScope<Config>, t: MnemonTranslate): () => void;
|
|
8
|
-
//# sourceMappingURL=workspace-mount.d.ts.map
|
package/lib/types/commands.d.ts
CHANGED
|
@@ -11,4 +11,3 @@ interface AgentServiceSource {
|
|
|
11
11
|
export declare function createMnemonCommand(service: MnemonService | AgentServiceSource, coordinator: MnemonSubagentCoordinator): CommandDefinition;
|
|
12
12
|
export declare function registerCommands(commands: CommandService, service: MnemonService | AgentServiceSource, coordinator: MnemonSubagentCoordinator): void;
|
|
13
13
|
export {};
|
|
14
|
-
//# sourceMappingURL=commands.d.ts.map
|
package/lib/types/config.d.ts
CHANGED
|
@@ -1,86 +1,12 @@
|
|
|
1
1
|
import z from 'schemastery';
|
|
2
|
+
import type { Config as SharedConfig, CustomPackConfig as SharedCustomPackConfig, InteractionConfig as SharedInteractionConfig, ResolvedConfig as SharedResolvedConfig, ResolvedInteractionConfig as SharedResolvedInteractionConfig } from './shared/contracts.ts';
|
|
2
3
|
export { DEFAULT_IDLE_REVIEW_MS, DEFAULT_RECALL_LIMIT, DEFAULT_TIMEOUT_MS } from './config-values.ts';
|
|
3
|
-
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
cliPath?: string;
|
|
9
|
-
/** Custom Mnemon base directory; also retained as a legacy dataDir-only scope selection. */
|
|
10
|
-
dataDir?: string;
|
|
11
|
-
/** @deprecated Migration-only selector from the former named-Pack settings UI. */
|
|
12
|
-
customPackId?: string;
|
|
13
|
-
/** @deprecated Migration-only roots from the former named-Pack settings UI. */
|
|
14
|
-
customPacks?: CustomPackConfig[];
|
|
15
|
-
/** Legacy store hint used to bootstrap or discover the initial Memory Space. */
|
|
16
|
-
store?: string;
|
|
17
|
-
/** Hard deadline for one CLI process. */
|
|
18
|
-
timeoutMs?: number;
|
|
19
|
-
/** Default number of recall results exposed to the agent and Web workspace. */
|
|
20
|
-
defaultRecallLimit?: number;
|
|
21
|
-
/** Add conservative recall/writeback guidance to the DSH system prompt. */
|
|
22
|
-
routingGuidance?: boolean;
|
|
23
|
-
/** Choose where the DSH Web memory workspace is mounted. */
|
|
24
|
-
displayMode?: 'sidebar' | 'buildin';
|
|
25
|
-
/** Register the configured DSH Web memory workspace. */
|
|
26
|
-
tabEnabled?: boolean;
|
|
27
|
-
/** Allow remember/link/forget mutations. Recall and status remain available when false. */
|
|
28
|
-
writeEnabled?: boolean;
|
|
29
|
-
/** Enable DSH agent lifecycle integration (Prime plus recall/remember cues). */
|
|
30
|
-
lifecycleEnabled?: boolean;
|
|
31
|
-
/** Recall behavior at the first step of each DSH turn. */
|
|
32
|
-
recallMode?: 'guided' | 'off';
|
|
33
|
-
/** Enable the short remember cue and the scored, debounced full-checkpoint review. */
|
|
34
|
-
writebackMode?: 'guided' | 'off';
|
|
35
|
-
/** Continuous root-agent idle time after the QoderWork activity gate is met. */
|
|
36
|
-
idleReviewMs?: number;
|
|
37
|
-
/** @deprecated Migration source for pre-0.2 settings; new writes use the live `mnemon-ui` namespace. */
|
|
38
|
-
conversationInteraction?: {
|
|
39
|
-
/** @deprecated Removed. Mnemon now uses DSH's standard tool presentation. */
|
|
40
|
-
toolviews?: boolean;
|
|
41
|
-
/** Per-turn memory activity bar under completed turns. */
|
|
42
|
-
turnBar?: boolean;
|
|
43
|
-
/** Save-to-memory action on finalized assistant messages. */
|
|
44
|
-
saveAction?: boolean;
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
export interface CustomPackConfig {
|
|
48
|
-
id: string;
|
|
49
|
-
name: string;
|
|
50
|
-
dataDir: string;
|
|
51
|
-
}
|
|
52
|
-
/** Browser-only interaction settings, registered live under `mnemon-ui`. */
|
|
53
|
-
export interface InteractionConfig {
|
|
54
|
-
turnBar?: boolean;
|
|
55
|
-
saveAction?: boolean;
|
|
56
|
-
}
|
|
4
|
+
export type Config = SharedConfig;
|
|
5
|
+
export type CustomPackConfig = SharedCustomPackConfig;
|
|
6
|
+
export type InteractionConfig = SharedInteractionConfig;
|
|
7
|
+
export type ResolvedConfig = SharedResolvedConfig;
|
|
8
|
+
export type ResolvedInteractionConfig = SharedResolvedInteractionConfig;
|
|
57
9
|
export declare const InteractionConfig: z<InteractionConfig>;
|
|
58
10
|
export declare const Config: z<Config>;
|
|
59
|
-
export interface ResolvedConfig {
|
|
60
|
-
storageScope: 'global' | 'workspace' | 'custom';
|
|
61
|
-
cliPath?: string;
|
|
62
|
-
dataDir?: string;
|
|
63
|
-
store?: string;
|
|
64
|
-
timeoutMs: number;
|
|
65
|
-
defaultRecallLimit: number;
|
|
66
|
-
routingGuidance: boolean;
|
|
67
|
-
displayMode: 'sidebar' | 'buildin';
|
|
68
|
-
tabEnabled: boolean;
|
|
69
|
-
writeEnabled: boolean;
|
|
70
|
-
lifecycleEnabled: boolean;
|
|
71
|
-
recallMode: 'guided' | 'off';
|
|
72
|
-
writebackMode: 'guided' | 'off';
|
|
73
|
-
idleReviewMs: number;
|
|
74
|
-
conversationInteraction: {
|
|
75
|
-
toolviews: boolean;
|
|
76
|
-
turnBar: boolean;
|
|
77
|
-
saveAction: boolean;
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
export interface ResolvedInteractionConfig {
|
|
81
|
-
turnBar: boolean;
|
|
82
|
-
saveAction: boolean;
|
|
83
|
-
}
|
|
84
11
|
export declare function resolveInteractionConfig(config?: InteractionConfig): ResolvedInteractionConfig;
|
|
85
12
|
export declare function resolveConfig(config?: Config): ResolvedConfig;
|
|
86
|
-
//# sourceMappingURL=config.d.ts.map
|
package/lib/types/contracts.d.ts
CHANGED
|
@@ -1,35 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export type JsonPrimitive
|
|
3
|
-
export type JsonValue = JsonPrimitive | JsonValue[] | {
|
|
4
|
-
[key: string]: JsonValue;
|
|
5
|
-
};
|
|
6
|
-
/** Plugin RPC failures use only error branches accepted by DSH's closed wire schema. */
|
|
7
|
-
export type RpcError = {
|
|
8
|
-
code: 'bad-request';
|
|
9
|
-
message: string;
|
|
10
|
-
details: {
|
|
11
|
-
issues: JsonValue[];
|
|
12
|
-
};
|
|
13
|
-
} | {
|
|
14
|
-
code: 'settings-rejected';
|
|
15
|
-
message: string;
|
|
16
|
-
details: {
|
|
17
|
-
ns: string;
|
|
18
|
-
};
|
|
19
|
-
} | {
|
|
20
|
-
code: 'internal';
|
|
21
|
-
message: string;
|
|
22
|
-
details: Record<string, never>;
|
|
23
|
-
};
|
|
24
|
-
export type RpcResult<T = JsonValue> = {
|
|
25
|
-
ok: true;
|
|
26
|
-
value: T;
|
|
27
|
-
} | {
|
|
28
|
-
ok: false;
|
|
29
|
-
error: RpcError;
|
|
30
|
-
};
|
|
31
|
-
/** Public DSH browser RPC face; the plugin intentionally consumes no other connection state. */
|
|
32
|
-
export type ClientConnectionHandle = Pick<DshClientConnectionHandle, 'rpc'>;
|
|
1
|
+
import type { RpcResult, SettingsOperation } from './shared/contracts.ts';
|
|
2
|
+
export type { ClientConnectionHandle, ClientSettingsScope, ClientSettingsSnapshot, JsonPrimitive, JsonValue, RpcError, RpcResult, SettingsOperation, } from './shared/contracts.ts';
|
|
33
3
|
export type HostRpcHandler = (endpoint: string, payload: unknown) => Promise<RpcResult<unknown>>;
|
|
34
4
|
export interface HostConnectionHandle {
|
|
35
5
|
rpc: {
|
|
@@ -147,6 +117,7 @@ export interface HostAgent {
|
|
|
147
117
|
origin?: 'subagent';
|
|
148
118
|
delegationDepth?: number;
|
|
149
119
|
cwd?: string;
|
|
120
|
+
agentPreset?: string;
|
|
150
121
|
};
|
|
151
122
|
events: readonly HostSessionEvent[];
|
|
152
123
|
};
|
|
@@ -155,9 +126,29 @@ export interface HostAgent {
|
|
|
155
126
|
steer(message: HostUserMessage): void;
|
|
156
127
|
inject(message: HostUserMessage): void;
|
|
157
128
|
}
|
|
129
|
+
export interface HostAgentHandle {
|
|
130
|
+
agent: HostAgent;
|
|
131
|
+
dispose(): Promise<void>;
|
|
132
|
+
}
|
|
133
|
+
export interface CreateHostAgentOptions {
|
|
134
|
+
sessionId: string;
|
|
135
|
+
meta?: {
|
|
136
|
+
cwd?: string;
|
|
137
|
+
agentPreset?: string;
|
|
138
|
+
};
|
|
139
|
+
agentOptions?: {
|
|
140
|
+
provider?: string;
|
|
141
|
+
model?: string;
|
|
142
|
+
maxTokens?: number;
|
|
143
|
+
};
|
|
144
|
+
signal?: AbortSignal;
|
|
145
|
+
setup?: (agentCtx: HostAgentContext) => unknown | Promise<unknown>;
|
|
146
|
+
}
|
|
158
147
|
export interface HostAgentsService {
|
|
159
148
|
get(id: string): HostAgent | undefined;
|
|
160
149
|
roots(): HostAgent[];
|
|
150
|
+
/** DSH rc.6+ factory for an owned, clean top-level Agent. */
|
|
151
|
+
create?(options: CreateHostAgentOptions): Promise<HostAgentHandle>;
|
|
161
152
|
}
|
|
162
153
|
export interface HostWorkspace {
|
|
163
154
|
readonly id: string;
|
|
@@ -217,46 +208,31 @@ export interface HostSubagentsService {
|
|
|
217
208
|
persona?: string;
|
|
218
209
|
}): Promise<HostSubagentRun>;
|
|
219
210
|
}
|
|
211
|
+
export interface HostLlmService {
|
|
212
|
+
listProviders(): Array<{
|
|
213
|
+
id: string;
|
|
214
|
+
name: string;
|
|
215
|
+
}>;
|
|
216
|
+
listModels(provider: string): Promise<Array<{
|
|
217
|
+
id: string;
|
|
218
|
+
name: string;
|
|
219
|
+
description?: string;
|
|
220
|
+
}>>;
|
|
221
|
+
}
|
|
220
222
|
export interface HostContextShape {
|
|
221
223
|
tools: {
|
|
222
224
|
register(definition: ToolDefinition): unknown;
|
|
223
225
|
};
|
|
224
226
|
commands: CommandService;
|
|
225
227
|
settings: HostSettingsService;
|
|
226
|
-
|
|
228
|
+
/** Web-only transport; absent from non-Web profiles such as Headless. */
|
|
229
|
+
connection?: HostConnectionHandle;
|
|
227
230
|
agents: HostAgentsService;
|
|
228
231
|
subagents: HostSubagentsService;
|
|
229
|
-
|
|
232
|
+
/** Web workbench catalog; Agent execution routes by session cwd without it. */
|
|
233
|
+
workspaceRegistry?: HostWorkspaceRegistry;
|
|
230
234
|
get(name: string): unknown;
|
|
231
235
|
inject(services: string[], callback: (ctx: HostContextShape) => void): unknown;
|
|
232
236
|
on(name: string, listener: (...args: never[]) => unknown): () => unknown;
|
|
233
237
|
effect(callback: () => (() => unknown) | void, label?: string): () => unknown;
|
|
234
238
|
}
|
|
235
|
-
export interface ClientSettingsSnapshot<T> {
|
|
236
|
-
status: 'loading' | 'ready' | 'unavailable';
|
|
237
|
-
value?: T;
|
|
238
|
-
base?: unknown;
|
|
239
|
-
user?: unknown;
|
|
240
|
-
revision?: number;
|
|
241
|
-
writable: boolean;
|
|
242
|
-
mode: 'host' | 'memory';
|
|
243
|
-
}
|
|
244
|
-
export interface ClientSettingsScope<T> {
|
|
245
|
-
getSnapshot(): ClientSettingsSnapshot<T>;
|
|
246
|
-
subscribe(listener: () => void): () => void;
|
|
247
|
-
set(field: string, value: unknown): Promise<void>;
|
|
248
|
-
unset(field: string): Promise<void>;
|
|
249
|
-
setPath(path: string[], value: unknown): Promise<void>;
|
|
250
|
-
unsetPath(path: string[]): Promise<void>;
|
|
251
|
-
/** Commit one namespace mutation behind a single revision fence. */
|
|
252
|
-
mutate?(ops: SettingsOperation[]): Promise<void>;
|
|
253
|
-
}
|
|
254
|
-
export type SettingsOperation = {
|
|
255
|
-
op: 'set';
|
|
256
|
-
path: string[];
|
|
257
|
-
value: unknown;
|
|
258
|
-
} | {
|
|
259
|
-
op: 'unset';
|
|
260
|
-
path: string[];
|
|
261
|
-
};
|
|
262
|
-
//# sourceMappingURL=contracts.d.ts.map
|
package/lib/types/documents.d.ts
CHANGED
|
@@ -1,84 +1,8 @@
|
|
|
1
1
|
import type { HostAgent } from './contracts.ts';
|
|
2
|
+
import type { DocumentMutation, DocumentMutationResult, DocumentRecord, DocumentSearchResult, DocumentSnapshot, DocumentView } from './shared/contracts.ts';
|
|
3
|
+
export type { DocumentMutation, DocumentMutationResult, DocumentRecord, DocumentSearchResult, DocumentSnapshot, DocumentStatus, DocumentView } from './shared/contracts.ts';
|
|
2
4
|
export declare const DOCUMENTS_VERSION = 1;
|
|
3
5
|
export declare const DOCUMENTS_ACTIVE_LIMIT_BYTES: number;
|
|
4
|
-
export type DocumentStatus = 'active' | 'archived';
|
|
5
|
-
export interface DocumentRecord {
|
|
6
|
-
id: string;
|
|
7
|
-
title: string;
|
|
8
|
-
description: string;
|
|
9
|
-
status: DocumentStatus;
|
|
10
|
-
filename: string;
|
|
11
|
-
relativePath: string;
|
|
12
|
-
sourcePaths: string[];
|
|
13
|
-
sessionIds: string[];
|
|
14
|
-
createdAt: string;
|
|
15
|
-
updatedAt: string;
|
|
16
|
-
lastAccessedAt: string;
|
|
17
|
-
revision: number;
|
|
18
|
-
contentHash: string;
|
|
19
|
-
sizeBytes: number;
|
|
20
|
-
archivedAt?: string;
|
|
21
|
-
archiveSummary?: string;
|
|
22
|
-
memoryBodyIds: string[];
|
|
23
|
-
}
|
|
24
|
-
export interface DocumentView extends DocumentRecord {
|
|
25
|
-
content: string;
|
|
26
|
-
}
|
|
27
|
-
export interface DocumentSnapshot {
|
|
28
|
-
workspaceRoot: string;
|
|
29
|
-
directory: string;
|
|
30
|
-
indexPath: string;
|
|
31
|
-
generatedAt: string;
|
|
32
|
-
revision: string;
|
|
33
|
-
limitBytes: number;
|
|
34
|
-
activeBytes: number;
|
|
35
|
-
activeCount: number;
|
|
36
|
-
archivedCount: number;
|
|
37
|
-
total: number;
|
|
38
|
-
documents: Array<DocumentRecord & {
|
|
39
|
-
healthy: boolean;
|
|
40
|
-
excerpt: string;
|
|
41
|
-
}>;
|
|
42
|
-
}
|
|
43
|
-
export interface DocumentSearchResult {
|
|
44
|
-
query: string;
|
|
45
|
-
includeArchived: boolean;
|
|
46
|
-
total: number;
|
|
47
|
-
generatedAt: string;
|
|
48
|
-
results: Array<DocumentView & {
|
|
49
|
-
score: number;
|
|
50
|
-
excerpt: string;
|
|
51
|
-
}>;
|
|
52
|
-
}
|
|
53
|
-
export type DocumentMutation = {
|
|
54
|
-
action: 'create';
|
|
55
|
-
title: string;
|
|
56
|
-
description?: string;
|
|
57
|
-
content: string;
|
|
58
|
-
sourcePaths?: string[];
|
|
59
|
-
sessionIds?: string[];
|
|
60
|
-
} | {
|
|
61
|
-
action: 'update';
|
|
62
|
-
id: string;
|
|
63
|
-
title?: string;
|
|
64
|
-
description?: string;
|
|
65
|
-
content?: string;
|
|
66
|
-
sourcePaths?: string[];
|
|
67
|
-
sessionIds?: string[];
|
|
68
|
-
};
|
|
69
|
-
export interface DocumentMutationResult {
|
|
70
|
-
success: true;
|
|
71
|
-
action: 'created' | 'updated' | 'archived';
|
|
72
|
-
document: DocumentView;
|
|
73
|
-
snapshot: DocumentSnapshot;
|
|
74
|
-
maintenance?: {
|
|
75
|
-
runId: string;
|
|
76
|
-
provider: string;
|
|
77
|
-
summary: string;
|
|
78
|
-
memoryBodyIds: string[];
|
|
79
|
-
archivedDocumentIds: string[];
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
6
|
export interface DocumentCapacityPlan {
|
|
83
7
|
projected: number;
|
|
84
8
|
limit: number;
|
|
@@ -146,4 +70,3 @@ export declare class DocumentManager {
|
|
|
146
70
|
forWorkspace(workspaceRoot: string): DocumentController;
|
|
147
71
|
forAgent(agent: HostAgent): DocumentController;
|
|
148
72
|
}
|
|
149
|
-
//# sourceMappingURL=documents.d.ts.map
|
package/lib/types/guidance.d.ts
CHANGED
|
@@ -9,4 +9,3 @@ export declare function registerGuidance(ctx: HostContextShape, config?: Pick<Re
|
|
|
9
9
|
export declare function registerRuntimeMemoryContext(ctx: HostContextShape, runtimeMemory: RuntimeMemoryController): void;
|
|
10
10
|
/** Shadow the global fallback with the current Agent workspace's hot memory. */
|
|
11
11
|
export declare function registerAgentRuntimeMemoryContext(agent: HostAgent, runtimeMemory: () => RuntimeMemoryController): () => void;
|
|
12
|
-
//# sourceMappingURL=guidance.d.ts.map
|
package/lib/types/index.d.ts
CHANGED
|
@@ -15,4 +15,3 @@ export { Config, InteractionConfig, resolveConfig, resolveInteractionConfig, Doc
|
|
|
15
15
|
export type { MnemonConfig };
|
|
16
16
|
/** Mount native model tools on every DSH surface and UI RPC only when Web connection exists. */
|
|
17
17
|
export declare function apply(rawContext: unknown, config?: MnemonConfig): void;
|
|
18
|
-
//# sourceMappingURL=index.d.ts.map
|
package/lib/types/lifecycle.d.ts
CHANGED
|
@@ -3,62 +3,22 @@ import type { HostAgent, HostContextShape } from './contracts.ts';
|
|
|
3
3
|
import type { Insight, RememberRequest, SearchRequest } from './service.ts';
|
|
4
4
|
import type { RuntimeMemoryMutation } from './runtime-memory.ts';
|
|
5
5
|
import type { DocumentMutation } from './documents.ts';
|
|
6
|
-
import { MnemonSubagentCoordinator, type DelegatedWriteResult
|
|
7
|
-
import { type ReviewActivityScore } from './review-activity.ts';
|
|
6
|
+
import { MnemonSubagentCoordinator, type DelegatedWriteResult } from './subagent.ts';
|
|
8
7
|
import { type TurnMemoryActivitySnapshot } from './activity.ts';
|
|
9
8
|
import type { RuntimeMemoryController } from './runtime-memory.ts';
|
|
9
|
+
import type { AssistantMessageText, LifecycleSnapshot, TaskAgentModelCatalog } from './shared/contracts.ts';
|
|
10
|
+
import type { PreparedMemoryPlacement } from './provider-placement.ts';
|
|
10
11
|
interface AgentRuntimeSource {
|
|
11
12
|
forAgent(agent: HostAgent): {
|
|
12
13
|
runtimeMemory: RuntimeMemoryController;
|
|
13
14
|
};
|
|
14
15
|
}
|
|
15
16
|
export type { TurnMemoryActivity, TurnMemoryActivitySnapshot } from './activity.ts';
|
|
17
|
+
export type { AssistantMessageText, LifecycleAgentSnapshot, LifecycleCounters, LifecyclePhase, LifecycleSnapshot } from './shared/contracts.ts';
|
|
16
18
|
export declare const MNEMON_PLUGIN_SOURCE = "dsh-mnemon";
|
|
17
|
-
export type LifecyclePhase = 'idle' | 'prime' | 'recall' | 'writeback' | 'review' | 'supervised' | 'error';
|
|
18
|
-
export interface LifecycleCounters {
|
|
19
|
-
primes: number;
|
|
20
|
-
recallCues: number;
|
|
21
|
-
writebackCues: number;
|
|
22
|
-
supervisedRequests: number;
|
|
23
|
-
failures: number;
|
|
24
|
-
}
|
|
25
|
-
export interface LifecycleAgentSnapshot {
|
|
26
|
-
sessionId: string;
|
|
27
|
-
status: 'idle' | 'running';
|
|
28
|
-
startSource: 'startup' | 'resume' | 'clear' | 'compact' | 'adopted';
|
|
29
|
-
primePending: boolean;
|
|
30
|
-
guidedTurns: number;
|
|
31
|
-
memoryToolCalls: number;
|
|
32
|
-
idleReviewPending: boolean;
|
|
33
|
-
reviewRunning: boolean;
|
|
34
|
-
reviewActivity: ReviewActivityScore;
|
|
35
|
-
lastPhase: LifecyclePhase;
|
|
36
|
-
lastReviewAt?: string;
|
|
37
|
-
lastReviewAction?: string;
|
|
38
|
-
lastReviewScore?: number;
|
|
39
|
-
lastReviewDocumentIds?: string[];
|
|
40
|
-
lastAt?: string;
|
|
41
|
-
lastError?: string;
|
|
42
|
-
}
|
|
43
|
-
export interface LifecycleSnapshot {
|
|
44
|
-
enabled: boolean;
|
|
45
|
-
recallMode: ResolvedConfig['recallMode'];
|
|
46
|
-
writebackMode: ResolvedConfig['writebackMode'];
|
|
47
|
-
idleReviewMs: number;
|
|
48
|
-
activeAgents: number;
|
|
49
|
-
sessionAvailable: boolean;
|
|
50
|
-
counters: LifecycleCounters;
|
|
51
|
-
subagents: SubagentCounters;
|
|
52
|
-
current?: LifecycleAgentSnapshot;
|
|
53
|
-
}
|
|
54
19
|
export interface SupervisedWritebackResult extends DelegatedWriteResult {
|
|
55
20
|
sessionId: string;
|
|
56
21
|
}
|
|
57
|
-
/** Extracted plain text of one finalized assistant message, when present in the session log. */
|
|
58
|
-
export interface AssistantMessageText {
|
|
59
|
-
messageId: string;
|
|
60
|
-
text: string;
|
|
61
|
-
}
|
|
62
22
|
/** DSH-native owner for per-agent Mnemon lifecycle hooks and UI-triggered LLM work. */
|
|
63
23
|
export declare class MnemonLifecycle {
|
|
64
24
|
private readonly ctx;
|
|
@@ -67,11 +27,16 @@ export declare class MnemonLifecycle {
|
|
|
67
27
|
private readonly runtimeSource?;
|
|
68
28
|
private readonly owners;
|
|
69
29
|
private readonly counters;
|
|
30
|
+
/** Creation ids reserved before DSH publishes clean task-root Agents. */
|
|
31
|
+
private readonly taskAgentIds;
|
|
70
32
|
/** Bounded process-local replay fence for finalized-message write actions. */
|
|
71
33
|
private readonly supervisedWritebacks;
|
|
72
34
|
constructor(ctx: HostContextShape, coordinator: MnemonSubagentCoordinator, config: ResolvedConfig, runtimeSource?: AgentRuntimeSource | undefined);
|
|
73
35
|
start(): () => void;
|
|
74
|
-
snapshot(sessionId?: string): LifecycleSnapshot;
|
|
36
|
+
snapshot(sessionId?: string, workspaceRoot?: string): LifecycleSnapshot;
|
|
37
|
+
/** Provider/model directory used by Settings without requiring a live session. */
|
|
38
|
+
taskAgentModels(includeCatalog?: boolean): Promise<TaskAgentModelCatalog>;
|
|
39
|
+
private availableAgent;
|
|
75
40
|
workspaceRoot(sessionId?: string): string | undefined;
|
|
76
41
|
/** Settled memory-tool activity for all turns, resolved per session. */
|
|
77
42
|
turnActivities(sessionId: string): TurnMemoryActivitySnapshot;
|
|
@@ -80,16 +45,36 @@ export declare class MnemonLifecycle {
|
|
|
80
45
|
recall(sessionId: string, request: SearchRequest, signal?: AbortSignal): Promise<import("./subagent.ts").DelegatedRecallResult>;
|
|
81
46
|
related(sessionId: string, id: string, memoryBodyId?: string, signal?: AbortSignal): Promise<import("./subagent.ts").DelegatedRecallResult>;
|
|
82
47
|
answer(sessionId: string, query: string, evidence: Insight[], signal?: AbortSignal): Promise<import("./subagent.ts").DelegatedAnswerResult>;
|
|
48
|
+
/** Synthesize a Web Agent Query without borrowing a conversation Agent or its history. */
|
|
49
|
+
answerTask(sessionId: string, query: string, evidence: Insight[], workspaceRoot?: string, signal?: AbortSignal): Promise<import("./subagent.ts").DelegatedAnswerResult>;
|
|
83
50
|
remember(sessionId: string, request: RememberRequest, signal?: AbortSignal): Promise<DelegatedWriteResult>;
|
|
84
51
|
runtime(sessionId: string, request: RuntimeMemoryMutation, signal?: AbortSignal): Promise<import("./subagent.ts").CoordinatedRuntimeMemoryResult>;
|
|
85
52
|
documents(sessionId: string): import("./documents.ts").DocumentSnapshot;
|
|
86
53
|
document(sessionId: string, id: string): import("./documents.ts").DocumentView;
|
|
87
54
|
searchDocuments(sessionId: string, query: string, includeArchived?: boolean, limit?: number): Promise<import("./documents.ts").DocumentSearchResult>;
|
|
88
55
|
mutateDocument(sessionId: string, request: DocumentMutation, signal?: AbortSignal): Promise<import("./subagent.ts").CoordinatedDocumentResult>;
|
|
89
|
-
archiveDocument(sessionId: string, id: string, signal?: AbortSignal): Promise<import("./subagent.ts").CoordinatedDocumentResult>;
|
|
56
|
+
archiveDocument(sessionId: string, id: string, workspaceRoot?: string, signal?: AbortSignal): Promise<import("./subagent.ts").CoordinatedDocumentResult>;
|
|
90
57
|
mutate(sessionId: string, operation: string, request: unknown, signal?: AbortSignal): Promise<DelegatedWriteResult>;
|
|
58
|
+
placeProvider(sessionId: string, body: {
|
|
59
|
+
name: string;
|
|
60
|
+
description: string;
|
|
61
|
+
}, prepared: PreparedMemoryPlacement, signal?: AbortSignal): Promise<import("./shared/contracts.ts").MemoryPlacementDecision>;
|
|
62
|
+
maintainMetadata(sessionId: string, memoryBodyIds: readonly string[], workspaceRoot?: string, signal?: AbortSignal): Promise<import("./shared/contracts.ts").MemoryBodyMetadataMaintenanceResult>;
|
|
91
63
|
supervise(sessionId: string, content: string, idempotencyKey?: string, signal?: AbortSignal): Promise<SupervisedWritebackResult>;
|
|
64
|
+
/** Run a Web workbench distillation under a fresh top-level task Agent. */
|
|
65
|
+
superviseTask(sessionId: string, content: string, idempotencyKey?: string, workspaceRoot?: string, signal?: AbortSignal): Promise<SupervisedWritebackResult>;
|
|
66
|
+
private superviseResolved;
|
|
92
67
|
private liveAgent;
|
|
68
|
+
/**
|
|
69
|
+
* Run session-independent maintenance under a fresh top-level Agent. Its cwd
|
|
70
|
+
* is the explicit Web workbench scope, so LiveMnemonRuntime resolves the same
|
|
71
|
+
* workspace graph without borrowing conversation history or ownership.
|
|
72
|
+
*/
|
|
73
|
+
private runTaskAgent;
|
|
74
|
+
/** Resolve the same model route and preset composition as an ordinary fresh DSH Agent. */
|
|
75
|
+
private taskAgentCreation;
|
|
76
|
+
/** Resolve a complete task route for both status admission and actual creation. */
|
|
77
|
+
private taskAgentModelRoute;
|
|
78
|
+
private taskAgentModelOptions;
|
|
93
79
|
private install;
|
|
94
80
|
}
|
|
95
|
-
//# sourceMappingURL=lifecycle.d.ts.map
|
|
@@ -1,29 +1,15 @@
|
|
|
1
1
|
import type { MnemonRunner } from './runner.ts';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
active: boolean;
|
|
7
|
-
dbPath: string;
|
|
8
|
-
createdAt: string;
|
|
9
|
-
updatedAt: string;
|
|
10
|
-
}
|
|
11
|
-
export interface CreateMemoryBodyRequest {
|
|
12
|
-
name: string;
|
|
13
|
-
description: string;
|
|
14
|
-
active?: boolean;
|
|
15
|
-
}
|
|
16
|
-
export interface UpdateMemoryBodyRequest {
|
|
17
|
-
name?: string;
|
|
18
|
-
description?: string;
|
|
19
|
-
active?: boolean;
|
|
20
|
-
}
|
|
2
|
+
import type { MemoryPlacementCandidate } from './provider-placement.ts';
|
|
3
|
+
import type { CreateMemoryBodyRequest, MemoryBody, MemoryPlacementDecision, MemoryProviderServiceCatalog, MemoryProviderServiceView, MemoryProviderConnection, MemoryProviderId, MemoryBodyMetadataUpdate, OpenVikingBodyConnection, UpdateMemoryBodyRequest } from './shared/contracts.ts';
|
|
4
|
+
import type { ProviderMemorySpace } from './providers/provider.ts';
|
|
5
|
+
export type { CreateMemoryBodyRequest, MemoryBody, UpdateMemoryBodyRequest } from './shared/contracts.ts';
|
|
21
6
|
export declare function validateMemoryBodyId(value: string): string;
|
|
22
7
|
/**
|
|
23
8
|
* Persistent metadata layered over Mnemon's native named stores.
|
|
24
9
|
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
10
|
+
* Native metadata lives beside Store directories so existing Mnemon Packs stay
|
|
11
|
+
* compatible. External connection metadata lives under state and is never
|
|
12
|
+
* included in Memory Space Packs.
|
|
27
13
|
*/
|
|
28
14
|
export declare class MemoryBodyRegistry {
|
|
29
15
|
readonly runner: MnemonRunner;
|
|
@@ -31,20 +17,38 @@ export declare class MemoryBodyRegistry {
|
|
|
31
17
|
private readonly now;
|
|
32
18
|
readonly directory: string;
|
|
33
19
|
readonly registryPath: string;
|
|
20
|
+
readonly providerRegistryPath: string;
|
|
34
21
|
private bodies;
|
|
22
|
+
private services;
|
|
23
|
+
private serviceEnabled;
|
|
35
24
|
constructor(runner: MnemonRunner, persistent?: boolean, now?: () => Date);
|
|
36
25
|
list(): MemoryBody[];
|
|
37
26
|
active(): MemoryBody[];
|
|
38
27
|
get(id: string): MemoryBody;
|
|
39
|
-
|
|
28
|
+
openVikingConnection(id: string): OpenVikingBodyConnection;
|
|
29
|
+
providerConnection(id: string, expectedProviderId?: MemoryProviderId): MemoryProviderConnection;
|
|
30
|
+
providerServiceConfigured(providerId: MemoryProviderId): boolean;
|
|
31
|
+
providerServiceEnabled(providerId: MemoryProviderId): boolean;
|
|
32
|
+
providerServices(options?: {
|
|
33
|
+
includeSecrets?: boolean;
|
|
34
|
+
}): MemoryProviderServiceCatalog;
|
|
35
|
+
updateProviderService(providerId: MemoryProviderId, settings: MemoryProviderConnection, clearSecrets?: readonly string[], enabled?: boolean): MemoryProviderServiceView;
|
|
36
|
+
resolveProviderService(providerId: MemoryProviderId, settings: MemoryProviderConnection, clearSecrets?: readonly string[]): MemoryProviderConnection;
|
|
37
|
+
/** Atomically replace one provider's local projections after authoritative discovery. */
|
|
38
|
+
syncProviderService(providerId: MemoryProviderId, service: MemoryProviderConnection, discovered: readonly ProviderMemorySpace[]): MemoryProviderServiceView;
|
|
39
|
+
placementCandidates(request: Pick<CreateMemoryBodyRequest, 'connection' | 'providerConnections' | 'openViking'>): MemoryPlacementCandidate[];
|
|
40
|
+
create(request: CreateMemoryBodyRequest, signal?: AbortSignal, placement?: MemoryPlacementDecision): Promise<MemoryBody>;
|
|
40
41
|
update(id: string, request: UpdateMemoryBodyRequest): MemoryBody;
|
|
42
|
+
/** Validate every model-authored update before committing the batch. */
|
|
43
|
+
updateMetadata(updates: readonly MemoryBodyMetadataUpdate[]): MemoryBody[];
|
|
41
44
|
remove(id: string, signal?: AbortSignal): Promise<MemoryBody>;
|
|
42
45
|
setActive(id: string, active: boolean): MemoryBody;
|
|
43
46
|
/** Refresh metadata after an atomic Pack import replaced the data component. */
|
|
44
47
|
reload(): void;
|
|
45
48
|
private loadAndReconcile;
|
|
46
49
|
private reconcileDiscoveredStores;
|
|
50
|
+
private nativeStoreIds;
|
|
47
51
|
private view;
|
|
48
52
|
private save;
|
|
53
|
+
private writeRegistry;
|
|
49
54
|
}
|
|
50
|
-
//# sourceMappingURL=memory-bodies.d.ts.map
|
package/lib/types/pack.d.ts
CHANGED
|
@@ -1,56 +1,12 @@
|
|
|
1
1
|
import type { ResolvedConfig } from './config.ts';
|
|
2
2
|
import type { MnemonRunner } from './runner.ts';
|
|
3
|
+
import type { MnemonPackComponent, MnemonPackExport, MnemonPackImportMode, MnemonPackImportResult, MnemonPackPreview, MnemonPackScope } from './shared/contracts.ts';
|
|
4
|
+
export type { MnemonPackComponent, MnemonPackComponentSummary, MnemonPackExport, MnemonPackImportMode, MnemonPackImportResult, MnemonPackManifest, MnemonPackPreview, MnemonPackScope } from './shared/contracts.ts';
|
|
3
5
|
export declare const MNEMON_PACK_FORMAT = "mnemonpack";
|
|
4
6
|
export declare const MNEMON_PACK_VERSION = 1;
|
|
5
7
|
export declare const MNEMON_PACK_MIME = "application/zip";
|
|
6
8
|
export declare const MNEMON_PACK_MAX_ARCHIVE_BYTES: number;
|
|
7
9
|
export declare const MNEMON_PACK_MAX_EXPANDED_BYTES: number;
|
|
8
|
-
declare const COMPONENT_ORDER: readonly ["runtime", "documents", "memory-spaces"];
|
|
9
|
-
export type MnemonPackComponent = typeof COMPONENT_ORDER[number];
|
|
10
|
-
export type MnemonPackScope = 'full' | MnemonPackComponent;
|
|
11
|
-
export type MnemonPackImportMode = 'merge' | 'replace';
|
|
12
|
-
export interface MnemonPackComponentSummary {
|
|
13
|
-
component: MnemonPackComponent;
|
|
14
|
-
files: number;
|
|
15
|
-
bytes: number;
|
|
16
|
-
items: number;
|
|
17
|
-
}
|
|
18
|
-
export interface MnemonPackManifest {
|
|
19
|
-
format: typeof MNEMON_PACK_FORMAT;
|
|
20
|
-
version: typeof MNEMON_PACK_VERSION;
|
|
21
|
-
scope: MnemonPackScope;
|
|
22
|
-
exportedAt: string;
|
|
23
|
-
source: {
|
|
24
|
-
plugin: 'dsh-mnemon';
|
|
25
|
-
pluginVersion: string;
|
|
26
|
-
};
|
|
27
|
-
components: MnemonPackComponent[];
|
|
28
|
-
summary: MnemonPackComponentSummary[];
|
|
29
|
-
}
|
|
30
|
-
export interface MnemonPackExport {
|
|
31
|
-
fileName: string;
|
|
32
|
-
mimeType: typeof MNEMON_PACK_MIME;
|
|
33
|
-
bytes: number;
|
|
34
|
-
base64: string;
|
|
35
|
-
targetRoot: string;
|
|
36
|
-
manifest: MnemonPackManifest;
|
|
37
|
-
}
|
|
38
|
-
export interface MnemonPackPreview {
|
|
39
|
-
fileName?: string;
|
|
40
|
-
archiveBytes: number;
|
|
41
|
-
expandedBytes: number;
|
|
42
|
-
targetRoot: string;
|
|
43
|
-
targetScope: ResolvedConfig['storageScope'];
|
|
44
|
-
manifest: MnemonPackManifest;
|
|
45
|
-
occupied: Record<MnemonPackComponent, boolean>;
|
|
46
|
-
}
|
|
47
|
-
export interface MnemonPackImportResult {
|
|
48
|
-
imported: true;
|
|
49
|
-
mode: MnemonPackImportMode;
|
|
50
|
-
targetRoot: string;
|
|
51
|
-
components: MnemonPackComponent[];
|
|
52
|
-
summary: MnemonPackComponentSummary[];
|
|
53
|
-
}
|
|
54
10
|
/** Native, checksummed import/export for the one currently effective Mnemon root. */
|
|
55
11
|
export declare class MnemonPackManager {
|
|
56
12
|
private readonly runner;
|
|
@@ -70,5 +26,3 @@ export declare class MnemonPackManager {
|
|
|
70
26
|
components?: MnemonPackComponent[];
|
|
71
27
|
}): Promise<MnemonPackImportResult>;
|
|
72
28
|
}
|
|
73
|
-
export {};
|
|
74
|
-
//# sourceMappingURL=pack.d.ts.map
|