memgrid 0.5.0 → 0.5.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/CHANGELOG.md +99 -80
- package/LICENSE +21 -21
- package/README.md +284 -251
- package/dist/claude-md.d.ts +4 -0
- package/dist/claude-md.d.ts.map +1 -0
- package/dist/claude-md.js +58 -0
- package/dist/claude-md.js.map +1 -0
- package/dist/hooks.d.ts +18 -0
- package/dist/hooks.d.ts.map +1 -0
- package/dist/hooks.js +138 -0
- package/dist/hooks.js.map +1 -0
- package/dist/learn/index.d.ts.map +1 -1
- package/dist/learn/index.js +28 -9
- package/dist/learn/index.js.map +1 -1
- package/dist/memgrid.d.ts.map +1 -1
- package/dist/memgrid.js +39 -6
- package/dist/memgrid.js.map +1 -1
- package/dist/retrieve/index.d.ts +1 -1
- package/dist/retrieve/index.d.ts.map +1 -1
- package/dist/retrieve/index.js +17 -13
- package/dist/retrieve/index.js.map +1 -1
- package/dist/retrieve/semantic.d.ts.map +1 -1
- package/dist/retrieve/semantic.js +9 -7
- package/dist/retrieve/semantic.js.map +1 -1
- package/dist/scanner/composite.d.ts.map +1 -1
- package/dist/scanner/composite.js +1 -3
- package/dist/scanner/composite.js.map +1 -1
- package/dist/scanner/config.d.ts.map +1 -1
- package/dist/scanner/config.js +30 -8
- package/dist/scanner/config.js.map +1 -1
- package/dist/scanner/golang.d.ts.map +1 -1
- package/dist/scanner/golang.js +11 -6
- package/dist/scanner/golang.js.map +1 -1
- package/dist/scanner/javascript.d.ts.map +1 -1
- package/dist/scanner/javascript.js +9 -5
- package/dist/scanner/javascript.js.map +1 -1
- package/dist/scanner/markdown.d.ts.map +1 -1
- package/dist/scanner/markdown.js +8 -3
- package/dist/scanner/markdown.js.map +1 -1
- package/dist/scanner/python.d.ts.map +1 -1
- package/dist/scanner/python.js +7 -3
- package/dist/scanner/python.js.map +1 -1
- package/dist/scanner/rules.d.ts.map +1 -1
- package/dist/scanner/rules.js +17 -3
- package/dist/scanner/rules.js.map +1 -1
- package/dist/scanner/rust.d.ts.map +1 -1
- package/dist/scanner/rust.js +4 -2
- package/dist/scanner/rust.js.map +1 -1
- package/dist/scanner/sync.d.ts +50 -0
- package/dist/scanner/sync.d.ts.map +1 -0
- package/dist/scanner/sync.js +384 -0
- package/dist/scanner/sync.js.map +1 -0
- package/dist/scanner/typescript.d.ts.map +1 -1
- package/dist/scanner/typescript.js +93 -17
- package/dist/scanner/typescript.js.map +1 -1
- package/dist/serve/cli.js +15 -1
- package/dist/serve/cli.js.map +1 -1
- package/dist/serve/mcp-server.d.ts.map +1 -1
- package/dist/serve/mcp-server.js +27 -9
- package/dist/serve/mcp-server.js.map +1 -1
- package/dist/store/file-store.d.ts +5 -0
- package/dist/store/file-store.d.ts.map +1 -1
- package/dist/store/file-store.js +36 -8
- package/dist/store/file-store.js.map +1 -1
- package/dist/sync/index.d.ts.map +1 -1
- package/dist/sync/index.js +64 -23
- package/dist/sync/index.js.map +1 -1
- package/package.json +64 -51
package/CHANGELOG.md
CHANGED
|
@@ -1,80 +1,99 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to MemGrid.
|
|
4
|
-
|
|
5
|
-
## v0.5.
|
|
6
|
-
|
|
7
|
-
### Added
|
|
8
|
-
- `
|
|
9
|
-
-
|
|
10
|
-
- **
|
|
11
|
-
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
-
|
|
21
|
-
- `
|
|
22
|
-
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
- `
|
|
29
|
-
- `
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
-
|
|
43
|
-
-
|
|
44
|
-
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
###
|
|
61
|
-
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
-
|
|
68
|
-
-
|
|
69
|
-
-
|
|
70
|
-
|
|
71
|
-
## v0.
|
|
72
|
-
|
|
73
|
-
### Added
|
|
74
|
-
-
|
|
75
|
-
-
|
|
76
|
-
-
|
|
77
|
-
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
-
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to MemGrid.
|
|
4
|
+
|
|
5
|
+
## v0.5.2 — Auto-Sync Hooks (unreleased)
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- `memgrid init` auto-configures memory sync hooks:
|
|
9
|
+
- **Claude Code PostCompletion** → runs `memgrid sync` after each task
|
|
10
|
+
- **Git post-commit** → runs `memgrid sync` after each commit
|
|
11
|
+
- All injections are non-destructive (merges with existing config)
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
- README: added Auto-Sync Hooks section + CLAUDE.md integration template
|
|
15
|
+
|
|
16
|
+
## v0.5.1 — Search Bug Fix (2026-06-28)
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
- `memgrid search` returning empty results after fresh init
|
|
20
|
+
- Root cause: ES2022 `#private` fields broke internal cache access
|
|
21
|
+
- Fix: `listUnitsSync()` public method replaces direct private field access
|
|
22
|
+
- Also added `store.load()` to `search()`, `sync()`, `stats()` entry points
|
|
23
|
+
|
|
24
|
+
## v0.5.0 — Multi-Language + Incremental Sync (2026-06-28)
|
|
25
|
+
|
|
26
|
+
### Added — Language-Agnostic Scanner Architecture
|
|
27
|
+
- `Scanner` interface: `name`, `scan()`, `scanFiles?()`, `detect()`
|
|
28
|
+
- `CompositeScanner`: auto-detects and composes multiple language scanners
|
|
29
|
+
- **TypeScript** — `ts-morph` AST (classes, methods, exported functions, call graph associations)
|
|
30
|
+
- **JavaScript** — regex (exported functions, classes, arrow functions)
|
|
31
|
+
- **Python** — regex (functions, classes, decorators, docstrings)
|
|
32
|
+
- **Go** — regex (functions, methods, structs, interfaces)
|
|
33
|
+
- **Rust** — regex (functions, structs, enums, traits, impl blocks)
|
|
34
|
+
- **Markdown** — headings as knowledge units from any `.md` file
|
|
35
|
+
- **Rules** — `.claude/rules/*.md` → pattern + trigger units (universal, extracted from TS scanner)
|
|
36
|
+
- **Config** — `package.json`, `pyproject.toml`, `go.mod`, `Cargo.toml`, `docker-compose.yml` (universal)
|
|
37
|
+
|
|
38
|
+
### Added — Incremental Sync
|
|
39
|
+
- `memgrid sync` CLI command for incremental re-scan after code changes
|
|
40
|
+
- `mg.sync()` API: hash-based file diff against baseline snapshot
|
|
41
|
+
- File snapshots stored in `mesh.json.fileSnapshot` (SHA-256 per scanned file)
|
|
42
|
+
- Fuzzy match repair: Jaccard + Dice similarity for fixing broken associations
|
|
43
|
+
- Stale detection: marks orphaned units when source files are deleted
|
|
44
|
+
- Fast path: 0 changes detected in ~5ms (hash compare only)
|
|
45
|
+
|
|
46
|
+
### Changed
|
|
47
|
+
- `mg.init()` now records initial file snapshot for future syncs
|
|
48
|
+
- `MemoryGrid` type extended with optional `fileSnapshot`
|
|
49
|
+
|
|
50
|
+
### Performance
|
|
51
|
+
| Scenario | Time |
|
|
52
|
+
|----------|------|
|
|
53
|
+
| Sync 0 changes | ~5ms |
|
|
54
|
+
| Sync 1 file | ~2s |
|
|
55
|
+
| Sync 5 files (typical PR) | ~2-3s |
|
|
56
|
+
| Full init (150 units) | ~10s |
|
|
57
|
+
|
|
58
|
+
## v0.4.0 — Hybrid Semantic Search (2026-06-27)
|
|
59
|
+
|
|
60
|
+
### Added
|
|
61
|
+
- Hybrid search: combines MiniSearch (keyword) with semantic similarity
|
|
62
|
+
- Configurable `semanticWeight` (0.0 = pure keyword, 1.0 = pure semantic)
|
|
63
|
+
- Keyword embedding provider built-in (no external API required)
|
|
64
|
+
- `--semantic` flag on CLI search command
|
|
65
|
+
|
|
66
|
+
### Performance
|
|
67
|
+
- 10 searches: 670ms → 3ms (223x improvement)
|
|
68
|
+
- Repeated queries: 0ms (LRU cache)
|
|
69
|
+
- Disk reload: 45ms → 5ms (9x, switched from YAML to JSON)
|
|
70
|
+
|
|
71
|
+
## v0.3.0 — Auto-Learning Engine (2026-06-27)
|
|
72
|
+
|
|
73
|
+
### Added
|
|
74
|
+
- Post-task analysis: `mg.analyzeTask()` detects new methods, patterns, errors, decisions
|
|
75
|
+
- `mg.applySuggestions()` writes learning results back to grid
|
|
76
|
+
- `mg.formatSuggestions()` renders diff for human review
|
|
77
|
+
- Learning suggestion types: `add`, `archive`, `update_confidence`
|
|
78
|
+
|
|
79
|
+
### Changed
|
|
80
|
+
- Memory unit meta fields: `confidence` (0.0-1.0) and `status` (active/stale/archived)
|
|
81
|
+
|
|
82
|
+
## v0.2.0 — MCP Server + Tests (2026-06-26)
|
|
83
|
+
|
|
84
|
+
### Added
|
|
85
|
+
- Full MCP (Model Context Protocol) server via `memgrid serve`
|
|
86
|
+
- MCP tools: `memgrid_search`, `memgrid_context`
|
|
87
|
+
- Test suite with Vitest
|
|
88
|
+
- Septonir project integration test
|
|
89
|
+
|
|
90
|
+
## v0.1.0 — Core Engine (2026-06-26)
|
|
91
|
+
|
|
92
|
+
### Added
|
|
93
|
+
- TypeScript AST scanning with `ts-morph`: extracts methods, classes, exported functions
|
|
94
|
+
- Rule extraction from `.claude/rules/*.md` (sections → pattern/trigger units)
|
|
95
|
+
- Example extraction from `.claude/examples/` (good/bad patterns)
|
|
96
|
+
- Config extraction from `package.json`, `docker-compose.yml`
|
|
97
|
+
- Association graph building (call graph, pattern matching)
|
|
98
|
+
- CLI: `init`, `search`, `add`, `stats`
|
|
99
|
+
- File-based storage in `.claude/memory-grid/`
|
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 wenliangw
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 wenliangw
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|