claude-self-reflect 2.5.6 → 2.5.8

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/README.md CHANGED
@@ -150,6 +150,9 @@ Recent conversations matter more. Old ones fade. Like your brain, but reliable.
150
150
 
151
151
  ## What's New
152
152
 
153
+ - **v2.5.6** - Tool Output Extraction - Captures git changes & tool outputs for cross-agent discovery
154
+ - **v2.5.5** - Critical dependency fix & streaming importer enhancements
155
+ - **v2.5.4** - Documentation & bug fixes (import path & state file compatibility)
153
156
  - **v2.5.3** - Streamlined README & import architecture diagram
154
157
  - **v2.5.2** - State file compatibility fix
155
158
  - **v2.4.5** - 10-40x performance boost
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "claude-self-reflect-mcp"
3
- version = "2.5.5"
3
+ version = "2.5.8"
4
4
  description = "MCP server for Claude self-reflection with memory decay"
5
5
  # readme = "README.md"
6
6
  requires-python = ">=3.10"
@@ -1,6 +1,10 @@
1
1
  #!/bin/bash
2
2
  # Run the Python MCP server using FastMCP
3
3
 
4
+ # CRITICAL: Capture the original working directory before changing it
5
+ # This is where Claude Code is actually running from
6
+ export MCP_CLIENT_CWD="$PWD"
7
+
4
8
  # Get the directory of this script
5
9
  SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
6
10
 
@@ -193,8 +193,10 @@ async def reflect_on_past(
193
193
  # Determine project scope
194
194
  target_project = project
195
195
  if project is None:
196
- # Try to detect current project from working directory
197
- cwd = os.getcwd()
196
+ # Use MCP_CLIENT_CWD environment variable set by run-mcp.sh
197
+ # This contains the actual working directory where Claude Code is running
198
+ cwd = os.environ.get('MCP_CLIENT_CWD', os.getcwd())
199
+
198
200
  # Extract project name from path (e.g., /Users/.../projects/project-name)
199
201
  path_parts = Path(cwd).parts
200
202
  if 'projects' in path_parts:
@@ -220,6 +222,7 @@ async def reflect_on_past(
220
222
  pass # We'll handle this differently in the filtering logic
221
223
 
222
224
  await ctx.debug(f"Searching for: {query}")
225
+ await ctx.debug(f"Client working directory: {cwd}")
223
226
  await ctx.debug(f"Project scope: {target_project if target_project != 'all' else 'all projects'}")
224
227
  await ctx.debug(f"Decay enabled: {should_use_decay}")
225
228
  await ctx.debug(f"Native decay mode: {USE_NATIVE_DECAY}")
@@ -3,6 +3,30 @@
3
3
  from pathlib import Path
4
4
 
5
5
 
6
+ def path_to_dash_encoded(path: str) -> str:
7
+ """
8
+ Convert a file path to dash-encoded format used in Claude logs.
9
+
10
+ Examples:
11
+ - /Users/kyle/projects/my-app -> -Users-kyle-projects-my-app
12
+ - /home/user/Code/project -> -home-user-Code-project
13
+
14
+ Args:
15
+ path: File system path
16
+
17
+ Returns:
18
+ Dash-encoded path string
19
+ """
20
+ # Convert to Path object and get parts
21
+ path_obj = Path(path)
22
+
23
+ # Remove empty parts and join with dashes
24
+ parts = [p for p in path_obj.parts if p and p != '/']
25
+
26
+ # Join with dashes and add leading dash
27
+ return '-' + '-'.join(parts)
28
+
29
+
6
30
  def normalize_project_name(project_path: str) -> str:
7
31
  """
8
32
  Normalize project name for consistent hashing across import/search.
@@ -65,8 +89,17 @@ def normalize_project_name(project_path: str) -> str:
65
89
  # Handle regular paths - if it's a file, get the parent directory
66
90
  # Otherwise use the directory/project name itself
67
91
  if path_obj.suffix: # It's a file (has an extension)
68
- # Use the parent directory name
92
+ # Check if .claude is anywhere in the parent path
93
+ for parent in path_obj.parents:
94
+ if parent.name == '.claude' and parent.parent:
95
+ return parent.parent.name
96
+ # No .claude found, use immediate parent
69
97
  return path_obj.parent.name
70
98
  else:
99
+ # Check if any parent in the path is .claude
100
+ for parent in [path_obj] + list(path_obj.parents):
101
+ if parent.name == '.claude' and parent.parent:
102
+ # Return the parent of .claude (the project directory)
103
+ return parent.parent.name
71
104
  # Use the directory name itself
72
105
  return path_obj.name
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-self-reflect",
3
- "version": "2.5.6",
3
+ "version": "2.5.8",
4
4
  "description": "Give Claude perfect memory of all your conversations - Installation wizard for Python MCP server",
5
5
  "keywords": [
6
6
  "claude",