dotmem 0.2.4 → 0.2.6

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 CHANGED
@@ -524,3 +524,110 @@ starts overwriting instead.
524
524
 
525
525
  Tests that touch persistence must point it at an isolated temporary project directory and clean up
526
526
  only that data; `memory.clear()` wipes all memories and acquired knowledge.
527
+
528
+ ---\n\n# Dotmem activation adapter (KILO)
529
+
530
+ When the user sends one of the canonical activation triggers, complete the canonical
531
+ Dotmem initialization sequence deterministically. Do not search the filesystem, create
532
+ demos, or explain the package.
533
+
534
+ ## Activation triggers
535
+
536
+ The recognized exact-message triggers are:
537
+
538
+ | Trigger | Behavior |
539
+ |---|---|
540
+ | `DOTMEM` | Activate the Dotmem environment |
541
+ | `npx DOTMEM` | Activate the Dotmem environment |
542
+ | `Joy` | Resolve the canonical conversational profile Joy |
543
+ | `Jo` | Resolve the canonical conversational profile Joy |
544
+
545
+ Matching rules:
546
+
547
+ - Case-insensitive.
548
+ - Ignore surrounding whitespace.
549
+ - Ignore trailing punctuation.
550
+ - Exact-message matching only.
551
+ - Activation occurs once per session.
552
+
553
+ Important distinction:
554
+
555
+ - `DOTMEM` and `npx DOTMEM` activate the Dotmem environment.
556
+ - `Joy` and `Jo` resolve the canonical conversational profile.
557
+ - Resolving Joy/Jo does not establish carrier compatibility or authority binding.
558
+ - Identity resolution, handshake and authority binding remain separate operations.
559
+
560
+ ## Deterministic activation sequence
561
+
562
+ Run these steps in order, immediately, when a trigger is received. Do not improvise,
563
+ search the filesystem, inspect package internals, invent commands or tools, or read
564
+ individual claims when a step below already provides the required information.
565
+
566
+ 1. Environment activation.
567
+ Reuse: `npx dotmem`
568
+ Capture and report the resolved storage root, canonical identity, index total,
569
+ size disclosure, and personality anchor from its output. If it presents a
570
+ handshake gate, follow that gate before any memory load.
571
+
572
+ 2. USER and PROJECT context loading.
573
+ Reuse: `npx dotmem bootstrap` (or `npx dotmem context "current project"`);
574
+ MCP equivalents: `dotmem_bootstrap`, `dotmem_context`.
575
+ Load the returned USER and PROJECT context from the storage root resolved in
576
+ step 1. Do not resolve paths independently.
577
+
578
+ 3. Canonical Joy profile resolution and document loading.
579
+ Reuse: `npx dotmem built-in-context --json` (MCP server creation also validates
580
+ the same built-in context) and the `DOTMEM_PROFILE_IDENTITY` block from the MCP
581
+ instructions.
582
+ Confirm and report profile id `joy`, alias `Jo`, and the seven profile documents:
583
+ `ai.md`, `behavior.md`, `decision.md`, `curiosity.md`, `trust.md`,
584
+ `language.md`, `soul.md`.
585
+ Resolving Joy/Jo does not establish human operator's authority.
586
+
587
+ 4. Iron Rules retrieval and application.
588
+ Reuse: `npx dotmem rules --expand` (or `npx dotmem rules --json`);
589
+ MCP equivalent: `dotmem_rules` with `expand: true`.
590
+ Report and apply the returned count and signature. Do not claim rules were
591
+ loaded without this output.
592
+
593
+ 5. HI recognition and handshake/authority verification.
594
+ Reuse: `npx dotmem handshake --status`.
595
+ Report `currentSpeakerBinding` and `currentAuthorityBinding` exactly as returned.
596
+ If unbound, run the challenge flow only when the HI provides an identity:
597
+ `npx dotmem handshake` (gate), then `npx dotmem handshake --answer "<answer>"`,
598
+ then `npx dotmem handshake --bind-hi "<identity>" --scope user`.
599
+ Never claim a bound HI or authority without the corresponding CLI output.
600
+
601
+ 6. Final activation acknowledgement.
602
+ Report, with evidence from steps 1-5: storage root, context loaded, Joy profile
603
+ documents loaded, Iron Rules count and signature, and HI/authority status.
604
+ A generated acknowledgement is not proof of initialization; only the step
605
+ outputs are.
606
+
607
+ ## Prohibitions
608
+
609
+ - Do not search the filesystem for Dotmem.
610
+ - Do not inspect package internals to discover commands.
611
+ - Do not invent commands or tools.
612
+ - Do not search for individual claims when bootstrap/context already provides them.
613
+ - Do not modify global host configuration.
614
+ - Do not repeatedly initialize an already initialized session.
615
+ - If a required capability is unavailable, report the exact missing capability.
616
+
617
+ ## Index discrepancy
618
+
619
+ `npx dotmem` reports `INDEX_TOTAL` for all claims in the combined store. Totals shown by
620
+ context projection, bootstrap, or MCP can differ because of applicability, scope,
621
+ retracted, superseded, no-term-match, and limit filtering. Compare with
622
+ `npx dotmem context --explain` and `npx dotmem bootstrap`; do not modify live memory
623
+ data to reconcile counts.
624
+
625
+ ## Run
626
+
627
+ ```sh
628
+ npx dotmem
629
+ ```
630
+
631
+ Then follow the canonical contract referenced by Dotmem's bootstrap output. Preserve
632
+ all identity, authority, and security boundaries. Report activation briefly and
633
+ continue with the user's actual task.
package/CHANGELOG.md CHANGED
@@ -1,10 +1,30 @@
1
- # Changelog
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.2.5] - 2026-11-19
9
+
10
+ ### Added
11
+ - **File-backed archive** - `.arch.mem` ZIP text archive with CLI and MCP (`put`, `get`, `list`, `search`, `auto`, `move`, `convert`, `forget`, `delete-claim`); UUID names and text-only security.
12
+ - **Local BM25 search** - Deterministic ranking over claims and archives with fuzzy matching and `--area`/`--tag`/`--since` filters.
13
+ - **Acquisition resilience** - Auto-archive lowest-value claims and retry on `DOTMEM_STORE_TOO_LARGE`.
14
+ - **Store repair** - `delete-claim` physically removes a claim and repairs broken revision references.
15
+ - **Archive security** - UTF-8 validation, null-byte rejection, SHA-256 checksum, 32 MiB decompression limit, text-only flags, `SECURITY.txt`.
16
+ - **Joy profile capabilities** - Designer, software architect, security CISO, LLM/AI, and 3D graphics (3ds Max, WebGL, Blender, Maya, Three.js).
17
+ - **Context brief date** - Brief format now includes `[YYYY-MM-DD]`.
18
+ - **MCP instructions** - Archive vs note guidance and cross-language query translation.
19
+
20
+ ### Changed
21
+ - **Store ceiling** - Raised from 4 MiB to 7 MiB.
22
+ - **Documentation** - Updated `docs/MEMORY.md`, `docs/README.md`, `docs/llms.txt`, `core/cli/usage.ts`, and ADR 030.
23
+
24
+ ### Fixed
25
+ - **Broken revision references** - Repaired stores via `delete-claim`.
26
+ - **CopyStatic warnings** - Removed missing `.d.ts` entries from static copy.
27
+
8
28
  ## [0.2.3] - 2026-11-17
