dotmem 0.0.7 → 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/llms.txt CHANGED
@@ -1,5 +1,5 @@
1
- dotmem — AI memory layer for agents and apps (v0.0.4). Built on memorio.
2
- Storage root: <user-home>/.dotmem (override: DOTMEM_STORAGE_ROOT)
1
+ dotmem — AI memory layer for agents and apps (v0.0.8).
2
+ Storage root: <user-home>/.mem (override: DOTMEM_STORAGE_ROOT)
3
3
 
4
4
  === Installation ===
5
5
  npm i dotmem
@@ -25,6 +25,8 @@ Tools exposed:
25
25
  dotmem_rules read - iron rules for the session
26
26
  dotmem_acquire write - acquire durable experience (requires DOTMEM_MCP_WRITE=1)
27
27
  dotmem_continuity r/w - session continuity, checkpoints, open loops
28
+ dotmem_note_read read - read a user note by id
29
+ dotmem_note_write write - add or update a user note (requires DOTMEM_MCP_WRITE=1)
28
30
 
29
31
  === CLI ===
30
32
  npx dotmem — project memory context for CWD
@@ -58,9 +60,13 @@ npx dotmem -h | --help
58
60
  === API (TypeScript) ===
59
61
 
60
62
  // From the main package entry point
61
- import { memory, logic, continuity, agent } from 'dotmem'
63
+ import { memory, continuity } from 'dotmem'
62
64
  import { createAgentMemory } from 'dotmem/agent'
63
65
 
66
+ // `logic` and `agent` are not exported from the main entry point in the current
67
+ // package. `core/logic` exists in the repository but is not a verified public
68
+ // runtime API. `agent` is available only through the `dotmem/agent` subpath.
69
+
64
70
  --- memory facade ---
65
71
 
66
72
  memory.init()
@@ -142,8 +148,9 @@ memory.journal.read(opts?: { limit?: number }): Promise<JournalEntry[]>
142
148
  memory.journal.write(entry: JournalEntry | JournalEntry[]): Promise<void>
143
149
  memory.journal.clear(): Promise<void>
144
150
 
145
- memory.profile.get(): DotMemProfile | DotMemProfileDocument
146
- // Returns the Joy canonical profile or a custom profile document
151
+ memory.profile.get(id: string): Promise<DotMemProfile>
152
+ // Read-only built-in profile access. Verified implementation accepts an id
153
+ // (for example 'joy' or 'Jo') and returns the Joy profile. No write API.
147
154
 
148
155
  memory.note.add(text: string, opts?: { id?: string; tags?: string[] }): Promise<void>
149
156
  memory.note.get(id: string): Promise<NoteContent | null>
@@ -154,11 +161,10 @@ memory.seed // development-only Joy seed injection (requires --dev)
154
161
 
155
162
  --- policy ---
156
163
 
157
- Enforcement tiers:
158
- 'permit' — allow without verification
159
- 'advisory' — allow with warnings
160
- 'caution' — allow with acknowledgment
161
- 'block' — prevent the operation
164
+ Enforcement tiers (authoritative vocabulary):
165
+ 'context' — supplies contextual information; does not itself impose a blocking precondition
166
+ 'precondition' — blocks the governed operation when the condition is violated or unresolved
167
+ 'hard-precondition' — retains the stronger enforcement semantics defined by the policy contract
162
168
 
163
169
  Event-driven functions from core/knowledge/policy:
164
170
  evaluatePolicies(event: PolicyEvent): PolicyDecision
@@ -168,15 +174,22 @@ Event-driven functions from core/knowledge/policy:
168
174
  memory.policy.evaluate(event): PolicyDecision // decision-time pull
169
175
  memory.policy.override.{grant|revoke|list|effective}()
170
176
 
171
- --- logic engine ---
172
177
 
