claude-mem 10.7.2 → 12.0.0

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.
@@ -125,3 +125,51 @@ get_observations(ids=[11131, 10942, 10855], orderBy="date_desc")
125
125
  - **Full observation:** ~500-1000 tokens each
126
126
  - **Batch fetch:** 1 HTTP request vs N individual requests
127
127
  - **10x token savings** by filtering before fetching
128
+
129
+ ## Smart-Explore Language Support
130
+
131
+ Smart-explore tools (`smart_search`, `smart_outline`, `smart_unfold`) use tree-sitter AST parsing. The following languages are supported out of the box.
132
+
133
+ ### 24 Bundled Languages
134
+
135
+ JS, TS, Python, Go, Rust, Ruby, Java, C, C++, Kotlin, Swift, PHP, Elixir, Lua, Scala, Bash, Haskell, Zig, CSS, SCSS, TOML, YAML, SQL, Markdown
136
+
137
+ ### Markdown Special Support
138
+
139
+ Markdown files get structure-aware parsing beyond generic tree-sitter:
140
+
141
+ - **Heading hierarchy** -- `#`/`##`/`###` headings are extracted as nested symbols (sections contain subsections)
142
+ - **Code block detection** -- fenced code blocks are surfaced as `code` symbols with language annotation
143
+ - **Section-aware unfold** -- `smart_unfold` on a heading returns the full section content (heading through all subsections until the next heading of equal or higher level)
144
+
145
+ ### User-Installable Grammars via `.claude-mem.json`
146
+
147
+ Add custom tree-sitter grammars for languages not in the bundled set. Place `.claude-mem.json` in the project root:
148
+
149
+ ```json
150
+ {
151
+ "grammars": {
152
+ "gleam": {
153
+ "package": "tree-sitter-gleam",
154
+ "extensions": [".gleam"]
155
+ },
156
+ "protobuf": {
157
+ "package": "tree-sitter-proto",
158
+ "extensions": [".proto"],
159
+ "query": ".claude-mem/queries/proto.scm"
160
+ }
161
+ }
162
+ }
163
+ ```
164
+
165
+ **Fields:**
166
+
167
+ - `package` (string, required) -- npm package name for the tree-sitter grammar
168
+ - `extensions` (array of strings, required) -- file extensions to associate with this language
169
+ - `query` (string, optional) -- path to a custom `.scm` query file for symbol extraction. If omitted, a generic query is used.
170
+
171
+ **Rules:**
172
+
173
+ - User grammars do NOT override bundled languages. If a language is already bundled, the entry is ignored.
174
+ - The npm package must be installed in the project (`npm install tree-sitter-gleam`).
175
+ - Config is cached per project root. Changes to `.claude-mem.json` take effect on next worker restart.