dotmem 0.1.5 → 0.1.7
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 +1 -1
- package/CHANGELOG.md +76 -0
- package/DOTMEM.md +6 -11
- package/MEMORY.md +25 -9
- package/README.md +6 -6
- package/build-config.json +10 -0
- package/built-in-context.json +155 -0
- package/cli.cjs +4914 -904
- package/cli.js +4911 -904
- package/context/profiles/joy/ai.json +24 -0
- package/{core/profile → context/profiles/joy}/ai.md +44 -4
- package/{core/profile → context/profiles/joy}/language.md +99 -99
- package/context/templates/AI.md +104 -0
- package/context/templates/DOTMEM.md +532 -0
- package/global.cjs +4265 -670
- package/global.js +4262 -673
- package/index.cjs +4159 -530
- package/index.js +4147 -532
- package/llms.txt +1 -1
- package/mcp.cjs +4080 -461
- package/mcp.js +4075 -463
- package/package.json +7 -8
- package/types/exports.d.ts +4 -3
- package/types/memory.d.ts +7 -2
- package/types/profile.d.ts +13 -6
- package/JOY.md +0 -144
- package/core/profile/ai.compact.md +0 -5
- /package/{core/profile → context/profiles/joy}/behavior.md +0 -0
- /package/{core/profile → context/profiles/joy}/curiosity.md +0 -0
- /package/{core/profile → context/profiles/joy}/decision.md +0 -0
- /package/{core/profile → context/profiles/joy}/soul.md +0 -0
- /package/{core/profile → context/profiles/joy}/trust.md +0 -0
package/AGENTS.md
CHANGED
|
@@ -42,7 +42,7 @@ the profile, not from the runtime. **Jo** is an alternative shorthand for the sa
|
|
|
42
42
|
represent the assistant's persistent identity in the dotmem system (canonical profile, decision-making
|
|
43
43
|
behavior, trust model, and relationship style).
|
|
44
44
|
|
|
45
|
-
The canonical profile (`
|
|
45
|
+
The canonical profile (`context/profiles/ai/`) defines:
|
|
46
46
|
- **Identity & behavior** (`behavior.md`, `soul.md`) — character, relationship style, conversational behavior
|
|
47
47
|
- **Trust model** (`trust.md`) — epistemic standards, verification requirements
|
|
48
48
|
- **Decision framework** (`decision.md`) — how Jo evaluates and makes technical decisions
|
package/CHANGELOG.md
CHANGED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to Dotmem are documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [0.1.7] - 2026-11-10
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- **MCP Automatic Joy Profile Activation** — Fresh MCP sessions now automatically deliver the canonical Joy identity through the `initialize.instructions` handshake, composed with (not conflated into) the Scintilla signal. Profile identity values are read from the single canonical profile (`context/profiles/ai/ai.json`) with no hardcoded values.
|
|
12
|
+
- **Session Issues — Phase 2** — Resolved race conditions in `doctor --fix` (optimistic concurrency control with version checking), cross-source duplicate ID handling in `acquire` (refuses ambiguous writes), `projectBootstrapContext` semantic prioritization (P1-P5 explicit priority + recency fallback), `expiresAt` freshness filtering in discovery and bootstrap context, and doctor dry-run content distinction (byte-identical vs divergent duplicates).
|
|
13
|
+
- **Windows EPERM test failure** — Build context script now accepts `CONTEXT_DIR` env var; test uses isolated temp fixture.
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
- **Progressive Summary Store** — Four detail levels (current: 1.0, recent: 0.7, distant: 0.3, archived: 0.1) with session count and age-based decay triggers, summary text truncation preserving earliest and most recent content, fact filtering by confidence, decision compaction, question count compaction, and summary rotation chain.
|
|
17
|
+
- **Automatic Conversational Capture** — 7-stage pipeline: detect → classify → extract → dedup → decide → provenance → store. Classification via keyword matching + heuristics (deterministic, no embeddings). Deduplication via Jaccard similarity (threshold 0.75). Explicit instruction detection. Fact vs inference distinction.
|
|
18
|
+
- **MCP Automatic Joy Profile Activation** — ADR-023: `buildProfileGuidance()` reads canonical `JO_PROFILE`; `buildMcpInstructions()` composes profile identity block + Scintilla signal.
|
|
19
|
+
- **Project identity `resolveProjectIdentity`** — Public API export for resolving stable project identity from DOTMEM_PROJECT_ID env, package.json name, or directory basename.
|
|
20
|
+
|
|
21
|
+
### Changed
|
|
22
|
+
- **Documentation Consolidation and Identity Cleanup** (ADR-006, ADR-007, ADR-008) — Root `docs/` removed; all files moved to `.project/`; Memorio identity removed from Dotmem documents; research paper filenames and headings normalized to Dotmem identity; source code references updated.
|
|
23
|
+
- **Historical Reference Cleanup** (ADR-007) — Single "Project origins" section in `.project/README.md`; repetitive historical notes removed from 30 research papers; project identity normalized.
|
|
24
|
+
- **Documentation Ownership Correction** (ADR-008) — Complete inventory and classification of recovered files; Memorio foundational docs identified; Dotmem AI docs classified.
|
|
25
|
+
- **Memory/MCP/Jo/Joy Ecosystem Migration** (ADR-009) — 819 files transferred from Memorio to Dotmem; README collisions resolved; Memorio `docs/research/` removed.
|
|
26
|
+
- **Recovery and Restoration of `.project/archives/`** (ADR-004, ADR-005) — 875 archived files inventoried; ~500 test cases restored to vitest suite; 57 papers recovered; ~40 experiments recovered; ~110 documents recovered.
|
|
27
|
+
- **Canonical Areas fix** — Added `project` key to `CANONICAL_AREAS` vocabulary, fixing silent exclusion of project-scoped knowledge claims.
|
|
28
|
+
|
|
29
|
+
### Deprecated
|
|
30
|
+
- `memory.init()` — No-op; runtime initializes lazily on first use.
|
|
31
|
+
|
|
32
|
+
## [0.1.6] - 2026-10-31
|
|
33
|
+
|
|
34
|
+
### Fixed
|
|
35
|
+
- **Foundation Validation (Workstream A)** — Memorio-Dotmem integration validated. Six duplicated local foundation modules removed; callers migrated to Memorio 5.5.3. TypeScript: 0 errors. Oxlint: 0 errors, 0 warnings. Build: CJS and ESM successful. Vitest: 52 passed, 1 skipped, 1 todo.
|
|
36
|
+
|
|
37
|
+
### Added
|
|
38
|
+
- **Progressive Conversational Memory Design** (Workstream B) — Architecture, behavior specification, test plan, issue investigation, and known limitations documented in `.project/progressive-memory/`.
|
|
39
|
+
- **Profile Projection and Document Loading** — Investigation of 7 declared profile documents vs 3 loaded.
|
|
40
|
+
- **Context Ceiling Analysis** — Identity channel 1904 bytes + ~300 bytes envelope = ~2204 bytes vs 2048 byte host ceiling.
|
|
41
|
+
- **Applicability Gate** — `CANONICAL_AREAS` missing `project` key identified and fixed.
|
|
42
|
+
|
|
43
|
+
## [0.1.5] - 2026-10-31
|
|
44
|
+
|
|
45
|
+
### Added
|
|
46
|
+
- **Historical Recovery and Physical Restoration** — `.project/archives/` recovery inventory (875 files), test recovery (~831 historical cases, ~500 restored), paper recovery (57 documents), experiment recovery (~40), documentation recovery (~110), ownership mapping, ADR-004 and ADR-005 recorded.
|
|
47
|
+
|
|
48
|
+
## [0.1.4] - 2026-10-31
|
|
49
|
+
|
|
50
|
+
### Changed
|
|
51
|
+
- **Documentation Cleanup and Ownership Correction** — ~160+ active documents inspected; 5 duplicate groups identified; 4 resolved; 7 documents rewritten with identity updates; 4 link groups fixed; 10+ legitimate Memorio reference categories preserved; validation: 25/25 checks passed.
|
|
52
|
+
|
|
53
|
+
## [0.1.3] - 2026-10-31
|
|
54
|
+
|
|
55
|
+
### Changed
|
|
56
|
+
- **Dotmem Historical Integration & Ownership Correction** — Architectural ownership correction: Dotmem owns memory acquisition, governance, identity, continuity, AI trust boundaries, Jo/Joy, progressive summaries; Memorio retains state, store, session, IDB/SQLite, generic cache, dispatch/observer. 8 files renamed to canonical names; 26+ document titles updated from "Memorio —" to "Dotmem —"; 7 duplicates removed; 3 SECURITY.md variants renamed; 3 index files updated.
|
|
57
|
+
|
|
58
|
+
## [0.1.2] - 2026-10-31
|
|
59
|
+
|
|
60
|
+
### Added
|
|
61
|
+
- **Dotmem Documentation Consolidation and Identity Cleanup** — Root `docs/` removed, files copied to `.project/`; Memorio identity removed from Dotmem documents; research paper filenames and H1 headings updated; source code references updated; `.project/README.md` rewritten; ADR-006, ADR-007, ADR-008 recorded.
|
|
62
|
+
|
|
63
|
+
## [0.1.1] - 2026-10-31
|
|
64
|
+
|
|
65
|
+
### Added
|
|
66
|
+
- **Dotmem Historical Reference Cleanup and Project Identity** — Single "Project origins" section; repetitive historical notes removed from 30 research papers; project identity normalized; technical dependency references preserved; historical documents preserved as-is; ADR-007, ADR-008 recorded.
|
|
67
|
+
|
|
68
|
+
## [0.1.0] - 2026-10-31
|
|
69
|
+
|
|
70
|
+
### Added
|
|
71
|
+
- **Initial Dotmem Release** — AI memory and continuity infrastructure for agents and applications. Memorio 5.5.3 as foundation. Core capabilities: acquired experience, application memory, continuity, policy, agent namespaces, notes and profiles, MCP and CLI.
|
|
72
|
+
- **Joy Identity** — Native, mandatory AI collaborator identity with canonical profile system.
|
|
73
|
+
- **MCP Server** — Stdio server `dotmem-mcp` with read-only default, write opt-in via `DOTMEM_MCP_WRITE=1`.
|
|
74
|
+
- **Deterministic Retrieval** — Lexical and structured matching without embeddings.
|
|
75
|
+
- **Agent Memory** — Logical namespace partitioning via `dotmem/agent`.
|
|
76
|
+
- **Governance & Security** — RBAC, audit, consent, AES-GCM, PBKDF2 helpers.
|
package/DOTMEM.md
CHANGED
|
@@ -20,8 +20,7 @@ It is responsible for the lifecycle around remembered information:
|
|
|
20
20
|
- selecting and projecting bounded context for a task;
|
|
21
21
|
- maintaining decisions, open loops, and working state where supported;
|
|
22
22
|
- providing controlled interfaces through its library, CLI, and MCP server;
|
|
23
|
-
- allowing an AI profile
|
|
24
|
-
a dependency of the runtime itself.
|
|
23
|
+
- allowing an AI profile to use the runtime without making that profile a dependency of the runtime itself.
|
|
25
24
|
|
|
26
25
|
Dotmem is not a chat application, a model, a vector database, or a prompt file. It is a
|
|
27
26
|
runtime and data layer that an application or AI agent can use.
|
|
@@ -82,7 +81,7 @@ Dotmem must not be described as:
|
|
|
82
81
|
- a verbatim conversation recorder or exact replay engine;
|
|
83
82
|
- a substitute for current source code, live system state, or direct verification;
|
|
84
83
|
- a model-provider-specific memory feature;
|
|
85
|
-
- a requirement to use
|
|
84
|
+
- a requirement to use any specific assistant identity.
|
|
86
85
|
|
|
87
86
|
A successful lookup means that a candidate was found. It does not prove that the candidate
|
|
88
87
|
applies now.
|
|
@@ -152,12 +151,9 @@ A memory claim must never assign its own enforcement tier or grant itself author
|
|
|
152
151
|
|
|
153
152
|
### 5.5 Profiles and agents
|
|
154
153
|
|
|
155
|
-
|
|
156
|
-
trust standards, decision practices, curiosity, and communication conventions.
|
|
154
|
+
A Dotmem build selects an AI profile at build time. The profile defines identity, behavior, trust standards, decision practices, curiosity, and communication conventions for the assistant. The profile is selected by the product owner and is immutable at runtime.
|
|
157
155
|
|
|
158
|
-
The profile is authoritative Dotmem data consumed by every installation. It is not the Dotmem runtime,
|
|
159
|
-
does not define the memory storage engine, and must be present and loaded during initialization.
|
|
160
|
-
Dotmem must not fall back to a generic assistant when it is missing.
|
|
156
|
+
The profile is authoritative Dotmem data consumed by every installation. It is not the Dotmem runtime, does not define the memory storage engine, and must be present and loaded during initialization. Dotmem must not fall back to a generic assistant when it is missing.
|
|
161
157
|
|
|
162
158
|
### 5.6 Interfaces
|
|
163
159
|
|
|
@@ -414,8 +410,7 @@ A profile activation is not authentication. Historical memory may help identify
|
|
|
414
410
|
user, but it cannot authenticate the current speaker. Identity-bound operations require
|
|
415
411
|
the current trusted binding defined by the implementation.
|
|
416
412
|
|
|
417
|
-
|
|
418
|
-
a hidden dependency of the generic runtime.
|
|
413
|
+
The build-selected profile is required for every Dotmem installation. Do not treat its profile as optional or as a hidden dependency of the generic runtime.
|
|
419
414
|
|
|
420
415
|
---
|
|
421
416
|
|
|
@@ -434,7 +429,7 @@ Keep each document responsible for one subject:
|
|
|
434
429
|
| `INSTRUCTIONS.md` | Concise operational instructions where required |
|
|
435
430
|
| `llms.txt` | Compact, verified machine-readable project and API orientation |
|
|
436
431
|
| `language.md` | Language-independence and communication contract for profiles |
|
|
437
|
-
|
|
|
432
|
+
| Build-selected profile files | Assistant identity, behavior, trust, decision, and curiosity for the selected profile |
|
|
438
433
|
|
|
439
434
|
A document must not silently redefine a contract owned by another document. If a contract
|
|
440
435
|
changes, update all dependent references in the same documentation change.
|
package/MEMORY.md
CHANGED
|
@@ -51,7 +51,7 @@ the profile, not from the runtime. **Jo** is an alternative shorthand for the sa
|
|
|
51
51
|
represent the assistant's persistent identity in the dotmem system (canonical profile, decision-making
|
|
52
52
|
behavior, trust model, and relationship style).
|
|
53
53
|
|
|
54
|
-
The canonical profile (`
|
|
54
|
+
The canonical profile (`context/profiles/ai/`) defines:
|
|
55
55
|
- **Identity & behavior** (`behavior.md`, `soul.md`) — character, relationship style, conversational behavior
|
|
56
56
|
- **Trust model** (`trust.md`) — epistemic standards, verification requirements
|
|
57
57
|
- **Decision framework** (`decision.md`) — how Jo evaluates and makes technical decisions
|
|
@@ -352,16 +352,25 @@ different persistence characteristics per runtime:
|
|
|
352
352
|
| `hot` | `state` (memory) | `state` (memory) | No | No | Never default; explicit only |
|
|
353
353
|
| `session` | `sessionStorage` | In-memory `Map` | Yes (same tab) | No | Never default; explicit only |
|
|
354
354
|
| `local` | `localStorage` | In-memory `Map` | Yes | No | Values ≤ 1 MB |
|
|
355
|
-
| `durable` | IndexedDB (`idb`) |
|
|
356
|
-
|
|
357
|
-
> **
|
|
358
|
-
>
|
|
359
|
-
>
|
|
360
|
-
>
|
|
355
|
+
| `durable` | IndexedDB (`idb`) | Filesystem `memory.kv` (`DurableMemoryStore`) | Yes | Yes | Values > 1 MB, only when backend available |
|
|
356
|
+
|
|
357
|
+
> **Durable scope**: `remember(scope: 'durable')` writes through `DurableMemoryStore`
|
|
358
|
+
> (`core/memory/durable-store.ts`), which persists `MemoryEntry[]` to a filesystem-backed
|
|
359
|
+
> `memory.kv` file using atomic writes (temp + sync + verify + rename + `.bak` backup +
|
|
360
|
+
> directory fsync), cross-process directory locks, and an in-process write queue. It is
|
|
361
|
+
> available in Node.js, Bun, and Deno whenever the runtime can resolve a filesystem
|
|
362
|
+
> backend. If no filesystem backend is available, an explicit
|
|
363
|
+
> `DurableStorageUnavailableError` is thrown — `durable` never silently falls back to
|
|
364
|
+
> volatile `Map`, `state`, `store`, or `session`.
|
|
365
|
+
>
|
|
366
|
+
> IndexedDB (`idb`) is used for `durable` only in browser environments where it is
|
|
367
|
+
> available. memorio's `idb` exposes no `set`/`get`/`deleteKey` methods outside a browser
|
|
368
|
+
> with IndexedDB, so `durable` scope no longer routes through `idb` in Node.js/Bun/Deno.
|
|
361
369
|
|
|
362
370
|
Scope resolution defaults (when `opts.scope` is not provided):
|
|
371
|
+
|
|
363
372
|
- Values ≤ 1 MB → `local`
|
|
364
|
-
- Values > 1 MB → `durable`
|
|
373
|
+
- Values > 1 MB → `durable` **only when the durable backend is available**; otherwise `local`.
|
|
365
374
|
|
|
366
375
|
The `hot` and `session` scopes are only used when explicitly set via `opts.scope`.
|
|
367
376
|
|
|
@@ -372,12 +381,19 @@ The `hot` and `session` scopes are only used when explicitly set via `opts.scope
|
|
|
372
381
|
| `hot` | Process lifetime | Global `state` tree | Process | Lazy on first use | Process exit |
|
|
373
382
|
| `session` | Session lifetime | `sessionStorage` (browser) / in-memory `Map` (Node/Bun) | Browser tab / process | Lazy on first use | Tab close / process exit |
|
|
374
383
|
| `local` | Process lifetime (Node/Bun) or persistent (browser) | `localStorage` (browser) / in-memory `Map` (Node/Bun) | Origin / process | Lazy on first use | Manual `forget()` / `clear()` / browser clear |
|
|
375
|
-
| `durable` | Persistent (browser
|
|
384
|
+
| `durable` | Persistent | Filesystem `memory.kv` (Node/Bun/Deno) or IndexedDB (browser) | Storage root | Lazy on first use | Manual `forget()` only (`clear()` skips `durable`) |
|
|
376
385
|
|
|
377
386
|
> **Note**: `session` and `local` are behaviorally identical in Node/Bun (both use in-memory
|
|
378
387
|
> `Map`s). The distinction exists only in browser environments. This is a known limitation;
|
|
379
388
|
> no security or isolation boundary is implied by the scope names in Node/Bun.
|
|
380
389
|
|
|
390
|
+
#### `memory.clear()` semantics
|
|
391
|
+
|
|
392
|
+
`memory.clear()` removes application key/value entries from `hot`, `session`, and `local`
|
|
393
|
+
scopes, but intentionally skips `durable` scope entries. Durable entries are persistent
|
|
394
|
+
user memory and must survive an operational clear. Acquired knowledge (`.mem` packages),
|
|
395
|
+
policy documents, and the durable key/value store are never touched by `memory.clear()`.
|
|
396
|
+
|
|
381
397
|
### Built-in seed claims
|
|
382
398
|
|
|
383
399
|
dotmem ships with a small set of built-in seed claims that describe the
|
package/README.md
CHANGED
|
@@ -290,17 +290,17 @@ See [MEMORY.md](./MEMORY.md) for the complete MCP tool list and write-gating det
|
|
|
290
290
|
|
|
291
291
|
---
|
|
292
292
|
|
|
293
|
-
##
|
|
293
|
+
## Build Configuration and Profiles
|
|
294
294
|
|
|
295
295
|
Dotmem core is model- and provider-independent.
|
|
296
296
|
|
|
297
|
-
|
|
297
|
+
The assistant's identity, behavior profile, and product branding are selected by the product owner at build time. These choices are embedded in the build artifact and are immutable at runtime. End users cannot change the assistant's identity, aliases, behavior profile, or product branding.
|
|
298
298
|
|
|
299
|
-
Joy is
|
|
299
|
+
The default Dotmem build uses the Joy profile. Joy is a selectable product profile, not a mandatory identity embedded in generic Dotmem runtime or documentation. Other builds may use different identity names, aliases, behavior profiles, and product branding while retaining the same underlying Dotmem runtime.
|
|
300
300
|
|
|
301
|
-
|
|
301
|
+
See [AI.md](./context/templates/AI.md) for the generic assistant operating contract and profile configuration model.
|
|
302
302
|
|
|
303
|
-
|
|
303
|
+
The Joy profile's identity and behavior documents live under `context/profiles/joy/`. The profile manifest (`ai.json`) defines the canonical identity, aliases, and declared documents for the Joy build.
|
|
304
304
|
|
|
305
305
|
---
|
|
306
306
|
|
|
@@ -311,7 +311,7 @@ See [JOY.md](./JOY.md) for activation rules, discovery order, identity resolutio
|
|
|
311
311
|
| [MEMORY.md](./MEMORY.md) | Memory model: acquisition contract, policy language, epistemic typing, enforcement, continuity, and identity |
|
|
312
312
|
| [AGENTS.md](./AGENTS.md) | AI agent working rules, activation phrases, and complete `memory.*` surface |
|
|
313
313
|
| [SECURITY.md](./SECURITY.md) | Encryption, multitenancy, key management, trust model, JHF, and sandbox |
|
|
314
|
-
| [
|
|
314
|
+
| [AI.md](./context/templates/AI.md) | Generic assistant operating contract and profile configuration model |
|
|
315
315
|
| [PACKAGE.md](./PACKAGE.md) | Package contents, complete quick start, and dependency graph |
|
|
316
316
|
| [LICENSE.md](./LICENSE.md) | License |
|
|
317
317
|
|