dotmem 0.3.0 → 0.3.2
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 +42 -12
- package/CHANGELOG.md +24 -3
- package/MEMORY.md +26 -8
- package/OVERVIEW.md +3 -1
- package/README.md +231 -294
- package/SECURITY.md +1 -1
- package/WHATSNEW.md +30 -0
- package/agent.cjs +19624 -142
- package/agent.js +19613 -142
- package/bin/cli.cjs +98 -1
- package/bin/cli.js +89 -1
- package/bin/dotmem-burst-stats.cjs +850 -9
- package/bin/dotmem-burst-stats.js +827 -9
- package/bin/mcp.cjs +26 -1
- package/bin/mcp.js +20 -1
- package/built-in-context.json +2 -2
- package/cli.cjs +33003 -331
- package/cli.js +32948 -329
- package/env.cjs +6 -1
- package/env.js +4 -1
- package/global.cjs +19412 -142
- package/global.js +19379 -142
- package/index.cjs +24369 -176
- package/index.js +24309 -176
- package/llms.txt +8 -4
- package/mcp.cjs +26852 -210
- package/mcp.js +26813 -210
- package/package.json +6 -7
- package/types/global-types.d.ts +67 -14
- package/types/memory.d.ts +39 -8
- package/crew/CREW-CERTIFICATION-REPORT.md +0 -52
- package/crew/PHASE-1-DISCOVERY.md +0 -74
- package/crew/PHASE-2-SURFACE-ANALYSIS.md +0 -74
- package/crew/PHASE-3-IMPLEMENTATION-REPORT.md +0 -40
package/AGENTS.md
CHANGED
|
@@ -24,16 +24,15 @@ npm i -g dotmem memorio
|
|
|
24
24
|
```
|
|
25
25
|
|
|
26
26
|
```chat
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
Hi Joy!
|
|
27
|
+
dotmem
|
|
30
28
|
```
|
|
31
29
|
|
|
32
30
|
## Activation
|
|
33
31
|
|
|
34
|
-
The
|
|
35
|
-
|
|
36
|
-
|
|
32
|
+
The primary chat invocation is `dotmem` (case-insensitive: `DOTMEM` is equivalent). `Joy` and `Jo` are
|
|
33
|
+
optional profile aliases for the canonical Joy profile; they are valid only when that profile is enabled
|
|
34
|
+
and the host adapter supports them. `npx dotmem` is a terminal command, `.mem` is a file/package
|
|
35
|
+
extension, and `load dotmem` is natural language - none of them is a deterministic chat trigger.
|
|
37
36
|
|
|
38
37
|
### What are Joy and Jo?
|
|
39
38
|
|
|
@@ -49,9 +48,9 @@ The canonical profile (`context/profiles/ai/`) defines:
|
|
|
49
48
|
- **Curiosity & learning** (`curiosity.md`) - what Jo seeks to understand and remember
|
|
50
49
|
- **Language conventions** (`language.md`) - communication style
|
|
51
50
|
|
|
52
|
-
When activated via `Joy` or `Jo`, dotmem
|
|
53
|
-
discovery order. The profile is
|
|
54
|
-
|
|
51
|
+
When activated via `Joy` or `Jo`, dotmem may load this canonical profile as part of the deterministic
|
|
52
|
+
discovery order. The profile is optional: Dotmem Core works without Joy, and no installation is
|
|
53
|
+
incomplete solely because the Joy profile is absent.
|
|
55
54
|
|
|
56
55
|
### Activation Behavior
|
|
57
56
|
|
|
@@ -211,6 +210,8 @@ It exposes two read tools, and write capabilities that the operator opts into:
|
|
|
211
210
|
| --- | --- | --- | --- |
|
|
212
211
|
| `dotmem_context` | read | always | You need the acquired experience relevant to the current situation. |
|
|
213
212
|
| `dotmem_rules` | read | always | You need the iron rules that constrain every session. |
|
|
213
|
+
| `dotmem_search` | read | always | Local BM25 search over claims and archives. |
|
|
214
|
+
| `dotmem_archive` | read/write | always (write actions gated) | File-backed `.arch.mem` archive operations. |
|
|
214
215
|
| `dotmem_acquire` | write | `DOTMEM_MCP_WRITE=1` | The work produced reusable, project-specific experience worth keeping. |
|
|
215
216
|
| `dotmem_continuity` | read | always | You need continuation status, summaries, open loops, or evaluation. |
|
|
216
217
|
| `dotmem_continuity` | write | `DOTMEM_MCP_WRITE=1` | You need to create checkpoints, resume, add/resolve open loops. |
|
|
@@ -344,12 +345,12 @@ Don't default to `state` for everything just because it's the one-liner in the R
|
|
|
344
345
|
| Relational, needs joins/SQL | `sqlite` | `idb` (no query language) |
|
|
345
346
|
| Structured, needs confidence/TTL/source/history | `memory` | `state`/`store` (no lifecycle semantics) |
|
|
346
347
|
| Large or structured, browser-only | `idb` | `store` (size/shape limits) |
|
|
347
|
-
| Must survive process restart (Node/Bun) | `memory.acquire()` or `memory.remember(scope: 'durable')`
|
|
348
|
+
| Must survive process restart (Node/Bun) | `memory.acquire()` or `memory.remember(scope: 'durable')` | `store`/`session` (process-local only) |
|
|
348
349
|
|
|
349
350
|
"Must survive reload" only holds in a browser. In Node.js, Bun and Deno, `store` and `session` fall
|
|
350
351
|
back to in-memory `Map`s that do not survive a process restart. The `memory.remember()` `durable`
|
|
351
|
-
scope
|
|
352
|
-
|
|
352
|
+
scope persists to a filesystem-backed `memory.kv` file in Node.js, Bun and Deno (and uses IndexedDB
|
|
353
|
+
in browsers), so it survives process restarts there.
|
|
353
354
|
|
|
354
355
|
`sqlite` and `memory` answer different questions - "what data do I have" vs. "what does the app
|
|
355
356
|
believe, and how sure is it." Don't reach for `memory` just because a value happens to come from
|
|
@@ -622,6 +623,35 @@ retracted, superseded, no-term-match, and limit filtering. Compare with
|
|
|
622
623
|
`npx dotmem context --explain` and `npx dotmem bootstrap`; do not modify live memory
|
|
623
624
|
data to reconcile counts.
|
|
624
625
|
|
|
626
|
+
### CLI
|
|
627
|
+
|
|
628
|
+
```bash
|
|
629
|
+
npx dotmem # project context (L1 by default)
|
|
630
|
+
npx dotmem --level 2 # expanded context (1, 2 or 3)
|
|
631
|
+
npx dotmem --full # complete projection
|
|
632
|
+
npx dotmem inspect FILE.mem # read-only inspection
|
|
633
|
+
npx dotmem dump
|
|
634
|
+
npx dotmem diff FILE_A.mem FILE_B.mem
|
|
635
|
+
npx dotmem stats --tokens # measure token footprint
|
|
636
|
+
```
|
|
637
|
+
|
|
638
|
+
Experimental commands (0.3.1, may change): `gc`, `consolidate`, `compile`, `hooks`, `debug`, `on`, `branch`, `snapshot`, `sync`, `pack`, `probe`, `quarantine`, `selector`, `rewrap`. Use `npx dotmem <command> --help`.
|
|
639
|
+
|
|
640
|
+
Recent additions (working tree):
|
|
641
|
+
- `npx dotmem context --no-telemetry-weights` — disable telemetry boost in ranking.
|
|
642
|
+
- `npx dotmem --role <role>` — print open loops for a role at startup.
|
|
643
|
+
- `npx dotmem loop add <id> "<text>" --waits-for <p> [--author <a>] [--target-role <r>|--to <r>] [--claim <id>] [--file <path>]`
|
|
644
|
+
- `npx dotmem loop list [--role <r>|--to <r>] [--all]` / `loop close <id> --by <p> [--resolution <text>]`
|
|
645
|
+
- `npx dotmem probe list` / `probe run [--id <id>]` — freshness probes on claims.
|
|
646
|
+
- `npx dotmem gc --report` / `gc --apply` / `gc --purge` — archive expired claims.
|
|
647
|
+
- `npx dotmem stats --best|--worst|--unused|--reset` — telemetry reports.
|
|
648
|
+
- `npx dotmem acquire ... --lifetime <durable|operational> --until <date> --subject <s> --predicate <p> --source <src> --taint <t> --auto-supersede`
|
|
649
|
+
- `npx dotmem quarantine promote <id>` — promote a quarantined claim to a derived, user-direct claim.
|
|
650
|
+
|
|
651
|
+
## Cognitive engine (0.3.1)
|
|
652
|
+
|
|
653
|
+
Dotmem includes a native evidence-driven operational intelligence layer under `core/cognitive-engine/` and `core/operator/` (attention, continuous attention, metadata-first discovery, deterministic calculation, read-only SQL, epistemic state machine, SSOT, privacy gate, budgets, cancellation). Python is optional; the native Calculation Engine and SQL adapter are the mandatory deterministic path. Update docs when touching these modules.
|
|
654
|
+
|
|
625
655
|
## Run
|
|
626
656
|
|
|
627
657
|
```sh
|
package/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,30 @@
|
|
|
1
|
-
|
|
1
|
+
# Changelog
|
|
2
2
|
|
|
3
3
|
All notable changes to Dotmem are documented in this file.
|
|
4
4
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.3.1] - 2026-11-30
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- **Cognitive engine** (`core/cognitive-engine/`) - Native evidence-driven operational intelligence layer: attention, continuous attention (persistent, scheduled, recoverable), metadata-first discovery, deterministic calculation, SQL read-only execution, epistemic state machine, SSOT, planner, router, orchestrator, privacy gate, human control, token accounting and validation.
|
|
12
|
+
- **Operator module** (`core/operator/`) - Classification and verification surfaces for the cognitive engine.
|
|
13
|
+
- **Knowledge extensions** - Loops, selector, telemetry, probe, entropy, QUBO/solvers/signatures, semantic retrieval and semantic provider, encryption helpers, assistant/domain profiles.
|
|
14
|
+
- **CLI commands** - `audit-sample`, `effects`, `why`, `branch`, `compile`, `consolidate`, `debug`, `gc`, `hooks`, `on`, `pack`, `probe`, `quarantine`, `rewrap`, `selector`, `snapshot`, `stats`, `sync`, `terms`, `loop`.
|
|
15
|
+
- **Contracts/tests** - Dedicated tests for cognitive engine, loops, selector, telemetry, probe, semantic provider, search security, persistent attention durability and Python adapter preflight.
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
- **Storage and routing** - Moved bridge tests into `tests/vitest/tests/bridge/`; updated claim records, discovery, acquire and state for cognitive-engine integration.
|
|
19
|
+
- **Documentation** - Updated `docs/AGENTS.md`, `docs/MEMORY.md`, `docs/README.md`, `docs/SECURITY.md`, `docs/llms.txt` for the cognitive engine and new CLI surface.
|
|
20
|
+
|
|
21
|
+
### Fixed
|
|
22
|
+
- **Build-time identity** - Runtime identity resolution hardened; handshake/runtime identity integration completed.
|
|
23
|
+
- **Persistent Continuous Attention** - Durable events, schedules and checkpoint recovery replace the in-memory queue.
|
|
24
|
+
|
|
25
|
+
### Notes
|
|
26
|
+
- Python sandbox is optional; native Calculation Engine and SQL read-only execution are the mandatory deterministic path.
|
|
27
|
+
|
|
8
28
|
## [0.3.0] - 2026-11-27
|
|
9
29
|
|
|
10
30
|
### Added
|
|
@@ -49,7 +69,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
49
69
|
- **Iron rules** - Added `iron-rule-em-dash-to-hyphen` (use hyphen instead of em dash) and `iron-rule-no-jsx` (never use JSX) as human-stated project rules.
|
|
50
70
|
|
|
51
71
|
### Changed
|
|
52
|
-
- **Em dash to hyphen** - Replaced em dash (
|
|
72
|
+
- **Em dash to hyphen** - Replaced em dash (`—`) with hyphen (`-`) across all project source, docs, and visual editor files.
|
|
53
73
|
- **Visual editor** - Converted remaining `.jsx` sources to `.js` using `React.createElement` (no JSX).
|
|
54
74
|
|
|
55
75
|
### Fixed
|
|
@@ -65,7 +85,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
65
85
|
|
|
66
86
|
### Added
|
|
67
87
|
- **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.
|
|
68
|
-
- **Automatic Conversational Capture** - 7-stage pipeline: detect
|
|
88
|
+
- **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.
|
|
69
89
|
- **MCP Automatic Joy Profile Activation** - ADR-023: `buildProfileGuidance()` reads canonical `JO_PROFILE`; `buildMcpInstructions()` composes profile identity block + Scintilla signal.
|
|
70
90
|
- **Project identity `resolveProjectIdentity`** - Public API export for resolving stable project identity from DOTMEM_PROJECT_ID env, package.json name, or directory basename.
|
|
71
91
|
|
|
@@ -125,3 +145,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
125
145
|
- **Deterministic Retrieval** - Lexical and structured matching without embeddings.
|
|
126
146
|
- **Agent Memory** - Logical namespace partitioning via `dotmem/agent`.
|
|
127
147
|
- **Governance & Security** - RBAC, audit, consent, AES-GCM, PBKDF2 helpers.
|
|
148
|
+
|
package/MEMORY.md
CHANGED
|
@@ -40,9 +40,10 @@ new code should simply call the operation it needs.
|
|
|
40
40
|
|
|
41
41
|
## Deterministic AI activation
|
|
42
42
|
|
|
43
|
-
The
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
The primary chat invocation is `dotmem` (case-insensitive: `DOTMEM` is equivalent). `Joy` and `Jo` are
|
|
44
|
+
optional profile aliases for the canonical Joy profile; they are valid only when that profile is enabled
|
|
45
|
+
and the host adapter supports them. `npx dotmem` is a terminal command, `.mem` is a file/package
|
|
46
|
+
extension, and `load dotmem` is natural language - none of them is a deterministic chat trigger.
|
|
46
47
|
|
|
47
48
|
### What are Joy and Jo?
|
|
48
49
|
|
|
@@ -58,9 +59,9 @@ The canonical profile (`context/profiles/ai/`) defines:
|
|
|
58
59
|
- **Curiosity & learning** (`curiosity.md`) - what Jo seeks to understand and remember
|
|
59
60
|
- **Language conventions** (`language.md`) - communication style
|
|
60
61
|
|
|
61
|
-
When activated via `Joy` or `Jo`, dotmem
|
|
62
|
-
discovery order. The profile is optional
|
|
63
|
-
|
|
62
|
+
When activated via `Joy` or `Jo`, dotmem may load this canonical profile as part of the deterministic
|
|
63
|
+
discovery order. The profile is optional: Dotmem Core works without Joy, and no installation is
|
|
64
|
+
incomplete solely because the Joy profile is absent.
|
|
64
65
|
|
|
65
66
|
### Activation Behavior
|
|
66
67
|
|
|
@@ -129,7 +130,7 @@ everywhere in this documentation. It resolves at runtime to the current OS user'
|
|
|
129
130
|
|
|
130
131
|
```text
|
|
131
132
|
Example (OS-specific, illustrative only):
|
|
132
|
-
Windows: C:\Users\<user>\.
|
|
133
|
+
Windows: C:\Users\<user>\.dotmem
|
|
133
134
|
Linux: /home/<user>/.dotmem
|
|
134
135
|
macOS: /Users/<user>/.dotmem
|
|
135
136
|
```
|
|
@@ -540,11 +541,16 @@ dotmem ships a stdio MCP server (`dotmem-mcp`) so an AI host and the terminal sh
|
|
|
540
541
|
| --- | --- | --- | --- |
|
|
541
542
|
| `dotmem_context` | read | always | You need the acquired experience relevant to the current situation. |
|
|
542
543
|
| `dotmem_rules` | read | always | You need the iron rules that constrain every session. |
|
|
543
|
-
| `
|
|
544
|
+
| `dotmem_search` | read | always | Local BM25 search over claims and archives. |
|
|
545
|
+
| `dotmem_archive` | read/write | always (write actions gated by `DOTMEM_MCP_WRITE=1`) | File-backed `.arch.mem` archive operations. |
|
|
546
|
+
| `dotmem_inspect` | read | always | Read-only `.mem`/package/store inspection. |
|
|
547
|
+
| `dotmem_session_bootstrap` | read | always | Unified bootstrap/context. |
|
|
544
548
|
| `dotmem_continuity` | read | always | You need continuation status, summaries, open loops, or evaluation. |
|
|
545
549
|
| `dotmem_continuity` | write | `DOTMEM_MCP_WRITE=1` | You need to create checkpoints, resume, add/resolve open loops. |
|
|
546
550
|
| `dotmem_note_read` | read | always | You need to read a user note by id. |
|
|
547
551
|
| `dotmem_note_write` | write | `DOTMEM_MCP_WRITE=1` | You need to add or update a user note. |
|
|
552
|
+
| `dotmem_acquire` | write | `DOTMEM_MCP_WRITE=1` | The work produced reusable, project-specific experience worth keeping. |
|
|
553
|
+
| `dotmem_verify` | write | `DOTMEM_MCP_WRITE=1` | Run due probes and persist verification metadata. |
|
|
548
554
|
|
|
549
555
|
Without `DOTMEM_MCP_WRITE=1`, `dotmem_acquire` is absent from `tools/list`: it does not appear, and calling it by name returns the transport's own "not found". The `dotmem_continuity` tool is always registered, but write actions (`checkpoint`, `add-open-loop`, `resolve-open-loop`) return an authorization error when `DOTMEM_MCP_WRITE=1` is not set. Read actions (`status`, `summaries`, `open-loops`, `evaluate`) remain available. The server never leaks the store path in error messages. `serverInfo.version` reports the package version, and `instructions` are built from boolean state only (write enabled / has experience), never from project-derived strings.
|
|
550
556
|
|
|
@@ -622,3 +628,15 @@ The following CLI commands exist but are **not** exposed as MCP tools. This tabl
|
|
|
622
628
|
|
|
623
629
|
See [README.md](./README.md) for the product overview, [SECURITY.md](./SECURITY.md)
|
|
624
630
|
for the threat model.
|
|
631
|
+
|
|
632
|
+
## Cognitive engine (0.3.1)
|
|
633
|
+
See `core/cognitive-engine/` and `core/operator/` for the evidence-driven operational intelligence layer (attention, metadata-first discovery, deterministic calculation, read-only SQL, epistemic state machine, SSOT, privacy gate, budgets). Python is optional.
|
|
634
|
+
|
|
635
|
+
## Cognitive engine and operator (0.3.1)
|
|
636
|
+
- `core/cognitive-engine/`: attention, continuous-attention, metadata, execution, epistemic, ssot, planner, router, orchestrator, privacy-gate, human-control, token, validation, discovery, context, brief, calc, reasoning, tools, state, ai-contract, dotmem-adapter, python-adapter, signatures.
|
|
637
|
+
- `core/operator/`: classification, verification.
|
|
638
|
+
- Knowledge extensions: loops, selector, telemetry, probe, entropy, qubo, solvers, semantic, semantic-provider, encryption, assistant-profile, domain-profile.
|
|
639
|
+
- Python is optional; native Calculation Engine and SQL adapter are the mandatory deterministic path.
|
|
640
|
+
|
|
641
|
+
## New CLI commands (0.3.1)
|
|
642
|
+
See README "New commands (0.3.1 scaffolds)" for gc, consolidate, compile, hooks, debug, on, branch, snapshot, sync, pack, probe, quarantine, selector, stats, rewrap.
|
package/OVERVIEW.md
CHANGED
|
@@ -116,6 +116,7 @@ including:
|
|
|
116
116
|
- Open-loop and task continuity
|
|
117
117
|
- Governance, consent, and audit
|
|
118
118
|
- Multi-agent coordination
|
|
119
|
+
- Cognitive engine: metadata-first discovery, deterministic calculation, read-only SQL adapter, epistemic state machine, SSOT, continuous attention (persistent, scheduled, recoverable), privacy gate, cancellation. Python is optional.
|
|
119
120
|
|
|
120
121
|
The architecture is intended to keep these responsibilities separate and
|
|
121
122
|
avoid duplicating foundational functionality.
|
|
@@ -279,7 +280,7 @@ Reported results in the supplied project summary include:
|
|
|
279
280
|
|
|
280
281
|
- A coverage matrix with 507 entries, of which 465 were reported
|
|
281
282
|
covered.
|
|
282
|
-
- A test report with
|
|
283
|
+
- A test report with 1473 passing tests (125 files), 1 skipped, 1 todo.
|
|
283
284
|
- Seven passing canonical-identity enforcement tests.
|
|
284
285
|
- Recovery of historical tests, research papers, experiments, and
|
|
285
286
|
documentation.
|
|
@@ -294,6 +295,7 @@ attention:
|
|
|
294
295
|
- Cross-AI profile replacement and transfer remain incomplete.
|
|
295
296
|
- Multi-process write coordination is not fully addressed.
|
|
296
297
|
- There is no formal SLA for identity persistence.
|
|
298
|
+
- End-to-end evidence lineage tracking is not yet available.
|
|
297
299
|
|
|
298
300
|
Implementation status must always be checked against the current code
|
|
299
301
|
and current test results. Historical research papers and capability
|