9
29
 
10
30
  ### Added
@@ -12,7 +32,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
12
32
  - **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.
13
33
 
14
34
  ### Changed
15
- - **Em dash to hyphen** - Replaced em dash (`—`) with hyphen (`-`) across all project source, docs, and visual editor files.
35
+ - **Em dash to hyphen** - Replaced em dash (`—`) with hyphen (`-`) across all project source, docs, and visual editor files.
16
36
  - **Visual editor** - Converted remaining `.jsx` sources to `.js` using `React.createElement` (no JSX).
17
37
 
18
38
  ### Fixed
@@ -28,7 +48,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
28
48
 
29
49
  ### Added
30
50
  - **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.
31
- - **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.
51
+ - **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.
32
52
  - **MCP Automatic Joy Profile Activation** - ADR-023: `buildProfileGuidance()` reads canonical `JO_PROFILE`; `buildMcpInstructions()` composes profile identity block + Scintilla signal.
33
53
  - **Project identity `resolveProjectIdentity`** - Public API export for resolving stable project identity from DOTMEM_PROJECT_ID env, package.json name, or directory basename.
34
54
 
@@ -87,4 +107,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
87
107
  - **MCP Server** - Stdio server `dotmem-mcp` with read-only default, write opt-in via `DOTMEM_MCP_WRITE=1`.
88
108
  - **Deterministic Retrieval** - Lexical and structured matching without embeddings.
89
109
  - **Agent Memory** - Logical namespace partitioning via `dotmem/agent`.
90
- - **Governance & Security** - RBAC, audit, consent, AES-GCM, PBKDF2 helpers.
110
+ - **Governance & Security** - RBAC, audit, consent, AES-GCM, PBKDF2 helpers.
package/MEMORY.md CHANGED
@@ -571,7 +571,7 @@ does not prevent one.
571
571
 
572
572
  ### Extra commands: proposed MCP exposure (no implementation yet)
573
573
 
574
- The following CLI commands exist but are **not** exposed as MCP tools. This table records the proposal only; no command below becomes an MCP tool without a decision from Dario.
574
+ The following CLI commands exist but are **not** exposed as MCP tools. This table records the proposal only; no command below becomes an MCP tool without a decision from human operator.
575
575
 
576
576
  | Command | MCP Exposure | Risk |
577
577
  | --- | --- | --- |
@@ -604,6 +604,8 @@ The following CLI commands exist but are **not** exposed as MCP tools. This tabl
604
604
  | `session [show\|doing]` | Current task state of the session | `npx dotmem session doing "task"` | read/write |
605
605
  | `loop <subcommand>` | Manage open loops (add\|list\|close\|show) | `npx dotmem loop add lp-1 "task"` | write |
606
606
  | `vault <subcommand>` | Local handle→value vault (put\|resolve\|list\|forget) | `npx dotmem vault put val --handle h1` | write |
607
+ | `archive <subcommand>` | File-backed text archive `.arch.mem` (put\|get\|list\|search\|auto\|move\|convert\|forget\|delete-claim) | `npx dotmem archive put title --file big.txt` | write |
608
+ | `search "<query>"` | Local BM25 search over claims and archives | `npx dotmem search "autodesk" --tag identity` | read |
607
609
  | `verify` | Freshness probes on claims | `npx dotmem verify` | read |
608
610
  | `guard <event> [--payload]` | Policy evaluation before a tool action | `npx dotmem guard tool.git-commit` | read |
609
611
  | `rule` / `rules` | Print the iron rules | `npx dotmem rules` | read |