173
- logic.experience(rule: LogicRule | LogicExperienceOptions): void
174
- logic.precedents(context: string): LogicPrecedent[]
175
- logic.context(situation: string): LogicContextResult
176
- logic.measure(situation: string): number
177
- logic.learn(experience: LogicExperienceOptions): void
178
- logic.clear(): void
179
- logic.stats(): LogicEngineStats
178
+ --- logic engine (not a verified public runtime API) ---
179
+
180
+ The repository contains `core/logic` and type declarations for `LogicEngineAPI`.
181
+ It is not exported from the main package entry point (`index.ts`) or from
182
+ `dotmem/global`, and no public access path is verified in this repository.
183
+
184
+ Type-level surface from `types/logic.d.ts` (unverified runtime availability):
185
+ experience(opts: LogicExperienceOptions): Promise<void>
186
+ precedents(query: LogicQuery): Promise<AcquiredClaim[]>
187
+ context(query: LogicQuery): Promise<AcquiredContext>
188
+ measure(query: LogicQuery): Promise<LogicMeasurement>
189
+ learn(query: LogicQuery): Promise<LogicRule[]>
190
+ clear(): Promise<void>
191
+ stats(): Promise<LogicStats>
192
+ configure(opts: { disabled?: boolean }): void
180
193
 
181
194
  --- continuity ---
182
195
 
@@ -205,16 +218,10 @@ createDefaultAgentMemory(): returns instance bound to 'default-agent'
205
218
 
206
219
  --- LLM cache ---
207
220
 
208
- import { cache } from 'dotmem' // actually: memory.llmCache or cache.llm
209
-
210
- cache.llm<T>(opts: {
211
- endpoint: string,
212
- prompt: string,
213
- options?: { model?: string; temperature?: number; maxTokens?: number }
214
- }): Promise<LlmCacheResult<T>>
215
-
216
- cache.llmStats(): LlmCacheStats
217
- cache.llmPurge(selector: LlmCachePurgeSelector): number
221
+ No LLM cache runtime is exported by the current package. `types/llm-cache.d.ts`
222
+ defines types only; `memory.llmCache` and `cache.llm` are not implemented or
223
+ exported in this repository. `cache` in the foundation package is a generic
224
+ key/value cache, not the documented LLM cache.
218
225
 
219
226
  --- storage / identity ---
220
227
 
@@ -238,7 +245,7 @@ Acquire → Discover → Project
238
245
 
239
246
  Claims (AcquireOptions):
240
247
  - id: string (unique, deterministic)
241
- - knowledge: JsonValue (canonical English if natural language)
248
+ - knowledge: JsonValue (language of the source content; optional internal normalization must not replace the original)
242
249
  - applicability: Record<string, JsonPrimitive> (exact-match dimensions)
243
250
  - evidence: [{ id, source?, observedAt?, supports? }]
244
251
  - epistemicType: 'observed' | 'inferred' | 'human-stated' | 'verified'
@@ -262,19 +269,18 @@ Projection statuses:
262
269
 
263
270
  === Policy Enforcement Tiers ===
264
271
 
265
- | Tier | Behavior |
266
- |-----------|------------------------------|
267
- | permit | Allow without verification |
268
- | advisory | Allow with warnings |
269
- | caution | Allow with acknowledgment |
270
- | block | Prevent the operation |
272
+ | Tier | Behavior |
273
+ |-------------------|----------|
274
+ | context | Supplies contextual information; does not itself impose a blocking precondition |
275
+ | precondition | Blocks the governed operation when the condition is violated or unresolved |
276
+ | hard-precondition | Retains the stronger enforcement semantics defined by the policy contract |
271
277
 
272
278
  === Activation Phrases ===
273
279
 
274
280
  dotmem, npx dotmem, Joy, Jo
275
281
 
276
282
  Handshake: npx dotmem handshake --status
277
- Storage: <user-home>/.dotmem (override: DOTMEM_STORAGE_ROOT)
283
+ Storage: <user-home>/.mem (override: DOTMEM_STORAGE_ROOT)
278
284
  Project: <storage>/projects/<project-id>.mem
279
285
  User: <storage>/user.mem
280
286
  Agent: <storage>/agent.mem