dotmem 0.0.5 → 0.0.8
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/AGENTS.md +514 -0
- package/CHANGELOG.md +0 -0
- package/DOTMEM.md +539 -41
- package/LICENSE.md +9 -0
- package/MEMORY.md +606 -0
- package/PACKAGE.md +57 -0
- package/README.md +417 -0
- package/SECURITY.md +525 -0
- package/agent.cjs +16 -4
- package/agent.js +16 -4
- package/cli.cjs +3995 -4671
- package/cli.js +3653 -4263
- package/env.cjs +6 -0
- package/env.js +4 -0
- package/global.cjs +49 -44
- package/global.d.ts +13 -14
- package/global.js +41 -25
- package/index.cjs +1465 -21195
- package/index.js +1437 -21176
- package/llms.txt +301 -0
- package/mcp.cjs +1747 -36854
- package/mcp.js +1730 -36833
- package/package.json +5 -7
- package/types/exports.d.ts +297 -304
- package/types/bun-sqlite.d.ts +0 -14
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dotmem",
|
|
3
3
|
"codeName": "dotmem",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.8",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"description": "The AI memory layer for agents and apps: acquired experience, discovery, context projection, continuity, and logic engine. Built on Memorio's state+store foundation.",
|
|
@@ -74,17 +74,15 @@
|
|
|
74
74
|
"publishConfig": {
|
|
75
75
|
"access": "public"
|
|
76
76
|
},
|
|
77
|
-
"
|
|
78
|
-
"@modelcontextprotocol/server": "
|
|
79
|
-
"
|
|
77
|
+
"dependencies": {
|
|
78
|
+
"@modelcontextprotocol/server": "2.4.0",
|
|
79
|
+
"memorio": "5.5.3",
|
|
80
|
+
"zod": "4.6.7"
|
|
80
81
|
},
|
|
81
82
|
"overrides": {
|
|
82
83
|
"glob": "^14.0.2",
|
|
83
84
|
"minimatch": "^11.0.1"
|
|
84
85
|
},
|
|
85
|
-
"dependencies": {
|
|
86
|
-
"memorio": "5.5.3"
|
|
87
|
-
},
|
|
88
86
|
"typings": "./index.d.ts",
|
|
89
87
|
"scripts": {
|
|
90
88
|
"prepack": "node -e \"['bin/cli.js','bin/cli.cjs','bin/mcp.js','bin/mcp.cjs'].forEach(f=>{try{require('fs').chmodSync(f,0o755)}catch{}})\""
|
package/types/exports.d.ts
CHANGED
|
@@ -1,304 +1,297 @@
|
|
|
1
|
-
export * from './memory'
|
|
2
|
-
export * from './agent'
|
|
3
|
-
export * from './logic'
|
|
4
|
-
export * from './policy'
|
|
5
|
-
export * from './profile'
|
|
6
|
-
export * from './llm-cache'
|
|
7
|
-
|
|
8
|
-
// ── Memory facade type ───────────────────────────────────────────────────
|
|
9
|
-
export interface MemoryFacade {
|
|
10
|
-
init(): Promise<void>
|
|
11
|
-
discover(situation: string
|
|
12
|
-
context(options?: ContextQueryOptions): Promise<import('./memory').AcquiredContext>
|
|
13
|
-
project(discovery: import('./memory').DiscoveryResult, options?: import('./memory').ProjectionOptions): import('./memory').ContextProjection
|
|
14
|
-
acquire(opts: import('./memory').AcquireOptions): Promise<void>
|
|
15
|
-
acquireStaged(opts: import('./memory').AcquireOptions): Promise<void>
|
|
16
|
-
remember<T>(key: string, value: T, opts?: import('./memory').RememberOptions<T>): Promise<void>
|
|
17
|
-
recall<T = any>(query: string | number, opts?: import('./memory').RecallOptions): Promise<T | null>
|
|
18
|
-
update(key: string, value: any, opts?: Partial<import('./memory').RememberOptions>): Promise<void>
|
|
19
|
-
forget(key: string): Promise<void>
|
|
20
|
-
patch(key: string, patches: import('./memory').PatchOperation[]): Promise<void>
|
|
21
|
-
stats(): Promise<import('./memory').MemoryStats>
|
|
22
|
-
forgetExpired(): Promise<number>
|
|
23
|
-
clear(): Promise<void>
|
|
24
|
-
fingerprint(): Promise<string>
|
|
25
|
-
journal: MemoryJournal
|
|
26
|
-
profile: MemoryProfile
|
|
27
|
-
note: MemoryNotes
|
|
28
|
-
seed: MemorySeed
|
|
29
|
-
policy: MemoryPolicyAPI
|
|
30
|
-
brain: MemoryBrainAPI
|
|
31
|
-
configure(config: import('./memory').SyncConfig): void
|
|
32
|
-
configureSync(config: import('./memory').SyncConfig): void
|
|
33
|
-
resetBrainPathCache(): void
|
|
34
|
-
resetPolicyStoreCache(): void
|
|
35
|
-
_getEntry(key: string): Promise<import('./memory').MemoryEntry | null>
|
|
36
|
-
_loadAll(): Promise<import('./memory').MemoryEntry[]>
|
|
37
|
-
_save(entry: import('./memory').MemoryEntry): Promise<void>
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export interface LlmCacheAPI {
|
|
41
|
-
llm<T>(opts: import('./llm-cache').LlmCacheOptions<T>): Promise<import('./llm-cache').LlmCacheResult<T>>
|
|
42
|
-
llmStats(): import('./llm-cache').LlmCacheStats
|
|
43
|
-
llmPurge(selector: import('./llm-cache').LlmCachePurgeSelector): number
|
|
44
|
-
[key: string]: any
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
type Situation = string
|
|
48
|
-
|
|
49
|
-
export interface ContextQueryOptions {
|
|
50
|
-
tags?: string | string[]
|
|
51
|
-
types?: import('./memory').MemoryType | import('./memory').MemoryType[]
|
|
52
|
-
minConfidence?: number
|
|
53
|
-
maxEntries?: number
|
|
54
|
-
scopes?: import('./memory').MemoryScope[]
|
|
55
|
-
project?: boolean
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export interface MemoryJournal {
|
|
59
|
-
read: (opts?: { limit?: number }) => Promise<JournalEntry[]>
|
|
60
|
-
write: (entry: JournalEntry | JournalEntry[]) => Promise<void>
|
|
61
|
-
clear: () => Promise<void>
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export interface JournalEntry {
|
|
65
|
-
id: string
|
|
66
|
-
key: string
|
|
67
|
-
type: import('./memory').MemoryType
|
|
68
|
-
operation: string
|
|
69
|
-
hlc?: string
|
|
70
|
-
createdAt: number
|
|
71
|
-
payload?: unknown
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
export interface MemoryProfile {
|
|
75
|
-
get(): import('./profile').DotMemProfile
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
export interface MemoryNotes {
|
|
79
|
-
add(text: string, opts?: { id?: string; tags?: string[] }): Promise<void>
|
|
80
|
-
get(id: string): Promise<NoteContent | null>
|
|
81
|
-
list(): Promise<NoteEntry[]>
|
|
82
|
-
forget(id: string): Promise<void>
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
export interface NoteContent {
|
|
86
|
-
id: string
|
|
87
|
-
title: string
|
|
88
|
-
content: string
|
|
89
|
-
tags: string[]
|
|
90
|
-
createdAt: number
|
|
91
|
-
sha256: string
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
export interface NoteEntry {
|
|
95
|
-
id: string
|
|
96
|
-
title: string
|
|
97
|
-
size: number
|
|
98
|
-
sha256: string
|
|
99
|
-
origin: string
|
|
100
|
-
tag?: string
|
|
101
|
-
acquiredAt?: string
|
|
102
|
-
scope?: string
|
|
103
|
-
type?: import('./memory').MemoryType
|
|
104
|
-
version?: number
|
|
105
|
-
updatedAt?: number
|
|
106
|
-
previousId?: string | null
|
|
107
|
-
patches?: import('./memory').PatchOperation[]
|
|
108
|
-
hlc?: string
|
|
109
|
-
key?: string
|
|
110
|
-
value?: unknown
|
|
111
|
-
status?: string
|
|
112
|
-
createdAt?: number
|
|
113
|
-
lastConfirmedAt?: number
|
|
114
|
-
supersededId?: string | null
|
|
115
|
-
confidence?: number
|
|
116
|
-
source?: string
|
|
117
|
-
ttl?: number | null
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
export interface MemorySeed {
|
|
121
|
-
id: string
|
|
122
|
-
title: string
|
|
123
|
-
content: string
|
|
124
|
-
origin: string
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
// --- Foundation types from Memorio
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
// ---
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
export
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
declare function
|
|
160
|
-
declare function
|
|
161
|
-
declare function
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
declare function
|
|
165
|
-
declare function
|
|
166
|
-
declare function
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
export
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
declare
|
|
179
|
-
declare
|
|
180
|
-
declare
|
|
181
|
-
declare
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
declare function
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
export interface
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
readonly
|
|
207
|
-
readonly
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
readonly
|
|
211
|
-
readonly
|
|
212
|
-
readonly
|
|
213
|
-
readonly
|
|
214
|
-
readonly
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
declare
|
|
225
|
-
declare
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
declare const
|
|
229
|
-
declare const
|
|
230
|
-
declare
|
|
231
|
-
declare
|
|
232
|
-
declare
|
|
233
|
-
declare
|
|
234
|
-
declare const
|
|
235
|
-
declare
|
|
236
|
-
declare
|
|
237
|
-
declare
|
|
238
|
-
declare
|
|
239
|
-
declare const
|
|
240
|
-
declare
|
|
241
|
-
declare
|
|
242
|
-
declare
|
|
243
|
-
declare
|
|
244
|
-
declare
|
|
245
|
-
declare function
|
|
246
|
-
declare function
|
|
247
|
-
declare function
|
|
248
|
-
declare function
|
|
249
|
-
declare function
|
|
250
|
-
declare function
|
|
251
|
-
declare function
|
|
252
|
-
declare function
|
|
253
|
-
declare function
|
|
254
|
-
declare function
|
|
255
|
-
declare function
|
|
256
|
-
declare function
|
|
257
|
-
declare function
|
|
258
|
-
declare function
|
|
259
|
-
declare
|
|
260
|
-
declare function
|
|
261
|
-
declare function
|
|
262
|
-
declare function
|
|
263
|
-
declare function
|
|
264
|
-
declare
|
|
265
|
-
declare function
|
|
266
|
-
declare function
|
|
267
|
-
declare function
|
|
268
|
-
declare function
|
|
269
|
-
declare function
|
|
270
|
-
declare function
|
|
271
|
-
declare
|
|
272
|
-
declare
|
|
273
|
-
declare function
|
|
274
|
-
declare
|
|
275
|
-
declare function
|
|
276
|
-
declare
|
|
277
|
-
declare const
|
|
278
|
-
declare
|
|
279
|
-
declare const
|
|
280
|
-
declare
|
|
281
|
-
declare
|
|
282
|
-
declare
|
|
283
|
-
declare const
|
|
284
|
-
declare const
|
|
285
|
-
declare const
|
|
286
|
-
declare
|
|
287
|
-
declare function
|
|
288
|
-
declare
|
|
289
|
-
declare
|
|
290
|
-
declare
|
|
291
|
-
declare
|
|
292
|
-
declare
|
|
293
|
-
declare function
|
|
294
|
-
declare function
|
|
295
|
-
declare function
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
declare function getCapabilities(): unknown
|
|
299
|
-
declare function createContext(name?: string, opts?: { encryptionKey?: any }): unknown
|
|
300
|
-
declare function listContexts(): unknown[]
|
|
301
|
-
declare function deleteContext(id: string): void
|
|
302
|
-
declare function isolate(name?: string, opts?: { encryptionKey?: any }): void
|
|
303
|
-
|
|
304
|
-
export default dotmem
|
|
1
|
+
export * from './memory'
|
|
2
|
+
export * from './agent'
|
|
3
|
+
export * from './logic'
|
|
4
|
+
export * from './policy'
|
|
5
|
+
export * from './profile'
|
|
6
|
+
export * from './llm-cache'
|
|
7
|
+
|
|
8
|
+
// ── Memory facade type ───────────────────────────────────────────────────
|
|
9
|
+
export interface MemoryFacade {
|
|
10
|
+
init(): Promise<void>
|
|
11
|
+
discover(situation: string, options?: import('./memory').DiscoveryOptions): Promise<import('./memory').DiscoveryResult>
|
|
12
|
+
context(options?: ContextQueryOptions): Promise<import('./memory').AcquiredContext>
|
|
13
|
+
project(discovery: import('./memory').DiscoveryResult, options?: import('./memory').ProjectionOptions): import('./memory').ContextProjection
|
|
14
|
+
acquire(opts: import('./memory').AcquireOptions): Promise<void>
|
|
15
|
+
acquireStaged(opts: import('./memory').AcquireOptions): Promise<void>
|
|
16
|
+
remember<T>(key: string, value: T, opts?: import('./memory').RememberOptions<T>): Promise<void>
|
|
17
|
+
recall<T = any>(query: string | number, opts?: import('./memory').RecallOptions): Promise<T | null>
|
|
18
|
+
update(key: string, value: any, opts?: Partial<import('./memory').RememberOptions>): Promise<void>
|
|
19
|
+
forget(key: string): Promise<void>
|
|
20
|
+
patch(key: string, patches: import('./memory').PatchOperation[]): Promise<void>
|
|
21
|
+
stats(): Promise<import('./memory').MemoryStats>
|
|
22
|
+
forgetExpired(): Promise<number>
|
|
23
|
+
clear(): Promise<void>
|
|
24
|
+
fingerprint(): Promise<string>
|
|
25
|
+
journal: MemoryJournal
|
|
26
|
+
profile: MemoryProfile
|
|
27
|
+
note: MemoryNotes
|
|
28
|
+
seed: MemorySeed
|
|
29
|
+
policy: import('./policy').MemoryPolicyAPI
|
|
30
|
+
brain: import('./policy').MemoryBrainAPI
|
|
31
|
+
configure(config: import('./memory').SyncConfig): void
|
|
32
|
+
configureSync(config: import('./memory').SyncConfig): void
|
|
33
|
+
resetBrainPathCache(): void
|
|
34
|
+
resetPolicyStoreCache(): void
|
|
35
|
+
_getEntry(key: string): Promise<import('./memory').MemoryEntry | null>
|
|
36
|
+
_loadAll(): Promise<import('./memory').MemoryEntry[]>
|
|
37
|
+
_save(entry: import('./memory').MemoryEntry): Promise<void>
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface LlmCacheAPI {
|
|
41
|
+
llm<T>(opts: import('./llm-cache').LlmCacheOptions<T>): Promise<import('./llm-cache').LlmCacheResult<T>>
|
|
42
|
+
llmStats(): import('./llm-cache').LlmCacheStats
|
|
43
|
+
llmPurge(selector: import('./llm-cache').LlmCachePurgeSelector): number
|
|
44
|
+
[key: string]: any
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
type Situation = string
|
|
48
|
+
|
|
49
|
+
export interface ContextQueryOptions {
|
|
50
|
+
tags?: string | string[]
|
|
51
|
+
types?: import('./memory').MemoryType | import('./memory').MemoryType[]
|
|
52
|
+
minConfidence?: number
|
|
53
|
+
maxEntries?: number
|
|
54
|
+
scopes?: import('./memory').MemoryScope[]
|
|
55
|
+
project?: boolean
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface MemoryJournal {
|
|
59
|
+
read: (opts?: { limit?: number }) => Promise<JournalEntry[]>
|
|
60
|
+
write: (entry: JournalEntry | JournalEntry[]) => Promise<void>
|
|
61
|
+
clear: () => Promise<void>
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export interface JournalEntry {
|
|
65
|
+
id: string
|
|
66
|
+
key: string
|
|
67
|
+
type: import('./memory').MemoryType
|
|
68
|
+
operation: string
|
|
69
|
+
hlc?: string
|
|
70
|
+
createdAt: number
|
|
71
|
+
payload?: unknown
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export interface MemoryProfile {
|
|
75
|
+
get(id: string): import('./profile').DotMemProfile
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export interface MemoryNotes {
|
|
79
|
+
add(text: string, opts?: { id?: string; tags?: string[] }): Promise<void>
|
|
80
|
+
get(id: string): Promise<NoteContent | null>
|
|
81
|
+
list(): Promise<NoteEntry[]>
|
|
82
|
+
forget(id: string): Promise<void>
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export interface NoteContent {
|
|
86
|
+
id: string
|
|
87
|
+
title: string
|
|
88
|
+
content: string
|
|
89
|
+
tags: string[]
|
|
90
|
+
createdAt: number
|
|
91
|
+
sha256: string
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export interface NoteEntry {
|
|
95
|
+
id: string
|
|
96
|
+
title: string
|
|
97
|
+
size: number
|
|
98
|
+
sha256: string
|
|
99
|
+
origin: string
|
|
100
|
+
tag?: string
|
|
101
|
+
acquiredAt?: string
|
|
102
|
+
scope?: string
|
|
103
|
+
type?: import('./memory').MemoryType
|
|
104
|
+
version?: number
|
|
105
|
+
updatedAt?: number
|
|
106
|
+
previousId?: string | null
|
|
107
|
+
patches?: import('./memory').PatchOperation[]
|
|
108
|
+
hlc?: string
|
|
109
|
+
key?: string
|
|
110
|
+
value?: unknown
|
|
111
|
+
status?: string
|
|
112
|
+
createdAt?: number
|
|
113
|
+
lastConfirmedAt?: number
|
|
114
|
+
supersededId?: string | null
|
|
115
|
+
confidence?: number
|
|
116
|
+
source?: string
|
|
117
|
+
ttl?: number | null
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export interface MemorySeed {
|
|
121
|
+
id: string
|
|
122
|
+
title: string
|
|
123
|
+
content: string
|
|
124
|
+
origin: string
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// --- Foundation types from Memorio are runtime-only and intentionally not
|
|
128
|
+
// re-exported through Dotmem's declaration surface: Memorio 5.5.3's published
|
|
129
|
+
// type entry is incomplete, and exposing those aliases would force consumers
|
|
130
|
+
// to enable skipLibCheck. Runtime callers may still use the underlying
|
|
131
|
+
// Memorío module directly. ---
|
|
132
|
+
// --- dotmem public runtime exports ---
|
|
133
|
+
export declare const memory: MemoryFacade
|
|
134
|
+
export declare const continuity: any
|
|
135
|
+
export declare const security: any
|
|
136
|
+
|
|
137
|
+
// --- Dotmem-specific encryption envelope ---
|
|
138
|
+
|
|
139
|
+
export interface EncryptedEnvelope {
|
|
140
|
+
id?: string
|
|
141
|
+
iv: string
|
|
142
|
+
data: string
|
|
143
|
+
tag?: string
|
|
144
|
+
algorithm?: string
|
|
145
|
+
keyId?: string
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
// --- User identity surface ---
|
|
149
|
+
export interface UserIdentity {
|
|
150
|
+
id: string
|
|
151
|
+
name?: string
|
|
152
|
+
email?: string
|
|
153
|
+
}
|
|
154
|
+
export declare function resolveUserIdentity(): UserIdentity | null
|
|
155
|
+
export declare function setUserIdentity(id: string, identity: UserIdentity): void
|
|
156
|
+
export declare function clearUserIdentity(): void
|
|
157
|
+
|
|
158
|
+
// ── User paths surface ───────────────────────────────────────────────────
|
|
159
|
+
export declare function resolveUserDotMemPath(): string
|
|
160
|
+
export declare function resolveUserProjectMemoryPath(projectId?: string): string
|
|
161
|
+
export declare function resolveUserAnchor(): string
|
|
162
|
+
export declare function resolveUserBrainPath(): string
|
|
163
|
+
export declare function resolveUserContractPath(): string
|
|
164
|
+
export declare function resolveUserAgentMemoryPath(): string
|
|
165
|
+
export declare function resolveUserReadmePath(): string
|
|
166
|
+
export declare function resolveUserExperiencePath(): string
|
|
167
|
+
|
|
168
|
+
// ── Storage location surface ─────────────────────────────────────────────
|
|
169
|
+
export interface DotMemStorageLocationError extends Error {
|
|
170
|
+
readonly storageRoot: string
|
|
171
|
+
readonly source: string
|
|
172
|
+
}
|
|
173
|
+
export declare const DOTMEM_STORAGE_ROOT_ENV_VAR: string
|
|
174
|
+
export declare const DOTMEM_USER_ANCHOR_DIR_NAME: string
|
|
175
|
+
export declare const DOTMEM_STORAGE_LOCATOR_FILE_NAME: string
|
|
176
|
+
export declare const DOTMEM_STORAGE_LOCATOR_VERSION: number
|
|
177
|
+
export declare function resolveDotMemStorageRoot(): string
|
|
178
|
+
export declare function describeDotMemStorage(): unknown
|
|
179
|
+
export declare function readDotMemStorageLocator(): unknown
|
|
180
|
+
export declare function relocateDotMemStorage(target: string): unknown
|
|
181
|
+
export declare function restoreDefaultDotMemStorage(): unknown
|
|
182
|
+
|
|
183
|
+
// ── Project identity surface ─────────────────────────────────────────────
|
|
184
|
+
export declare function resolveProjectIdentity(id?: string): Promise<string>
|
|
185
|
+
|
|
186
|
+
// ── Mem package inspection ──────────────────────────────────────────────
|
|
187
|
+
export declare function inspectMem(mem: unknown, opts?: Record<string, unknown>): unknown
|
|
188
|
+
export declare function signMemPackage(mem: unknown, key: unknown): unknown
|
|
189
|
+
export interface MemInspection {
|
|
190
|
+
status: 'inspected'
|
|
191
|
+
version: number
|
|
192
|
+
entries: unknown[]
|
|
193
|
+
}
|
|
194
|
+
export interface MemInspectionStatus {
|
|
195
|
+
valid: boolean
|
|
196
|
+
errors?: string[]
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
// ── Profile ──────────────────────────────────────────────────────────────
|
|
200
|
+
export interface DotMemProfileDocument {
|
|
201
|
+
readonly name: string
|
|
202
|
+
readonly content: string
|
|
203
|
+
}
|
|
204
|
+
export interface DotMemProfile {
|
|
205
|
+
readonly format: 'dotmem.profile'
|
|
206
|
+
readonly version: 1
|
|
207
|
+
readonly id: 'joy'
|
|
208
|
+
readonly name: 'Joy'
|
|
209
|
+
readonly alternative: ['Jo']
|
|
210
|
+
readonly documents: ReadonlyArray<DotMemProfileDocument>
|
|
211
|
+
readonly type: 'ai-persona'
|
|
212
|
+
readonly role: string
|
|
213
|
+
readonly immutable: true
|
|
214
|
+
readonly description: string
|
|
215
|
+
}
|
|
216
|
+
export declare const JO_PROFILE: Readonly<DotMemProfile>
|
|
217
|
+
|
|
218
|
+
// ── Mutation engine extras ──────────────────────────────────────────────
|
|
219
|
+
export declare function currentTimestamp(): string
|
|
220
|
+
export declare function activeTransactionId(): string | null
|
|
221
|
+
|
|
222
|
+
// --- Foundation values from Memorio (ambient globals) ---declare const state: any
|
|
223
|
+
export declare const store: any
|
|
224
|
+
export declare const session: any
|
|
225
|
+
export declare const cache: LlmCacheAPI
|
|
226
|
+
export declare const idb: any
|
|
227
|
+
export declare const sqlite: any
|
|
228
|
+
export declare const observer: any
|
|
229
|
+
export declare const schema: any
|
|
230
|
+
export declare function registerSchema(path: string, schema: any): void
|
|
231
|
+
export declare function validate(path: string, value: any): { valid: boolean; errors?: string[] }
|
|
232
|
+
export declare function unregisterSchema(path: string): boolean
|
|
233
|
+
export declare function listSchemas(): string[]
|
|
234
|
+
export declare const typed: <T extends Record<string, any>>() => T
|
|
235
|
+
export declare const computed: any
|
|
236
|
+
export declare const broadcast: any
|
|
237
|
+
export declare const message: (...args: unknown[]) => void
|
|
238
|
+
export declare const logger: any
|
|
239
|
+
export declare const snapshot: () => Record<string, any>
|
|
240
|
+
export declare function diff(snap: Record<string, any>): Array<{ path: string; oldValue: any; newValue: any }>
|
|
241
|
+
export declare function undo(): any
|
|
242
|
+
export declare function redo(): any
|
|
243
|
+
export declare function canUndo(): boolean
|
|
244
|
+
export declare function canRedo(): boolean
|
|
245
|
+
export declare function rollback(snap: Record<string, any>): void
|
|
246
|
+
export declare function trace(): any[]
|
|
247
|
+
export declare function enableHistory(enabled?: boolean): void
|
|
248
|
+
export declare function clearHistory(): void
|
|
249
|
+
export declare function clearRedo(): void
|
|
250
|
+
export declare function createMutation(path: string, operation: any, before: any, after: any, opts?: { context?: string; source?: string; transactionId?: string }): unknown
|
|
251
|
+
export declare function recordMutation(mutation: unknown): void
|
|
252
|
+
export declare function toPatch(mutation: unknown): unknown | null
|
|
253
|
+
export declare function mutate(path: string, value: any, opts?: { source?: string; transactionId?: string }): unknown
|
|
254
|
+
export declare function beginTransaction(source?: string, message?: string, metadata?: Record<string, any>): unknown
|
|
255
|
+
export declare function commitTransaction(): unknown
|
|
256
|
+
export declare function abortTransaction(): unknown
|
|
257
|
+
export declare function currentTransaction(): unknown
|
|
258
|
+
export declare function listTransactions(): unknown[]
|
|
259
|
+
export declare const transaction: (source?: string, message?: string, metadata?: Record<string, any>) => unknown
|
|
260
|
+
export declare function generateMutationId(): string
|
|
261
|
+
export declare function generateTransactionId(): string
|
|
262
|
+
export declare function generateCommitId(): string
|
|
263
|
+
export declare function mutationToPatch(mutation: unknown): unknown | null
|
|
264
|
+
export declare function diffToPatch(path: string, before: any, after: any): unknown | null
|
|
265
|
+
export declare function canMerge(p1: unknown, p2: unknown): boolean
|
|
266
|
+
export declare function mergePatches(p1: unknown, p2: unknown): unknown
|
|
267
|
+
export declare function dispatch(event: string, payload?: unknown): Promise<void>
|
|
268
|
+
export declare function isDotMemCodename(value: string): boolean
|
|
269
|
+
export declare function codenameKeyFor(value: string): string | undefined
|
|
270
|
+
export declare function renderCodenames(): string
|
|
271
|
+
export declare const CODENAMES: Record<string, string>
|
|
272
|
+
export declare const CODENAME_DETAILS: Record<string, unknown>
|
|
273
|
+
export declare function propertyName(container: any, object: any): string | null
|
|
274
|
+
export declare const internal: any
|
|
275
|
+
export declare function setContext(id: string): void
|
|
276
|
+
export declare function getContext(): string | null
|
|
277
|
+
export declare const hlc: any
|
|
278
|
+
export declare const fractional: any
|
|
279
|
+
export declare const encryption: any
|
|
280
|
+
export declare const securityEncryption: any
|
|
281
|
+
export declare const devtools: any
|
|
282
|
+
export declare function help(): void
|
|
283
|
+
export declare const temporal: any
|
|
284
|
+
export declare const events: Record<string, any>
|
|
285
|
+
export declare const dotmem: any
|
|
286
|
+
export declare function isBrowser(): boolean
|
|
287
|
+
export declare function isNode(): boolean
|
|
288
|
+
export declare function isDeno(): boolean
|
|
289
|
+
export declare function isBun(): boolean
|
|
290
|
+
export declare function isEdge(): boolean
|
|
291
|
+
export declare function getCapabilities(): unknown
|
|
292
|
+
export declare function createContext(name?: string, opts?: { encryptionKey?: any }): unknown
|
|
293
|
+
export declare function listContexts(): unknown[]
|
|
294
|
+
export declare function deleteContext(id: string): void
|
|
295
|
+
export declare function isolate(name?: string, opts?: { encryptionKey?: any }): void
|
|
296
|
+
|
|
297
|
+
export default dotmem
|