claude-db 0.8.2 → 0.8.3

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 CHANGED
@@ -1,5 +1,20 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.8.3
4
+
5
+ ### Fixed
6
+
7
+ - **No transcripts were found for a project whose path contained an underscore,
8
+ a space or any non-ASCII character.**
9
+ ([#13](https://github.com/Avijit07x/claude-db/issues/13))
10
+ The transcript directory name was built by replacing only `/` and `.` with
11
+ `-`, but Claude Code replaces every non-alphanumeric character. A project at
12
+ `/home/f/work/epiclin_2` was looked up under `-home-f-work-epiclin_2` while
13
+ its transcripts sat in `-home-f-work-epiclin-2`, so `flush`, `adoption` and
14
+ `setup` all reported nothing to ingest. The name is now derived the same way
15
+ Claude Code writes it — one dash per non-alphanumeric character — which also
16
+ covers paths with spaces, `@`, `~` or accented characters.
17
+
3
18
  ## 0.8.2
4
19
 
5
20
  ### Fixed
@@ -112,13 +112,15 @@ function isSyntheticPrompt(text) {
112
112
  text.startsWith('[Request interrupted') ||
113
113
  text.startsWith('<local-command'));
114
114
  }
115
+ function projectSlug(project) {
116
+ return project.replace(/[^a-zA-Z0-9]/g, '-');
117
+ }
115
118
  export function transcriptPathFor(project, sessionId) {
116
- const slug = project.replace(/[/.]/g, '-');
117
- return join(homedir(), '.claude', 'projects', slug, `${sessionId}.jsonl`);
119
+ return join(homedir(), '.claude', 'projects', projectSlug(project), `${sessionId}.jsonl`);
118
120
  }
119
121
  export function transcriptsFor(project) {
120
122
  const root = join(homedir(), '.claude', 'projects');
121
- const slug = project.replace(/[/.]/g, '-');
123
+ const slug = projectSlug(project);
122
124
  let candidates;
123
125
  try {
124
126
  candidates = readdirSync(root).filter((name) => name === slug || name.startsWith(`${slug}-`));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-db",
3
- "version": "0.8.2",
3
+ "version": "0.8.3",
4
4
  "description": "Persistent memory for Claude Code. Captures why decisions were made, not just which files changed. Bring your own database: SQLite, MongoDB or Postgres. No cloud, no subscription.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",