dsh-mnemon 0.4.7 → 0.5.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 +10 -20
- package/README.zh-CN.md +10 -20
- package/SECURITY.md +8 -8
- package/cordis.patch.yml +42 -0
- package/lib/client.js +2360 -6843
- package/lib/contracts.js +16 -17
- package/lib/core.js +11 -0
- package/lib/definitions-j0FLgE0-.js +251 -0
- package/lib/extension-sdk.js +93 -229
- package/lib/index.js +3730 -6330
- package/lib/runtime-AtIOTeP1.js +1316 -0
- package/lib/storage-lock-Bqrhkyag.js +20 -0
- package/lib/testing.js +231 -0
- package/lib/types/src/client/extension-sdk.d.ts +10 -0
- package/lib/types/src/client/index.d.ts +1 -0
- package/lib/types/src/client/locales.d.ts +84 -0
- package/lib/types/src/client/page-client.d.ts +15 -0
- package/lib/types/src/client/page-kit.d.ts +40 -0
- package/lib/types/src/client/source-contracts.d.ts +46 -0
- package/lib/types/src/client/source-pages.d.ts +83 -0
- package/lib/types/src/core/contracts/index.d.ts +40 -0
- package/lib/types/src/core/contracts/plugin.d.ts +32 -0
- package/lib/types/src/core/contracts/view.d.ts +416 -0
- package/lib/types/src/core/definitions.d.ts +16 -0
- package/lib/types/src/core/plugin.d.ts +6 -0
- package/lib/types/src/{config-values.d.ts → host/config-values.d.ts} +7 -7
- package/lib/types/src/{config.d.ts → host/config.d.ts} +4 -1
- package/lib/types/src/{shared → host}/display-mode.d.ts +1 -1
- package/lib/types/src/host/plugin.d.ts +8 -0
- package/lib/types/src/host/protocol.d.ts +549 -0
- package/lib/types/src/host/view-protocol.d.ts +123 -0
- package/lib/types/src/index.d.ts +2 -21
- package/lib/types/src/sdk/index.d.ts +9 -0
- package/lib/types/src/sdk/input.d.ts +11 -0
- package/lib/types/src/sdk/install.d.ts +7 -0
- package/lib/types/src/sdk/service.d.ts +31 -0
- package/lib/types/src/sdk/storage-lock.d.ts +6 -0
- package/lib/types/src/sdk/strategy-configuration.d.ts +31 -0
- package/lib/types/src/sdk/testing.d.ts +70 -0
- package/package.json +46 -35
- package/lib/kernel.js +0 -1173
- package/lib/layers/documents.js +0 -31
- package/lib/layers/memory-spaces.js +0 -34
- package/lib/layers/runtime.js +0 -27
- package/lib/provider-sdk.js +0 -2
- package/lib/registry-B9SdBRLo.js +0 -2423
- package/lib/strategy-default-three-tier.js +0 -99
- package/lib/strategy-sdk.js +0 -56
- package/lib/types/packages/contracts/src/index.d.ts +0 -221
- package/lib/types/packages/extension-sdk/src/index.d.ts +0 -54
- package/lib/types/packages/kernel/src/access.d.ts +0 -14
- package/lib/types/packages/kernel/src/catalog.d.ts +0 -42
- package/lib/types/packages/kernel/src/index.d.ts +0 -5
- package/lib/types/packages/kernel/src/kernel.d.ts +0 -46
- package/lib/types/packages/kernel/src/topology.d.ts +0 -25
- package/lib/types/packages/kernel/src/view.d.ts +0 -89
- package/lib/types/packages/layer-documents/src/index.d.ts +0 -4
- package/lib/types/packages/layer-memory-spaces/src/index.d.ts +0 -4
- package/lib/types/packages/layer-runtime/src/index.d.ts +0 -4
- package/lib/types/packages/provider-sdk/src/index.d.ts +0 -19
- package/lib/types/packages/strategy-default-three-tier/src/index.d.ts +0 -7
- package/lib/types/packages/strategy-sdk/src/index.d.ts +0 -35
- package/lib/types/src/activity.d.ts +0 -16
- package/lib/types/src/agent-memory-turn.d.ts +0 -42
- package/lib/types/src/channels.d.ts +0 -1
- package/lib/types/src/client/GlobalLocationSetting.d.ts +0 -19
- package/lib/types/src/client/MnemonPackSection.d.ts +0 -13
- package/lib/types/src/client/MnemonSaveAction.d.ts +0 -13
- package/lib/types/src/client/MnemonSettingsCard.d.ts +0 -16
- package/lib/types/src/client/MnemonTurnTail.d.ts +0 -21
- package/lib/types/src/client/MnemonView.d.ts +0 -26
- package/lib/types/src/client/ProviderIcon.d.ts +0 -8
- package/lib/types/src/client/ProviderSettingsSection.d.ts +0 -16
- package/lib/types/src/client/anchor.d.ts +0 -27
- package/lib/types/src/client/api.d.ts +0 -83
- package/lib/types/src/client/better-sidebar.d.ts +0 -13
- package/lib/types/src/client/dsh-compat.d.ts +0 -51
- package/lib/types/src/client/settings.d.ts +0 -23
- package/lib/types/src/client/sidebar-entry.d.ts +0 -5
- package/lib/types/src/client/subagent-token-usage.d.ts +0 -23
- package/lib/types/src/client/workspace-controller.d.ts +0 -14
- package/lib/types/src/client/workspace-mount.d.ts +0 -20
- package/lib/types/src/commands.d.ts +0 -13
- package/lib/types/src/contracts.d.ts +0 -316
- package/lib/types/src/documents.d.ts +0 -77
- package/lib/types/src/git-branch.d.ts +0 -6
- package/lib/types/src/guidance.d.ts +0 -29
- package/lib/types/src/lifecycle.d.ts +0 -80
- package/lib/types/src/live-runtime.d.ts +0 -92
- package/lib/types/src/memory-bodies.d.ts +0 -57
- package/lib/types/src/memory-receipts.d.ts +0 -21
- package/lib/types/src/memory-system/access.d.ts +0 -2
- package/lib/types/src/memory-system/catalog.d.ts +0 -2
- package/lib/types/src/memory-system/contracts.d.ts +0 -2
- package/lib/types/src/memory-system/defaults.d.ts +0 -6
- package/lib/types/src/memory-system/index.d.ts +0 -7
- package/lib/types/src/memory-system/kernel.d.ts +0 -2
- package/lib/types/src/memory-system/topology.d.ts +0 -2
- package/lib/types/src/memory-system/view.d.ts +0 -2
- package/lib/types/src/memory-view.d.ts +0 -21
- package/lib/types/src/pack.d.ts +0 -29
- package/lib/types/src/process.d.ts +0 -16
- package/lib/types/src/provider-placement.d.ts +0 -26
- package/lib/types/src/provider-sdk.d.ts +0 -4
- package/lib/types/src/providers/byterover.d.ts +0 -32
- package/lib/types/src/providers/catalog.d.ts +0 -23
- package/lib/types/src/providers/hindsight.d.ts +0 -20
- package/lib/types/src/providers/holographic.d.ts +0 -23
- package/lib/types/src/providers/honcho.d.ts +0 -18
- package/lib/types/src/providers/http.d.ts +0 -32
- package/lib/types/src/providers/mem0.d.ts +0 -18
- package/lib/types/src/providers/memory-system.d.ts +0 -6
- package/lib/types/src/providers/openviking.d.ts +0 -32
- package/lib/types/src/providers/provider.d.ts +0 -46
- package/lib/types/src/providers/registry.d.ts +0 -23
- package/lib/types/src/providers/retaindb.d.ts +0 -17
- package/lib/types/src/providers/supermemory.d.ts +0 -17
- package/lib/types/src/recall-quality/contracts.d.ts +0 -32
- package/lib/types/src/recall-quality/engine.d.ts +0 -13
- package/lib/types/src/recall-quality/index.d.ts +0 -4
- package/lib/types/src/recall-quality/policies.d.ts +0 -5
- package/lib/types/src/recall-quality/registry.d.ts +0 -10
- package/lib/types/src/review-activity.d.ts +0 -19
- package/lib/types/src/rpc.d.ts +0 -22
- package/lib/types/src/runner.d.ts +0 -41
- package/lib/types/src/runtime-memory.d.ts +0 -90
- package/lib/types/src/search-tokens.d.ts +0 -5
- package/lib/types/src/service.d.ts +0 -113
- package/lib/types/src/session-events.d.ts +0 -8
- package/lib/types/src/settings.d.ts +0 -6
- package/lib/types/src/shared/contracts.d.ts +0 -1008
- package/lib/types/src/storage-scope.d.ts +0 -12
- package/lib/types/src/subagent-token-usage.d.ts +0 -53
- package/lib/types/src/subagent.d.ts +0 -124
- package/lib/types/src/tools.d.ts +0 -10
- package/lib/types/src/version-updates.d.ts +0 -37
|
@@ -1,316 +0,0 @@
|
|
|
1
|
-
import type { RpcResult, SettingsOperation } from './shared/contracts.ts';
|
|
2
|
-
export type { ClientConnectionHandle, ClientSettingsScope, ClientSettingsSnapshot, JsonPrimitive, JsonValue, RpcError, RpcResult, SettingsOperation, } from './shared/contracts.ts';
|
|
3
|
-
export type HostRpcHandler = (endpoint: string, payload: unknown, signal?: AbortSignal) => Promise<RpcResult<unknown>>;
|
|
4
|
-
export type HostRpcAuthority = 'trusted-host' | 'loopback';
|
|
5
|
-
/**
|
|
6
|
-
* DSH rc.2 requires this registration policy. DSH 0.1.2-alpha.1 accepts only
|
|
7
|
-
* the first two JavaScript arguments and safely ignores this trailing value.
|
|
8
|
-
* Keeping one unconditional call shape avoids runtime version detection.
|
|
9
|
-
*/
|
|
10
|
-
export interface HostRpcRegistrationOptions {
|
|
11
|
-
readonly authority: HostRpcAuthority;
|
|
12
|
-
}
|
|
13
|
-
export interface HostConnectionHandle {
|
|
14
|
-
rpc: {
|
|
15
|
-
handle(channel: string, handler: HostRpcHandler, options: HostRpcRegistrationOptions): unknown;
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
export interface HostSettingsScope<T> {
|
|
19
|
-
get(): T;
|
|
20
|
-
}
|
|
21
|
-
export interface HostSettingsService {
|
|
22
|
-
readonly writable: boolean;
|
|
23
|
-
register<T>(namespace: string, schema: unknown, options: {
|
|
24
|
-
base?: Partial<T>;
|
|
25
|
-
applies: 'live' | 'restart';
|
|
26
|
-
validate?: (value: T) => void;
|
|
27
|
-
}): HostSettingsScope<T>;
|
|
28
|
-
describe(options?: {
|
|
29
|
-
redactSecrets?: boolean;
|
|
30
|
-
}): Array<{
|
|
31
|
-
ns: string;
|
|
32
|
-
value: unknown;
|
|
33
|
-
base?: unknown;
|
|
34
|
-
user?: unknown;
|
|
35
|
-
revision: number;
|
|
36
|
-
applies: 'live' | 'restart';
|
|
37
|
-
}>;
|
|
38
|
-
mutate(namespace: string, ops: SettingsOperation[], expectedRevision?: number): Promise<void>;
|
|
39
|
-
}
|
|
40
|
-
export interface ToolExecution {
|
|
41
|
-
signal: AbortSignal;
|
|
42
|
-
agent?: HostAgent;
|
|
43
|
-
name?: string;
|
|
44
|
-
/** Parsed tool arguments, available on the authoritative tools/result event. */
|
|
45
|
-
arguments?: unknown;
|
|
46
|
-
parent?: symbol;
|
|
47
|
-
token?: symbol;
|
|
48
|
-
/** End the current model turn after an authoritative terminal tool call. */
|
|
49
|
-
concludeTurn?: () => void;
|
|
50
|
-
}
|
|
51
|
-
export type CommandResult = {
|
|
52
|
-
kind: 'success';
|
|
53
|
-
text?: string;
|
|
54
|
-
} | {
|
|
55
|
-
kind: 'error';
|
|
56
|
-
text: string;
|
|
57
|
-
};
|
|
58
|
-
export interface CommandInvocation {
|
|
59
|
-
agent: HostAgent;
|
|
60
|
-
rawInput: string;
|
|
61
|
-
signal: AbortSignal;
|
|
62
|
-
}
|
|
63
|
-
export interface CommandDefinition {
|
|
64
|
-
name: string;
|
|
65
|
-
description: string;
|
|
66
|
-
input?: {
|
|
67
|
-
hint: string;
|
|
68
|
-
};
|
|
69
|
-
handler(invocation: CommandInvocation): CommandResult | Promise<CommandResult>;
|
|
70
|
-
}
|
|
71
|
-
export interface CommandService {
|
|
72
|
-
register(definition: CommandDefinition): unknown;
|
|
73
|
-
}
|
|
74
|
-
export interface ToolDefinition {
|
|
75
|
-
name: string;
|
|
76
|
-
description: string;
|
|
77
|
-
parameters: Record<string, unknown>;
|
|
78
|
-
output: {
|
|
79
|
-
schema: Record<string, unknown>;
|
|
80
|
-
render: (args: Record<string, unknown>, value: never) => Array<{
|
|
81
|
-
type: 'text';
|
|
82
|
-
text: string;
|
|
83
|
-
}>;
|
|
84
|
-
};
|
|
85
|
-
execute: (args: never, execution: ToolExecution) => Promise<unknown>;
|
|
86
|
-
presentCall?: (args: never) => Record<string, unknown>;
|
|
87
|
-
presentResult?: () => Record<string, unknown>;
|
|
88
|
-
}
|
|
89
|
-
export interface HostMessageSource {
|
|
90
|
-
kind: string;
|
|
91
|
-
plugin?: string;
|
|
92
|
-
form?: string;
|
|
93
|
-
summary?: string;
|
|
94
|
-
}
|
|
95
|
-
/** Minimum shape shared by DSH content blocks, including merge-added blocks. */
|
|
96
|
-
export interface HostOpaqueContentBlock {
|
|
97
|
-
type: string;
|
|
98
|
-
/** Present on text-like blocks; omitted by images and other merge-added blocks. */
|
|
99
|
-
text?: string;
|
|
100
|
-
}
|
|
101
|
-
export interface HostTextContentBlock extends HostOpaqueContentBlock {
|
|
102
|
-
type: 'text';
|
|
103
|
-
text: string;
|
|
104
|
-
}
|
|
105
|
-
/** Durable image metadata used by the DSH 0.1.1 prerelease line. */
|
|
106
|
-
export interface HostImageAttachmentRef {
|
|
107
|
-
attachmentId: string;
|
|
108
|
-
mediaType: 'image/png' | 'image/jpeg' | 'image/webp' | 'image/gif';
|
|
109
|
-
bytes: number;
|
|
110
|
-
width: number;
|
|
111
|
-
height: number;
|
|
112
|
-
name?: string;
|
|
113
|
-
}
|
|
114
|
-
export interface HostImageContentBlock extends HostOpaqueContentBlock {
|
|
115
|
-
type: 'image';
|
|
116
|
-
attachment: HostImageAttachmentRef;
|
|
117
|
-
}
|
|
118
|
-
/** User content is open to DSH/plugin blocks while documenting first-party text and image shapes. */
|
|
119
|
-
export type HostUserContentBlock = HostTextContentBlock | HostImageContentBlock | HostOpaqueContentBlock;
|
|
120
|
-
export interface HostUserMessage {
|
|
121
|
-
id: string;
|
|
122
|
-
role: 'user';
|
|
123
|
-
content: HostUserContentBlock[];
|
|
124
|
-
source: HostMessageSource;
|
|
125
|
-
}
|
|
126
|
-
export interface HostSessionEvent {
|
|
127
|
-
type: string;
|
|
128
|
-
seq?: number;
|
|
129
|
-
time?: number;
|
|
130
|
-
data: Record<string, unknown>;
|
|
131
|
-
}
|
|
132
|
-
/**
|
|
133
|
-
* Minimum session log surface shared by the stable DSH rc line and the 0.1.2
|
|
134
|
-
* alpha line. rc.2 exposes the immutable log through `events`; alpha.4+
|
|
135
|
-
* replaces that property with range snapshots and indexed reads.
|
|
136
|
-
*/
|
|
137
|
-
export interface HostSession {
|
|
138
|
-
header?: {
|
|
139
|
-
origin?: 'subagent';
|
|
140
|
-
parentSession?: string;
|
|
141
|
-
delegationDepth?: number;
|
|
142
|
-
cwd?: string;
|
|
143
|
-
agentPreset?: string;
|
|
144
|
-
};
|
|
145
|
-
/** Stable rc.2 event-log accessor. */
|
|
146
|
-
events?: readonly HostSessionEvent[];
|
|
147
|
-
/** DSH 0.1.2-alpha.4+ event-log accessor. */
|
|
148
|
-
snapshotEvents?(fromSeq?: number, toSeqExclusive?: number): readonly HostSessionEvent[];
|
|
149
|
-
/** DSH 0.1.2-alpha.4+ indexed event accessor. */
|
|
150
|
-
eventAt?(seq: number): HostSessionEvent | undefined;
|
|
151
|
-
/**
|
|
152
|
-
* Model-visible event sequences, in order. Optional because not every host
|
|
153
|
-
* publishes a surface projection; when absent, callers fall back to
|
|
154
|
-
* session-scoped state.
|
|
155
|
-
*/
|
|
156
|
-
surface?: {
|
|
157
|
-
readonly nodes: readonly number[];
|
|
158
|
-
};
|
|
159
|
-
}
|
|
160
|
-
export type HostPreStepDecision = {
|
|
161
|
-
kind: 'reject';
|
|
162
|
-
} | {
|
|
163
|
-
kind: 'enter';
|
|
164
|
-
messages: HostUserMessage[];
|
|
165
|
-
};
|
|
166
|
-
export interface HostAgentContext {
|
|
167
|
-
/**
|
|
168
|
-
* `options` is optional and forwarded verbatim to the host. `prepend`
|
|
169
|
-
* places the listener at the head of the chain, which for a waterfall
|
|
170
|
-
* means it observes the fully assembled result. Omitting it keeps the
|
|
171
|
-
* previous two-argument behaviour exactly.
|
|
172
|
-
*/
|
|
173
|
-
on(name: string, listener: (...args: never[]) => unknown, options?: {
|
|
174
|
-
prepend?: boolean;
|
|
175
|
-
}): () => unknown;
|
|
176
|
-
effect(callback: () => (() => unknown) | void, label?: string): () => unknown;
|
|
177
|
-
get?(name: string): unknown;
|
|
178
|
-
}
|
|
179
|
-
export interface HostAgent {
|
|
180
|
-
id: string;
|
|
181
|
-
status: 'idle' | 'running';
|
|
182
|
-
options?: {
|
|
183
|
-
provider?: string;
|
|
184
|
-
model?: string;
|
|
185
|
-
maxTokens?: number;
|
|
186
|
-
};
|
|
187
|
-
session: HostSession;
|
|
188
|
-
ctx: HostAgentContext;
|
|
189
|
-
followup(message: HostUserMessage): void;
|
|
190
|
-
steer(message: HostUserMessage): void;
|
|
191
|
-
inject(message: HostUserMessage): void;
|
|
192
|
-
}
|
|
193
|
-
export interface HostAgentHandle {
|
|
194
|
-
agent: HostAgent;
|
|
195
|
-
dispose(): Promise<void>;
|
|
196
|
-
}
|
|
197
|
-
export interface CreateHostAgentOptions {
|
|
198
|
-
sessionId: string;
|
|
199
|
-
meta?: {
|
|
200
|
-
cwd?: string;
|
|
201
|
-
agentPreset?: string;
|
|
202
|
-
};
|
|
203
|
-
agentOptions?: {
|
|
204
|
-
provider?: string;
|
|
205
|
-
model?: string;
|
|
206
|
-
maxTokens?: number;
|
|
207
|
-
};
|
|
208
|
-
signal?: AbortSignal;
|
|
209
|
-
setup?: (agentCtx: HostAgentContext) => unknown | Promise<unknown>;
|
|
210
|
-
}
|
|
211
|
-
export interface HostAgentsService {
|
|
212
|
-
get(id: string): HostAgent | undefined;
|
|
213
|
-
roots(): HostAgent[];
|
|
214
|
-
/** DSH rc.6+ factory for an owned, clean top-level Agent. */
|
|
215
|
-
create?(options: CreateHostAgentOptions): Promise<HostAgentHandle>;
|
|
216
|
-
}
|
|
217
|
-
export interface HostWorkspace {
|
|
218
|
-
readonly id: string;
|
|
219
|
-
readonly path: string;
|
|
220
|
-
readonly title: string;
|
|
221
|
-
}
|
|
222
|
-
export interface HostWorkspaceRegistry {
|
|
223
|
-
get(id: string): HostWorkspace | undefined;
|
|
224
|
-
list(): HostWorkspace[];
|
|
225
|
-
}
|
|
226
|
-
export interface HostSubagentResult {
|
|
227
|
-
output: Array<{
|
|
228
|
-
type: string;
|
|
229
|
-
text?: string;
|
|
230
|
-
[key: string]: unknown;
|
|
231
|
-
}>;
|
|
232
|
-
structured?: unknown;
|
|
233
|
-
/** DSH rc.8+ provider-authored failure detail, including for remote children. */
|
|
234
|
-
diagnostic?: string;
|
|
235
|
-
stopReason: string;
|
|
236
|
-
}
|
|
237
|
-
export interface HostSubagentRun {
|
|
238
|
-
id: string;
|
|
239
|
-
localAgent?: HostAgent;
|
|
240
|
-
result: Promise<HostSubagentResult>;
|
|
241
|
-
dispose(): Promise<void>;
|
|
242
|
-
}
|
|
243
|
-
export interface HostSubagentProvider {
|
|
244
|
-
inheritsParentContext?: boolean;
|
|
245
|
-
capabilities: {
|
|
246
|
-
outputSchema: boolean;
|
|
247
|
-
depthLimit: boolean;
|
|
248
|
-
toolFilter: boolean;
|
|
249
|
-
persona: boolean;
|
|
250
|
-
};
|
|
251
|
-
}
|
|
252
|
-
export interface HostSubagentsService {
|
|
253
|
-
list(): string[];
|
|
254
|
-
getProvider(name: string): HostSubagentProvider | undefined;
|
|
255
|
-
start(name: string, request: {
|
|
256
|
-
label?: string;
|
|
257
|
-
prompt: Array<{
|
|
258
|
-
type: 'text';
|
|
259
|
-
text: string;
|
|
260
|
-
}>;
|
|
261
|
-
parent: HostAgent;
|
|
262
|
-
signal: AbortSignal;
|
|
263
|
-
agentOptions?: {
|
|
264
|
-
provider?: string;
|
|
265
|
-
model?: string;
|
|
266
|
-
maxTokens?: number;
|
|
267
|
-
};
|
|
268
|
-
outputSchema?: Record<string, unknown>;
|
|
269
|
-
maxDepth?: number;
|
|
270
|
-
toolFilter?: {
|
|
271
|
-
allow?: string[];
|
|
272
|
-
deny?: string[];
|
|
273
|
-
};
|
|
274
|
-
persona?: string;
|
|
275
|
-
}): Promise<HostSubagentRun>;
|
|
276
|
-
}
|
|
277
|
-
export interface HostLlmService {
|
|
278
|
-
listProviders(): Array<{
|
|
279
|
-
id: string;
|
|
280
|
-
name: string;
|
|
281
|
-
}>;
|
|
282
|
-
listModels(provider: string): Promise<Array<{
|
|
283
|
-
id: string;
|
|
284
|
-
name: string;
|
|
285
|
-
description?: string;
|
|
286
|
-
/** Absent means unknown; an explicit list declares the accepted request modalities. */
|
|
287
|
-
inputModalities?: readonly string[];
|
|
288
|
-
}>>;
|
|
289
|
-
}
|
|
290
|
-
export interface HostContextShape {
|
|
291
|
-
tools: {
|
|
292
|
-
register(definition: ToolDefinition): unknown;
|
|
293
|
-
};
|
|
294
|
-
commands: CommandService;
|
|
295
|
-
settings: HostSettingsService;
|
|
296
|
-
/** Web-only transport; absent from non-Web profiles such as Headless. */
|
|
297
|
-
connection?: HostConnectionHandle;
|
|
298
|
-
agents: HostAgentsService;
|
|
299
|
-
subagents: HostSubagentsService;
|
|
300
|
-
/** Web workbench catalog; Agent execution routes by session cwd without it. */
|
|
301
|
-
workspaceRegistry?: HostWorkspaceRegistry;
|
|
302
|
-
get(name: string): unknown;
|
|
303
|
-
/** Cordis service publication; optional only for narrow test/headless shims. */
|
|
304
|
-
provide?(name: string, value?: unknown, check?: () => boolean): unknown;
|
|
305
|
-
inject(services: string[], callback: (ctx: HostContextShape) => void): unknown;
|
|
306
|
-
/**
|
|
307
|
-
* `options` is optional and forwarded verbatim to the host. `prepend`
|
|
308
|
-
* places the listener at the head of the chain, which for a waterfall
|
|
309
|
-
* means it observes the fully assembled result. Omitting it keeps the
|
|
310
|
-
* previous two-argument behaviour exactly.
|
|
311
|
-
*/
|
|
312
|
-
on(name: string, listener: (...args: never[]) => unknown, options?: {
|
|
313
|
-
prepend?: boolean;
|
|
314
|
-
}): () => unknown;
|
|
315
|
-
effect(callback: () => (() => unknown) | void, label?: string): () => unknown;
|
|
316
|
-
}
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import type { HostAgent } from './contracts.ts';
|
|
2
|
-
import type { DocumentMutation, DocumentMutationResult, DocumentRecord, DocumentSearchResult, DocumentSnapshot, DocumentView } from './shared/contracts.ts';
|
|
3
|
-
import type { AuthorityCommitRecorder } from './memory-receipts.ts';
|
|
4
|
-
import type { MemoryMigrationLineage } from '../packages/contracts/src/index.ts';
|
|
5
|
-
export type { DocumentMutation, DocumentMutationResult, DocumentRecord, DocumentSearchResult, DocumentSnapshot, DocumentStatus, DocumentView } from './shared/contracts.ts';
|
|
6
|
-
export declare const DOCUMENTS_VERSION = 1;
|
|
7
|
-
export declare const DOCUMENTS_ACTIVE_LIMIT_BYTES: number;
|
|
8
|
-
export interface DocumentCapacityPlan {
|
|
9
|
-
projected: number;
|
|
10
|
-
limit: number;
|
|
11
|
-
fits: boolean;
|
|
12
|
-
candidates: DocumentRecord[];
|
|
13
|
-
}
|
|
14
|
-
export declare class DocumentCapacityError extends Error {
|
|
15
|
-
readonly projected: number;
|
|
16
|
-
readonly limit: number;
|
|
17
|
-
readonly candidates: DocumentRecord[];
|
|
18
|
-
constructor(projected: number, limit: number, candidates: DocumentRecord[]);
|
|
19
|
-
}
|
|
20
|
-
export declare class DocumentConflictError extends Error {
|
|
21
|
-
constructor();
|
|
22
|
-
}
|
|
23
|
-
/** Project-scoped control plane for managed active and cold document copies. */
|
|
24
|
-
export declare class DocumentController {
|
|
25
|
-
readonly limitBytes: number;
|
|
26
|
-
private readonly now;
|
|
27
|
-
private readonly recordCommit?;
|
|
28
|
-
readonly workspaceRoot: string;
|
|
29
|
-
readonly storageRoot: string;
|
|
30
|
-
readonly directory: string;
|
|
31
|
-
readonly activeDirectory: string;
|
|
32
|
-
readonly archivedDirectory: string;
|
|
33
|
-
readonly indexPath: string;
|
|
34
|
-
readonly lockPath: string;
|
|
35
|
-
private readonly managedRelativePrefix;
|
|
36
|
-
private queue;
|
|
37
|
-
constructor(workspaceRoot: string, limitBytes?: number, now?: () => Date, storageRoot?: string, recordCommit?: AuthorityCommitRecorder | undefined);
|
|
38
|
-
snapshot(): DocumentSnapshot;
|
|
39
|
-
get(id: string): DocumentView;
|
|
40
|
-
capacityPlan(request: DocumentMutation): DocumentCapacityPlan;
|
|
41
|
-
search(query: string, options?: {
|
|
42
|
-
includeArchived?: boolean;
|
|
43
|
-
limit?: number;
|
|
44
|
-
}): Promise<DocumentSearchResult>;
|
|
45
|
-
mutate(request: DocumentMutation): Promise<DocumentMutationResult>;
|
|
46
|
-
archive(id: string, expectedRevision: number, details: {
|
|
47
|
-
summary: string;
|
|
48
|
-
memoryBodyIds: string[];
|
|
49
|
-
lineage?: readonly MemoryMigrationLineage[];
|
|
50
|
-
}): Promise<DocumentMutationResult>;
|
|
51
|
-
private mutateLocked;
|
|
52
|
-
private initialize;
|
|
53
|
-
private readIndex;
|
|
54
|
-
private snapshotUnlocked;
|
|
55
|
-
private requireDocument;
|
|
56
|
-
private assertCapacity;
|
|
57
|
-
private normalizeSourcePaths;
|
|
58
|
-
private relativeManagedPath;
|
|
59
|
-
private pathFor;
|
|
60
|
-
private readBody;
|
|
61
|
-
private view;
|
|
62
|
-
private persistDocument;
|
|
63
|
-
private persistIndex;
|
|
64
|
-
private atomicWrite;
|
|
65
|
-
private withLock;
|
|
66
|
-
}
|
|
67
|
-
/** Resolves one cached controller per canonical DSH workspace. */
|
|
68
|
-
export declare class DocumentManager {
|
|
69
|
-
private readonly limitBytes;
|
|
70
|
-
private readonly now;
|
|
71
|
-
private readonly storageRoot?;
|
|
72
|
-
private readonly recordCommit?;
|
|
73
|
-
private readonly controllers;
|
|
74
|
-
constructor(limitBytes?: number, now?: () => Date, storageRoot?: (() => string) | undefined, recordCommit?: AuthorityCommitRecorder | undefined);
|
|
75
|
-
forWorkspace(workspaceRoot: string): DocumentController;
|
|
76
|
-
forAgent(agent: HostAgent): DocumentController;
|
|
77
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Resolve the current git branch of a workspace root. Returns undefined when
|
|
3
|
-
* the directory is not a git working tree, HEAD is detached, or the probe
|
|
4
|
-
* fails or times out, so callers fall back to the unfiltered view.
|
|
5
|
-
*/
|
|
6
|
-
export declare function resolveGitBranch(cwd?: string): string | undefined;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type { HostAgent, HostContextShape } from './contracts.ts';
|
|
2
|
-
import type { ResolvedConfig } from './config.ts';
|
|
3
|
-
import { type RuntimeMemoryController } from './runtime-memory.ts';
|
|
4
|
-
import type { MemoryWake } from '../packages/contracts/src/index.ts';
|
|
5
|
-
export declare const GUIDANCE_SECTION_NAME = "mnemon:routing";
|
|
6
|
-
export declare const RUNTIME_MEMORY_PROTOCOL_SECTION_NAME = "mnemon:runtime-memory-protocol";
|
|
7
|
-
export declare const RUNTIME_MEMORY_CONTEXT_NAME = "mnemon:runtime-memory";
|
|
8
|
-
export declare const ROUTING_GUIDANCE = "Use memory only when needed. Search Mnemon Documents for substantial project records. Call mnemon_recall for durable history or exact prior details; never infer a missing historical rule. Put only new user facts or explicit save/correction requests in mnemon_runtime_memory; never cache retrieved evidence. A write exists only after its receipt.";
|
|
9
|
-
export declare function memoryPromptText(value: string): string;
|
|
10
|
-
/** Replace the already-materialized Agent protocol and context with the Wake pinned during assembly. */
|
|
11
|
-
export declare function applyAgentMemoryViewWake<T extends {
|
|
12
|
-
sections: Array<{
|
|
13
|
-
name: string;
|
|
14
|
-
text: string;
|
|
15
|
-
}>;
|
|
16
|
-
contexts: Array<{
|
|
17
|
-
name: string;
|
|
18
|
-
text: string;
|
|
19
|
-
}>;
|
|
20
|
-
}>(assembly: T, wake: MemoryWake | undefined): T;
|
|
21
|
-
/** Register the non-recursive escape used by both legacy Runtime and View Wake contexts. */
|
|
22
|
-
export declare function registerMemoryPromptInterpolation(ctx: HostContextShape): void;
|
|
23
|
-
export declare function registerGuidance(ctx: HostContextShape, config?: Pick<ResolvedConfig, 'routingGuidance'>): void;
|
|
24
|
-
/** Project the latest committed USER.md/MEMORY.md as DSH's durable runtime-context snapshot. */
|
|
25
|
-
export declare function registerRuntimeMemoryContext(ctx: HostContextShape, runtimeMemory: RuntimeMemoryController, enabled?: () => boolean): void;
|
|
26
|
-
/** Shadow the global fallback with the current Agent workspace's hot memory. */
|
|
27
|
-
export declare function registerAgentRuntimeMemoryContext(agent: HostAgent, runtimeMemory: () => RuntimeMemoryController, enabled?: () => boolean): () => void;
|
|
28
|
-
/** Project only the immutable Wake pinned by the root Agent lifecycle. */
|
|
29
|
-
export declare function registerAgentMemoryViewContext(agent: HostAgent, wake: () => MemoryWake | undefined): () => void;
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import type { ResolvedConfig } from './config.ts';
|
|
2
|
-
import type { HostContextShape } from './contracts.ts';
|
|
3
|
-
import type { Insight, RememberRequest, SearchRequest } from './service.ts';
|
|
4
|
-
import type { RuntimeMemoryMutation } from './runtime-memory.ts';
|
|
5
|
-
import type { DocumentMutation } from './documents.ts';
|
|
6
|
-
import { MnemonSubagentCoordinator, type DelegatedWriteResult } from './subagent.ts';
|
|
7
|
-
import { type TurnMemoryActivitySnapshot } from './activity.ts';
|
|
8
|
-
import type { AssistantMessageText, LifecycleSnapshot, TaskAgentModelCatalog } from './shared/contracts.ts';
|
|
9
|
-
import type { PreparedMemoryPlacement } from './provider-placement.ts';
|
|
10
|
-
import type { MnemonAgentRuntimeSource } from './live-runtime.ts';
|
|
11
|
-
type AgentRuntimeSource = Pick<MnemonAgentRuntimeSource, 'forAgent' | 'bindAgentRuntime'>;
|
|
12
|
-
export type { TurnMemoryActivity, TurnMemoryActivitySnapshot } from './activity.ts';
|
|
13
|
-
export type { AssistantMessageText, LifecycleAgentSnapshot, LifecycleCounters, LifecyclePhase, LifecycleSnapshot } from './shared/contracts.ts';
|
|
14
|
-
export declare const MNEMON_PLUGIN_SOURCE = "dsh-mnemon";
|
|
15
|
-
export interface SupervisedWritebackResult extends DelegatedWriteResult {
|
|
16
|
-
sessionId: string;
|
|
17
|
-
}
|
|
18
|
-
/** DSH-native owner for per-agent Mnemon lifecycle hooks and UI-triggered LLM work. */
|
|
19
|
-
export declare class MnemonLifecycle {
|
|
20
|
-
private readonly ctx;
|
|
21
|
-
private readonly coordinator;
|
|
22
|
-
private readonly config;
|
|
23
|
-
private readonly runtimeSource?;
|
|
24
|
-
private readonly owners;
|
|
25
|
-
private readonly children;
|
|
26
|
-
private readonly memoryTurns;
|
|
27
|
-
private readonly counters;
|
|
28
|
-
/** Creation ids reserved before DSH publishes clean task-root Agents. */
|
|
29
|
-
private readonly taskAgentIds;
|
|
30
|
-
/** Bounded process-local replay fence for finalized-message write actions. */
|
|
31
|
-
private readonly supervisedWritebacks;
|
|
32
|
-
constructor(ctx: HostContextShape, coordinator: MnemonSubagentCoordinator, config: ResolvedConfig, runtimeSource?: AgentRuntimeSource | undefined);
|
|
33
|
-
start(): () => void;
|
|
34
|
-
snapshot(sessionId?: string, workspaceRoot?: string): LifecycleSnapshot;
|
|
35
|
-
/** Provider/model directory used by Settings without requiring a live session. */
|
|
36
|
-
taskAgentModels(includeCatalog?: boolean): Promise<TaskAgentModelCatalog>;
|
|
37
|
-
private availableAgent;
|
|
38
|
-
workspaceRoot(sessionId?: string): string | undefined;
|
|
39
|
-
/** Settled memory-tool activity for all turns, resolved per session. */
|
|
40
|
-
turnActivities(sessionId: string): TurnMemoryActivitySnapshot;
|
|
41
|
-
/** Plain text of one finalized assistant message, resolved per session; null while absent. */
|
|
42
|
-
assistantMessage(sessionId: string, messageId: string): AssistantMessageText | null;
|
|
43
|
-
recall(sessionId: string, request: SearchRequest, signal?: AbortSignal): Promise<import("./subagent.ts").RecallResult>;
|
|
44
|
-
related(sessionId: string, id: string, memoryBodyId?: string, signal?: AbortSignal): Promise<import("./subagent.ts").RecallResult>;
|
|
45
|
-
answer(sessionId: string, query: string, evidence: Insight[], signal?: AbortSignal): Promise<import("./subagent.ts").DelegatedAnswerResult>;
|
|
46
|
-
/** Synthesize a Web Agent Query without borrowing a conversation Agent or its history. */
|
|
47
|
-
answerTask(sessionId: string, query: string, evidence: Insight[], workspaceRoot?: string, signal?: AbortSignal): Promise<import("./subagent.ts").DelegatedAnswerResult>;
|
|
48
|
-
remember(sessionId: string, request: RememberRequest, signal?: AbortSignal): Promise<DelegatedWriteResult>;
|
|
49
|
-
runtime(sessionId: string, request: RuntimeMemoryMutation, signal?: AbortSignal): Promise<import("./subagent.ts").CoordinatedRuntimeMemoryResult>;
|
|
50
|
-
documents(sessionId: string): import("./documents.ts").DocumentSnapshot;
|
|
51
|
-
document(sessionId: string, id: string): import("./documents.ts").DocumentView;
|
|
52
|
-
searchDocuments(sessionId: string, query: string, includeArchived?: boolean, limit?: number): Promise<import("./documents.ts").DocumentSearchResult>;
|
|
53
|
-
mutateDocument(sessionId: string, request: DocumentMutation, signal?: AbortSignal): Promise<import("./subagent.ts").CoordinatedDocumentResult>;
|
|
54
|
-
archiveDocument(sessionId: string, id: string, workspaceRoot?: string, signal?: AbortSignal): Promise<import("./subagent.ts").CoordinatedDocumentResult>;
|
|
55
|
-
mutate(sessionId: string, operation: string, request: unknown, signal?: AbortSignal): Promise<DelegatedWriteResult>;
|
|
56
|
-
placeProvider(sessionId: string, body: {
|
|
57
|
-
name: string;
|
|
58
|
-
description: string;
|
|
59
|
-
}, prepared: PreparedMemoryPlacement, signal?: AbortSignal): Promise<import("./shared/contracts.ts").MemoryPlacementDecision>;
|
|
60
|
-
maintainMetadata(sessionId: string, memoryBodyIds: readonly string[], workspaceRoot?: string, signal?: AbortSignal): Promise<import("./shared/contracts.ts").MemoryBodyMetadataMaintenanceResult>;
|
|
61
|
-
supervise(sessionId: string, content: string, idempotencyKey?: string, signal?: AbortSignal): Promise<SupervisedWritebackResult>;
|
|
62
|
-
/** Run a Web workbench distillation under a fresh top-level task Agent. */
|
|
63
|
-
superviseTask(sessionId: string, content: string, idempotencyKey?: string, workspaceRoot?: string, signal?: AbortSignal): Promise<SupervisedWritebackResult>;
|
|
64
|
-
private superviseResolved;
|
|
65
|
-
private liveAgent;
|
|
66
|
-
/**
|
|
67
|
-
* Run session-independent maintenance under a fresh top-level Agent. Its cwd
|
|
68
|
-
* is the explicit Web workbench scope, so LiveMnemonRuntime resolves the same
|
|
69
|
-
* workspace graph without borrowing conversation history or ownership.
|
|
70
|
-
*/
|
|
71
|
-
private runTaskAgent;
|
|
72
|
-
/** Resolve the same model route and preset composition as an ordinary fresh DSH Agent. */
|
|
73
|
-
private taskAgentCreation;
|
|
74
|
-
/** Resolve a complete task route for both status admission and actual creation. */
|
|
75
|
-
private taskAgentModelRoute;
|
|
76
|
-
private taskAgentModelOptions;
|
|
77
|
-
private install;
|
|
78
|
-
/** Child memory ownership is independent of root-only reminders and idle review. */
|
|
79
|
-
private installChild;
|
|
80
|
-
}
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import type { ResolvedConfig } from './config.ts';
|
|
2
|
-
import type { HostAgent, HostAgentsService, HostWorkspace, HostWorkspaceRegistry } from './contracts.ts';
|
|
3
|
-
import { DocumentManager } from './documents.ts';
|
|
4
|
-
import { MnemonPackManager } from './pack.ts';
|
|
5
|
-
import { type MnemonRunner } from './runner.ts';
|
|
6
|
-
import { RuntimeMemoryController } from './runtime-memory.ts';
|
|
7
|
-
import { MnemonService } from './service.ts';
|
|
8
|
-
import { StorageScopeInspector } from './storage-scope.ts';
|
|
9
|
-
import { MemoryCatalog } from './memory-system/catalog.ts';
|
|
10
|
-
import { MemoryKernel } from './memory-system/kernel.ts';
|
|
11
|
-
import { MemoryTopologyManager } from './memory-system/topology.ts';
|
|
12
|
-
import type { MemoryBoot } from '../packages/extension-sdk/src/index.ts';
|
|
13
|
-
import type { MemoryTurnViewManager } from '../packages/kernel/src/index.ts';
|
|
14
|
-
export interface MnemonRuntimeGraph {
|
|
15
|
-
config: ResolvedConfig;
|
|
16
|
-
runner: MnemonRunner;
|
|
17
|
-
service: MnemonService;
|
|
18
|
-
runtimeMemory: RuntimeMemoryController;
|
|
19
|
-
documents: DocumentManager;
|
|
20
|
-
storage: StorageScopeInspector;
|
|
21
|
-
packs: MnemonPackManager;
|
|
22
|
-
memoryCatalog: MemoryCatalog;
|
|
23
|
-
memoryTopology: MemoryTopologyManager;
|
|
24
|
-
memoryKernel: MemoryKernel;
|
|
25
|
-
memoryViews: MemoryTurnViewManager;
|
|
26
|
-
/** Detach this generation from future Host-global extension changes. */
|
|
27
|
-
dispose(): void;
|
|
28
|
-
}
|
|
29
|
-
export interface MnemonAgentRuntimeSource {
|
|
30
|
-
readonly config: ResolvedConfig;
|
|
31
|
-
forAgent(agent: HostAgent): MnemonRuntimeGraph;
|
|
32
|
-
/** Retain one runtime generation for an Agent turn or delegated child lifetime. */
|
|
33
|
-
bindAgentRuntime(agentId: string, graph: MnemonRuntimeGraph): () => void;
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Build a complete generation before it can become visible. Constructors also
|
|
37
|
-
* validate and initialize the selected storage root, so a failed candidate is
|
|
38
|
-
* rejected by DSH settings validation without disturbing the active graph.
|
|
39
|
-
*/
|
|
40
|
-
export declare function createRuntimeGraph(config: ResolvedConfig, workspaceRoot?: string, extensions?: MemoryBoot): MnemonRuntimeGraph;
|
|
41
|
-
/**
|
|
42
|
-
* Stable faces handed to DSH registrations. `swap` is synchronous and contains
|
|
43
|
-
* no user code, so all faces move to the same prevalidated generation in one
|
|
44
|
-
* JavaScript turn. A method obtained before the swap stays bound to its old
|
|
45
|
-
* generation until that invocation settles.
|
|
46
|
-
*/
|
|
47
|
-
export declare class LiveMnemonRuntime implements MnemonAgentRuntimeSource {
|
|
48
|
-
private readonly workspaceRegistry?;
|
|
49
|
-
private readonly agents?;
|
|
50
|
-
private readonly extensions?;
|
|
51
|
-
private current;
|
|
52
|
-
private readonly workspaceGraphs;
|
|
53
|
-
private readonly agentGraphs;
|
|
54
|
-
private closed;
|
|
55
|
-
readonly config: ResolvedConfig;
|
|
56
|
-
readonly runner: MnemonRunner;
|
|
57
|
-
readonly service: MnemonService;
|
|
58
|
-
readonly runtimeMemory: RuntimeMemoryController;
|
|
59
|
-
readonly documents: DocumentManager;
|
|
60
|
-
readonly storage: StorageScopeInspector;
|
|
61
|
-
readonly packs: MnemonPackManager;
|
|
62
|
-
readonly memoryCatalog: MemoryCatalog;
|
|
63
|
-
readonly memoryTopology: MemoryTopologyManager;
|
|
64
|
-
readonly memoryKernel: MemoryKernel;
|
|
65
|
-
readonly memoryViews: MemoryTurnViewManager;
|
|
66
|
-
constructor(initial: MnemonRuntimeGraph, workspaceRegistry?: HostWorkspaceRegistry | undefined, agents?: HostAgentsService | undefined, extensions?: MemoryBoot | undefined);
|
|
67
|
-
swap(next: MnemonRuntimeGraph): void;
|
|
68
|
-
snapshot(): MnemonRuntimeGraph;
|
|
69
|
-
bindAgentRuntime(agentId: string, graph: MnemonRuntimeGraph): () => void;
|
|
70
|
-
dispose(): void;
|
|
71
|
-
/** Resolve the runtime that must serve one Agent execution. */
|
|
72
|
-
forAgent(agent: HostAgent): MnemonRuntimeGraph;
|
|
73
|
-
/** Resolve an authorized DSH workspace selected by the Web workbench. */
|
|
74
|
-
forWorkspaceId(workspaceId: string): MnemonRuntimeGraph;
|
|
75
|
-
/** Resolve a Web request, preferring its explicit inspection workspace. */
|
|
76
|
-
route(request: {
|
|
77
|
-
workspaceId?: string;
|
|
78
|
-
sessionId?: string;
|
|
79
|
-
}): {
|
|
80
|
-
graph: MnemonRuntimeGraph;
|
|
81
|
-
selectedWorkspace?: HostWorkspace;
|
|
82
|
-
effectiveWorkspace?: HostWorkspace;
|
|
83
|
-
selectedRoot: string;
|
|
84
|
-
effectiveRoot: string;
|
|
85
|
-
aligned: boolean;
|
|
86
|
-
};
|
|
87
|
-
private forWorkspacePath;
|
|
88
|
-
private assertOpen;
|
|
89
|
-
private agent;
|
|
90
|
-
private requireWorkspace;
|
|
91
|
-
private workspaceForPath;
|
|
92
|
-
}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import type { MnemonRunner } from './runner.ts';
|
|
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';
|
|
6
|
-
export declare function validateMemoryBodyId(value: string): string;
|
|
7
|
-
/**
|
|
8
|
-
* Persistent metadata layered over Mnemon's native named stores.
|
|
9
|
-
*
|
|
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.
|
|
13
|
-
*/
|
|
14
|
-
export declare class MemoryBodyRegistry {
|
|
15
|
-
readonly runner: MnemonRunner;
|
|
16
|
-
private readonly persistent;
|
|
17
|
-
private readonly now;
|
|
18
|
-
readonly directory: string;
|
|
19
|
-
readonly registryPath: string;
|
|
20
|
-
readonly providerRegistryPath: string;
|
|
21
|
-
private bodies;
|
|
22
|
-
private services;
|
|
23
|
-
private serviceEnabled;
|
|
24
|
-
constructor(runner: MnemonRunner, persistent?: boolean, now?: () => Date);
|
|
25
|
-
list(): MemoryBody[];
|
|
26
|
-
active(): MemoryBody[];
|
|
27
|
-
get(id: string): MemoryBody;
|
|
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>;
|
|
41
|
-
update(id: string, request: UpdateMemoryBodyRequest): MemoryBody;
|
|
42
|
-
/** Validate every model-authored update before committing the batch. */
|
|
43
|
-
updateMetadata(updates: readonly MemoryBodyMetadataUpdate[]): MemoryBody[];
|
|
44
|
-
remove(id: string, signal?: AbortSignal): Promise<MemoryBody>;
|
|
45
|
-
setActive(id: string, active: boolean): MemoryBody;
|
|
46
|
-
/** Advance the safe catalog checkpoint after provider-backed content changes. */
|
|
47
|
-
touch(id: string): MemoryBody;
|
|
48
|
-
/** Refresh metadata after an atomic Pack import replaced the data component. */
|
|
49
|
-
reload(): void;
|
|
50
|
-
private loadAndReconcile;
|
|
51
|
-
private reconcileDiscoveredStores;
|
|
52
|
-
private nativeStoreIds;
|
|
53
|
-
private nextTimestamp;
|
|
54
|
-
private view;
|
|
55
|
-
private save;
|
|
56
|
-
private writeRegistry;
|
|
57
|
-
}
|