dotmem 0.3.0 → 0.3.1
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 +20 -0
- package/MEMORY.md +26 -8
- package/README.md +231 -294
- package/SECURITY.md +1 -1
- package/WHATSNEW.md +30 -0
- package/agent.cjs +101 -101
- package/agent.js +101 -101
- package/built-in-context.json +2 -2
- package/cli.cjs +219 -201
- package/cli.js +219 -201
- package/global.cjs +101 -101
- package/global.js +101 -101
- package/index.cjs +118 -118
- package/index.js +118 -118
- package/llms.txt +8 -4
- package/mcp.cjs +109 -108
- package/mcp.js +109 -108
- package/package.json +6 -7
- package/types/global-types.d.ts +65 -14
- package/types/memory.d.ts +39 -8
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
|
@@ -125,3 +125,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
125
125
|
- **Deterministic Retrieval** - Lexical and structured matching without embeddings.
|
|
126
126
|
- **Agent Memory** - Logical namespace partitioning via `dotmem/agent`.
|
|
127
127
|
- **Governance & Security** - RBAC, audit, consent, AES-GCM, PBKDF2 helpers.
|
|
128
|
+
|
|
129
|
+
## [0.3.1] - 2026-11-30
|
|
130
|
+
|
|
131
|
+
### Added
|
|
132
|
+
- **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.
|
|
133
|
+
- **Operator module** (`core/operator/`) - Classification and verification surfaces for the cognitive engine.
|
|
134
|
+
- **Knowledge extensions** - Loops, selector, telemetry, probe, entropy, QUBO/solvers/signatures, semantic retrieval and semantic provider, encryption helpers, assistant/domain profiles.
|
|
135
|
+
- **CLI commands** - `audit-sample`, `effects`, `why`, `branch`, `compile`, `consolidate`, `debug`, `gc`, `hooks`, `on`, `pack`, `probe`, `quarantine`, `rewrap`, `selector`, `snapshot`, `stats`, `sync`, `terms`, `loop`.
|
|
136
|
+
- **Contracts/tests** - Dedicated tests for cognitive engine, loops, selector, telemetry, probe, semantic provider, search security, persistent attention durability and Python adapter preflight.
|
|
137
|
+
|
|
138
|
+
### Changed
|
|
139
|
+
- **Storage and routing** - Moved bridge tests into `tests/vitest/tests/bridge/`; updated claim records, discovery, acquire and state for cognitive-engine integration.
|
|
140
|
+
- **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.
|
|
141
|
+
|
|
142
|
+
### Fixed
|
|
143
|
+
- **Build-time identity** - Runtime identity resolution hardened; handshake/runtime identity integration completed.
|
|
144
|
+
- **Persistent Continuous Attention** - Durable events, schedules and checkpoint recovery replace the in-memory queue.
|
|
145
|
+
|
|
146
|
+
### Notes
|
|
147
|
+
- Python sandbox is optional; native Calculation Engine and SQL read-only execution are the mandatory deterministic path.
|
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.
|