claude-self-reflect 3.2.4 → 3.3.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.
Files changed (33) hide show
  1. package/.claude/agents/claude-self-reflect-test.md +595 -528
  2. package/.claude/agents/reflection-specialist.md +59 -3
  3. package/README.md +14 -5
  4. package/mcp-server/run-mcp.sh +49 -5
  5. package/mcp-server/src/app_context.py +64 -0
  6. package/mcp-server/src/config.py +57 -0
  7. package/mcp-server/src/connection_pool.py +286 -0
  8. package/mcp-server/src/decay_manager.py +106 -0
  9. package/mcp-server/src/embedding_manager.py +64 -40
  10. package/mcp-server/src/embeddings_old.py +141 -0
  11. package/mcp-server/src/models.py +64 -0
  12. package/mcp-server/src/parallel_search.py +371 -0
  13. package/mcp-server/src/project_resolver.py +5 -0
  14. package/mcp-server/src/reflection_tools.py +206 -0
  15. package/mcp-server/src/rich_formatting.py +196 -0
  16. package/mcp-server/src/search_tools.py +826 -0
  17. package/mcp-server/src/server.py +127 -1720
  18. package/mcp-server/src/temporal_design.py +132 -0
  19. package/mcp-server/src/temporal_tools.py +597 -0
  20. package/mcp-server/src/temporal_utils.py +384 -0
  21. package/mcp-server/src/utils.py +150 -67
  22. package/package.json +10 -1
  23. package/scripts/add-timestamp-indexes.py +134 -0
  24. package/scripts/check-collections.py +29 -0
  25. package/scripts/debug-august-parsing.py +76 -0
  26. package/scripts/debug-import-single.py +91 -0
  27. package/scripts/debug-project-resolver.py +82 -0
  28. package/scripts/debug-temporal-tools.py +135 -0
  29. package/scripts/delta-metadata-update.py +547 -0
  30. package/scripts/import-conversations-unified.py +53 -2
  31. package/scripts/precompact-hook.sh +33 -0
  32. package/scripts/streaming-watcher.py +1443 -0
  33. package/scripts/utils.py +39 -0
@@ -0,0 +1,39 @@
1
+ """Shared utilities for claude-self-reflect MCP server and scripts."""
2
+
3
+ from pathlib import Path
4
+
5
+
6
+ def normalize_project_name(project_path: str, _depth: int = 0) -> str:
7
+ """
8
+ Simplified project name normalization for consistent hashing.
9
+
10
+ Examples:
11
+ '/Users/name/.claude/projects/-Users-name-projects-myproject' -> 'myproject'
12
+ '-Users-name-projects-myproject' -> 'myproject'
13
+ '/path/to/myproject' -> 'myproject'
14
+ 'myproject' -> 'myproject'
15
+
16
+ Args:
17
+ project_path: Project path or name in any format
18
+ _depth: Internal recursion depth counter (for backwards compatibility)
19
+
20
+ Returns:
21
+ Normalized project name suitable for consistent hashing
22
+ """
23
+ if not project_path:
24
+ return ""
25
+
26
+ path = Path(project_path.rstrip('/'))
27
+
28
+ # Extract the final directory name
29
+ final_component = path.name
30
+
31
+ # If it's Claude's dash-separated format, extract project name
32
+ if final_component.startswith('-') and 'projects' in final_component:
33
+ # Find the last occurrence of 'projects-' to handle edge cases
34
+ idx = final_component.rfind('projects-')
35
+ if idx != -1:
36
+ return final_component[idx + len('projects-'):]
37
+
38
+ # For regular paths, just return the directory name
39
+ return final_component if final_component else path.parent.name