feat: Live Context System with Distributed CLAUDE.md Generation (#556)
* docs: add folder index generator plan RFC for auto-generating folder-level CLAUDE.md files with observation timelines. Includes IDE symlink support and root CLAUDE.md integration. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat: implement folder index generator (Phase 1) Add automatic CLAUDE.md generation for folders containing observed files. This enables IDE context providers to access relevant memory observations. Core modules: - FolderDiscovery: Extract folders from observation file paths - FolderTimelineCompiler: Compile chronological timeline per folder - ClaudeMdGenerator: Write CLAUDE.md with tag-based content replacement - FolderIndexOrchestrator: Coordinate regeneration on observation save Integration: - Event-driven regeneration after observation save in ResponseProcessor - HTTP endpoints for folder discovery, timeline, and manual generation - Settings for enabling/configuring folder index behavior The <claude-mem-context> tag wrapping ensures: - Manual CLAUDE.md content is preserved - Auto-generated content won't be recursively observed - Clean separation between user and system content 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat: add updateFolderClaudeMd function to CursorHooksInstaller Adds function to update CLAUDE.md files for folders touched by observations. Uses existing /api/search/by-file endpoint, preserves content outside <claude-mem-context> tags, and writes atomically via temp file + rename. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat: hook updateFolderClaudeMd into ResponseProcessor Calls updateFolderClaudeMd after observation save to update folder-level CLAUDE.md files. Uses fire-and-forget pattern with error logging. Extracts file paths from saved observations and workspace path from registry. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat: add timeline formatting for folder CLAUDE.md files Implements formatTimelineForClaudeMd function that transforms API response into compact markdown table format. Converts emojis to text labels, handles ditto marks for timestamps, and groups under "Recent" header. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * refactor: remove old folder-index implementation Deletes redundant folder-index services that were replaced by the simpler updateFolderClaudeMd approach in CursorHooksInstaller.ts. Removed: - src/services/folder-index/ directory (5 files) - FolderIndexRoutes.ts - folder-index settings from SettingsDefaultsManager - folder-index route registration from worker-service 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat: add worktree-aware project filtering for unified timelines Detect git worktrees and show both parent repo and worktree observations in the session start timeline. When running in a worktree, the context now includes observations from both projects, interleaved chronologically. - Add detectWorktree() utility to identify worktree directories - Add getProjectContext() to return parent + worktree projects - Update context hook to pass multi-project queries - Add queryObservationsMulti() and querySummariesMulti() for IN clauses - Maintain backward compatibility with single-project queries 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com> * fix: restructure logging to prove session correctness and reduce noise Add critical logging at each stage of the session lifecycle to prove the session ID chain (contentSessionId → sessionDbId → memorySessionId) stays aligned. New logs include CREATED, ENQUEUED, CLAIMED, MEMORY_ID_CAPTURED, STORING, and STORED. Move intermediate migration and backfill progress logs to DEBUG level to reduce noise, keeping only essential initialization and completion logs at INFO level. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com> * refactor: extract folder CLAUDE.md utils to shared location Moves folder CLAUDE.md utilities from CursorHooksInstaller to a new shared utils file. Removes Cursor registry dependency - file paths from observations are already absolute, no workspace lookup needed. New file: src/utils/claude-md-utils.ts - replaceTaggedContent() - preserves user content outside tags - writeClaudeMdToFolder() - atomic writes with tag preservation - formatTimelineForClaudeMd() - API response to compact markdown - updateFolderClaudeMdFiles() - orchestrates folder updates 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: trigger folder CLAUDE.md updates when observations are saved The folder CLAUDE.md update was previously only triggered in syncAndBroadcastSummary, but summaries run with observationCount=0 (observations are saved separately). Moved the update logic to syncAndBroadcastObservations where file paths are available. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * all the claudes * test: add unit tests for claude-md-utils pure functions Add 11 tests covering replaceTaggedContent and formatTimelineForClaudeMd: - replaceTaggedContent: empty content, tag replacement, appending, partial tags - formatTimelineForClaudeMd: empty input, parsing, ditto marks, session IDs 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * test: add integration tests for file operation functions Add 9 tests for writeClaudeMdToFolder and updateFolderClaudeMdFiles: - writeClaudeMdToFolder: folder creation, content preservation, nested dirs, atomic writes - updateFolderClaudeMdFiles: empty skip, fetch/write, deduplication, error handling 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * test: add unit tests for timeline-formatting utilities Add 14 tests for extractFirstFile and groupByDate functions: - extractFirstFile: relative paths, fallback to files_read, null handling, invalid JSON - groupByDate: empty arrays, date grouping, chronological sorting, item preservation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * chore: rebuild plugin scripts with merged features * docs: add project-specific CLAUDE.md with architecture and development notes * fix: exclude project root from auto-generated CLAUDE.md updates Skip folders containing .git directory when auto-updating subfolder CLAUDE.md files. This ensures: 1. Root CLAUDE.md remains user-managed and untouched by the system 2. SessionStart context injection stays pristine throughout the session 3. Subfolder CLAUDE.md files continue to receive live context updates 4. Cleaner separation between user-authored root docs and auto-generated folder indexes 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: prevent crash from resuming stale SDK sessions on worker restart When the worker restarts, it was incorrectly passing the `resume` parameter to INIT prompts (lastPromptNumber=1) when a memorySessionId existed from a previous SDK session. This caused "Claude Code process exited with code 1" crashes because the SDK tried to resume into a session that no longer exists. Root cause: The resume condition only checked `hasRealMemorySessionId` but did not verify that this was a CONTINUATION prompt (lastPromptNumber > 1). Fix: Add `session.lastPromptNumber > 1` check to the resume condition: - Before: `...(hasRealMemorySessionId && { resume: session.memorySessionId })` - After: `...(hasRealMemorySessionId && session.lastPromptNumber > 1 && { resume: ... })` Also added: - Enhanced debug logging that warns when skipping resume for INIT prompts - Unit tests in tests/sdk-agent-resume.test.ts (9 test cases) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: properly handle Chroma MCP connection errors Previously, ensureCollection() caught ALL errors from chroma_get_collection_info and assumed they meant "collection doesn't exist", triggering unnecessary collection creation attempts. Connection errors like "Not connected" or "MCP error -32000: Connection closed" would cascade into failed creation attempts. Similarly, queryChroma() would silently return empty results when the MCP call failed, masking the underlying connection problem. Changes: - ensureCollection(): Detect connection errors and re-throw immediately instead of attempting collection creation - queryChroma(): Wrap MCP call in try-catch and throw connection errors instead of returning empty results - Both methods reset connection state (connected=false, client=null) on connection errors so subsequent operations can attempt to reconnect 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * pushed * fix: scope regenerate-claude-md.ts to current working directory Critical bug fix: The script was querying ALL observations from the database across ALL projects ever recorded (1396+ folders), then attempting to write CLAUDE.md files everywhere including other projects, non-existent paths, and ignored directories. Changes: - Use git ls-files to discover folders (respects .gitignore automatically) - Filter database query to current project only (by folder name) - Use relative paths for database queries (matches storage format) - Add --clean flag to remove auto-generated CLAUDE.md files - Add fallback directory walker for non-git repos Now correctly scopes to 26 folders with observations instead of 1396+. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * docs and adjustments * fix: cleanup mode strips tags instead of deleting files blindly The cleanup mode was incorrectly deleting entire files that contained <claude-mem-context> tags. The correct behavior (per original design): 1. Strip the <claude-mem-context>...</claude-mem-context> section 2. If empty after stripping → delete the file 3. If has remaining content → save the stripped version Now properly preserves user content in CLAUDE.md files while removing only the auto-generated sections. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * deleted some files * chore: regenerate folder CLAUDE.md files with fixed script Regenerated 23 folder CLAUDE.md files using the corrected script that: - Scopes to current working directory only - Uses git ls-files to respect .gitignore - Filters by project name 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Update CLAUDE.md files for January 5, 2026 - Regenerated and staged 23 CLAUDE.md files with a mix of new and modified content. - Fixed cleanup mode to properly strip tags instead of deleting files blindly. - Cleaned up empty CLAUDE.md files from various directories, including ~/.claude and ~/Scripts. - Conducted dry-run cleanup that identified a significant reduction in auto-generated CLAUDE.md files. - Removed the isAutoGeneratedClaudeMd function due to incorrect file deletion behavior. * feat: use settings for observation limit in batch regeneration script Replace hard-coded limit of 10 with configurable CLAUDE_MEM_CONTEXT_OBSERVATIONS setting (default: 50). This allows users to control how many observations appear in folder CLAUDE.md files. Changes: - Import SettingsDefaultsManager and load settings at script startup - Use OBSERVATION_LIMIT constant derived from settings at both call sites - Remove stale default parameter from findObservationsByFolder function 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat: use settings for observation limit in event-driven updates Replace hard-coded limit of 10 in updateFolderClaudeMdFiles with configurable CLAUDE_MEM_CONTEXT_OBSERVATIONS setting (default: 50). Changes: - Import SettingsDefaultsManager and os module - Load settings at function start (once, not in loop) - Use limit from settings in API call 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat: Implement configurable observation limits and enhance search functionality - Added configurable observation limits to batch regeneration scripts. - Enhanced SearchManager to handle folder queries and normalize parameters. - Introduced methods to check for direct child files in observations and sessions. - Updated SearchOptions interface to include isFolder flag for filtering. - Improved code quality with comprehensive reviews and anti-pattern checks. - Cleaned up auto-generated CLAUDE.md files across various directories. - Documented recent changes and improvements in CLAUDE.md files. * build asset * Project Context from Claude-Mem auto-added (can be auto removed at any time) * CLAUDE.md updates * fix: resolve CLAUDE.md files to correct directory in worktree setups When using git worktrees, CLAUDE.md files were being written relative to the worker's process.cwd() instead of the actual project directory. This fix threads the project's cwd from message processing through to the file writing utilities, ensuring CLAUDE.md files are created in the correct project directory regardless of where the worker was started. Changes: - Add projectRoot parameter to updateFolderClaudeMdFiles for path resolution - Thread projectRoot through ResponseProcessor call chain - Track lastCwd from messages in SDKAgent, GeminiAgent, OpenRouterAgent - Add tests for relative/absolute path handling with projectRoot 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * more project context updates * context updates * fix: preserve actual dates in folder CLAUDE.md generation Previously, formatTimelineForClaudeMd used today's date for all observations because the API only returned time (e.g., "4:30 PM") without date information. This caused all historical observations to appear as if they happened today. Changes: - SearchManager.findByFile now groups results by date with headers (e.g., "### Jan 4, 2026") matching formatSearchResults behavior - formatTimelineForClaudeMd now parses these date headers and uses the correct date when constructing epochs for date grouping The timeline dates are critical for claude-mem context - LLMs need accurate temporal context to understand when work happened. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * build: update worker assets with date parsing fix 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * claude-mem context: Fixed critical date parsing bug in PR #556 * fix: address PR #556 review items - Use getWorkerHost() instead of hard-coded 127.0.0.1 in claude-md-utils - Add error message and stack details to FOLDER_INDEX logging - Add 5 new tests for worktree/projectRoot path resolution 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Refactor CLAUDE documentation across multiple components and tests - Updated CLAUDE.md files in src/ui/viewer, src/ui/viewer/constants, src/ui/viewer/hooks, tests/server, tests/worker/agents, and plans to reflect recent changes and improvements. - Removed outdated entries and consolidated recent activities for clarity. - Enhanced documentation for hooks, settings, and pagination implementations. - Streamlined test suite documentation for server and worker agents, indicating recent test audits and cleanup efforts. - Adjusted plans to remove obsolete entries and focus on current implementation strategies. * docs: comprehensive v9.0 documentation audit and updates - Add usage/folder-context to docs.json navigation (was documented but hidden!) - Update introduction.mdx with v9.0 release notes (Live Context, Worktree Support, Windows Fixes) - Add CLAUDE_MEM_WORKER_HOST setting to configuration.mdx - Add Folder Context Files section with link to detailed docs - Document worktree support in folder-context.mdx - Update terminology from "mem-search skill" to "MCP tools" throughout active docs - Update Search Pipeline in architecture/overview.mdx - Update usage/getting-started.mdx with MCP tools terminology - Update usage/claude-desktop.mdx title and terminology - Update hooks-architecture.mdx reference 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat: add recent activity log for worker CLI with detailed entries * chore: update CLAUDE.md context files 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat: add brainstorming report for CLAUDE.md distribution architecture --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
<claude-mem-context>
|
||||
# Recent Activity
|
||||
|
||||
<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->
|
||||
|
||||
### Jan 5, 2026
|
||||
|
||||
**CLAUDE.md**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #37391 | 12:48 AM | ✅ | Staged 23 CLAUDE.md files with mix of new and modified content | ~400 |
|
||||
| #37390 | 12:47 AM | ✅ | Regenerated 23 CLAUDE.md files in budapest workspace | ~365 |
|
||||
</claude-mem-context>
|
||||
@@ -0,0 +1,187 @@
|
||||
<claude-mem-context>
|
||||
# Recent Activity
|
||||
|
||||
<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->
|
||||
|
||||
### Nov 21, 2025
|
||||
|
||||
**cleanup-duplicates.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #13458 | 4:05 PM | 🔵 | Comments already document multiple observations per tool_use_id design | ~394 |
|
||||
|
||||
**restore-endless-mode.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #13229 | 1:36 PM | 🔵 | Dead Code Analysis: Deferred Transformation Experiment | ~613 |
|
||||
| #13228 | 1:33 PM | 🔵 | Endless Mode Restoration CLI Tool | ~601 |
|
||||
|
||||
### Nov 22, 2025
|
||||
|
||||
**restore-endless-mode.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #14203 | 1:05 AM | 🔵 | Endless Mode Feature Branch Contains Major Additions | ~566 |
|
||||
|
||||
### Dec 5, 2025
|
||||
|
||||
**run.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #20355 | 6:49 PM | 🔵 | Runtime launcher added for dynamic Bun/Node selection | ~260 |
|
||||
| #20290 | 6:06 PM | 🔵 | Runtime Launcher Script for Dynamic Execution | ~269 |
|
||||
| #20140 | 4:08 PM | 🔄 | Eliminated code duplication in run.ts by importing from runtime.ts | ~376 |
|
||||
| #20135 | 4:03 PM | ⚖️ | Proposed Refactoring: 77% Code Reduction While Maintaining Functionality | ~411 |
|
||||
| #20133 | 4:02 PM | ⚖️ | Runtime Implementation Analysis: Four Categories of Issues Identified | ~406 |
|
||||
| #20130 | " | ⚖️ | Code Duplication Deemed Unnecessary Due to Bundling | ~359 |
|
||||
| #20127 | 4:01 PM | 🔵 | Dual Purpose Runtime System Revealed | ~335 |
|
||||
| #20126 | " | 🔵 | Invalid Justification for Duplication Analysis | ~295 |
|
||||
| #20125 | " | 🔵 | Code Duplication Issue in Runtime Implementation | ~317 |
|
||||
| #20123 | " | 🔵 | Source TypeScript Runtime Launcher Implementation | ~313 |
|
||||
| #20120 | 3:58 PM | 🔵 | PR 169 Changes Overview | ~314 |
|
||||
| #20110 | 3:55 PM | 🔵 | PR 169 adds Bun runtime support with automatic detection | ~461 |
|
||||
|
||||
### Dec 8, 2025
|
||||
|
||||
**restore-endless-mode.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #21893 | 3:30 PM | 🔵 | Endless Mode Transcript Restoration CLI Tool | ~345 |
|
||||
|
||||
### Dec 9, 2025
|
||||
|
||||
**import-xml-observations.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #22929 | 3:04 PM | ⚖️ | Silent Failure Pattern Conversion Strategy | ~471 |
|
||||
| #22928 | 3:03 PM | 🔵 | Silent Failure Pattern Audit Results | ~372 |
|
||||
| #22927 | 3:01 PM | 🔵 | Silent Failure Pattern Detection Across Codebase | ~352 |
|
||||
|
||||
### Dec 10, 2025
|
||||
|
||||
**import-xml-observations.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #23755 | 9:05 PM | 🔵 | Import XML Observations Utility Uses SessionStore Directly | ~280 |
|
||||
|
||||
**cleanup-duplicates.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #23754 | 9:05 PM | 🔵 | Cleanup Duplicates Utility Uses SessionStore Directly | ~234 |
|
||||
|
||||
### Dec 11, 2025
|
||||
|
||||
**import-xml-observations.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #23959 | 1:58 PM | 🔵 | TypeScript Codebase Architecture Mapped | ~337 |
|
||||
|
||||
### Dec 13, 2025
|
||||
|
||||
**import-xml-observations.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #25321 | 9:12 PM | 🔵 | Console.error Usage Found in 29 Files | ~366 |
|
||||
|
||||
### Dec 16, 2025
|
||||
|
||||
**import-xml-observations.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #27502 | 4:19 PM | 🔵 | Observation Storage Architecture Located | ~403 |
|
||||
|
||||
### Dec 18, 2025
|
||||
|
||||
**import-xml-observations.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #29773 | 7:01 PM | 🔵 | Observation Type Definitions Across Codebase | ~362 |
|
||||
|
||||
### Dec 19, 2025
|
||||
|
||||
**cleanup-duplicates.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #29926 | 6:25 PM | 🔵 | cleanup-duplicates.ts Only Deletes From SQLite, Not Chroma | ~340 |
|
||||
|
||||
### Dec 21, 2025
|
||||
|
||||
**cleanup-duplicates.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #31603 | 8:21 PM | 🔵 | Complete Console.* Statement Audit Across Codebase | ~813 |
|
||||
| #31599 | 8:19 PM | 🔵 | 136 console logging statements found in TypeScript source files | ~538 |
|
||||
|
||||
### Dec 24, 2025
|
||||
|
||||
**import-xml-observations.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #32184 | 7:20 PM | 🔄 | Direct SQL replaced method call for SDK session ID update | ~259 |
|
||||
| #32183 | " | 🔄 | Simplified database update in XML import script | ~254 |
|
||||
| #32100 | 5:08 PM | 🔵 | storeObservation method usage spans three TypeScript files | ~237 |
|
||||
|
||||
### Dec 25, 2025
|
||||
|
||||
**import-xml-observations.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #32558 | 8:18 PM | 🔵 | Identified files containing 'summary' or 'Summary' | ~167 |
|
||||
| #32456 | 5:41 PM | ✅ | Completed merge of main branch into feature/titans-phase1-3 | ~354 |
|
||||
|
||||
### Dec 27, 2025
|
||||
|
||||
**import-xml-observations.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #33082 | 6:45 PM | 🔵 | User directory path patterns in codebase | ~362 |
|
||||
|
||||
### Dec 28, 2025
|
||||
|
||||
**cleanup-duplicates.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #33636 | 11:35 PM | ✅ | Major Documentation and Code Cleanup Removed 4,929 Lines | ~381 |
|
||||
| #33590 | 11:11 PM | 🔵 | Database Migration Renamed sdk_session_id to memory_session_id | ~387 |
|
||||
|
||||
**import-xml-observations.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #33439 | 10:15 PM | 🔄 | Extended Session ID Renaming to Additional Codebase Components | ~352 |
|
||||
|
||||
### Dec 29, 2025
|
||||
|
||||
**cleanup-duplicates.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #33675 | 12:02 AM | 🔄 | Major Documentation and Code Cleanup in MCP Clarity Branch | ~491 |
|
||||
|
||||
### Jan 1, 2026
|
||||
|
||||
**import-xml-observations.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #35553 | 9:50 PM | 🔵 | storeObservation method usage across codebase | ~315 |
|
||||
| #35515 | 9:14 PM | ✅ | Wave 1 Extended Fixes Committed: 5 Critical Error Handling Issues Resolved | ~409 |
|
||||
| #35501 | 9:10 PM | 🔵 | Wave 1 Verification Issue: Anti-Pattern Detector Not Recognizing Fixes | ~497 |
|
||||
| #35500 | 9:09 PM | 🟣 | Wave 1 Complete: All 4 Empty Catch Blocks Fixed | ~511 |
|
||||
| #35493 | 9:08 PM | 🔴 | Wave 1 Fix 1/4: XML Importer Empty Catch Block Fixed | ~392 |
|
||||
| #35492 | " | ✅ | Wave 1 Fix 1/4: Added Logger Import to XML Importer | ~248 |
|
||||
| #35488 | 9:07 PM | 🔵 | Wave 1 Target File: XML Observation Importer Structure | ~424 |
|
||||
| #35485 | 9:06 PM | ⚖️ | Comprehensive error handling remediation plan completed and submitted for approval | ~555 |
|
||||
| #35465 | 9:01 PM | 🔵 | Empty catch block in XML observations import script | ~281 |
|
||||
|
||||
### Jan 2, 2026
|
||||
|
||||
**import-xml-observations.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #35985 | 5:16 PM | 🔵 | Alignment logging implemented across session lifecycle touchpoints | ~377 |
|
||||
|
||||
### Jan 3, 2026
|
||||
|
||||
**import-xml-observations.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #36296 | 8:04 PM | 🔵 | TypeScript Compilation Check: Pre-Existing Errors Unrelated to Refactoring | ~621 |
|
||||
</claude-mem-context>
|
||||
@@ -0,0 +1,36 @@
|
||||
<claude-mem-context>
|
||||
# Recent Activity
|
||||
|
||||
<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->
|
||||
|
||||
### Dec 10, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #23825 | 11:12 PM | ✅ | Worker Port Set to 38888 for Migration Phase | ~283 |
|
||||
| #23824 | " | 🔵 | Worker Port Sourced from getWorkerPort() Utility | ~247 |
|
||||
| #23816 | 10:52 PM | 🟣 | Worker CLI Command Interface Created | ~325 |
|
||||
|
||||
### Dec 11, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #24060 | 2:58 PM | 🔴 | Worker CLI Start Command Exit Behavior Fixed | ~232 |
|
||||
|
||||
### Dec 12, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #24359 | 7:00 PM | 🟣 | Phase 1 Critical Code Fixes Completed via Agent Task | ~441 |
|
||||
| #24358 | 6:59 PM | ✅ | Completed Phase 1 Code Fixes for better-sqlite3 Migration | ~385 |
|
||||
| #24348 | 6:57 PM | 🔴 | Added Defensive Break Statement to worker-cli.ts Restart Case | ~269 |
|
||||
| #24345 | " | 🔵 | worker-cli.ts Missing Break Statement in Switch Case | ~318 |
|
||||
|
||||
### Dec 14, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #26766 | 11:30 PM | ⚖️ | Root Cause Identified: Missing Post-Install Worker Restart Trigger in Plugin Update Flow | ~604 |
|
||||
| #26722 | 11:23 PM | 🔵 | Worker CLI TypeScript Source Shows Simple ProcessManager Delegation | ~394 |
|
||||
| #26721 | " | 🔵 | Worker CLI Source Code Shows Simple Restart Logic Without Delays | ~425 |
|
||||
</claude-mem-context>
|
||||
@@ -0,0 +1,71 @@
|
||||
<claude-mem-context>
|
||||
# Recent Activity
|
||||
|
||||
<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->
|
||||
|
||||
### Nov 25, 2025
|
||||
|
||||
**api.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #15545 | 8:37 PM | 🔵 | API Constants File Contains Single Comment Reference | ~227 |
|
||||
|
||||
### Dec 7, 2025
|
||||
|
||||
**observation-metadata.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #21685 | 9:48 PM | 🔵 | Configuration Defaults and Environment Variables | ~558 |
|
||||
|
||||
### Dec 9, 2025
|
||||
|
||||
**observation-metadata.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #22672 | 12:10 PM | 🔵 | Observation Type System with Six Types and Seven Concepts | ~505 |
|
||||
|
||||
### Dec 11, 2025
|
||||
|
||||
**observation-metadata.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #23959 | 1:58 PM | 🔵 | TypeScript Codebase Architecture Mapped | ~337 |
|
||||
|
||||
### Dec 18, 2025
|
||||
|
||||
**observation-metadata.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #29773 | 7:01 PM | 🔵 | Observation Type Definitions Across Codebase | ~362 |
|
||||
| #29248 | 12:15 AM | ⚖️ | RAGTIME domain-agnostic architecture design for claude-mem | ~590 |
|
||||
| #29229 | 12:08 AM | 🔵 | Claude-Mem Observation Type System Architecture Mapped | ~552 |
|
||||
| #29220 | 12:04 AM | 🔵 | Observation Type and Concept Taxonomy | ~355 |
|
||||
|
||||
### Dec 21, 2025
|
||||
|
||||
**observation-metadata.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #31747 | 10:43 PM | 🔵 | PR #412 Code Review Identifies Two Critical Bugs in Mode System | ~545 |
|
||||
| #31433 | 6:58 PM | 🔄 | Simplified observation-metadata.ts to use hardcoded defaults | ~330 |
|
||||
| #31429 | 6:57 PM | 🔄 | Removed unused emoji mapping constants from observation metadata | ~245 |
|
||||
| #31423 | 6:50 PM | 🔵 | Observation Metadata Constants File Structure | ~327 |
|
||||
| #31329 | 5:45 PM | 🔵 | Observation Metadata Integration Across Services and UI | ~403 |
|
||||
| #31328 | " | 🔵 | Settings Defaults Manager Uses Observation Metadata Constants | ~286 |
|
||||
| #31327 | " | 🔵 | Observation Metadata Constants - Core Type and Concept Definitions | ~369 |
|
||||
|
||||
### Dec 25, 2025
|
||||
|
||||
**observation-metadata.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #32701 | 9:00 PM | 🔵 | Test Coverage Report Generated | ~471 |
|
||||
|
||||
### Jan 2, 2026
|
||||
|
||||
**observation-metadata.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #35875 | 2:39 PM | 🔵 | Logging UI Architecture Mapped | ~599 |
|
||||
| #35836 | 2:30 PM | 🔵 | Observation metadata constants for types and concepts | ~280 |
|
||||
</claude-mem-context>
|
||||
@@ -0,0 +1,95 @@
|
||||
<claude-mem-context>
|
||||
# Recent Activity
|
||||
|
||||
<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->
|
||||
|
||||
### Dec 9, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #23126 | 6:40 PM | ✅ | Removed SKIP_TOOLS Check from saveHook Function | ~288 |
|
||||
| #23125 | " | 🔵 | SKIP_TOOLS Reference Still Present in saveHook Function | ~224 |
|
||||
| #23124 | " | ✅ | Removed SKIP_TOOLS Constant from save-hook.ts | ~297 |
|
||||
| #23123 | 6:39 PM | 🔵 | Current SKIP_TOOLS Implementation in save-hook.ts | ~397 |
|
||||
| #23122 | " | 🔴 | Hardened Spinner Stop Mechanism with Timeout and Logging | ~361 |
|
||||
| #23121 | " | 🔵 | Current Spinner Stop Implementation in summary-hook.ts | ~348 |
|
||||
| #23118 | 6:38 PM | ✅ | Phase 6: StopInput Interface Type Safety Restored | ~248 |
|
||||
| #23117 | 6:37 PM | ✅ | Phase 6: PostToolUseInput Interface Type Safety Restored | ~222 |
|
||||
| #23116 | " | ✅ | Phase 6: UserPromptSubmitInput Interface Type Safety Restored | ~216 |
|
||||
| #23115 | " | ✅ | Phase 6: SessionStartInput Interface Type Safety Restored | ~341 |
|
||||
| #23114 | " | 🔵 | Current State of context-hook.ts Interface | ~409 |
|
||||
| #23113 | " | 🔵 | Current State of summary-hook.ts Interface and Spinner Stop | ~397 |
|
||||
| #23112 | " | 🔵 | Current State of save-hook.ts Interface and SKIP_TOOLS | ~395 |
|
||||
| #23111 | " | 🔵 | Current State of new-hook.ts Interface | ~381 |
|
||||
| #23076 | 6:27 PM | ✅ | Added Comment Explaining Exit Code 3 in user-message-hook.ts | ~245 |
|
||||
| #23075 | 6:26 PM | ✅ | Deleted Expired Announcement Code from user-message-hook.ts | ~354 |
|
||||
| #23074 | " | ✅ | Replaced Verbose Manual Mode Help with Error in cleanup-hook.ts | ~222 |
|
||||
| #23073 | " | ✅ | Removed cwd from cleanup-hook Debug Logging | ~177 |
|
||||
| #23072 | " | ✅ | Simplified SessionEndInput Interface in cleanup-hook.ts | ~236 |
|
||||
| #23071 | 6:25 PM | 🔵 | cleanup-hook.ts Has Over-Engineered Manual Mode Help (lines 36-47) | ~399 |
|
||||
| #23070 | " | 🔵 | user-message-hook.ts Contains Expired Announcement Code (lines 31-70) | ~370 |
|
||||
| #23045 | 4:41 PM | 🔵 | "What's the Point?" Audit: Hook Code Contains 50% Dead/Duplicated Logic | ~1458 |
|
||||
| #23044 | 4:37 PM | 🔵 | Hook Architecture Audit: Purpose and Design Patterns | ~1032 |
|
||||
| #22856 | 2:27 PM | ✅ | Replaced node_modules Check with Marker File in user-message-hook | ~324 |
|
||||
| #22855 | " | 🔵 | Identified node_modules First-Run Check in user-message-hook | ~319 |
|
||||
| #22825 | 2:06 PM | 🔄 | Removed Duplicate Session Initialization Call from New Hook | ~346 |
|
||||
|
||||
### Dec 10, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #23407 | 2:14 PM | 🔵 | New Hook Implementation Structure | ~264 |
|
||||
|
||||
### Dec 13, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #25389 | 9:30 PM | 🔴 | Save Hook Error Logging Enhanced With Tool Context | ~361 |
|
||||
| #25388 | " | 🔴 | New Hook Now Logs SDK Agent Start Errors | ~344 |
|
||||
| #25387 | 9:29 PM | 🔴 | New Hook Now Logs Session Initialization Errors | ~350 |
|
||||
| #25386 | " | 🔴 | Context Hook Now Logs Error Text Before Throwing | ~338 |
|
||||
| #25385 | " | ✅ | Added Logger Import to New Hook | ~249 |
|
||||
| #25384 | " | ✅ | Added Logger Import to Context Hook | ~223 |
|
||||
| #25383 | " | 🔵 | New Hook Has Two Silent Failure Points | ~392 |
|
||||
| #25382 | 9:28 PM | 🔵 | Save Hook Has Partial Error Logging | ~351 |
|
||||
| #25381 | " | 🔵 | Summary Hook Has Partial Error Logging | ~345 |
|
||||
| #25380 | " | 🔵 | Context Hook Silent Failure Pattern Confirmed | ~354 |
|
||||
|
||||
### Dec 14, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #26730 | 11:24 PM | 🔵 | Context Hook TypeScript Source Shows EnsureWorkerRunning as First Action | ~441 |
|
||||
| #26729 | " | 🔵 | Context Hook TypeScript Source Calls ensureWorkerRunning Before API Requests | ~411 |
|
||||
| #26260 | 8:32 PM | 🔵 | User Message Hook Calls Context Inject with colors=true Parameter | ~300 |
|
||||
| #26244 | 8:29 PM | 🔵 | Context Hook Delegates to Worker API Context Endpoint | ~260 |
|
||||
| #25692 | 4:24 PM | 🔵 | Summary hook extracts last user and assistant messages from transcript file before sending to worker | ~465 |
|
||||
|
||||
### Dec 17, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #28449 | 4:23 PM | 🔵 | New Hook Session Initialization Flow | ~385 |
|
||||
|
||||
### Dec 19, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #30105 | 8:11 PM | 🔵 | Hook Response Utility Standardizes Hook Output Format | ~387 |
|
||||
| #30103 | 8:10 PM | 🔵 | Context Hook Injects Mode-Based Memory Context During SessionStart | ~460 |
|
||||
|
||||
### Dec 20, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #31085 | 7:59 PM | 🔵 | Summary Hook Uses session_id from Hook Input | ~315 |
|
||||
|
||||
### Dec 27, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #33216 | 9:07 PM | 🔵 | UserPromptSubmit Hook (new-hook.ts) Initializes Session and Starts SDK Agent via Two HTTP Endpoints | ~735 |
|
||||
| #33211 | 9:04 PM | 🔵 | User Message Hook Displays Context Info via stderr in Parallel with Context Injection | ~476 |
|
||||
| #33210 | 9:03 PM | 🔵 | Summary Hook (summary-hook.ts) Extracts Messages and Triggers Summarization | ~479 |
|
||||
| #33209 | " | 🔵 | SessionStart Hook (context-hook.ts) Fetches Context Injection via HTTP | ~520 |
|
||||
</claude-mem-context>
|
||||
@@ -9,7 +9,7 @@
|
||||
import { stdin } from "process";
|
||||
import { ensureWorkerRunning, getWorkerPort } from "../shared/worker-utils.js";
|
||||
import { HOOK_TIMEOUTS } from "../shared/hook-constants.js";
|
||||
import { getProjectName } from "../utils/project-name.js";
|
||||
import { getProjectContext } from "../utils/project-name.js";
|
||||
import { logger } from "../utils/logger.js";
|
||||
|
||||
export interface SessionStartInput {
|
||||
@@ -24,10 +24,12 @@ async function contextHook(input?: SessionStartInput): Promise<string> {
|
||||
await ensureWorkerRunning();
|
||||
|
||||
const cwd = input?.cwd ?? process.cwd();
|
||||
const project = getProjectName(cwd);
|
||||
const context = getProjectContext(cwd);
|
||||
const port = getWorkerPort();
|
||||
|
||||
const url = `http://127.0.0.1:${port}/api/context/inject?project=${encodeURIComponent(project)}`;
|
||||
// Pass all projects (parent + worktree if applicable) for unified timeline
|
||||
const projectsParam = context.allProjects.join(',');
|
||||
const url = `http://127.0.0.1:${port}/api/context/inject?projects=${encodeURIComponent(projectsParam)}`;
|
||||
|
||||
// Note: Removed AbortSignal.timeout due to Windows Bun cleanup issue (libuv assertion)
|
||||
// Worker service has its own timeouts, so client-side timeout is redundant
|
||||
|
||||
+12
-11
@@ -24,12 +24,9 @@ async function newHook(input?: UserPromptSubmitInput): Promise<void> {
|
||||
|
||||
const { session_id, cwd, prompt } = input;
|
||||
const project = getProjectName(cwd);
|
||||
|
||||
logger.info('HOOK', 'new-hook: Received hook input', { session_id, has_prompt: !!prompt, cwd });
|
||||
|
||||
const port = getWorkerPort();
|
||||
|
||||
logger.info('HOOK', 'new-hook: Calling /api/sessions/init', { contentSessionId: session_id, project, prompt_length: prompt?.length });
|
||||
logger.debug('HOOK', 'new-hook: Calling /api/sessions/init', { contentSessionId: session_id, project });
|
||||
|
||||
// Initialize session via HTTP - handles DB operations and privacy checks
|
||||
const initResponse = await fetch(`http://127.0.0.1:${port}/api/sessions/init`, {
|
||||
@@ -51,25 +48,25 @@ async function newHook(input?: UserPromptSubmitInput): Promise<void> {
|
||||
const sessionDbId = initResult.sessionDbId;
|
||||
const promptNumber = initResult.promptNumber;
|
||||
|
||||
logger.info('HOOK', 'new-hook: Received from /api/sessions/init', { sessionDbId, promptNumber, skipped: initResult.skipped });
|
||||
logger.debug('HOOK', 'new-hook: Received from /api/sessions/init', { sessionDbId, promptNumber, skipped: initResult.skipped });
|
||||
|
||||
// SESSION ALIGNMENT LOG: Entry point showing content session ID and prompt number
|
||||
logger.info('HOOK', `[ALIGNMENT] Hook Entry | contentSessionId=${session_id} | prompt#=${promptNumber} | sessionDbId=${sessionDbId}`);
|
||||
// Debug-level alignment log for detailed tracing
|
||||
logger.debug('HOOK', `[ALIGNMENT] Hook Entry | contentSessionId=${session_id} | prompt#=${promptNumber} | sessionDbId=${sessionDbId}`);
|
||||
|
||||
// Check if prompt was entirely private (worker performs privacy check)
|
||||
if (initResult.skipped && initResult.reason === 'private') {
|
||||
logger.info('HOOK', `new-hook: Session ${sessionDbId}, prompt #${promptNumber} (fully private - skipped)`);
|
||||
logger.info('HOOK', `INIT_COMPLETE | sessionDbId=${sessionDbId} | promptNumber=${promptNumber} | skipped=true | reason=private`, {
|
||||
sessionId: sessionDbId
|
||||
});
|
||||
console.log(STANDARD_HOOK_RESPONSE);
|
||||
return;
|
||||
}
|
||||
|
||||
logger.info('HOOK', `new-hook: Session ${sessionDbId}, prompt #${promptNumber}`);
|
||||
|
||||
// Strip leading slash from commands for memory agent
|
||||
// /review 101 → review 101 (more semantic for observations)
|
||||
const cleanedPrompt = prompt.startsWith('/') ? prompt.substring(1) : prompt;
|
||||
|
||||
logger.info('HOOK', 'new-hook: Calling /sessions/{sessionDbId}/init', { sessionDbId, promptNumber, userPrompt_length: cleanedPrompt?.length });
|
||||
logger.debug('HOOK', 'new-hook: Calling /sessions/{sessionDbId}/init', { sessionDbId, promptNumber });
|
||||
|
||||
// Initialize SDK agent session via HTTP (starts the agent!)
|
||||
const response = await fetch(`http://127.0.0.1:${port}/sessions/${sessionDbId}/init`, {
|
||||
@@ -83,6 +80,10 @@ async function newHook(input?: UserPromptSubmitInput): Promise<void> {
|
||||
throw new Error(`SDK agent start failed: ${response.status}`);
|
||||
}
|
||||
|
||||
logger.info('HOOK', `INIT_COMPLETE | sessionDbId=${sessionDbId} | promptNumber=${promptNumber} | project=${project}`, {
|
||||
sessionId: sessionDbId
|
||||
});
|
||||
|
||||
console.log(STANDARD_HOOK_RESPONSE);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,141 @@
|
||||
<claude-mem-context>
|
||||
# Recent Activity
|
||||
|
||||
<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->
|
||||
|
||||
### Dec 22, 2025
|
||||
|
||||
**SDKAgent.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #31951 | 8:17 PM | 🟣 | Mode System with Inheritance and Multilingual Support | ~776 |
|
||||
|
||||
**prompts.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #31891 | 7:17 PM | 🔴 | Migration des prompts de résumé vers les fichiers de modes pour le support multilingue | ~474 |
|
||||
| #31890 | " | 🔵 | Modifications en cours sur les fichiers de modes multilingues et le système de prompts | ~325 |
|
||||
| #31872 | 7:04 PM | 🔄 | Externalisation des prompts de résumé codés en dur | ~378 |
|
||||
| #31868 | 7:03 PM | 🔵 | サマリープロンプトのハードコーディング箇所の特定 | ~193 |
|
||||
| #31829 | 6:28 PM | 🔄 | Removed languageNote usage from continuation observation XML template | ~90 |
|
||||
| #31828 | " | 🔄 | Removed languageNote variable from buildContinuationPrompt | ~199 |
|
||||
| #31827 | " | 🔄 | Removed languageNote usage from summary XML template | ~79 |
|
||||
| #31826 | " | 🔄 | Removed unused languageNote variable from buildSummaryPrompt | ~198 |
|
||||
| #31825 | 6:26 PM | 🔄 | Removed unused languageNote variable from buildInitPrompt | ~278 |
|
||||
| #31820 | 6:20 PM | 🔵 | Prompts system architecture uses mode.prompts.format_examples field | ~305 |
|
||||
| #31816 | 6:10 PM | 🔄 | Extracted memory continuation header to mode configuration | ~236 |
|
||||
| #31815 | 6:09 PM | 🔄 | Extracted continuation instruction to mode configuration | ~252 |
|
||||
| #31814 | " | 🔄 | Extracted continuation greeting to mode configuration | ~306 |
|
||||
| #31813 | 6:08 PM | 🔄 | Removed hardcoded language instruction from buildSummaryPrompt | ~291 |
|
||||
| #31812 | " | 🔄 | Replaced all XML placeholder text with mode configuration variables | ~459 |
|
||||
| #31811 | " | 🔄 | Replaced hardcoded memory processing header with mode variable | ~252 |
|
||||
|
||||
**parser.test.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #31855 | 6:53 PM | ✅ | テストスイートの大規模削除とテスト分析レポートの追加 | ~197 |
|
||||
|
||||
### Dec 23, 2025
|
||||
|
||||
**prompts.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #32030 | 7:44 PM | 🔵 | SDK prompt building system uses mode configuration | ~330 |
|
||||
|
||||
**parser.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #32029 | 7:40 PM | 🔵 | Parser Layer Has No Skip Logic - Always Saves Observations | ~342 |
|
||||
|
||||
### Dec 24, 2025
|
||||
|
||||
**prompts.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #32213 | 8:17 PM | 🔵 | Prompt Generation System Architecture | ~402 |
|
||||
| #32337 | 4:03 PM | ✅ | Enhanced observation prompt with granularity reminder | ~278 |
|
||||
|
||||
### Dec 25, 2025
|
||||
|
||||
**parser.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #32701 | 9:00 PM | 🔵 | Test Coverage Report Generated | ~471 |
|
||||
| #32565 | 8:19 PM | 🔵 | Read parser.ts (first 150 lines) | ~146 |
|
||||
|
||||
**prompts.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #32558 | 8:18 PM | 🔵 | Identified files containing 'summary' or 'Summary' | ~167 |
|
||||
|
||||
### Dec 27, 2025
|
||||
|
||||
**prompts.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #33131 | 7:52 PM | 🔵 | Session ID Propagation Flow Analysis with Architectural Vulnerabilities Identified | ~577 |
|
||||
| #33129 | " | 🔵 | Prompt Building Functions with Session ID Threading Documentation | ~483 |
|
||||
|
||||
### Dec 28, 2025
|
||||
|
||||
**prompts.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #33438 | 10:15 PM | 🔄 | Bulk Rename Session ID Fields Across Entire Codebase | ~384 |
|
||||
| #33420 | 10:06 PM | 🔵 | Complete session ID flow analysis reveals missing SDK session capture mechanism | ~545 |
|
||||
| #33415 | 10:05 PM | 🔵 | Prompt building functions receive sessionId but only use it for context display | ~372 |
|
||||
| #33316 | 3:09 PM | 🔴 | Fixed Disconnected SDK Agent Sessions | ~350 |
|
||||
| #33296 | 3:08 PM | 🔵 | Session ID Propagation Flow Architecture Traced Through Codebase | ~720 |
|
||||
|
||||
### Dec 30, 2025
|
||||
|
||||
**parser.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #34462 | 2:23 PM | 🔵 | Code Quality Review Identifies Critical V2 Migration Issues | ~418 |
|
||||
|
||||
**prompts.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #34398 | 1:53 PM | 🔵 | SDK Prompts Module Structure | ~361 |
|
||||
|
||||
### Jan 1, 2026
|
||||
|
||||
**prompts.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #35666 | 11:37 PM | ✅ | Staged error handling improvements across 10 files | ~261 |
|
||||
| #35641 | 11:27 PM | ✅ | Added APPROVED OVERRIDE comments for JSON parse error handling in SDK prompts | ~336 |
|
||||
|
||||
### Jan 2, 2026
|
||||
|
||||
**prompts.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #35901 | 2:49 PM | 🔵 | PR #525 File Changes Summary | ~376 |
|
||||
| #35770 | 1:23 PM | ✅ | Last User Message Field Removed Across 11 Files in Codebase | ~374 |
|
||||
| #35763 | 1:22 PM | 🔄 | Removed last_user_message from SDKSession interface | ~241 |
|
||||
| #35762 | 1:21 PM | 🔵 | SDKSession interface includes last_user_message field | ~221 |
|
||||
| #35742 | 1:15 PM | 🔵 | SDKSession interface defines both user_prompt and last_user_message fields | ~289 |
|
||||
| #35738 | 1:12 PM | 🔵 | Summary prompt uses last_assistant_message but not last_user_message | ~334 |
|
||||
| #35737 | " | 🔵 | Summary Prompt Interface Defines Optional last_user_message | ~253 |
|
||||
| #35736 | " | 🔵 | SDKSession Interface Defines Optional last_user_message Field | ~277 |
|
||||
| #35733 | 1:11 PM | 🔵 | Located last_user_message usage across codebase | ~333 |
|
||||
|
||||
### Jan 3, 2026
|
||||
|
||||
**parser.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #36200 | 7:22 PM | 🔵 | Parser Module Analysis for Phase 2 Refactoring | ~562 |
|
||||
|
||||
### Jan 5, 2026
|
||||
|
||||
**prompts.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #37613 | 5:31 PM | 🔵 | PR #558 Review Feedback Analysis | ~544 |
|
||||
| #37571 | 4:51 PM | ✅ | Phase 1 Anti-Pattern Check Complete - Clean Implementation | ~400 |
|
||||
| #37557 | 4:49 PM | 🔵 | Issue #545 Bug Location and Fix Pattern Documented | ~462 |
|
||||
| #37539 | 4:45 PM | 🔵 | SDK Defensive JSON Parsing Pattern Implementation | ~408 |
|
||||
</claude-mem-context>
|
||||
@@ -0,0 +1,100 @@
|
||||
<claude-mem-context>
|
||||
# Recent Activity
|
||||
|
||||
<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->
|
||||
|
||||
### Nov 6, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #4185 | 10:25 PM | 🔴 | Prefixed unused id parameters with underscore in filter callbacks | ~299 |
|
||||
|
||||
### Nov 8, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #5539 | 10:20 PM | 🔵 | Harsh critical audit of context-hook reveals systematic anti-patterns | ~3154 |
|
||||
| #5497 | 9:29 PM | 🔵 | Harsh critical audit of context-hook reveals systematic anti-patterns | ~2815 |
|
||||
|
||||
### Nov 9, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #5757 | 5:16 PM | 🔵 | MCP search server exposes 9 tools consuming ~2,000-3,000 tokens per session | ~421 |
|
||||
| #5754 | 5:14 PM | 🔵 | MCP search server provides 9 search tools with hybrid semantic/FTS5 | ~402 |
|
||||
|
||||
### Nov 10, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #6250 | 12:54 PM | 🔵 | MCP Search Server Connection Failure Reported | ~329 |
|
||||
|
||||
### Nov 17, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #10744 | 11:47 PM | ✅ | Search Query Parameter Made Optional for Filter-Only Queries | ~373 |
|
||||
| #10572 | 7:47 PM | 🟣 | Unified cross-type search with search_everything tool | ~501 |
|
||||
| #10571 | 7:46 PM | 🔵 | Search server architecture and hybrid search implementation | ~553 |
|
||||
|
||||
### Nov 18, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #11462 | 7:55 PM | 🔵 | Ready to Apply Fix to Contextualize Handler | ~261 |
|
||||
| #11460 | " | 🔴 | Identified Root Cause of Contextualize Endpoint Bug | ~413 |
|
||||
| #11454 | 7:54 PM | 🔵 | Unified Search Handler Shows Correct Pattern for Filter-Only Queries | ~334 |
|
||||
| #11447 | " | 🔵 | Contextualize Handler Calls Search Methods with Query='*' | ~279 |
|
||||
| #11432 | 7:52 PM | 🔵 | Contextualize Handler Formats Results with Sections | ~286 |
|
||||
| #11431 | 7:51 PM | 🔵 | Confirmed Empty Results Trigger in Contextualize Handler | ~289 |
|
||||
| #11430 | " | 🔵 | Contextualize Handler Implementation Uses Search Methods | ~424 |
|
||||
| #11429 | " | 🔵 | Search Server Defines Six Main Search Tools | ~358 |
|
||||
| #11428 | " | 🔵 | Contextualize Tool Definition Found in Search Server | ~357 |
|
||||
| #11332 | 3:55 PM | 🔵 | Comprehensive FTS5 Removal Audit Completed for Architecture Migration | ~792 |
|
||||
| #11206 | 3:01 PM | 🔵 | mem-search skill architecture and migration details retrieved in full format | ~538 |
|
||||
| #11181 | 4:09 AM | 🔵 | Store methods for ID-based lookups exist but not exposed as MCP tools | ~495 |
|
||||
| #11013 | 2:12 AM | 🔵 | Search Server Implements Three-Path Query Strategy with ChromaDB Primary and FTS5 Fallback | ~462 |
|
||||
|
||||
### Nov 28, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #16711 | 4:34 PM | 🟣 | include_inactive Parameter Extracted in Search Handler | ~369 |
|
||||
| #16710 | " | 🔵 | Search Tool Schema Definition with Type and Filter Parameters | ~527 |
|
||||
| #16708 | " | 🔵 | Search Server MCP Tool Architecture and ChromaDB Integration | ~491 |
|
||||
| #16682 | 4:10 PM | 🔵 | Comprehensive Exploration Task Completed on Observation System | ~601 |
|
||||
|
||||
### Dec 14, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #26238 | 8:28 PM | 🔵 | MCP Server Architecture Maps Tools to Worker API Endpoints | ~355 |
|
||||
| #26138 | 7:55 PM | ✅ | Updated Comment to Reference progressive_description Tool | ~238 |
|
||||
| #26137 | " | ✅ | Completed Tool Description Minimization - All 9 Tools Updated | ~335 |
|
||||
| #26136 | " | ✅ | Minimized Get Session Tool Description | ~218 |
|
||||
| #26135 | " | ✅ | Minimized Get Batch Observations Tool Description | ~258 |
|
||||
| #26134 | " | ✅ | Minimized Get Observation Tool Description | ~228 |
|
||||
| #26133 | " | ✅ | Minimized Get Context Timeline Tool Description | ~245 |
|
||||
| #26132 | 7:54 PM | ✅ | Minimized Get Recent Context Tool Description | ~214 |
|
||||
| #26131 | " | ✅ | Minimized Timeline Tool Description | ~232 |
|
||||
| #26130 | " | ✅ | Minimized Search Tool Description | ~235 |
|
||||
| #26129 | " | ✅ | Renamed progressive_ix Tool to progressive_description with Minimized Description | ~296 |
|
||||
| #26128 | " | ✅ | Renamed Tool Endpoint Mapping from progressive_ix to progressive_description | ~229 |
|
||||
| #26127 | " | ✅ | Completed Format Parameter Removal from All Four MCP Tools | ~318 |
|
||||
| #26126 | 7:53 PM | ✅ | Removed Format Parameter from Get Recent Context Tool Schema | ~244 |
|
||||
| #26125 | " | ✅ | Removed Format Parameter from Timeline Tool Schema | ~248 |
|
||||
| #26124 | " | ✅ | Removed Format Parameter from Search Tool Schema | ~283 |
|
||||
| #26123 | " | 🔵 | Current MCP Server Tool Schema Analysis | ~337 |
|
||||
| #25815 | 5:31 PM | 🔵 | Comprehensive MCP Server and SKILL.md Structure Analysis | ~575 |
|
||||
| #25807 | 5:30 PM | 🔵 | MCP Server Architecture with 14 HTTP-Delegating Tools | ~545 |
|
||||
| #25788 | 5:15 PM | 🔵 | MCP Server Capabilities and Request Handlers | ~256 |
|
||||
|
||||
### Dec 17, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #29078 | 10:16 PM | ✅ | Updated get_recent_context tool schema to accept dynamic parameters | ~318 |
|
||||
| #29077 | 10:15 PM | ✅ | Updated timeline tool schema to accept dynamic parameters | ~292 |
|
||||
| #29076 | " | ✅ | Updated search tool schema to accept dynamic parameters | ~315 |
|
||||
| #28923 | 7:28 PM | 🔵 | MCP Server Architecture: Thin HTTP Wrapper Pattern | ~402 |
|
||||
</claude-mem-context>
|
||||
@@ -0,0 +1,63 @@
|
||||
<claude-mem-context>
|
||||
# Recent Activity
|
||||
|
||||
<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->
|
||||
|
||||
### Dec 10, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #23832 | 11:15 PM | 🔵 | Current worker-service.ts Lacks Admin Endpoints | ~393 |
|
||||
|
||||
### Dec 14, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #26740 | 11:26 PM | 🔵 | Worker Service Refactored to Orchestrator with Background Initialization | ~421 |
|
||||
| #26739 | 11:25 PM | 🔵 | Worker Service Architecture Uses Domain Services and Background Initialization | ~438 |
|
||||
| #26255 | 8:31 PM | 🔵 | Context Generator Timeline Rendering Logic Details File Grouping Implementation | ~397 |
|
||||
| #26251 | 8:30 PM | 🔵 | Worker Service Orchestrates Domain Services and Route Handlers | ~292 |
|
||||
| #26246 | 8:29 PM | 🔵 | Context Generator Implements Rich Date-Grouped Timeline Format | ~468 |
|
||||
|
||||
### Dec 17, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #28548 | 4:49 PM | 🔵 | Worker service cleanup method uses Unix-specific process management | ~323 |
|
||||
| #28446 | 4:23 PM | 🔵 | Worker Service Refactored to Orchestrator Pattern | ~529 |
|
||||
|
||||
### Dec 18, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #29340 | 3:11 PM | ✅ | Constructor Initialization Comment Updated | ~267 |
|
||||
| #29339 | " | ✅ | Class Member Comment Updated in WorkerService | ~267 |
|
||||
| #29338 | " | ✅ | Service Import Comment Updated | ~222 |
|
||||
| #29337 | 3:10 PM | ✅ | Terminology Update in Worker Service Documentation | ~268 |
|
||||
| #29239 | 12:11 AM | 🔵 | Worker Service Refactored as Domain-Driven Orchestrator | ~477 |
|
||||
|
||||
### Dec 20, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #30808 | 6:05 PM | 🔴 | Fixed worker readiness check to fail on initialization errors | ~315 |
|
||||
| #30800 | 6:03 PM | 🔵 | Dual Error Logging in Background Initialization | ~367 |
|
||||
| #30799 | " | 🔵 | Background Initialization Invocation Pattern | ~365 |
|
||||
| #30797 | " | 🔵 | Background Initialization Sequence and Error Handler Confirmed | ~450 |
|
||||
| #30795 | 6:02 PM | 🔵 | Readiness Endpoint Returns 503 During Initialization | ~397 |
|
||||
| #30793 | " | 🔵 | Dual Initialization State Tracking Pattern | ~388 |
|
||||
| #30791 | " | 🔵 | Worker Service Constructor Defers SearchRoutes Initialization | ~387 |
|
||||
| #30790 | " | 🔵 | Initialization Promise Resolver Pattern Located | ~321 |
|
||||
| #30788 | " | 🔵 | Worker Service Initialization Resolves Promise Despite Errors | ~388 |
|
||||
|
||||
### Jan 1, 2026
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #35654 | 11:29 PM | ✅ | Added APPROVED OVERRIDE annotation for instruction loading HTTP route error handler | ~339 |
|
||||
| #35651 | 11:28 PM | ✅ | Added APPROVED OVERRIDE annotation for shutdown error handler with process.exit | ~354 |
|
||||
| #35649 | " | ✅ | Added APPROVED OVERRIDE annotation for readiness check retry loop error handling | ~374 |
|
||||
| #35647 | " | ✅ | Added APPROVED OVERRIDE annotation for port availability probe error handling | ~327 |
|
||||
| #35646 | " | ✅ | Added APPROVED OVERRIDE annotation for Cursor context file update error handling | ~342 |
|
||||
| #35643 | 11:27 PM | ✅ | Added APPROVED OVERRIDE annotation for PID file cleanup error handling | ~320 |
|
||||
</claude-mem-context>
|
||||
@@ -0,0 +1,7 @@
|
||||
<claude-mem-context>
|
||||
# Recent Activity
|
||||
|
||||
<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->
|
||||
|
||||
*No recent activity*
|
||||
</claude-mem-context>
|
||||
@@ -17,7 +17,9 @@ import { loadContextConfig } from './ContextConfigLoader.js';
|
||||
import { calculateTokenEconomics } from './TokenCalculator.js';
|
||||
import {
|
||||
queryObservations,
|
||||
queryObservationsMulti,
|
||||
querySummaries,
|
||||
querySummariesMulti,
|
||||
getPriorSessionMessages,
|
||||
prepareSummariesForTimeline,
|
||||
buildTimeline,
|
||||
@@ -129,6 +131,9 @@ export async function generateContext(
|
||||
const cwd = input?.cwd ?? process.cwd();
|
||||
const project = getProjectName(cwd);
|
||||
|
||||
// Use provided projects array (for worktree support) or fall back to single project
|
||||
const projects = input?.projects || [project];
|
||||
|
||||
// Initialize database
|
||||
const db = initializeDatabase();
|
||||
if (!db) {
|
||||
@@ -136,9 +141,13 @@ export async function generateContext(
|
||||
}
|
||||
|
||||
try {
|
||||
// Query data
|
||||
const observations = queryObservations(db, project, config);
|
||||
const summaries = querySummaries(db, project, config);
|
||||
// Query data for all projects (supports worktree: parent + worktree combined)
|
||||
const observations = projects.length > 1
|
||||
? queryObservationsMulti(db, projects, config)
|
||||
: queryObservations(db, project, config);
|
||||
const summaries = projects.length > 1
|
||||
? querySummariesMulti(db, projects, config)
|
||||
: querySummaries(db, project, config);
|
||||
|
||||
// Handle empty state
|
||||
if (observations.length === 0 && summaries.length === 0) {
|
||||
|
||||
@@ -66,6 +66,65 @@ export function querySummaries(
|
||||
`).all(project, config.sessionCount + SUMMARY_LOOKAHEAD) as SessionSummary[];
|
||||
}
|
||||
|
||||
/**
|
||||
* Query observations from multiple projects (for worktree support)
|
||||
*
|
||||
* Returns observations from all specified projects, interleaved chronologically.
|
||||
* Used when running in a worktree to show both parent repo and worktree observations.
|
||||
*/
|
||||
export function queryObservationsMulti(
|
||||
db: SessionStore,
|
||||
projects: string[],
|
||||
config: ContextConfig
|
||||
): Observation[] {
|
||||
const typeArray = Array.from(config.observationTypes);
|
||||
const typePlaceholders = typeArray.map(() => '?').join(',');
|
||||
const conceptArray = Array.from(config.observationConcepts);
|
||||
const conceptPlaceholders = conceptArray.map(() => '?').join(',');
|
||||
|
||||
// Build IN clause for projects
|
||||
const projectPlaceholders = projects.map(() => '?').join(',');
|
||||
|
||||
return db.db.prepare(`
|
||||
SELECT
|
||||
id, memory_session_id, type, title, subtitle, narrative,
|
||||
facts, concepts, files_read, files_modified, discovery_tokens,
|
||||
created_at, created_at_epoch, project
|
||||
FROM observations
|
||||
WHERE project IN (${projectPlaceholders})
|
||||
AND type IN (${typePlaceholders})
|
||||
AND EXISTS (
|
||||
SELECT 1 FROM json_each(concepts)
|
||||
WHERE value IN (${conceptPlaceholders})
|
||||
)
|
||||
ORDER BY created_at_epoch DESC
|
||||
LIMIT ?
|
||||
`).all(...projects, ...typeArray, ...conceptArray, config.totalObservationCount) as Observation[];
|
||||
}
|
||||
|
||||
/**
|
||||
* Query session summaries from multiple projects (for worktree support)
|
||||
*
|
||||
* Returns summaries from all specified projects, interleaved chronologically.
|
||||
* Used when running in a worktree to show both parent repo and worktree summaries.
|
||||
*/
|
||||
export function querySummariesMulti(
|
||||
db: SessionStore,
|
||||
projects: string[],
|
||||
config: ContextConfig
|
||||
): SessionSummary[] {
|
||||
// Build IN clause for projects
|
||||
const projectPlaceholders = projects.map(() => '?').join(',');
|
||||
|
||||
return db.db.prepare(`
|
||||
SELECT id, memory_session_id, request, investigated, learned, completed, next_steps, created_at, created_at_epoch, project
|
||||
FROM session_summaries
|
||||
WHERE project IN (${projectPlaceholders})
|
||||
ORDER BY created_at_epoch DESC
|
||||
LIMIT ?
|
||||
`).all(...projects, config.sessionCount + SUMMARY_LOOKAHEAD) as SessionSummary[];
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert cwd path to dashed format for transcript lookup
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
<claude-mem-context>
|
||||
# Recent Activity
|
||||
|
||||
<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->
|
||||
|
||||
*No recent activity*
|
||||
</claude-mem-context>
|
||||
@@ -0,0 +1,26 @@
|
||||
<claude-mem-context>
|
||||
# Recent Activity
|
||||
|
||||
<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->
|
||||
|
||||
### Jan 3, 2026
|
||||
|
||||
**FooterRenderer.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #36390 | 8:50 PM | 🔄 | Comprehensive Monolith Refactor with Modular Architecture | ~724 |
|
||||
| #36283 | 8:02 PM | 🔄 | Phase 4: FooterRenderer Extracted with Conditional Display Logic | ~464 |
|
||||
|
||||
**TimelineRenderer.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #36292 | 8:04 PM | 🔄 | Phase 4 Module Inventory: 12 Files Created in Context Architecture | ~571 |
|
||||
| #36281 | 8:01 PM | 🔄 | Phase 4: TimelineRenderer Extracted with Dual Format Support | ~531 |
|
||||
|
||||
### Jan 5, 2026
|
||||
|
||||
**FooterRenderer.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #37545 | 4:47 PM | ✅ | Issue #544 Analysis Report Created for mem-search Skill Messaging Problem | ~480 |
|
||||
</claude-mem-context>
|
||||
@@ -93,7 +93,7 @@ export function renderDayTimeline(
|
||||
}
|
||||
} else {
|
||||
const obs = item.data as Observation;
|
||||
const file = extractFirstFile(obs.files_modified, cwd);
|
||||
const file = extractFirstFile(obs.files_modified, cwd, obs.files_read);
|
||||
const time = formatTime(obs.created_at);
|
||||
const showTime = time !== lastTime;
|
||||
const timeDisplay = showTime ? time : '';
|
||||
|
||||
@@ -11,6 +11,8 @@ export interface ContextInput {
|
||||
cwd?: string;
|
||||
hook_event_name?: string;
|
||||
source?: "startup" | "resume" | "clear" | "compact";
|
||||
/** Array of projects to query (for worktree support: [parent, worktree]) */
|
||||
projects?: string[];
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
@@ -56,6 +58,8 @@ export interface Observation {
|
||||
discovery_tokens: number | null;
|
||||
created_at: string;
|
||||
created_at_epoch: number;
|
||||
/** Project this observation belongs to (for multi-project queries) */
|
||||
project?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -71,6 +75,8 @@ export interface SessionSummary {
|
||||
next_steps: string | null;
|
||||
created_at: string;
|
||||
created_at_epoch: number;
|
||||
/** Project this summary belongs to (for multi-project queries) */
|
||||
project?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,127 @@
|
||||
<claude-mem-context>
|
||||
# Recent Activity
|
||||
|
||||
<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->
|
||||
|
||||
### Dec 21, 2025
|
||||
|
||||
**types.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #31766 | 11:11 PM | 🟣 | Expansión de ModePrompts con campos de configuración granular | ~327 |
|
||||
| #31765 | 11:10 PM | 🔵 | Sistema de configuración de modos con interfaces TypeScript | ~321 |
|
||||
| #31764 | 11:09 PM | ⚖️ | Consulta arquitectónica con Gemini sobre reconstrucción completa de prompts por modos | ~469 |
|
||||
| #31704 | 9:37 PM | 🔵 | Mode system architecture discovered in claude-mem | ~457 |
|
||||
| #31428 | 6:56 PM | 🔵 | Domain Types Define Observation System Interfaces | ~292 |
|
||||
|
||||
**ModeManager.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #31747 | 10:43 PM | 🔵 | PR #412 Code Review Identifies Two Critical Bugs in Mode System | ~545 |
|
||||
| #31746 | 10:42 PM | 🔵 | PR #412 Documentation Audit Identifies Comment Quality Issues | ~535 |
|
||||
| #31743 | 10:36 PM | 🔵 | PR #412 proposes mode system with inheritance and multilingual support | ~523 |
|
||||
| #31739 | 10:28 PM | 🟣 | Mode Inheritance System with Parent-Override Pattern | ~373 |
|
||||
| #31732 | 10:05 PM | 🟣 | Implemented mode inheritance system with parent-override pattern | ~430 |
|
||||
| #31731 | " | 🟣 | Added deep merge infrastructure for mode inheritance | ~313 |
|
||||
| #31729 | 9:55 PM | 🟣 | Mode Inheritance Parser Implementation | ~299 |
|
||||
| #31728 | 9:54 PM | 🔵 | ModeManager System Architecture | ~314 |
|
||||
| #31727 | " | ⚖️ | Mode Inheritance System for Multilingual Support | ~509 |
|
||||
| #31725 | 9:51 PM | ⚖️ | Mode Inheritance System Architecture | ~509 |
|
||||
| #31709 | 9:39 PM | 🔵 | Mode system architecture comprehensively documented | ~588 |
|
||||
| #31697 | 9:24 PM | 🔵 | Root Cause Found: getPackageRoot() Returns Wrong Directory for ModeManager | ~399 |
|
||||
| #31662 | 8:56 PM | 🔵 | ModeManager Path Resolution Dependency on getPackageRoot | ~361 |
|
||||
| #31649 | 8:46 PM | 🟣 | ModeManager singleton implements dynamic mode profile loading | ~363 |
|
||||
| #31446 | 7:22 PM | 🔵 | ModeManager Loading System Investigation | ~297 |
|
||||
| #31445 | 7:21 PM | 🔵 | ModeManager Icon Resolution Methods | ~358 |
|
||||
| #31427 | 6:56 PM | 🔵 | ModeManager Imports ObservationType and ObservationConcept Types | ~192 |
|
||||
| #31422 | 6:50 PM | 🔵 | Observation Metadata Constants Usage Across Codebase | ~366 |
|
||||
| #31407 | 6:26 PM | 🔵 | ModeManager provides observation type metadata access methods | ~283 |
|
||||
|
||||
### Dec 22, 2025
|
||||
|
||||
**types.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #31896 | 7:18 PM | ✅ | Commit amendé avec les nouveaux types pour support multilingue des résumés | ~290 |
|
||||
| #31895 | " | 🟣 | Ajout de quatre champs de prompts de résumé à l'interface ModePrompts | ~347 |
|
||||
| #31894 | " | 🔵 | Interface ModePrompts contient les placeholders XML pour résumés | ~354 |
|
||||
| #31808 | 6:07 PM | 🟣 | Added customizable XML placeholder fields to ModePrompts interface | ~432 |
|
||||
| #31804 | 4:53 PM | ⚖️ | Refined scope for prompt placeholder extraction to mode configuration | ~439 |
|
||||
| #31803 | 4:52 PM | 🔵 | Explored prompt system architecture for placeholder customization | ~472 |
|
||||
| #31800 | 4:51 PM | ⚖️ | Initiated design task to extract hardcoded placeholders into mode configuration | ~441 |
|
||||
| #31797 | 4:49 PM | 🔵 | ModePrompts interface defines high-level prompt sections but not field placeholders | ~364 |
|
||||
| #31793 | 4:41 PM | 🔵 | Completed comprehensive exploration of mode system architecture | ~525 |
|
||||
| #31784 | 4:37 PM | 🔵 | Examined ModeConfig type definitions for prompt customization | ~317 |
|
||||
|
||||
**ModeManager.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #31790 | 4:39 PM | 🔵 | Identified files that interact with ModeManager and prompts | ~332 |
|
||||
| #31785 | 4:37 PM | 🔵 | Examined ModeManager for mode loading and inheritance system | ~286 |
|
||||
|
||||
### Dec 23, 2025
|
||||
|
||||
**ModeManager.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #32033 | 7:50 PM | ⚖️ | Mode-to-Settings Auto-Sync Architecture Designed | ~583 |
|
||||
| #32032 | 7:45 PM | 🔵 | Queue System Bug: Mode Loaded Once at Startup Prevents Processing | ~450 |
|
||||
| #32026 | 7:39 PM | 🔵 | Email Investigation Mode Configuration Located | ~300 |
|
||||
| #32025 | 7:35 PM | 🔵 | ModeManager Implementation with Inheritance System | ~474 |
|
||||
|
||||
### Dec 24, 2025
|
||||
|
||||
**ModeManager.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #32214 | 8:17 PM | 🔵 | ModeManager singleton handles mode profiles with inheritance support | ~483 |
|
||||
|
||||
### Dec 25, 2025
|
||||
|
||||
**ModeManager.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #32701 | 9:00 PM | 🔵 | Test Coverage Report Generated | ~471 |
|
||||
| #32580 | 8:22 PM | 🔵 | Grep for resetStuckMessages and processing | ~242 |
|
||||
|
||||
**types.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #32558 | 8:18 PM | 🔵 | Identified files containing 'summary' or 'Summary' | ~167 |
|
||||
|
||||
### Dec 31, 2025
|
||||
|
||||
**types.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #34631 | 3:02 PM | 🟣 | Context-Preservation Workflow Design Documents Created | ~729 |
|
||||
| #34610 | 2:58 PM | 🔵 | Mode Configuration System Architecture for Memory Agent Behavior | ~570 |
|
||||
|
||||
### Jan 1, 2026
|
||||
|
||||
**ModeManager.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #35433 | 8:43 PM | 🔵 | Try-Catch Block Distribution Across Services | ~372 |
|
||||
|
||||
### Jan 2, 2026
|
||||
|
||||
**ModeManager.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #35951 | 4:42 PM | 🔵 | Multi-Layer Service Architecture Discovery | ~395 |
|
||||
|
||||
### Jan 3, 2026
|
||||
|
||||
**ModeManager.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #36539 | 9:39 PM | 🔵 | ModeManager Singleton Pattern with Inheritance | ~343 |
|
||||
|
||||
### Jan 5, 2026
|
||||
|
||||
**ModeManager.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #37665 | 5:52 PM | 🔵 | Codebase uses dependency injection and lazy initialization patterns to avoid circular dependencies | ~548 |
|
||||
</claude-mem-context>
|
||||
@@ -0,0 +1,37 @@
|
||||
<claude-mem-context>
|
||||
# Recent Activity
|
||||
|
||||
<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->
|
||||
|
||||
### Jan 4, 2026
|
||||
|
||||
**FolderDiscovery.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #37021 | 4:59 PM | ✅ | Deleted Redundant Folder Index Service Directory | ~299 |
|
||||
| #37011 | 4:50 PM | 🔵 | FolderDiscovery extracts folders from observations and applies depth, exclusion, and activity filters | ~433 |
|
||||
|
||||
**ClaudeMdGenerator.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #37012 | 4:51 PM | 🔵 | ClaudeMdGenerator writes tag-wrapped timeline markdown while preserving manual content | ~446 |
|
||||
| #36981 | 4:25 PM | 🔵 | ClaudeMdGenerator creates and updates CLAUDE.md files with timeline content | ~336 |
|
||||
|
||||
**types.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #37010 | 4:50 PM | 🔵 | Type definitions specify folder-index configuration schema and timeline data structures | ~349 |
|
||||
|
||||
**FolderTimelineCompiler.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #37009 | 4:50 PM | 🔵 | FolderTimelineCompiler queries database and groups activity chronologically by date | ~419 |
|
||||
| #37002 | 4:45 PM | 🔴 | Fixed session file deduplication and summary selection in FolderTimelineCompiler | ~306 |
|
||||
| #37001 | " | 🔴 | Fixed FolderTimelineCompiler to generate concise summaries and deduplicate files | ~284 |
|
||||
|
||||
**FolderIndexOrchestrator.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #37008 | 4:50 PM | 🔵 | FolderIndexOrchestrator implements event-driven regeneration triggered by observation saves | ~418 |
|
||||
| #36983 | 4:26 PM | 🔵 | FolderIndexOrchestrator coordinates automatic CLAUDE.md regeneration after observation saves | ~367 |
|
||||
</claude-mem-context>
|
||||
@@ -0,0 +1,12 @@
|
||||
<claude-mem-context>
|
||||
# Recent Activity
|
||||
|
||||
<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->
|
||||
|
||||
### Jan 4, 2026
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #36864 | 1:52 AM | 🔵 | ProcessManager Module Imports Reviewed | ~245 |
|
||||
| #36860 | 1:50 AM | 🔵 | ProcessManager Source Code Reviewed for WMIC Implementation | ~608 |
|
||||
</claude-mem-context>
|
||||
@@ -0,0 +1,7 @@
|
||||
<claude-mem-context>
|
||||
# Recent Activity
|
||||
|
||||
<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->
|
||||
|
||||
*No recent activity*
|
||||
</claude-mem-context>
|
||||
@@ -0,0 +1,60 @@
|
||||
<claude-mem-context>
|
||||
# Recent Activity
|
||||
|
||||
<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->
|
||||
|
||||
### Dec 28, 2025
|
||||
|
||||
**SessionQueueProcessor.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #33396 | 9:53 PM | ✅ | Queue refactoring touched 12 files with net addition of 1021 lines | ~402 |
|
||||
| #33395 | " | 🟣 | Queue system refactored with atomic message processing | ~487 |
|
||||
| #33374 | 7:12 PM | 🟣 | Refactored Queue System with Atomic Message Claiming and In-Memory State Elimination | ~477 |
|
||||
| #33384 | " | 🔵 | Confirmed `SessionQueueProcessor` Integration in `SessionManager` | ~289 |
|
||||
| #33387 | " | ⚖️ | Formulated Plan to Address PR #470 Review Issues | ~441 |
|
||||
|
||||
### Dec 30, 2025
|
||||
|
||||
**SessionQueueProcessor.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #34409 | 1:55 PM | 🔵 | SessionQueueProcessor Event-Driven Message Iteration | ~433 |
|
||||
| #34391 | 1:40 PM | 🔵 | SessionQueueProcessor Respects Abort Signal But Only Stops Iterator Loop | ~382 |
|
||||
|
||||
### Jan 1, 2026
|
||||
|
||||
**SessionQueueProcessor.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #35521 | 9:35 PM | 🔵 | Queue Processor Uses Database-Backed Message Store | ~316 |
|
||||
| #35433 | 8:43 PM | 🔵 | Try-Catch Block Distribution Across Services | ~372 |
|
||||
| #35432 | " | 🔵 | Services Directory Structure Mapped | ~268 |
|
||||
|
||||
### Jan 2, 2026
|
||||
|
||||
**SessionQueueProcessor.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #35951 | 4:42 PM | 🔵 | Multi-Layer Service Architecture Discovery | ~395 |
|
||||
| #35887 | 2:47 PM | 🔵 | SessionQueueProcessor Has Error Recovery But Doesn't Mark Failed | ~353 |
|
||||
| #35851 | 2:32 PM | 🔵 | Queue Processor Uses Atomic Claiming with Event-Driven Wake-Up | ~464 |
|
||||
|
||||
### Jan 3, 2026
|
||||
|
||||
**SessionQueueProcessor.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #36343 | 8:29 PM | 🔄 | SessionQueueProcessor Updated to Use claimAndDelete | ~299 |
|
||||
| #36340 | 8:28 PM | 🔵 | Complete Duplicate Bug Analysis via Explore Agent | ~435 |
|
||||
| #36323 | 8:25 PM | 🔵 | Message Queue Architecture Scope Expanded | ~302 |
|
||||
| #36314 | " | 🔵 | Message Queue Processing Duplicate Bug Investigation | ~316 |
|
||||
|
||||
### Jan 4, 2026
|
||||
|
||||
**SessionQueueProcessor.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #36713 | 12:11 AM | 🔵 | Issue #520 Stuck Messages Already Resolved | ~569 |
|
||||
| #36711 | " | 🔵 | Issue #520 Stuck Messages Analysis - Already Resolved | ~526 |
|
||||
</claude-mem-context>
|
||||
@@ -0,0 +1,34 @@
|
||||
<claude-mem-context>
|
||||
# Recent Activity
|
||||
|
||||
<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->
|
||||
|
||||
### Jan 3, 2026
|
||||
|
||||
**Server.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #36689 | 11:56 PM | 🔵 | PR #538 Review Findings - Modular Architecture Refactor | ~590 |
|
||||
| #36583 | 9:57 PM | 🟣 | Server Test Suite Created | ~485 |
|
||||
| #36427 | 8:59 PM | 🔵 | Server Class Architecture and Route Registration | ~447 |
|
||||
|
||||
**ErrorHandler.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #36581 | 9:57 PM | 🟣 | ErrorHandler Test Suite Created for Phase 6 | ~444 |
|
||||
| #36454 | 9:03 PM | 🔵 | Centralized Express Error Handling | ~446 |
|
||||
| #36390 | 8:50 PM | 🔄 | Comprehensive Monolith Refactor with Modular Architecture | ~724 |
|
||||
|
||||
**index.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #36575 | 9:55 PM | 🔵 | Server Layer API Documentation for Phase 6 | ~521 |
|
||||
|
||||
### Jan 5, 2026
|
||||
|
||||
**Server.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #37758 | 6:25 PM | ⚖️ | Integration Test Design for Four Critical Testing Gaps | ~729 |
|
||||
| #37533 | 4:44 PM | 🔵 | Windows IPC Detection Logic and Managed Mode Handling | ~427 |
|
||||
</claude-mem-context>
|
||||
@@ -0,0 +1,95 @@
|
||||
<claude-mem-context>
|
||||
# Recent Activity
|
||||
|
||||
<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->
|
||||
|
||||
### Dec 8, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #22310 | 9:46 PM | 🟣 | Complete Hook Lifecycle Documentation Generated | ~603 |
|
||||
| #22305 | 9:45 PM | 🔵 | Session Summary Storage and Status Lifecycle | ~472 |
|
||||
| #22304 | " | 🔵 | Session Creation Idempotency and Observation Storage | ~481 |
|
||||
| #22303 | " | 🔵 | SessionStore CRUD Operations for Hook Integration | ~392 |
|
||||
| #22300 | 9:44 PM | 🔵 | SessionStore Database Management and Schema Migrations | ~455 |
|
||||
| #22299 | " | 🔵 | Database Schema and Entity Types | ~460 |
|
||||
| #21976 | 5:24 PM | 🟣 | storeObservation Saves tool_use_id to Database | ~298 |
|
||||
|
||||
### Dec 10, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #23808 | 10:42 PM | 🔵 | migrations.ts Already Migrated to bun:sqlite | ~312 |
|
||||
| #23807 | " | 🔵 | SessionSearch.ts Already Migrated to bun:sqlite | ~321 |
|
||||
| #23805 | " | 🔵 | Database.ts Already Migrated to bun:sqlite | ~290 |
|
||||
| #23784 | 9:59 PM | ✅ | SessionStore.ts db.pragma() Converted to db.query().all() Pattern | ~198 |
|
||||
| #23783 | 9:58 PM | ✅ | SessionStore.ts Migration004 Multi-Statement db.exec() Converted to db.run() | ~220 |
|
||||
| #23782 | " | ✅ | SessionStore.ts initializeSchema() db.exec() Converted to db.run() | ~197 |
|
||||
| #23781 | " | ✅ | SessionStore.ts Constructor PRAGMA Calls Converted to db.run() | ~215 |
|
||||
| #23780 | " | ✅ | SessionStore.ts Type Annotation Updated | ~183 |
|
||||
| #23779 | " | ✅ | SessionStore.ts Import Updated to bun:sqlite | ~237 |
|
||||
| #23778 | 9:57 PM | ✅ | Database.ts Import Updated to bun:sqlite | ~177 |
|
||||
| #23777 | " | 🔵 | SessionStore.ts Current Implementation - better-sqlite3 Import and API Usage | ~415 |
|
||||
| #23776 | " | 🔵 | migrations.ts Current Implementation - better-sqlite3 Import | ~285 |
|
||||
| #23775 | " | 🔵 | Database.ts Current Implementation - better-sqlite3 Import | ~286 |
|
||||
| #23774 | " | 🔵 | SessionSearch.ts Current Implementation - better-sqlite3 Import | ~309 |
|
||||
| #23671 | 8:36 PM | 🔵 | getUserPromptsByIds Method Implementation with Filtering and Ordering | ~326 |
|
||||
| #23670 | " | 🔵 | getUserPromptsByIds Method Location in SessionStore | ~145 |
|
||||
| #23635 | 8:10 PM | 🔴 | Fixed SessionStore.ts Concepts Filter SQL Parameter Bug | ~297 |
|
||||
| #23634 | " | 🔵 | SessionStore.ts Concepts Filter Bug Confirmed at Line 849 | ~356 |
|
||||
| #23522 | 5:27 PM | 🔵 | Complete TypeScript Type Definitions for Database Entities | ~433 |
|
||||
| #23521 | " | 🔵 | Database Schema Structure with 7 Migration Versions | ~461 |
|
||||
|
||||
### Dec 18, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #29868 | 8:19 PM | 🔵 | SessionStore Architecture Review for Mode Metadata Addition | ~350 |
|
||||
| #29243 | 12:13 AM | 🔵 | Observations Table Schema Migration: Text Field Made Nullable | ~496 |
|
||||
| #29241 | 12:12 AM | 🔵 | Migration001: Core Schema for Sessions, Memories, Overviews, Diagnostics, Transcripts | ~555 |
|
||||
| #29238 | 12:11 AM | 🔵 | Observation Type Schema Evolution: Five to Six Types | ~331 |
|
||||
| #29237 | " | 🔵 | SQLite SessionStore with Schema Migrations and WAL Mode | ~520 |
|
||||
|
||||
### Dec 21, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #31622 | 8:26 PM | 🔄 | Completed SessionStore logging standardization | ~270 |
|
||||
| #31621 | " | 🔄 | Standardized error logging for boundary timestamps query | ~253 |
|
||||
| #31620 | " | 🔄 | Standardized error logging in getTimelineAroundObservation | ~252 |
|
||||
| #31619 | " | 🔄 | Replaced console.log with logger.debug in SessionStore | ~263 |
|
||||
|
||||
### Dec 27, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #33213 | 9:04 PM | 🔵 | SessionStore Implements KISS Session ID Threading via INSERT OR IGNORE Pattern | ~673 |
|
||||
|
||||
### Dec 28, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #33548 | 10:59 PM | ✅ | Reverted memory_session_id NULL Initialization to contentSessionId Placeholder | ~421 |
|
||||
| #33546 | 10:57 PM | 🔴 | Fixed createSDKSession to Initialize memory_session_id as NULL | ~406 |
|
||||
| #33545 | " | 🔵 | createSDKSession Sets memory_session_id Equal to content_session_id Initially | ~378 |
|
||||
| #33544 | " | 🔵 | SessionStore Migration 17 Already Renamed Session ID Columns | ~451 |
|
||||
|
||||
### Jan 2, 2026
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #36028 | 9:20 PM | 🔄 | Try-Catch Block Removed from Database Migration | ~291 |
|
||||
|
||||
### Jan 3, 2026
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #36653 | 11:03 PM | 🔵 | storeObservation Method Signature Shows Parameter Named memorySessionId | ~474 |
|
||||
| #36652 | " | 🔵 | createSDKSession Implementation Confirms NULL Initialization With Security Rationale | ~488 |
|
||||
| #36650 | 11:02 PM | 🔵 | Phase 1 Analysis Reveals Implementation-Test Mismatch on NULL vs Placeholder Initialization | ~687 |
|
||||
| #36649 | " | 🔵 | SessionStore Implementation Reveals NULL-Based Memory Session ID Initialization Pattern | ~770 |
|
||||
| #36175 | 6:52 PM | ✅ | MigrationRunner Re-exported from Migrations.ts | ~405 |
|
||||
| #36172 | " | 🔵 | Migrations.ts Contains Legacy Migration System | ~650 |
|
||||
| #36163 | 6:48 PM | 🔵 | SessionStore Method Inventory and Extraction Boundaries | ~692 |
|
||||
| #36162 | 6:47 PM | 🔵 | SessionStore Architecture and Migration History | ~593 |
|
||||
</claude-mem-context>
|
||||
@@ -96,6 +96,11 @@ export class PendingMessageStore {
|
||||
// Delete immediately - no "processing" state needed
|
||||
const deleteStmt = this.db.prepare('DELETE FROM pending_messages WHERE id = ?');
|
||||
deleteStmt.run(msg.id);
|
||||
|
||||
// Log claim with minimal info (avoid logging full payload)
|
||||
logger.info('QUEUE', `CLAIMED | sessionDbId=${sessionId} | messageId=${msg.id} | type=${msg.message_type}`, {
|
||||
sessionId: sessionId
|
||||
});
|
||||
}
|
||||
return msg;
|
||||
});
|
||||
|
||||
@@ -336,15 +336,64 @@ export class SessionSearch {
|
||||
return this.db.prepare(sql).all(...params) as ObservationSearchResult[];
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a file is a direct child of a folder (not in a subfolder)
|
||||
*/
|
||||
private isDirectChild(filePath: string, folderPath: string): boolean {
|
||||
if (!filePath.startsWith(folderPath + '/')) return false;
|
||||
const remainder = filePath.slice(folderPath.length + 1);
|
||||
return !remainder.includes('/');
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if an observation has any files that are direct children of the folder
|
||||
*/
|
||||
private hasDirectChildFile(obs: ObservationSearchResult, folderPath: string): boolean {
|
||||
const checkFiles = (filesJson: string | null): boolean => {
|
||||
if (!filesJson) return false;
|
||||
try {
|
||||
const files = JSON.parse(filesJson);
|
||||
if (Array.isArray(files)) {
|
||||
return files.some(f => this.isDirectChild(f, folderPath));
|
||||
}
|
||||
} catch {}
|
||||
return false;
|
||||
};
|
||||
|
||||
return checkFiles(obs.files_modified) || checkFiles(obs.files_read);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a session has any files that are direct children of the folder
|
||||
*/
|
||||
private hasDirectChildFileSession(session: SessionSummarySearchResult, folderPath: string): boolean {
|
||||
const checkFiles = (filesJson: string | null): boolean => {
|
||||
if (!filesJson) return false;
|
||||
try {
|
||||
const files = JSON.parse(filesJson);
|
||||
if (Array.isArray(files)) {
|
||||
return files.some(f => this.isDirectChild(f, folderPath));
|
||||
}
|
||||
} catch {}
|
||||
return false;
|
||||
};
|
||||
|
||||
return checkFiles(session.files_read) || checkFiles(session.files_edited);
|
||||
}
|
||||
|
||||
/**
|
||||
* Find observations and summaries by file path
|
||||
* When isFolder=true, only returns results with files directly in the folder (not subfolders)
|
||||
*/
|
||||
findByFile(filePath: string, options: SearchOptions = {}): {
|
||||
observations: ObservationSearchResult[];
|
||||
sessions: SessionSummarySearchResult[];
|
||||
} {
|
||||
const params: any[] = [];
|
||||
const { limit = 50, offset = 0, orderBy = 'date_desc', ...filters } = options;
|
||||
const { limit = 50, offset = 0, orderBy = 'date_desc', isFolder = false, ...filters } = options;
|
||||
|
||||
// Query more results if we're filtering to direct children
|
||||
const queryLimit = isFolder ? limit * 3 : limit;
|
||||
|
||||
// Add file to filters
|
||||
const fileFilters = { ...filters, files: filePath };
|
||||
@@ -359,9 +408,14 @@ export class SessionSearch {
|
||||
LIMIT ? OFFSET ?
|
||||
`;
|
||||
|
||||
params.push(limit, offset);
|
||||
params.push(queryLimit, offset);
|
||||
|
||||
const observations = this.db.prepare(observationsSql).all(...params) as ObservationSearchResult[];
|
||||
let observations = this.db.prepare(observationsSql).all(...params) as ObservationSearchResult[];
|
||||
|
||||
// Post-filter to direct children if isFolder mode
|
||||
if (isFolder) {
|
||||
observations = observations.filter(obs => this.hasDirectChildFile(obs, filePath)).slice(0, limit);
|
||||
}
|
||||
|
||||
// For session summaries, search files_read and files_edited
|
||||
const sessionParams: any[] = [];
|
||||
@@ -403,9 +457,14 @@ export class SessionSearch {
|
||||
LIMIT ? OFFSET ?
|
||||
`;
|
||||
|
||||
sessionParams.push(limit, offset);
|
||||
sessionParams.push(queryLimit, offset);
|
||||
|
||||
const sessions = this.db.prepare(sessionsSql).all(...sessionParams) as SessionSummarySearchResult[];
|
||||
let sessions = this.db.prepare(sessionsSql).all(...sessionParams) as SessionSummarySearchResult[];
|
||||
|
||||
// Post-filter to direct children if isFolder mode
|
||||
if (isFolder) {
|
||||
sessions = sessions.filter(s => this.hasDirectChildFileSession(s, filePath)).slice(0, limit);
|
||||
}
|
||||
|
||||
return { observations, sessions };
|
||||
}
|
||||
|
||||
@@ -152,7 +152,7 @@ export class SessionStore {
|
||||
|
||||
if (!hasWorkerPort) {
|
||||
this.db.run('ALTER TABLE sdk_sessions ADD COLUMN worker_port INTEGER');
|
||||
logger.info('DB', 'Added worker_port column to sdk_sessions table');
|
||||
logger.debug('DB', 'Added worker_port column to sdk_sessions table');
|
||||
}
|
||||
|
||||
// Record migration
|
||||
@@ -173,7 +173,7 @@ export class SessionStore {
|
||||
|
||||
if (!hasPromptCounter) {
|
||||
this.db.run('ALTER TABLE sdk_sessions ADD COLUMN prompt_counter INTEGER DEFAULT 0');
|
||||
logger.info('DB', 'Added prompt_counter column to sdk_sessions table');
|
||||
logger.debug('DB', 'Added prompt_counter column to sdk_sessions table');
|
||||
}
|
||||
|
||||
// Check observations for prompt_number
|
||||
@@ -182,7 +182,7 @@ export class SessionStore {
|
||||
|
||||
if (!obsHasPromptNumber) {
|
||||
this.db.run('ALTER TABLE observations ADD COLUMN prompt_number INTEGER');
|
||||
logger.info('DB', 'Added prompt_number column to observations table');
|
||||
logger.debug('DB', 'Added prompt_number column to observations table');
|
||||
}
|
||||
|
||||
// Check session_summaries for prompt_number
|
||||
@@ -191,7 +191,7 @@ export class SessionStore {
|
||||
|
||||
if (!sumHasPromptNumber) {
|
||||
this.db.run('ALTER TABLE session_summaries ADD COLUMN prompt_number INTEGER');
|
||||
logger.info('DB', 'Added prompt_number column to session_summaries table');
|
||||
logger.debug('DB', 'Added prompt_number column to session_summaries table');
|
||||
}
|
||||
|
||||
// Record migration
|
||||
@@ -216,7 +216,7 @@ export class SessionStore {
|
||||
return;
|
||||
}
|
||||
|
||||
logger.info('DB', 'Removing UNIQUE constraint from session_summaries.memory_session_id');
|
||||
logger.debug('DB', 'Removing UNIQUE constraint from session_summaries.memory_session_id');
|
||||
|
||||
// Begin transaction
|
||||
this.db.run('BEGIN TRANSACTION');
|
||||
@@ -270,7 +270,7 @@ export class SessionStore {
|
||||
// Record migration
|
||||
this.db.prepare('INSERT OR IGNORE INTO schema_versions (version, applied_at) VALUES (?, ?)').run(7, new Date().toISOString());
|
||||
|
||||
logger.info('DB', 'Successfully removed UNIQUE constraint from session_summaries.memory_session_id');
|
||||
logger.debug('DB', 'Successfully removed UNIQUE constraint from session_summaries.memory_session_id');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -291,7 +291,7 @@ export class SessionStore {
|
||||
return;
|
||||
}
|
||||
|
||||
logger.info('DB', 'Adding hierarchical fields to observations table');
|
||||
logger.debug('DB', 'Adding hierarchical fields to observations table');
|
||||
|
||||
// Add new columns
|
||||
this.db.run(`
|
||||
@@ -307,7 +307,7 @@ export class SessionStore {
|
||||
// Record migration
|
||||
this.db.prepare('INSERT OR IGNORE INTO schema_versions (version, applied_at) VALUES (?, ?)').run(8, new Date().toISOString());
|
||||
|
||||
logger.info('DB', 'Successfully added hierarchical fields to observations table');
|
||||
logger.debug('DB', 'Successfully added hierarchical fields to observations table');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -329,7 +329,7 @@ export class SessionStore {
|
||||
return;
|
||||
}
|
||||
|
||||
logger.info('DB', 'Making observations.text nullable');
|
||||
logger.debug('DB', 'Making observations.text nullable');
|
||||
|
||||
// Begin transaction
|
||||
this.db.run('BEGIN TRANSACTION');
|
||||
@@ -385,7 +385,7 @@ export class SessionStore {
|
||||
// Record migration
|
||||
this.db.prepare('INSERT OR IGNORE INTO schema_versions (version, applied_at) VALUES (?, ?)').run(9, new Date().toISOString());
|
||||
|
||||
logger.info('DB', 'Successfully made observations.text nullable');
|
||||
logger.debug('DB', 'Successfully made observations.text nullable');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -404,7 +404,7 @@ export class SessionStore {
|
||||
return;
|
||||
}
|
||||
|
||||
logger.info('DB', 'Creating user_prompts table with FTS5 support');
|
||||
logger.debug('DB', 'Creating user_prompts table with FTS5 support');
|
||||
|
||||
// Begin transaction
|
||||
this.db.run('BEGIN TRANSACTION');
|
||||
@@ -462,7 +462,7 @@ export class SessionStore {
|
||||
// Record migration
|
||||
this.db.prepare('INSERT OR IGNORE INTO schema_versions (version, applied_at) VALUES (?, ?)').run(10, new Date().toISOString());
|
||||
|
||||
logger.info('DB', 'Successfully created user_prompts table with FTS5 support');
|
||||
logger.debug('DB', 'Successfully created user_prompts table with FTS5 support');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -481,7 +481,7 @@ export class SessionStore {
|
||||
|
||||
if (!obsHasDiscoveryTokens) {
|
||||
this.db.run('ALTER TABLE observations ADD COLUMN discovery_tokens INTEGER DEFAULT 0');
|
||||
logger.info('DB', 'Added discovery_tokens column to observations table');
|
||||
logger.debug('DB', 'Added discovery_tokens column to observations table');
|
||||
}
|
||||
|
||||
// Check if discovery_tokens column exists in session_summaries table
|
||||
@@ -490,7 +490,7 @@ export class SessionStore {
|
||||
|
||||
if (!sumHasDiscoveryTokens) {
|
||||
this.db.run('ALTER TABLE session_summaries ADD COLUMN discovery_tokens INTEGER DEFAULT 0');
|
||||
logger.info('DB', 'Added discovery_tokens column to session_summaries table');
|
||||
logger.debug('DB', 'Added discovery_tokens column to session_summaries table');
|
||||
}
|
||||
|
||||
// Record migration only after successful column verification/addition
|
||||
@@ -514,7 +514,7 @@ export class SessionStore {
|
||||
return;
|
||||
}
|
||||
|
||||
logger.info('DB', 'Creating pending_messages table');
|
||||
logger.debug('DB', 'Creating pending_messages table');
|
||||
|
||||
this.db.run(`
|
||||
CREATE TABLE pending_messages (
|
||||
@@ -544,7 +544,7 @@ export class SessionStore {
|
||||
|
||||
this.db.prepare('INSERT OR IGNORE INTO schema_versions (version, applied_at) VALUES (?, ?)').run(16, new Date().toISOString());
|
||||
|
||||
logger.info('DB', 'pending_messages table created successfully');
|
||||
logger.debug('DB', 'pending_messages table created successfully');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -559,7 +559,7 @@ export class SessionStore {
|
||||
const applied = this.db.prepare('SELECT version FROM schema_versions WHERE version = ?').get(17) as SchemaVersion | undefined;
|
||||
if (applied) return;
|
||||
|
||||
logger.info('DB', 'Checking session ID columns for semantic clarity rename');
|
||||
logger.debug('DB', 'Checking session ID columns for semantic clarity rename');
|
||||
|
||||
let renamesPerformed = 0;
|
||||
|
||||
@@ -577,7 +577,7 @@ export class SessionStore {
|
||||
if (hasOldCol) {
|
||||
// SQLite 3.25+ supports ALTER TABLE RENAME COLUMN
|
||||
this.db.run(`ALTER TABLE ${table} RENAME COLUMN ${oldCol} TO ${newCol}`);
|
||||
logger.info('DB', `Renamed ${table}.${oldCol} to ${newCol}`);
|
||||
logger.debug('DB', `Renamed ${table}.${oldCol} to ${newCol}`);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -606,9 +606,9 @@ export class SessionStore {
|
||||
this.db.prepare('INSERT OR IGNORE INTO schema_versions (version, applied_at) VALUES (?, ?)').run(17, new Date().toISOString());
|
||||
|
||||
if (renamesPerformed > 0) {
|
||||
logger.info('DB', `Successfully renamed ${renamesPerformed} session ID columns`);
|
||||
logger.debug('DB', `Successfully renamed ${renamesPerformed} session ID columns`);
|
||||
} else {
|
||||
logger.info('DB', 'No session ID column renames needed (already up to date)');
|
||||
logger.debug('DB', 'No session ID column renames needed (already up to date)');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -639,7 +639,7 @@ export class SessionStore {
|
||||
|
||||
if (!hasColumn) {
|
||||
this.db.run('ALTER TABLE pending_messages ADD COLUMN failed_at_epoch INTEGER');
|
||||
logger.info('DB', 'Added failed_at_epoch column to pending_messages table');
|
||||
logger.debug('DB', 'Added failed_at_epoch column to pending_messages table');
|
||||
}
|
||||
|
||||
this.db.prepare('INSERT OR IGNORE INTO schema_versions (version, applied_at) VALUES (?, ?)').run(20, new Date().toISOString());
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
<claude-mem-context>
|
||||
# Recent Activity
|
||||
|
||||
<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->
|
||||
|
||||
### Jan 3, 2026
|
||||
|
||||
**bulk.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #36670 | 11:37 PM | ✅ | Resolved merge conflicts by accepting branch changes for 39 files | ~435 |
|
||||
| #36469 | 9:04 PM | 🔵 | Bulk Import with Duplicate Detection | ~451 |
|
||||
| #36390 | 8:50 PM | 🔄 | Comprehensive Monolith Refactor with Modular Architecture | ~724 |
|
||||
</claude-mem-context>
|
||||
@@ -0,0 +1,15 @@
|
||||
<claude-mem-context>
|
||||
# Recent Activity
|
||||
|
||||
<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->
|
||||
|
||||
### Jan 3, 2026
|
||||
|
||||
**runner.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #36487 | 9:13 PM | 🔴 | Fixed Foreign Key Constraint Issues in Observations Test Suite | ~677 |
|
||||
| #36390 | 8:50 PM | 🔄 | Comprehensive Monolith Refactor with Modular Architecture | ~724 |
|
||||
| #36353 | 8:42 PM | 🔵 | Multiple observation table definitions found across codebase | ~280 |
|
||||
| #36323 | 8:25 PM | 🔵 | Message Queue Architecture Scope Expanded | ~302 |
|
||||
</claude-mem-context>
|
||||
@@ -136,7 +136,7 @@ export class MigrationRunner {
|
||||
|
||||
if (!hasWorkerPort) {
|
||||
this.db.run('ALTER TABLE sdk_sessions ADD COLUMN worker_port INTEGER');
|
||||
logger.info('DB', 'Added worker_port column to sdk_sessions table');
|
||||
logger.debug('DB', 'Added worker_port column to sdk_sessions table');
|
||||
}
|
||||
|
||||
// Record migration
|
||||
@@ -157,7 +157,7 @@ export class MigrationRunner {
|
||||
|
||||
if (!hasPromptCounter) {
|
||||
this.db.run('ALTER TABLE sdk_sessions ADD COLUMN prompt_counter INTEGER DEFAULT 0');
|
||||
logger.info('DB', 'Added prompt_counter column to sdk_sessions table');
|
||||
logger.debug('DB', 'Added prompt_counter column to sdk_sessions table');
|
||||
}
|
||||
|
||||
// Check observations for prompt_number
|
||||
@@ -166,7 +166,7 @@ export class MigrationRunner {
|
||||
|
||||
if (!obsHasPromptNumber) {
|
||||
this.db.run('ALTER TABLE observations ADD COLUMN prompt_number INTEGER');
|
||||
logger.info('DB', 'Added prompt_number column to observations table');
|
||||
logger.debug('DB', 'Added prompt_number column to observations table');
|
||||
}
|
||||
|
||||
// Check session_summaries for prompt_number
|
||||
@@ -175,7 +175,7 @@ export class MigrationRunner {
|
||||
|
||||
if (!sumHasPromptNumber) {
|
||||
this.db.run('ALTER TABLE session_summaries ADD COLUMN prompt_number INTEGER');
|
||||
logger.info('DB', 'Added prompt_number column to session_summaries table');
|
||||
logger.debug('DB', 'Added prompt_number column to session_summaries table');
|
||||
}
|
||||
|
||||
// Record migration
|
||||
@@ -200,7 +200,7 @@ export class MigrationRunner {
|
||||
return;
|
||||
}
|
||||
|
||||
logger.info('DB', 'Removing UNIQUE constraint from session_summaries.memory_session_id');
|
||||
logger.debug('DB', 'Removing UNIQUE constraint from session_summaries.memory_session_id');
|
||||
|
||||
// Begin transaction
|
||||
this.db.run('BEGIN TRANSACTION');
|
||||
@@ -254,7 +254,7 @@ export class MigrationRunner {
|
||||
// Record migration
|
||||
this.db.prepare('INSERT OR IGNORE INTO schema_versions (version, applied_at) VALUES (?, ?)').run(7, new Date().toISOString());
|
||||
|
||||
logger.info('DB', 'Successfully removed UNIQUE constraint from session_summaries.memory_session_id');
|
||||
logger.debug('DB', 'Successfully removed UNIQUE constraint from session_summaries.memory_session_id');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -275,7 +275,7 @@ export class MigrationRunner {
|
||||
return;
|
||||
}
|
||||
|
||||
logger.info('DB', 'Adding hierarchical fields to observations table');
|
||||
logger.debug('DB', 'Adding hierarchical fields to observations table');
|
||||
|
||||
// Add new columns
|
||||
this.db.run(`
|
||||
@@ -291,7 +291,7 @@ export class MigrationRunner {
|
||||
// Record migration
|
||||
this.db.prepare('INSERT OR IGNORE INTO schema_versions (version, applied_at) VALUES (?, ?)').run(8, new Date().toISOString());
|
||||
|
||||
logger.info('DB', 'Successfully added hierarchical fields to observations table');
|
||||
logger.debug('DB', 'Successfully added hierarchical fields to observations table');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -313,7 +313,7 @@ export class MigrationRunner {
|
||||
return;
|
||||
}
|
||||
|
||||
logger.info('DB', 'Making observations.text nullable');
|
||||
logger.debug('DB', 'Making observations.text nullable');
|
||||
|
||||
// Begin transaction
|
||||
this.db.run('BEGIN TRANSACTION');
|
||||
@@ -369,7 +369,7 @@ export class MigrationRunner {
|
||||
// Record migration
|
||||
this.db.prepare('INSERT OR IGNORE INTO schema_versions (version, applied_at) VALUES (?, ?)').run(9, new Date().toISOString());
|
||||
|
||||
logger.info('DB', 'Successfully made observations.text nullable');
|
||||
logger.debug('DB', 'Successfully made observations.text nullable');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -388,7 +388,7 @@ export class MigrationRunner {
|
||||
return;
|
||||
}
|
||||
|
||||
logger.info('DB', 'Creating user_prompts table with FTS5 support');
|
||||
logger.debug('DB', 'Creating user_prompts table with FTS5 support');
|
||||
|
||||
// Begin transaction
|
||||
this.db.run('BEGIN TRANSACTION');
|
||||
@@ -446,7 +446,7 @@ export class MigrationRunner {
|
||||
// Record migration
|
||||
this.db.prepare('INSERT OR IGNORE INTO schema_versions (version, applied_at) VALUES (?, ?)').run(10, new Date().toISOString());
|
||||
|
||||
logger.info('DB', 'Successfully created user_prompts table with FTS5 support');
|
||||
logger.debug('DB', 'Successfully created user_prompts table with FTS5 support');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -465,7 +465,7 @@ export class MigrationRunner {
|
||||
|
||||
if (!obsHasDiscoveryTokens) {
|
||||
this.db.run('ALTER TABLE observations ADD COLUMN discovery_tokens INTEGER DEFAULT 0');
|
||||
logger.info('DB', 'Added discovery_tokens column to observations table');
|
||||
logger.debug('DB', 'Added discovery_tokens column to observations table');
|
||||
}
|
||||
|
||||
// Check if discovery_tokens column exists in session_summaries table
|
||||
@@ -474,7 +474,7 @@ export class MigrationRunner {
|
||||
|
||||
if (!sumHasDiscoveryTokens) {
|
||||
this.db.run('ALTER TABLE session_summaries ADD COLUMN discovery_tokens INTEGER DEFAULT 0');
|
||||
logger.info('DB', 'Added discovery_tokens column to session_summaries table');
|
||||
logger.debug('DB', 'Added discovery_tokens column to session_summaries table');
|
||||
}
|
||||
|
||||
// Record migration only after successful column verification/addition
|
||||
@@ -498,7 +498,7 @@ export class MigrationRunner {
|
||||
return;
|
||||
}
|
||||
|
||||
logger.info('DB', 'Creating pending_messages table');
|
||||
logger.debug('DB', 'Creating pending_messages table');
|
||||
|
||||
this.db.run(`
|
||||
CREATE TABLE pending_messages (
|
||||
@@ -528,7 +528,7 @@ export class MigrationRunner {
|
||||
|
||||
this.db.prepare('INSERT OR IGNORE INTO schema_versions (version, applied_at) VALUES (?, ?)').run(16, new Date().toISOString());
|
||||
|
||||
logger.info('DB', 'pending_messages table created successfully');
|
||||
logger.debug('DB', 'pending_messages table created successfully');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -543,7 +543,7 @@ export class MigrationRunner {
|
||||
const applied = this.db.prepare('SELECT version FROM schema_versions WHERE version = ?').get(17) as SchemaVersion | undefined;
|
||||
if (applied) return;
|
||||
|
||||
logger.info('DB', 'Checking session ID columns for semantic clarity rename');
|
||||
logger.debug('DB', 'Checking session ID columns for semantic clarity rename');
|
||||
|
||||
let renamesPerformed = 0;
|
||||
|
||||
@@ -561,7 +561,7 @@ export class MigrationRunner {
|
||||
if (hasOldCol) {
|
||||
// SQLite 3.25+ supports ALTER TABLE RENAME COLUMN
|
||||
this.db.run(`ALTER TABLE ${table} RENAME COLUMN ${oldCol} TO ${newCol}`);
|
||||
logger.info('DB', `Renamed ${table}.${oldCol} to ${newCol}`);
|
||||
logger.debug('DB', `Renamed ${table}.${oldCol} to ${newCol}`);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -590,9 +590,9 @@ export class MigrationRunner {
|
||||
this.db.prepare('INSERT OR IGNORE INTO schema_versions (version, applied_at) VALUES (?, ?)').run(17, new Date().toISOString());
|
||||
|
||||
if (renamesPerformed > 0) {
|
||||
logger.info('DB', `Successfully renamed ${renamesPerformed} session ID columns`);
|
||||
logger.debug('DB', `Successfully renamed ${renamesPerformed} session ID columns`);
|
||||
} else {
|
||||
logger.info('DB', 'No session ID column renames needed (already up to date)');
|
||||
logger.debug('DB', 'No session ID column renames needed (already up to date)');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -623,7 +623,7 @@ export class MigrationRunner {
|
||||
|
||||
if (!hasColumn) {
|
||||
this.db.run('ALTER TABLE pending_messages ADD COLUMN failed_at_epoch INTEGER');
|
||||
logger.info('DB', 'Added failed_at_epoch column to pending_messages table');
|
||||
logger.debug('DB', 'Added failed_at_epoch column to pending_messages table');
|
||||
}
|
||||
|
||||
this.db.prepare('INSERT OR IGNORE INTO schema_versions (version, applied_at) VALUES (?, ?)').run(20, new Date().toISOString());
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
<claude-mem-context>
|
||||
# Recent Activity
|
||||
|
||||
<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->
|
||||
|
||||
### Jan 3, 2026
|
||||
|
||||
**files.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #36670 | 11:37 PM | ✅ | Resolved merge conflicts by accepting branch changes for 39 files | ~435 |
|
||||
| #36453 | 9:02 PM | 🔵 | Session File Aggregation | ~384 |
|
||||
| #36390 | 8:50 PM | 🔄 | Comprehensive Monolith Refactor with Modular Architecture | ~724 |
|
||||
|
||||
**store.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #36483 | 9:11 PM | 🟣 | Observations Module Test Suite Implemented | ~716 |
|
||||
| #36445 | 9:01 PM | 🔵 | Observation Storage with Timestamp Override | ~444 |
|
||||
|
||||
**types.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #36470 | 9:06 PM | 🔵 | SQLite Module API Documentation Verified for Test Implementation | ~765 |
|
||||
| #36447 | 9:02 PM | 🔵 | Observation Type Definitions | ~459 |
|
||||
|
||||
### Jan 4, 2026
|
||||
|
||||
**types.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #36770 | 12:42 AM | 🔵 | Export Script Type Duplication Analysis Complete | ~555 |
|
||||
</claude-mem-context>
|
||||
@@ -0,0 +1,32 @@
|
||||
<claude-mem-context>
|
||||
# Recent Activity
|
||||
|
||||
<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->
|
||||
|
||||
### Jan 3, 2026
|
||||
|
||||
**get.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #36670 | 11:37 PM | ✅ | Resolved merge conflicts by accepting branch changes for 39 files | ~435 |
|
||||
| #36464 | 9:04 PM | 🔵 | User Prompt Retrieval Functions | ~471 |
|
||||
| #36390 | 8:50 PM | 🔄 | Comprehensive Monolith Refactor with Modular Architecture | ~724 |
|
||||
|
||||
**store.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #36485 | 9:12 PM | 🟣 | Prompts Module Test Suite Implemented | ~680 |
|
||||
| #36466 | 9:04 PM | 🔵 | User Prompt Storage | ~363 |
|
||||
|
||||
**types.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #36470 | 9:06 PM | 🔵 | SQLite Module API Documentation Verified for Test Implementation | ~765 |
|
||||
|
||||
### Jan 4, 2026
|
||||
|
||||
**types.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #36770 | 12:42 AM | 🔵 | Export Script Type Duplication Analysis Complete | ~555 |
|
||||
</claude-mem-context>
|
||||
@@ -0,0 +1,32 @@
|
||||
<claude-mem-context>
|
||||
# Recent Activity
|
||||
|
||||
<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->
|
||||
|
||||
### Jan 3, 2026
|
||||
|
||||
**create.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #36670 | 11:37 PM | ✅ | Resolved merge conflicts by accepting branch changes for 39 files | ~435 |
|
||||
| #36482 | 9:10 PM | 🟣 | Sessions Module Test Suite Implemented | ~627 |
|
||||
| #36390 | 8:50 PM | 🔄 | Comprehensive Monolith Refactor with Modular Architecture | ~724 |
|
||||
|
||||
**types.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #36470 | 9:06 PM | 🔵 | SQLite Module API Documentation Verified for Test Implementation | ~765 |
|
||||
| #36439 | 9:01 PM | 🔵 | Session Type Hierarchy | ~420 |
|
||||
|
||||
**get.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #36438 | 9:01 PM | 🔵 | Session Retrieval Functions with Database-First Pattern | ~479 |
|
||||
|
||||
### Jan 4, 2026
|
||||
|
||||
**types.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #36770 | 12:42 AM | 🔵 | Export Script Type Duplication Analysis Complete | ~555 |
|
||||
</claude-mem-context>
|
||||
@@ -0,0 +1,32 @@
|
||||
<claude-mem-context>
|
||||
# Recent Activity
|
||||
|
||||
<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->
|
||||
|
||||
### Jan 3, 2026
|
||||
|
||||
**get.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #36670 | 11:37 PM | ✅ | Resolved merge conflicts by accepting branch changes for 39 files | ~435 |
|
||||
| #36390 | 8:50 PM | 🔄 | Comprehensive Monolith Refactor with Modular Architecture | ~724 |
|
||||
|
||||
**store.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #36484 | 9:11 PM | 🟣 | Summaries Module Test Suite Implemented | ~708 |
|
||||
| #36461 | 9:03 PM | 🔵 | Summary Storage with Timestamp Override | ~439 |
|
||||
|
||||
**types.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #36470 | 9:06 PM | 🔵 | SQLite Module API Documentation Verified for Test Implementation | ~765 |
|
||||
| #36457 | 9:03 PM | 🔵 | Summary Type Hierarchy | ~426 |
|
||||
|
||||
### Jan 4, 2026
|
||||
|
||||
**types.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #36770 | 12:42 AM | 🔵 | Export Script Type Duplication Analysis Complete | ~555 |
|
||||
</claude-mem-context>
|
||||
@@ -0,0 +1,12 @@
|
||||
<claude-mem-context>
|
||||
# Recent Activity
|
||||
|
||||
<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->
|
||||
|
||||
### Jan 3, 2026
|
||||
|
||||
**queries.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #36390 | 8:50 PM | 🔄 | Comprehensive Monolith Refactor with Modular Architecture | ~724 |
|
||||
</claude-mem-context>
|
||||
@@ -267,6 +267,8 @@ export interface SearchOptions extends SearchFilters {
|
||||
limit?: number;
|
||||
offset?: number;
|
||||
orderBy?: 'relevance' | 'date_desc' | 'date_asc';
|
||||
/** When true, treats filePath as a folder and only matches direct children (not descendants) */
|
||||
isFolder?: boolean;
|
||||
}
|
||||
|
||||
export interface ObservationSearchResult extends ObservationRow {
|
||||
|
||||
@@ -0,0 +1,133 @@
|
||||
<claude-mem-context>
|
||||
# Recent Activity
|
||||
|
||||
<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->
|
||||
|
||||
### Dec 21, 2025
|
||||
|
||||
**ChromaSync.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #31745 | 10:42 PM | 🔵 | PR #412 Error Handling Audit Reveals Seven Silent Failure Patterns | ~529 |
|
||||
| #31741 | 10:29 PM | 🟣 | Configurable Local Embedding Models with Multilingual Support | ~461 |
|
||||
| #31738 | 10:26 PM | 🔵 | Configurable Embedding Models Already Implemented in Feature Branch | ~622 |
|
||||
| #31737 | 10:23 PM | 🔵 | ChromaSync Embedding Architecture Investigation | ~582 |
|
||||
| #31715 | 9:42 PM | 🔵 | Multilingual Embeddings Feature Branch Found | ~371 |
|
||||
| #31591 | 8:11 PM | 🔄 | Phase 4 completed - Removed error hiding from utility files | ~441 |
|
||||
|
||||
### Dec 22, 2025
|
||||
|
||||
**ChromaSync.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #31790 | 4:39 PM | 🔵 | Identified files that interact with ModeManager and prompts | ~332 |
|
||||
|
||||
### Dec 24, 2025
|
||||
|
||||
**ChromaSync.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #32154 | 6:41 PM | 🔵 | ChromaSync Vector Database Architecture | ~558 |
|
||||
| #32153 | 6:40 PM | 🔵 | Session Identifier Architecture Across Codebase | ~529 |
|
||||
|
||||
### Dec 25, 2025
|
||||
|
||||
**ChromaSync.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #32558 | 8:18 PM | 🔵 | Identified files containing 'summary' or 'Summary' | ~167 |
|
||||
|
||||
### Dec 26, 2025
|
||||
|
||||
**ChromaSync.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #32912 | 10:02 PM | 🔵 | Error handling uses consistent logger.error and logger.failure patterns throughout codebase | ~508 |
|
||||
|
||||
### Dec 27, 2025
|
||||
|
||||
**ChromaSync.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #33245 | 9:53 PM | 🔵 | Chroma Collection Creation Fails Silently in Fire-and-Forget Backfill | ~355 |
|
||||
| #33244 | " | 🔵 | Commit 63fd158 Removed Double JSON Serialization from SDKAgent | ~304 |
|
||||
| #33242 | 9:52 PM | 🔵 | ChromaSync Double-JSON Pattern Intact - Regression Not From Code Changes | ~367 |
|
||||
| #33241 | " | 🔵 | mem-search Regression Root Cause: Silent ChromaSync Initialization Failures | ~568 |
|
||||
| #33240 | 9:51 PM | 🔵 | mem-search Regression Root Cause: Silent ChromaSync Initialization Failures | ~478 |
|
||||
| #33239 | 9:50 PM | 🔵 | mem-search Regression Root Cause: Silent ChromaSync Initialization Failures | ~460 |
|
||||
| #33238 | 9:49 PM | 🔵 | Chroma Vector Search Initialization Failure in DatabaseManager | ~446 |
|
||||
| #33233 | 9:44 PM | 🔵 | Vector Search Unavailable in mem-search - Chroma Not Initialized | ~335 |
|
||||
| #33225 | 9:37 PM | 🔵 | Worker Performance Barriers Analysis | ~415 |
|
||||
| #33224 | 9:35 PM | 🔵 | Worker Performance Barriers: Timeouts and Rate Limiting | ~491 |
|
||||
| #33082 | 6:45 PM | 🔵 | User directory path patterns in codebase | ~362 |
|
||||
|
||||
### Dec 28, 2025
|
||||
|
||||
**ChromaSync.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #33439 | 10:15 PM | 🔄 | Extended Session ID Renaming to Additional Codebase Components | ~352 |
|
||||
| #33322 | 3:09 PM | 🔵 | Worker Performance Bottlenecks Identified Across Multiple Subsystems | ~399 |
|
||||
| #33299 | 3:08 PM | 🔵 | mem-search Regression Caused by Logger Error Serialization Bug | ~417 |
|
||||
| #33292 | " | 🔄 | ChromaSync Lazy Initialization Replaces Startup Backfill | ~398 |
|
||||
|
||||
### Dec 29, 2025
|
||||
|
||||
**ChromaSync.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #33860 | 4:35 PM | 🔵 | Comprehensive Bun integration architecture and platform-specific implementation details | ~619 |
|
||||
| #33791 | 3:48 PM | 🔵 | ChromaSync.close() terminates subprocess via transport.close() | ~302 |
|
||||
| #33786 | 3:47 PM | 🔵 | ChromaDB vector database synchronization architecture | ~535 |
|
||||
| #33778 | 3:36 PM | 🔵 | ChromaSync spawns chroma-mcp subprocess via StdioClientTransport | ~419 |
|
||||
|
||||
### Dec 30, 2025
|
||||
|
||||
**ChromaSync.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #34440 | 2:16 PM | 🔵 | TypeScript type errors identified across multiple components | ~328 |
|
||||
|
||||
### Jan 1, 2026
|
||||
|
||||
**ChromaSync.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #35434 | 8:45 PM | 🔵 | Comprehensive Try-Catch Audit of Worker Service Error Handling | ~792 |
|
||||
| #35433 | 8:43 PM | 🔵 | Try-Catch Block Distribution Across Services | ~372 |
|
||||
| #35432 | " | 🔵 | Services Directory Structure Mapped | ~268 |
|
||||
|
||||
### Jan 2, 2026
|
||||
|
||||
**ChromaSync.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #35951 | 4:42 PM | 🔵 | Multi-Layer Service Architecture Discovery | ~395 |
|
||||
| #35902 | 2:49 PM | 🔴 | Improved ChromaSync Error Logging | ~280 |
|
||||
| #35901 | " | 🔵 | PR #525 File Changes Summary | ~376 |
|
||||
| #35864 | 2:35 PM | 🔵 | Chroma Sync Methods Block on addDocuments Completion | ~441 |
|
||||
| #35861 | 2:34 PM | 🔵 | ChromaSync Provides Vector Database Integration with Fail-Fast Design | ~476 |
|
||||
| #35789 | 1:53 PM | ⚖️ | Error Logging Anti-Pattern Identified: Incomplete Error Information | ~404 |
|
||||
| #35785 | 1:46 PM | 🔵 | Incomplete Error Logging Pattern in ChromaSync Collection Check | ~349 |
|
||||
| #35783 | 1:45 PM | ⚖️ | Error Logging Anti-Pattern Identification Task | ~399 |
|
||||
| #35775 | 1:24 PM | 🔵 | ensureConnection Call Sites in ChromaSync | ~309 |
|
||||
| #35774 | " | 🔴 | Added Connection Error Detection in ensureCollection | ~342 |
|
||||
| #35773 | " | 🔵 | ChromaSync Service Architecture and Connection Flow | ~420 |
|
||||
| #35726 | 1:09 PM | ✅ | ChromaDB Error Handling Fix Committed to Bugfix Branch | ~314 |
|
||||
| #35725 | " | 🔴 | ChromaDB Connection Error Handling Fixed | ~335 |
|
||||
| #35724 | " | ✅ | Bugfix Branch Created with ChromaDB Connection Changes | ~303 |
|
||||
|
||||
### Jan 3, 2026
|
||||
|
||||
**ChromaSync.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #36296 | 8:04 PM | 🔵 | TypeScript Compilation Check: Pre-Existing Errors Unrelated to Refactoring | ~621 |
|
||||
|
||||
### Jan 5, 2026
|
||||
|
||||
**ChromaSync.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #37758 | 6:25 PM | ⚖️ | Integration Test Design for Four Critical Testing Gaps | ~729 |
|
||||
</claude-mem-context>
|
||||
@@ -165,10 +165,24 @@ export class ChromaSync {
|
||||
|
||||
logger.debug('CHROMA_SYNC', 'Collection exists', { collection: this.collectionName });
|
||||
} catch (error) {
|
||||
// Log the FULL error - don't try to guess what type it is
|
||||
logger.warn('CHROMA_SYNC', 'Collection check failed, attempting to create', { collection: this.collectionName }, error as Error);
|
||||
// Check if this is a connection error - don't try to create collection
|
||||
const errorMessage = error instanceof Error ? error.message : String(error);
|
||||
const isConnectionError =
|
||||
errorMessage.includes('Not connected') ||
|
||||
errorMessage.includes('Connection closed') ||
|
||||
errorMessage.includes('MCP error -32000');
|
||||
|
||||
// Try to create collection - if this also fails, we'll see that error too
|
||||
if (isConnectionError) {
|
||||
// Reset connection state so next call attempts reconnect
|
||||
this.connected = false;
|
||||
this.client = null;
|
||||
logger.error('CHROMA_SYNC', 'Connection lost during collection check',
|
||||
{ collection: this.collectionName }, error as Error);
|
||||
throw new Error(`Chroma connection lost: ${errorMessage}`);
|
||||
}
|
||||
|
||||
// Only attempt creation if it's genuinely a "collection not found" error
|
||||
logger.warn('CHROMA_SYNC', 'Collection check failed, attempting to create', { collection: this.collectionName }, error as Error);
|
||||
logger.info('CHROMA_SYNC', 'Creating collection', { collection: this.collectionName });
|
||||
|
||||
try {
|
||||
@@ -642,7 +656,7 @@ export class ChromaSync {
|
||||
const batch = allDocs.slice(i, i + this.BATCH_SIZE);
|
||||
await this.addDocuments(batch);
|
||||
|
||||
logger.info('CHROMA_SYNC', 'Backfill progress', {
|
||||
logger.debug('CHROMA_SYNC', 'Backfill progress', {
|
||||
project: this.project,
|
||||
progress: `${Math.min(i + this.BATCH_SIZE, allDocs.length)}/${allDocs.length}`
|
||||
});
|
||||
@@ -683,7 +697,7 @@ export class ChromaSync {
|
||||
const batch = summaryDocs.slice(i, i + this.BATCH_SIZE);
|
||||
await this.addDocuments(batch);
|
||||
|
||||
logger.info('CHROMA_SYNC', 'Backfill progress', {
|
||||
logger.debug('CHROMA_SYNC', 'Backfill progress', {
|
||||
project: this.project,
|
||||
progress: `${Math.min(i + this.BATCH_SIZE, summaryDocs.length)}/${summaryDocs.length}`
|
||||
});
|
||||
@@ -732,7 +746,7 @@ export class ChromaSync {
|
||||
const batch = promptDocs.slice(i, i + this.BATCH_SIZE);
|
||||
await this.addDocuments(batch);
|
||||
|
||||
logger.info('CHROMA_SYNC', 'Backfill progress', {
|
||||
logger.debug('CHROMA_SYNC', 'Backfill progress', {
|
||||
project: this.project,
|
||||
progress: `${Math.min(i + this.BATCH_SIZE, promptDocs.length)}/${promptDocs.length}`
|
||||
});
|
||||
@@ -788,10 +802,29 @@ export class ChromaSync {
|
||||
where: whereStringified
|
||||
};
|
||||
|
||||
const result = await this.client.callTool({
|
||||
name: 'chroma_query_documents',
|
||||
arguments: arguments_obj
|
||||
});
|
||||
let result;
|
||||
try {
|
||||
result = await this.client.callTool({
|
||||
name: 'chroma_query_documents',
|
||||
arguments: arguments_obj
|
||||
});
|
||||
} catch (error) {
|
||||
const errorMessage = error instanceof Error ? error.message : String(error);
|
||||
const isConnectionError =
|
||||
errorMessage.includes('Not connected') ||
|
||||
errorMessage.includes('Connection closed') ||
|
||||
errorMessage.includes('MCP error -32000');
|
||||
|
||||
if (isConnectionError) {
|
||||
// Reset connection state so next call attempts reconnect
|
||||
this.connected = false;
|
||||
this.client = null;
|
||||
logger.error('CHROMA_SYNC', 'Connection lost during query',
|
||||
{ project: this.project, query }, error as Error);
|
||||
throw new Error(`Chroma query failed - connection lost: ${errorMessage}`);
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
|
||||
const resultText = logger.happyPathError(
|
||||
'CHROMA',
|
||||
|
||||
@@ -0,0 +1,125 @@
|
||||
<claude-mem-context>
|
||||
# Recent Activity
|
||||
|
||||
<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->
|
||||
|
||||
### Dec 10, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #23673 | 8:36 PM | ✅ | Add Project Filter Parameter to Session and Prompt Hydration in Search | ~306 |
|
||||
| #23596 | 5:54 PM | ⚖️ | Import/Export Bug Fix Priority and Scope | ~415 |
|
||||
| #23595 | 5:53 PM | 🔴 | SearchManager Returns Wrong Format for Empty Results | ~320 |
|
||||
| #23594 | " | 🔵 | SearchManager Search Method Control Flow | ~313 |
|
||||
| #23591 | 5:51 PM | 🔵 | SearchManager JSON Response Structure | ~231 |
|
||||
| #23590 | " | 🔵 | Import/Export Feature Status Review | ~490 |
|
||||
| #23583 | 5:50 PM | 🔵 | SearchManager Hybrid Search Architecture | ~495 |
|
||||
|
||||
### Dec 13, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #25191 | 8:04 PM | 🔵 | ChromaSync Instantiated in DatabaseManager Constructor | ~315 |
|
||||
|
||||
### Dec 14, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #26263 | 8:32 PM | 🔵 | SearchManager Timeline Methods Use Rich Formatting, Search Method Uses Flat Tables | ~464 |
|
||||
| #26243 | 8:29 PM | 🔵 | FormattingService Provides Basic Table Format Without Dates or File Grouping | ~390 |
|
||||
| #26240 | " | 🔵 | SearchManager Formats Results as Tables, Timeline Uses Rich Date-Grouped Format | ~416 |
|
||||
| #26108 | 7:43 PM | ✅ | changes() Method Format Logic Removed | ~401 |
|
||||
| #26107 | " | ✅ | changes() Method Format Parameter Removed | ~317 |
|
||||
| #26106 | 7:42 PM | ✅ | decisions() Method Format Logic Removed | ~405 |
|
||||
| #26105 | " | ✅ | decisions() Method Format Parameter Removed | ~310 |
|
||||
| #26104 | " | ✅ | Main search() Method Format Handling Removed | ~430 |
|
||||
| #26103 | 7:41 PM | ✅ | FormattingService.ts Rewritten to Table Format | ~457 |
|
||||
| #26102 | " | 🔵 | SearchManager.ts Format Parameter Removal Status | ~478 |
|
||||
|
||||
### Dec 15, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #27043 | 6:04 PM | 🔵 | Subagent confirms no version switcher UI exists, only orphaned backend infrastructure | ~539 |
|
||||
| #27041 | 6:03 PM | 🔵 | Branch switching code isolated to two backend files, no frontend UI components | ~473 |
|
||||
| #27037 | 6:02 PM | 🔵 | Branch switching functionality exists in SettingsRoutes with UI switcher removal intent | ~463 |
|
||||
|
||||
### Dec 16, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #27727 | 5:45 PM | 🔵 | SearchManager returns raw data arrays when format=json is specified | ~349 |
|
||||
|
||||
### Dec 17, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #28473 | 4:25 PM | 🔵 | PaginationHelper LIMIT+1 Trick and Project Path Sanitization | ~499 |
|
||||
| #28458 | 4:24 PM | 🔵 | SDK Agent Observer-Only Event-Driven Query Loop | ~513 |
|
||||
| #28455 | " | 🔵 | Event-Driven Session Manager with Zero-Latency Queuing | ~566 |
|
||||
|
||||
### Dec 18, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #29240 | 12:12 AM | 🔵 | SDK Agent Event-Driven Query Loop with Tool Restrictions | ~507 |
|
||||
|
||||
### Dec 20, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #31100 | 8:01 PM | 🔵 | Summary and Memory Message Generation in SDK Agent | ~324 |
|
||||
|
||||
### Dec 25, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #32616 | 8:43 PM | 🔵 | Comprehensive analysis of "enable billing" setting and its impact on rate limiting | ~533 |
|
||||
| #32599 | 8:40 PM | 🔄 | Added validation and explicit default for Gemini model configuration | ~393 |
|
||||
| #32598 | " | 🔵 | Gemini configuration loaded from settings or environment variables | ~363 |
|
||||
| #32591 | 8:38 PM | 🔴 | Removed Unsupported Gemini Model from Agent | ~282 |
|
||||
| #32583 | " | 🔵 | Gemini Agent Implementation Details | ~434 |
|
||||
| #32543 | 7:29 PM | 🔄 | Rate limiting applied conditionally based on billing status | ~164 |
|
||||
| #32542 | " | 🔄 | Query Gemini now accepts billing status | ~163 |
|
||||
| #32541 | " | 🔄 | Gemini config now includes billing status | ~182 |
|
||||
| #32540 | " | 🔄 | Rate limiting logic refactored for Gemini billing | ~164 |
|
||||
|
||||
### Dec 26, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #32949 | 10:55 PM | 🔵 | Complete settings persistence flow for Xiaomi MIMO v2 Flash model | ~320 |
|
||||
| #32948 | 10:53 PM | 🔵 | OpenRouterAgent uses CLAUDE_MEM_OPENROUTER_MODEL setting with Xiaomi as default | ~183 |
|
||||
|
||||
### Dec 27, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #33215 | 9:06 PM | 🔵 | SessionManager Implements Event-Driven Lifecycle with Database-First Persistence and Auto-Initialization | ~853 |
|
||||
| #33214 | " | 🔵 | SDKAgent Implements Event-Driven Query Loop with Init/Continuation Prompt Selection | ~769 |
|
||||
|
||||
### Dec 28, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #33551 | 11:00 PM | 🔵 | GeminiAgent Does Not Implement Resume Functionality | ~307 |
|
||||
| #33550 | " | 🔵 | OpenRouterAgent Does Not Implement Resume Functionality | ~294 |
|
||||
| #33549 | 10:59 PM | 🔴 | SDKAgent Now Checks memorySessionId Differs From contentSessionId Before Resume | ~419 |
|
||||
| #33547 | " | 🔵 | All Agents Call storeObservation with contentSessionId Instead of memorySessionId | ~407 |
|
||||
| #33543 | 10:56 PM | 🔵 | SDKAgent Already Implements Memory Session ID Capture and Resume Logic | ~467 |
|
||||
| #33542 | " | 🔵 | SessionManager Already Uses Renamed Session ID Fields | ~390 |
|
||||
|
||||
### Dec 30, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #34504 | 2:31 PM | 🔵 | SDKAgent V2 Message Handling and Processing Flow Detailed | ~583 |
|
||||
| #34459 | 2:23 PM | 🔵 | Complete SDKAgent V2 Architecture with Comprehensive Message Processing | ~619 |
|
||||
| #34453 | 2:21 PM | 🔵 | Memory Agent Configured as Observer-Only | ~379 |
|
||||
|
||||
### Jan 4, 2026
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #36853 | 1:49 AM | 🔵 | GeminiAgent Implementation Reviewed for Model Support | ~555 |
|
||||
</claude-mem-context>
|
||||
@@ -173,7 +173,14 @@ export class GeminiAgent {
|
||||
}
|
||||
|
||||
// Process pending messages
|
||||
// Track cwd from messages for CLAUDE.md generation
|
||||
let lastCwd: string | undefined;
|
||||
|
||||
for await (const message of this.sessionManager.getMessageIterator(session.sessionDbId)) {
|
||||
// Capture cwd from each message for worktree support
|
||||
if (message.cwd) {
|
||||
lastCwd = message.cwd;
|
||||
}
|
||||
// Capture earliest timestamp BEFORE processing (will be cleared after)
|
||||
// This ensures backlog messages get their original timestamps, not current time
|
||||
const originalTimestamp = session.earliestPendingTimestamp;
|
||||
@@ -217,7 +224,8 @@ export class GeminiAgent {
|
||||
worker,
|
||||
tokensUsed,
|
||||
originalTimestamp,
|
||||
'Gemini'
|
||||
'Gemini',
|
||||
lastCwd
|
||||
);
|
||||
|
||||
} else if (message.type === 'summarize') {
|
||||
@@ -253,7 +261,8 @@ export class GeminiAgent {
|
||||
worker,
|
||||
tokensUsed,
|
||||
originalTimestamp,
|
||||
'Gemini'
|
||||
'Gemini',
|
||||
lastCwd
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,7 +121,8 @@ export class OpenRouterAgent {
|
||||
worker,
|
||||
tokensUsed,
|
||||
null,
|
||||
'OpenRouter'
|
||||
'OpenRouter',
|
||||
undefined // No lastCwd yet - before message processing
|
||||
);
|
||||
} else {
|
||||
logger.warn('SDK', 'Empty OpenRouter init response - session may lack context', {
|
||||
@@ -130,8 +131,15 @@ export class OpenRouterAgent {
|
||||
});
|
||||
}
|
||||
|
||||
// Track lastCwd from messages for CLAUDE.md generation
|
||||
let lastCwd: string | undefined;
|
||||
|
||||
// Process pending messages
|
||||
for await (const message of this.sessionManager.getMessageIterator(session.sessionDbId)) {
|
||||
// Capture cwd from messages for proper worktree support
|
||||
if (message.cwd) {
|
||||
lastCwd = message.cwd;
|
||||
}
|
||||
// Capture earliest timestamp BEFORE processing (will be cleared after)
|
||||
const originalTimestamp = session.earliestPendingTimestamp;
|
||||
|
||||
@@ -174,7 +182,8 @@ export class OpenRouterAgent {
|
||||
worker,
|
||||
tokensUsed,
|
||||
originalTimestamp,
|
||||
'OpenRouter'
|
||||
'OpenRouter',
|
||||
lastCwd
|
||||
);
|
||||
|
||||
} else if (message.type === 'summarize') {
|
||||
@@ -210,7 +219,8 @@ export class OpenRouterAgent {
|
||||
worker,
|
||||
tokensUsed,
|
||||
originalTimestamp,
|
||||
'OpenRouter'
|
||||
'OpenRouter',
|
||||
lastCwd
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,6 +39,10 @@ export class SDKAgent {
|
||||
* @param worker WorkerService reference for spinner control (optional)
|
||||
*/
|
||||
async startSession(session: ActiveSession, worker?: WorkerRef): Promise<void> {
|
||||
// Track cwd from messages for CLAUDE.md generation (worktree support)
|
||||
// Uses mutable object so generator updates are visible in response processing
|
||||
const cwdTracker = { lastCwd: undefined as string | undefined };
|
||||
|
||||
// Find Claude executable
|
||||
const claudePath = this.findClaudeExecutable();
|
||||
|
||||
@@ -61,10 +65,13 @@ export class SDKAgent {
|
||||
];
|
||||
|
||||
// Create message generator (event-driven)
|
||||
const messageGenerator = this.createMessageGenerator(session);
|
||||
const messageGenerator = this.createMessageGenerator(session, cwdTracker);
|
||||
|
||||
// CRITICAL: Only resume if memorySessionId exists (was captured from a previous SDK response).
|
||||
// memorySessionId starts as NULL and is captured on first SDK message.
|
||||
// CRITICAL: Only resume if:
|
||||
// 1. memorySessionId exists (was captured from a previous SDK response)
|
||||
// 2. lastPromptNumber > 1 (this is a continuation within the same SDK session)
|
||||
// On worker restart or crash recovery, memorySessionId may exist from a previous
|
||||
// SDK session but we must NOT resume because the SDK context was lost.
|
||||
// NEVER use contentSessionId for resume - that would inject messages into the user's transcript!
|
||||
const hasRealMemorySessionId = !!session.memorySessionId;
|
||||
|
||||
@@ -77,11 +84,17 @@ export class SDKAgent {
|
||||
lastPromptNumber: session.lastPromptNumber
|
||||
});
|
||||
|
||||
// SESSION ALIGNMENT LOG: Resume decision proof - show if we're resuming with correct memorySessionId
|
||||
// Debug-level alignment logs for detailed tracing
|
||||
if (session.lastPromptNumber > 1) {
|
||||
logger.info('SDK', `[ALIGNMENT] Resume Decision | contentSessionId=${session.contentSessionId} | memorySessionId=${session.memorySessionId} | prompt#=${session.lastPromptNumber} | hasRealMemorySessionId=${hasRealMemorySessionId} | resumeWith=${hasRealMemorySessionId ? session.memorySessionId : 'NONE (fresh SDK session)'}`);
|
||||
const willResume = hasRealMemorySessionId;
|
||||
logger.debug('SDK', `[ALIGNMENT] Resume Decision | contentSessionId=${session.contentSessionId} | memorySessionId=${session.memorySessionId} | prompt#=${session.lastPromptNumber} | hasRealMemorySessionId=${hasRealMemorySessionId} | willResume=${willResume} | resumeWith=${willResume ? session.memorySessionId : 'NONE'}`);
|
||||
} else {
|
||||
logger.info('SDK', `[ALIGNMENT] First Prompt | contentSessionId=${session.contentSessionId} | prompt#=${session.lastPromptNumber} | Will capture memorySessionId from first SDK response`);
|
||||
// INIT prompt - never resume even if memorySessionId exists (stale from previous session)
|
||||
const hasStaleMemoryId = hasRealMemorySessionId;
|
||||
logger.debug('SDK', `[ALIGNMENT] First Prompt (INIT) | contentSessionId=${session.contentSessionId} | prompt#=${session.lastPromptNumber} | hasStaleMemoryId=${hasStaleMemoryId} | action=START_FRESH | Will capture new memorySessionId from SDK response`);
|
||||
if (hasStaleMemoryId) {
|
||||
logger.warn('SDK', `Skipping resume for INIT prompt despite existing memorySessionId=${session.memorySessionId} - SDK context was lost (worker restart or crash recovery)`);
|
||||
}
|
||||
}
|
||||
|
||||
// Run Agent SDK query loop
|
||||
@@ -90,8 +103,10 @@ export class SDKAgent {
|
||||
prompt: messageGenerator,
|
||||
options: {
|
||||
model: modelId,
|
||||
// Resume with captured memorySessionId (null on first prompt, real ID on subsequent)
|
||||
...(hasRealMemorySessionId && { resume: session.memorySessionId }),
|
||||
// Only resume if BOTH: (1) we have a memorySessionId AND (2) this isn't the first prompt
|
||||
// On worker restart, memorySessionId may exist from a previous SDK session but we
|
||||
// need to start fresh since the SDK context was lost
|
||||
...(hasRealMemorySessionId && session.lastPromptNumber > 1 && { resume: session.memorySessionId }),
|
||||
disallowedTools,
|
||||
abortController: session.abortController,
|
||||
pathToClaudeCodeExecutable: claudePath
|
||||
@@ -109,12 +124,20 @@ export class SDKAgent {
|
||||
session.sessionDbId,
|
||||
message.session_id
|
||||
);
|
||||
logger.info('SDK', 'Captured memory session ID', {
|
||||
sessionDbId: session.sessionDbId,
|
||||
// Verify the update by reading back from DB
|
||||
const verification = this.dbManager.getSessionStore().getSessionById(session.sessionDbId);
|
||||
const dbVerified = verification?.memory_session_id === message.session_id;
|
||||
logger.info('SESSION', `MEMORY_ID_CAPTURED | sessionDbId=${session.sessionDbId} | memorySessionId=${message.session_id} | dbVerified=${dbVerified}`, {
|
||||
sessionId: session.sessionDbId,
|
||||
memorySessionId: message.session_id
|
||||
});
|
||||
// SESSION ALIGNMENT LOG: Memory session ID captured - now contentSessionId→memorySessionId mapping is complete
|
||||
logger.info('SDK', `[ALIGNMENT] Captured | contentSessionId=${session.contentSessionId} → memorySessionId=${message.session_id} | Future prompts will resume with this ID`);
|
||||
if (!dbVerified) {
|
||||
logger.error('SESSION', `MEMORY_ID_MISMATCH | sessionDbId=${session.sessionDbId} | expected=${message.session_id} | got=${verification?.memory_session_id}`, {
|
||||
sessionId: session.sessionDbId
|
||||
});
|
||||
}
|
||||
// Debug-level alignment log for detailed tracing
|
||||
logger.debug('SDK', `[ALIGNMENT] Captured | contentSessionId=${session.contentSessionId} → memorySessionId=${message.session_id} | Future prompts will resume with this ID`);
|
||||
}
|
||||
|
||||
// Handle assistant messages
|
||||
@@ -177,7 +200,8 @@ export class SDKAgent {
|
||||
worker,
|
||||
discoveryTokens,
|
||||
originalTimestamp,
|
||||
'SDK'
|
||||
'SDK',
|
||||
cwdTracker.lastCwd
|
||||
);
|
||||
}
|
||||
|
||||
@@ -224,8 +248,16 @@ export class SDKAgent {
|
||||
* - Each user message is added to session.conversationHistory
|
||||
* - This allows provider switching (Claude→Gemini) with full context
|
||||
* - SDK manages its own internal state, but we mirror it for interop
|
||||
*
|
||||
* CWD TRACKING:
|
||||
* - cwdTracker is a mutable object shared with startSession
|
||||
* - As messages with cwd are processed, cwdTracker.lastCwd is updated
|
||||
* - This enables processAgentResponse to use the correct cwd for CLAUDE.md
|
||||
*/
|
||||
private async *createMessageGenerator(session: ActiveSession): AsyncIterableIterator<SDKUserMessage> {
|
||||
private async *createMessageGenerator(
|
||||
session: ActiveSession,
|
||||
cwdTracker: { lastCwd: string | undefined }
|
||||
): AsyncIterableIterator<SDKUserMessage> {
|
||||
// Load active mode
|
||||
const mode = ModeManager.getInstance().getActiveMode();
|
||||
|
||||
@@ -261,6 +293,11 @@ export class SDKAgent {
|
||||
|
||||
// Consume pending messages from SessionManager (event-driven, no polling)
|
||||
for await (const message of this.sessionManager.getMessageIterator(session.sessionDbId)) {
|
||||
// Capture cwd from each message for worktree support
|
||||
if (message.cwd) {
|
||||
cwdTracker.lastCwd = message.cwd;
|
||||
}
|
||||
|
||||
if (message.type === 'observation') {
|
||||
// Update last prompt number
|
||||
if (message.prompt_number !== undefined) {
|
||||
|
||||
@@ -71,6 +71,12 @@ export class SearchManager {
|
||||
private normalizeParams(args: any): any {
|
||||
const normalized: any = { ...args };
|
||||
|
||||
// Map filePath to files (API uses filePath, internal uses files)
|
||||
if (normalized.filePath && !normalized.files) {
|
||||
normalized.files = normalized.filePath;
|
||||
delete normalized.filePath;
|
||||
}
|
||||
|
||||
// Parse comma-separated concepts into array
|
||||
if (normalized.concepts && typeof normalized.concepts === 'string') {
|
||||
normalized.concepts = normalized.concepts.split(',').map((s: string) => s.trim()).filter(Boolean);
|
||||
@@ -101,6 +107,13 @@ export class SearchManager {
|
||||
delete normalized.dateEnd;
|
||||
}
|
||||
|
||||
// Parse isFolder boolean from string
|
||||
if (normalized.isFolder === 'true') {
|
||||
normalized.isFolder = true;
|
||||
} else if (normalized.isFolder === 'false') {
|
||||
normalized.isFolder = false;
|
||||
}
|
||||
|
||||
return normalized;
|
||||
}
|
||||
|
||||
@@ -301,7 +314,7 @@ export class SearchManager {
|
||||
for (const result of dayResults) {
|
||||
let file = 'General';
|
||||
if (result.type === 'observation') {
|
||||
file = extractFirstFile(result.data.files_modified, cwd);
|
||||
file = extractFirstFile(result.data.files_modified, cwd, result.data.files_read);
|
||||
}
|
||||
if (!resultsByFile.has(file)) {
|
||||
resultsByFile.set(file, []);
|
||||
@@ -577,7 +590,7 @@ export class SearchManager {
|
||||
lines.push('');
|
||||
} else if (item.type === 'observation') {
|
||||
const obs = item.data as ObservationSearchResult;
|
||||
const file = extractFirstFile(obs.files_modified, cwd);
|
||||
const file = extractFirstFile(obs.files_modified, cwd, obs.files_read);
|
||||
|
||||
if (file !== currentFile) {
|
||||
if (tableOpen) {
|
||||
@@ -1079,7 +1092,9 @@ export class SearchManager {
|
||||
*/
|
||||
async findByFile(args: any): Promise<any> {
|
||||
const normalized = this.normalizeParams(args);
|
||||
const { files: filePath, ...filters } = normalized;
|
||||
const { files: rawFilePath, ...filters } = normalized;
|
||||
// Handle both string and array (normalizeParams may split on comma)
|
||||
const filePath = Array.isArray(rawFilePath) ? rawFilePath[0] : rawFilePath;
|
||||
let observations: ObservationSearchResult[] = [];
|
||||
let sessions: SessionSummarySearchResult[] = [];
|
||||
|
||||
@@ -1138,24 +1153,57 @@ export class SearchManager {
|
||||
};
|
||||
}
|
||||
|
||||
// Format as table
|
||||
const header = `Found ${totalResults} result(s) for file "${filePath}"\n\n${this.formatter.formatTableHeader()}`;
|
||||
const formattedResults: string[] = [];
|
||||
// Combine observations and sessions with timestamps for date grouping
|
||||
const combined: Array<{
|
||||
type: 'observation' | 'session';
|
||||
data: ObservationSearchResult | SessionSummarySearchResult;
|
||||
epoch: number;
|
||||
created_at: string;
|
||||
}> = [
|
||||
...observations.map(obs => ({
|
||||
type: 'observation' as const,
|
||||
data: obs,
|
||||
epoch: obs.created_at_epoch,
|
||||
created_at: obs.created_at
|
||||
})),
|
||||
...sessions.map(sess => ({
|
||||
type: 'session' as const,
|
||||
data: sess,
|
||||
epoch: sess.created_at_epoch,
|
||||
created_at: sess.created_at
|
||||
}))
|
||||
];
|
||||
|
||||
// Add observations
|
||||
observations.forEach((obs, i) => {
|
||||
formattedResults.push(this.formatter.formatObservationIndex(obs, i));
|
||||
});
|
||||
// Sort by date (most recent first)
|
||||
combined.sort((a, b) => b.epoch - a.epoch);
|
||||
|
||||
// Add sessions
|
||||
sessions.forEach((session, i) => {
|
||||
formattedResults.push(this.formatter.formatSessionIndex(session, i + observations.length));
|
||||
});
|
||||
// Group by date for proper timeline rendering
|
||||
const resultsByDate = groupByDate(combined, item => item.created_at);
|
||||
|
||||
// Format with date headers for proper date parsing by folder CLAUDE.md generator
|
||||
const lines: string[] = [];
|
||||
lines.push(`Found ${totalResults} result(s) for file "${filePath}"`);
|
||||
lines.push('');
|
||||
|
||||
for (const [day, dayResults] of resultsByDate) {
|
||||
lines.push(`### ${day}`);
|
||||
lines.push('');
|
||||
lines.push(this.formatter.formatTableHeader());
|
||||
|
||||
for (const result of dayResults) {
|
||||
if (result.type === 'observation') {
|
||||
lines.push(this.formatter.formatObservationIndex(result.data as ObservationSearchResult, 0));
|
||||
} else {
|
||||
lines.push(this.formatter.formatSessionIndex(result.data as SessionSummarySearchResult, 0));
|
||||
}
|
||||
}
|
||||
lines.push('');
|
||||
}
|
||||
|
||||
return {
|
||||
content: [{
|
||||
type: 'text' as const,
|
||||
text: header + '\n' + formattedResults.join('\n')
|
||||
text: lines.join('\n')
|
||||
}]
|
||||
};
|
||||
}
|
||||
@@ -1519,7 +1567,7 @@ export class SearchManager {
|
||||
} else if (item.type === 'observation') {
|
||||
// Render observation in table
|
||||
const obs = item.data as ObservationSearchResult;
|
||||
const file = extractFirstFile(obs.files_modified, cwd);
|
||||
const file = extractFirstFile(obs.files_modified, cwd, obs.files_read);
|
||||
|
||||
// Check if we need a new file section
|
||||
if (file !== currentFile) {
|
||||
@@ -1749,7 +1797,7 @@ export class SearchManager {
|
||||
} else if (item.type === 'observation') {
|
||||
// Render observation in table
|
||||
const obs = item.data as ObservationSearchResult;
|
||||
const file = extractFirstFile(obs.files_modified, cwd);
|
||||
const file = extractFirstFile(obs.files_modified, cwd, obs.files_read);
|
||||
|
||||
// Check if we need a new file section
|
||||
if (file !== currentFile) {
|
||||
|
||||
@@ -48,7 +48,7 @@ export class SessionManager {
|
||||
* Initialize a new session or return existing one
|
||||
*/
|
||||
initializeSession(sessionDbId: number, currentUserPrompt?: string, promptNumber?: number): ActiveSession {
|
||||
logger.info('SESSION', 'initializeSession called', {
|
||||
logger.debug('SESSION', 'initializeSession called', {
|
||||
sessionDbId,
|
||||
promptNumber,
|
||||
has_currentUserPrompt: !!currentUserPrompt
|
||||
@@ -57,7 +57,7 @@ export class SessionManager {
|
||||
// Check if already active
|
||||
let session = this.sessions.get(sessionDbId);
|
||||
if (session) {
|
||||
logger.info('SESSION', 'Returning cached session', {
|
||||
logger.debug('SESSION', 'Returning cached session', {
|
||||
sessionDbId,
|
||||
contentSessionId: session.contentSessionId,
|
||||
lastPromptNumber: session.lastPromptNumber
|
||||
@@ -99,7 +99,7 @@ export class SessionManager {
|
||||
// Fetch from database
|
||||
const dbSession = this.dbManager.getSessionById(sessionDbId);
|
||||
|
||||
logger.info('SESSION', 'Fetched session from database', {
|
||||
logger.debug('SESSION', 'Fetched session from database', {
|
||||
sessionDbId,
|
||||
content_session_id: dbSession.content_session_id,
|
||||
memory_session_id: dbSession.memory_session_id
|
||||
@@ -142,7 +142,7 @@ export class SessionManager {
|
||||
currentProvider: null // Will be set when generator starts
|
||||
};
|
||||
|
||||
logger.info('SESSION', 'Creating new session object', {
|
||||
logger.debug('SESSION', 'Creating new session object', {
|
||||
sessionDbId,
|
||||
contentSessionId: dbSession.content_session_id,
|
||||
memorySessionId: dbSession.memory_session_id || '(none - fresh session)',
|
||||
@@ -199,10 +199,10 @@ export class SessionManager {
|
||||
|
||||
try {
|
||||
const messageId = this.getPendingStore().enqueue(sessionDbId, session.contentSessionId, message);
|
||||
logger.debug('SESSION', `Observation persisted to DB`, {
|
||||
sessionId: sessionDbId,
|
||||
messageId,
|
||||
tool: data.tool_name
|
||||
const queueDepth = this.getPendingStore().getPendingCount(sessionDbId);
|
||||
const toolSummary = logger.formatTool(data.tool_name, data.tool_input);
|
||||
logger.info('QUEUE', `ENQUEUED | sessionDbId=${sessionDbId} | messageId=${messageId} | type=observation | tool=${toolSummary} | depth=${queueDepth}`, {
|
||||
sessionId: sessionDbId
|
||||
});
|
||||
} catch (error) {
|
||||
logger.error('SESSION', 'Failed to persist observation to DB', {
|
||||
@@ -215,15 +215,6 @@ export class SessionManager {
|
||||
// Notify generator immediately (zero latency)
|
||||
const emitter = this.sessionQueues.get(sessionDbId);
|
||||
emitter?.emit('message');
|
||||
|
||||
// Format tool name for logging
|
||||
const toolSummary = logger.formatTool(data.tool_name, data.tool_input);
|
||||
|
||||
logger.info('SESSION', `Observation queued`, {
|
||||
sessionId: sessionDbId,
|
||||
tool: toolSummary,
|
||||
hasGenerator: !!session.generatorPromise
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -248,9 +239,9 @@ export class SessionManager {
|
||||
|
||||
try {
|
||||
const messageId = this.getPendingStore().enqueue(sessionDbId, session.contentSessionId, message);
|
||||
logger.debug('SESSION', `Summarize persisted to DB`, {
|
||||
sessionId: sessionDbId,
|
||||
messageId
|
||||
const queueDepth = this.getPendingStore().getPendingCount(sessionDbId);
|
||||
logger.info('QUEUE', `ENQUEUED | sessionDbId=${sessionDbId} | messageId=${messageId} | type=summarize | depth=${queueDepth}`, {
|
||||
sessionId: sessionDbId
|
||||
});
|
||||
} catch (error) {
|
||||
logger.error('SESSION', 'Failed to persist summarize to DB', {
|
||||
@@ -261,11 +252,6 @@ export class SessionManager {
|
||||
|
||||
const emitter = this.sessionQueues.get(sessionDbId);
|
||||
emitter?.emit('message');
|
||||
|
||||
logger.info('SESSION', `Summarize queued`, {
|
||||
sessionId: sessionDbId,
|
||||
hasGenerator: !!session.generatorPromise
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
<claude-mem-context>
|
||||
# Recent Activity
|
||||
|
||||
<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->
|
||||
|
||||
*No recent activity*
|
||||
</claude-mem-context>
|
||||
@@ -14,6 +14,7 @@
|
||||
import { logger } from '../../../utils/logger.js';
|
||||
import { parseObservations, parseSummary, type ParsedObservation, type ParsedSummary } from '../../../sdk/parser.js';
|
||||
import { updateCursorContextForProject } from '../../worker-service.js';
|
||||
import { updateFolderClaudeMdFiles } from '../../../utils/claude-md-utils.js';
|
||||
import { getWorkerPort } from '../../../shared/worker-utils.js';
|
||||
import type { ActiveSession } from '../../worker-types.js';
|
||||
import type { DatabaseManager } from '../DatabaseManager.js';
|
||||
@@ -50,7 +51,8 @@ export async function processAgentResponse(
|
||||
worker: WorkerRef | undefined,
|
||||
discoveryTokens: number,
|
||||
originalTimestamp: number | null,
|
||||
agentName: string
|
||||
agentName: string,
|
||||
projectRoot?: string
|
||||
): Promise<void> {
|
||||
// Add assistant response to shared conversation history for provider interop
|
||||
if (text) {
|
||||
@@ -72,6 +74,12 @@ export async function processAgentResponse(
|
||||
throw new Error('Cannot store observations: memorySessionId not yet captured');
|
||||
}
|
||||
|
||||
// Log pre-storage with session ID chain for verification
|
||||
logger.info('DB', `STORING | sessionDbId=${session.sessionDbId} | memorySessionId=${session.memorySessionId} | obsCount=${observations.length} | hasSummary=${!!summaryForStore}`, {
|
||||
sessionId: session.sessionDbId,
|
||||
memorySessionId: session.memorySessionId
|
||||
});
|
||||
|
||||
// ATOMIC TRANSACTION: Store observations + summary ONCE
|
||||
// Messages are already deleted from queue on claim, so no completion tracking needed
|
||||
const result = sessionStore.storeObservations(
|
||||
@@ -84,12 +92,10 @@ export async function processAgentResponse(
|
||||
originalTimestamp ?? undefined
|
||||
);
|
||||
|
||||
// Log what was saved
|
||||
logger.info('SDK', `${agentName} observations and summary saved atomically`, {
|
||||
// Log storage result with IDs for end-to-end traceability
|
||||
logger.info('DB', `STORED | sessionDbId=${session.sessionDbId} | memorySessionId=${session.memorySessionId} | obsCount=${result.observationIds.length} | obsIds=[${result.observationIds.join(',')}] | summaryId=${result.summaryId || 'none'}`, {
|
||||
sessionId: session.sessionDbId,
|
||||
observationCount: result.observationIds.length,
|
||||
hasSummary: !!result.summaryId,
|
||||
atomicTransaction: true
|
||||
memorySessionId: session.memorySessionId
|
||||
});
|
||||
|
||||
// AFTER transaction commits - async operations (can fail safely without data loss)
|
||||
@@ -100,7 +106,8 @@ export async function processAgentResponse(
|
||||
dbManager,
|
||||
worker,
|
||||
discoveryTokens,
|
||||
agentName
|
||||
agentName,
|
||||
projectRoot
|
||||
);
|
||||
|
||||
// Sync and broadcast summary if present
|
||||
@@ -152,7 +159,8 @@ async function syncAndBroadcastObservations(
|
||||
dbManager: DatabaseManager,
|
||||
worker: WorkerRef | undefined,
|
||||
discoveryTokens: number,
|
||||
agentName: string
|
||||
agentName: string,
|
||||
projectRoot?: string
|
||||
): Promise<void> {
|
||||
for (let i = 0; i < observations.length; i++) {
|
||||
const obsId = result.observationIds[i];
|
||||
@@ -204,6 +212,25 @@ async function syncAndBroadcastObservations(
|
||||
created_at_epoch: result.createdAtEpoch
|
||||
});
|
||||
}
|
||||
|
||||
// Update folder CLAUDE.md files for touched folders (fire-and-forget)
|
||||
// This runs per-observation batch to ensure folders are updated as work happens
|
||||
const allFilePaths: string[] = [];
|
||||
for (const obs of observations) {
|
||||
allFilePaths.push(...(obs.files_modified || []));
|
||||
allFilePaths.push(...(obs.files_read || []));
|
||||
}
|
||||
|
||||
if (allFilePaths.length > 0) {
|
||||
updateFolderClaudeMdFiles(
|
||||
allFilePaths,
|
||||
session.project,
|
||||
getWorkerPort(),
|
||||
projectRoot
|
||||
).catch(error => {
|
||||
logger.warn('FOLDER_INDEX', 'CLAUDE.md update failed (non-critical)', { project: session.project }, error as Error);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
<claude-mem-context>
|
||||
# Recent Activity
|
||||
|
||||
<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->
|
||||
|
||||
### Dec 7, 2025
|
||||
|
||||
**SessionEventBroadcaster.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #21829 | 11:05 PM | 🔄 | Massive refactor adds 8,671 lines and removes 5,585 lines across 60 files | ~619 |
|
||||
| #21824 | 10:59 PM | 🔵 | SessionEventBroadcaster methods called 7 times across SessionRoutes and SessionCompletionHandler | ~398 |
|
||||
| #21822 | " | 🔵 | SessionEventBroadcaster instantiated in WorkerService and injected into routes and handlers | ~372 |
|
||||
| #21816 | 10:58 PM | 🔵 | SessionEventBroadcaster provides semantic SSE event broadcasting | ~398 |
|
||||
| #21807 | 10:49 PM | ⚖️ | KISS Audit Identified 587 Lines of Ceremonial Complexity | ~699 |
|
||||
| #21796 | 10:46 PM | 🔵 | SessionEventBroadcaster Duplicates Processing Status Updates | ~388 |
|
||||
| #21743 | 10:16 PM | 🟣 | Created SessionEventBroadcaster for Semantic Session Event Broadcasting | ~514 |
|
||||
|
||||
### Dec 8, 2025
|
||||
|
||||
**SessionEventBroadcaster.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #22107 | 6:47 PM | 🔵 | SessionEventBroadcaster Has observation_queued But No observation_completed Event | ~429 |
|
||||
| #22049 | 6:04 PM | 🔵 | broadcastProcessingStatus method synchronizes queue state across six system components | ~477 |
|
||||
| #22043 | 6:02 PM | 🔵 | SessionEventBroadcaster provides semantic event broadcasting with SSE and processing status updates | ~449 |
|
||||
| #22036 | 6:00 PM | 🔵 | Found processing_status tracking across UI, hooks, and event systems | ~312 |
|
||||
|
||||
### Dec 11, 2025
|
||||
|
||||
**SessionEventBroadcaster.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #23962 | 1:59 PM | 🔵 | Services Layer Implements Full Backend Architecture | ~490 |
|
||||
|
||||
### Dec 20, 2025
|
||||
|
||||
**session-events.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #30609 | 5:01 PM | 🔄 | Phase 4: Eliminated Over-Engineering in Hook/Worker System | ~504 |
|
||||
| #30567 | 4:56 PM | 🟣 | Session Event Broadcasting Utilities | ~313 |
|
||||
|
||||
**SessionEventBroadcaster.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #30593 | 4:59 PM | 🔄 | Deleted SessionEventBroadcaster Class File | ~298 |
|
||||
| #30548 | 4:53 PM | 🔵 | SessionEventBroadcaster SSE Notification Layer | ~338 |
|
||||
|
||||
### Dec 25, 2025
|
||||
|
||||
**SessionEventBroadcaster.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #32597 | 8:40 PM | 🔵 | Identified session completion mechanism and potential method discrepancy | ~470 |
|
||||
| #32580 | 8:22 PM | 🔵 | Grep for resetStuckMessages and processing | ~242 |
|
||||
|
||||
### Dec 28, 2025
|
||||
|
||||
**SessionEventBroadcaster.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #33439 | 10:15 PM | 🔄 | Extended Session ID Renaming to Additional Codebase Components | ~352 |
|
||||
| #33328 | 3:10 PM | 🟣 | Merged centralized logger and session continuity diagnostics to main | ~397 |
|
||||
| #33280 | 3:07 PM | 🔄 | Logger coverage refactor for background services | ~428 |
|
||||
|
||||
### Dec 30, 2025
|
||||
|
||||
**SessionEventBroadcaster.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #34550 | 4:53 PM | 🔵 | Phase 2 Review Reveals Critical Incomplete Error Handling | ~577 |
|
||||
|
||||
### Dec 31, 2025
|
||||
|
||||
**SessionEventBroadcaster.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #34558 | 2:32 PM | 🔵 | Code Quality Fix Plan Created for Seven Identified Issues | ~629 |
|
||||
|
||||
### Jan 2, 2026
|
||||
|
||||
**SessionEventBroadcaster.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #35951 | 4:42 PM | 🔵 | Multi-Layer Service Architecture Discovery | ~395 |
|
||||
</claude-mem-context>
|
||||
@@ -0,0 +1,58 @@
|
||||
<claude-mem-context>
|
||||
# Recent Activity
|
||||
|
||||
<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->
|
||||
|
||||
### Dec 28, 2025
|
||||
|
||||
**BaseRouteHandler.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #33396 | 9:53 PM | ✅ | Queue refactoring touched 12 files with net addition of 1021 lines | ~402 |
|
||||
| #33336 | 3:36 PM | 🔴 | Fixed Windows Worker Crashes and Headers Already Sent Errors | ~351 |
|
||||
| #33259 | 2:46 PM | 🔴 | Windows Worker Stability Pull Request Created | ~386 |
|
||||
| #33258 | 2:38 PM | 🔴 | Added headersSent Guard to Error Handler | ~338 |
|
||||
| #33256 | 2:36 PM | ⚖️ | Implementation Plan for Windows Worker Issues | ~471 |
|
||||
|
||||
### Jan 1, 2026
|
||||
|
||||
**middleware.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #35614 | 10:57 PM | 🔴 | Suppressed /api/logs endpoint logging to reduce noise | ~252 |
|
||||
| #35612 | " | ✅ | HTTP logging middleware excludes /api/logs polling endpoint | ~262 |
|
||||
| #35611 | " | 🔵 | HTTP Middleware Architecture in Worker Service | ~360 |
|
||||
|
||||
**BaseRouteHandler.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #35433 | 8:43 PM | 🔵 | Try-Catch Block Distribution Across Services | ~372 |
|
||||
|
||||
### Jan 2, 2026
|
||||
|
||||
**middleware.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #35951 | 4:42 PM | 🔵 | Multi-Layer Service Architecture Discovery | ~395 |
|
||||
|
||||
### Jan 3, 2026
|
||||
|
||||
**middleware.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #36689 | 11:56 PM | 🔵 | PR #538 Review Findings - Modular Architecture Refactor | ~590 |
|
||||
|
||||
### Jan 5, 2026
|
||||
|
||||
**BaseRouteHandler.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #37665 | 5:52 PM | 🔵 | Codebase uses dependency injection and lazy initialization patterns to avoid circular dependencies | ~548 |
|
||||
| #37662 | " | 🔵 | BaseRouteHandler imports logger demonstrating HTTP layer dependency on logger | ~367 |
|
||||
|
||||
**middleware.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #37626 | 5:35 PM | 🔵 | FormatTool Function Usage Across Codebase | ~493 |
|
||||
| #37537 | 4:45 PM | 🔵 | Middleware formatTool Call Confirmed as Critical Crash Point | ~361 |
|
||||
</claude-mem-context>
|
||||
@@ -0,0 +1,97 @@
|
||||
<claude-mem-context>
|
||||
# Recent Activity
|
||||
|
||||
<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->
|
||||
|
||||
### Dec 5, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #20734 | 9:08 PM | 🔵 | SearchRoutes Context Injection Endpoint with Dynamic Import | ~614 |
|
||||
| #20548 | 8:21 PM | 🔵 | Context generator imported from services directory in worker | ~334 |
|
||||
| #20547 | " | 🔵 | Context injection route implementation in SearchRoutes.ts | ~289 |
|
||||
|
||||
### Dec 7, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #21742 | 10:16 PM | 🔵 | SessionRoutes Analysis: Identified 10+ Scattered Broadcast Calls | ~540 |
|
||||
|
||||
### Dec 8, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #22301 | 9:44 PM | 🔵 | Privacy Validation in Observation Processing | ~399 |
|
||||
| #22296 | 9:43 PM | 🔵 | SessionRoutes HTTP Endpoints and SDK Agent Lifecycle | ~442 |
|
||||
| #22222 | 8:29 PM | 🔵 | Found waiting logic in SessionRoutes but it may not be working correctly | ~359 |
|
||||
| #22005 | 5:40 PM | 🔵 | handleObservationsByClaudeId Current Implementation | ~443 |
|
||||
| #22004 | " | 🔵 | Legacy Observation Handling Pattern Identified | ~337 |
|
||||
| #22003 | " | 🔵 | SessionRoutes Architecture Confirmed | ~354 |
|
||||
| #21969 | 5:22 PM | 🟣 | Worker Routes Pass tool_use_id to SessionManager Queue | ~290 |
|
||||
| #21968 | " | ✅ | Worker Endpoint Extracts toolUseId from Observation Request | ~243 |
|
||||
| #21962 | 5:21 PM | 🟣 | Implemented handleGetObservationsForToolUse Endpoint Handler | ~325 |
|
||||
| #21961 | " | 🟣 | Added GET Endpoint for Fetching Observations by Tool Use ID | ~272 |
|
||||
| #21951 | 5:18 PM | 🔵 | Worker SessionRoutes Architecture and Endpoints Reviewed | ~418 |
|
||||
| #21948 | 5:09 PM | 🟣 | Implemented PreToolUse Endpoint Handler | ~334 |
|
||||
| #21947 | 5:07 PM | 🟣 | Added PreToolUse Route Registration | ~287 |
|
||||
|
||||
### Dec 9, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #23143 | 6:42 PM | ✅ | Updated Skip Tools Logic to Use USER_SETTINGS_PATH Constant | ~150 |
|
||||
| #23142 | " | ✅ | Fixed Settings Path Import in SessionRoutes | ~148 |
|
||||
| #23140 | 6:41 PM | 🟣 | Implemented Skip Tools Filtering in Observations Endpoint | ~386 |
|
||||
| #23138 | " | ✅ | Added SettingsDefaultsManager and Paths Imports to SessionRoutes | ~222 |
|
||||
| #23136 | " | 🔵 | SessionRoutes handleObservationsByClaudeId Handler Structure | ~329 |
|
||||
| #23007 | 4:02 PM | 🔵 | Settings Write Implementation Using Nested Schema | ~398 |
|
||||
| #22859 | 2:28 PM | 🔴 | Fixed Python Version Validation to Support 3.10+ | ~322 |
|
||||
| #22854 | 2:27 PM | 🔵 | Located Python Version Validation Regex in SettingsRoutes | ~316 |
|
||||
|
||||
### Dec 10, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #23593 | 5:52 PM | 🔵 | SearchRoutes Handler Pattern | ~268 |
|
||||
| #23588 | 5:51 PM | 🔵 | Search Routes HTTP API Integration | ~281 |
|
||||
|
||||
### Dec 14, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #26253 | 8:31 PM | 🔵 | SearchRoutes Confirms Context Endpoints Use generateContext, Search Uses SearchManager | ~397 |
|
||||
| #25689 | 4:23 PM | 🔵 | SessionRoutes queueSummarize receives messages but doesn't persist them to database | ~496 |
|
||||
|
||||
### Dec 15, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #27043 | 6:04 PM | 🔵 | Subagent confirms no version switcher UI exists, only orphaned backend infrastructure | ~539 |
|
||||
| #27041 | 6:03 PM | 🔵 | Branch switching code isolated to two backend files, no frontend UI components | ~473 |
|
||||
| #27037 | 6:02 PM | 🔵 | Branch switching functionality exists in SettingsRoutes with UI switcher removal intent | ~463 |
|
||||
|
||||
### Dec 16, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #27414 | 3:25 PM | 🔵 | Batch Observations Endpoint Already Implemented | ~330 |
|
||||
|
||||
### Dec 19, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #30077 | 8:05 PM | 🔵 | SessionRoutes HTTP API Manages SDK Agent Lifecycle and Message Queue | ~516 |
|
||||
|
||||
### Dec 26, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #32949 | 10:55 PM | 🔵 | Complete settings persistence flow for Xiaomi MIMO v2 Flash model | ~320 |
|
||||
| #32939 | 10:53 PM | 🔵 | Settings API routes handle model configuration persistence | ~288 |
|
||||
|
||||
### Dec 30, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #34491 | 2:28 PM | 🔵 | SessionRoutes Implements Multi-Provider Agent Management | ~635 |
|
||||
</claude-mem-context>
|
||||
@@ -195,31 +195,46 @@ export class SearchRoutes extends BaseRouteHandler {
|
||||
|
||||
/**
|
||||
* Context injection endpoint for hooks
|
||||
* GET /api/context/inject?project=...&colors=true
|
||||
* GET /api/context/inject?projects=...&colors=true
|
||||
* GET /api/context/inject?project=...&colors=true (legacy, single project)
|
||||
*
|
||||
* Returns pre-formatted context string ready for display.
|
||||
* Use colors=true for ANSI-colored terminal output.
|
||||
*
|
||||
* For worktrees, pass comma-separated projects (e.g., "main,worktree-branch")
|
||||
* to get a unified timeline from both parent and worktree.
|
||||
*/
|
||||
private handleContextInject = this.wrapHandler(async (req: Request, res: Response): Promise<void> => {
|
||||
const projectName = req.query.project as string;
|
||||
// Support both legacy `project` and new `projects` parameter
|
||||
const projectsParam = (req.query.projects as string) || (req.query.project as string);
|
||||
const useColors = req.query.colors === 'true';
|
||||
|
||||
if (!projectName) {
|
||||
this.badRequest(res, 'Project parameter is required');
|
||||
if (!projectsParam) {
|
||||
this.badRequest(res, 'Project(s) parameter is required');
|
||||
return;
|
||||
}
|
||||
|
||||
// Parse comma-separated projects list
|
||||
const projects = projectsParam.split(',').map(p => p.trim()).filter(Boolean);
|
||||
|
||||
if (projects.length === 0) {
|
||||
this.badRequest(res, 'At least one project is required');
|
||||
return;
|
||||
}
|
||||
|
||||
// Import context generator (runs in worker, has access to database)
|
||||
const { generateContext } = await import('../../../context-generator.js');
|
||||
|
||||
// Use project name as CWD (generateContext uses path.basename to get project)
|
||||
const cwd = `/context/${projectName}`;
|
||||
// Use first project name as CWD (for display purposes)
|
||||
const primaryProject = projects[projects.length - 1]; // Last is the current/primary project
|
||||
const cwd = `/context/${primaryProject}`;
|
||||
|
||||
// Generate context
|
||||
// Generate context with all projects
|
||||
const contextText = await generateContext(
|
||||
{
|
||||
session_id: 'context-inject-' + Date.now(),
|
||||
cwd: cwd
|
||||
cwd: cwd,
|
||||
projects: projects
|
||||
},
|
||||
useColors
|
||||
);
|
||||
|
||||
@@ -560,31 +560,23 @@ export class SessionRoutes extends BaseRouteHandler {
|
||||
// Step 1: Create/get SDK session (idempotent INSERT OR IGNORE)
|
||||
const sessionDbId = store.createSDKSession(contentSessionId, project, prompt);
|
||||
|
||||
logger.info('HTTP', 'SessionRoutes: createSDKSession returned', {
|
||||
sessionDbId,
|
||||
contentSessionId
|
||||
});
|
||||
|
||||
// SESSION ALIGNMENT LOG: DB lookup proof - show content→memory mapping
|
||||
// Verify session creation with DB lookup
|
||||
const dbSession = store.getSessionById(sessionDbId);
|
||||
const memorySessionId = dbSession?.memory_session_id || null;
|
||||
const hasCapturedMemoryId = !!memorySessionId;
|
||||
const isNewSession = !dbSession?.memory_session_id;
|
||||
logger.info('SESSION', `CREATED | contentSessionId=${contentSessionId} → sessionDbId=${sessionDbId} | isNew=${isNewSession} | project=${project}`, {
|
||||
sessionId: sessionDbId
|
||||
});
|
||||
|
||||
// Step 2: Get next prompt number from user_prompts count
|
||||
const currentCount = store.getPromptNumberFromUserPrompts(contentSessionId);
|
||||
const promptNumber = currentCount + 1;
|
||||
|
||||
logger.info('HTTP', 'SessionRoutes: Calculated promptNumber', {
|
||||
sessionDbId,
|
||||
promptNumber,
|
||||
currentCount
|
||||
});
|
||||
|
||||
// SESSION ALIGNMENT LOG: For prompt > 1, prove we looked up memorySessionId from contentSessionId
|
||||
// Debug-level alignment logs for detailed tracing
|
||||
const memorySessionId = dbSession?.memory_session_id || null;
|
||||
if (promptNumber > 1) {
|
||||
logger.info('HTTP', `[ALIGNMENT] DB Lookup Proof | contentSessionId=${contentSessionId} → memorySessionId=${memorySessionId || '(not yet captured)'} | prompt#=${promptNumber} | hasCapturedMemoryId=${hasCapturedMemoryId}`);
|
||||
logger.debug('HTTP', `[ALIGNMENT] DB Lookup Proof | contentSessionId=${contentSessionId} → memorySessionId=${memorySessionId || '(not yet captured)'} | prompt#=${promptNumber}`);
|
||||
} else {
|
||||
logger.info('HTTP', `[ALIGNMENT] New Session | contentSessionId=${contentSessionId} | prompt#=${promptNumber} | memorySessionId will be captured on first SDK response`);
|
||||
logger.debug('HTTP', `[ALIGNMENT] New Session | contentSessionId=${contentSessionId} | prompt#=${promptNumber} | memorySessionId will be captured on first SDK response`);
|
||||
}
|
||||
|
||||
// Step 3: Strip privacy tags from prompt
|
||||
@@ -610,10 +602,10 @@ export class SessionRoutes extends BaseRouteHandler {
|
||||
// Step 5: Save cleaned user prompt
|
||||
store.saveUserPrompt(contentSessionId, promptNumber, cleanedPrompt);
|
||||
|
||||
logger.info('SESSION', 'Session initialized via HTTP', {
|
||||
// Debug-level log since CREATED already logged the key info
|
||||
logger.debug('SESSION', 'User prompt saved', {
|
||||
sessionId: sessionDbId,
|
||||
promptNumber,
|
||||
project
|
||||
promptNumber
|
||||
});
|
||||
|
||||
res.json({
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
<claude-mem-context>
|
||||
# Recent Activity
|
||||
|
||||
<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->
|
||||
|
||||
### Jan 3, 2026
|
||||
|
||||
**ResultFormatter.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #36670 | 11:37 PM | ✅ | Resolved merge conflicts by accepting branch changes for 39 files | ~435 |
|
||||
| #36540 | 9:39 PM | 🟣 | ResultFormatter Test Suite Created | ~424 |
|
||||
| #36533 | 9:35 PM | 🔵 | ResultFormatter for Unified Search Result Display | ~598 |
|
||||
| #36390 | 8:50 PM | 🔄 | Comprehensive Monolith Refactor with Modular Architecture | ~724 |
|
||||
|
||||
**SearchOrchestrator.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #36545 | 9:41 PM | 🟣 | Phase 3 Search Strategy Test Suite Completion | ~564 |
|
||||
| #36544 | 9:40 PM | 🟣 | Phase 3 Search Strategy Test Suite Complete | ~449 |
|
||||
| #36543 | " | 🟣 | Phase 3 Search Strategy Tests Completed | ~458 |
|
||||
| #36541 | 9:39 PM | 🟣 | SearchOrchestrator Test Suite Implementation | ~588 |
|
||||
| #36531 | 9:34 PM | 🔵 | SearchOrchestrator Strategy Selection Logic | ~334 |
|
||||
| #36529 | " | 🔵 | Search Module Architecture Discovery | ~302 |
|
||||
|
||||
**types.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #36538 | 9:38 PM | 🟣 | SQLiteSearchStrategy Test Suite Created | ~527 |
|
||||
| #36537 | " | 🟣 | HybridSearchStrategy Test Suite Created | ~435 |
|
||||
| #36536 | " | 🟣 | ChromaSearchStrategy Test Suite Created | ~430 |
|
||||
| #36523 | 9:34 PM | 🔴 | Fixed TypeScript Type Import Issues in Worker Services | ~386 |
|
||||
| #36519 | " | 🔴 | Fixed Type Import Issues Preventing Worker Tests | ~308 |
|
||||
| #36516 | 9:33 PM | 🔴 | Fixed TypeScript Type Import Issues in Worker Search Modules | ~377 |
|
||||
|
||||
**index.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #36527 | 9:34 PM | 🔵 | Search Strategy Architecture Analysis for Phase 3 Testing | ~486 |
|
||||
| #36421 | 8:58 PM | 🔄 | Search Module Public API Organization | ~393 |
|
||||
|
||||
### Jan 5, 2026
|
||||
|
||||
**ResultFormatter.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #37968 | 8:22 PM | 🔵 | ResultFormatter Uses Epoch Timestamps from Database | ~364 |
|
||||
</claude-mem-context>
|
||||
@@ -62,10 +62,8 @@ export class ResultFormatter {
|
||||
for (const result of dayResults) {
|
||||
let file = 'General';
|
||||
if (result.type === 'observation') {
|
||||
file = extractFirstFile(
|
||||
(result.data as ObservationSearchResult).files_modified,
|
||||
cwd
|
||||
);
|
||||
const obs = result.data as ObservationSearchResult;
|
||||
file = extractFirstFile(obs.files_modified, cwd, obs.files_read);
|
||||
}
|
||||
if (!resultsByFile.has(file)) {
|
||||
resultsByFile.set(file, []);
|
||||
|
||||
@@ -216,7 +216,7 @@ export class TimelineBuilder {
|
||||
|
||||
} else if (item.type === 'observation') {
|
||||
const obs = item.data as ObservationSearchResult;
|
||||
const file = extractFirstFile(obs.files_modified, cwd);
|
||||
const file = extractFirstFile(obs.files_modified, cwd, obs.files_read);
|
||||
|
||||
if (file !== currentFile) {
|
||||
if (tableOpen) {
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
<claude-mem-context>
|
||||
# Recent Activity
|
||||
|
||||
<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->
|
||||
|
||||
### Jan 3, 2026
|
||||
|
||||
**DateFilter.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #36670 | 11:37 PM | ✅ | Resolved merge conflicts by accepting branch changes for 39 files | ~435 |
|
||||
| #36523 | 9:34 PM | 🔴 | Fixed TypeScript Type Import Issues in Worker Services | ~386 |
|
||||
| #36519 | " | 🔴 | Fixed Type Import Issues Preventing Worker Tests | ~308 |
|
||||
| #36516 | 9:33 PM | 🔴 | Fixed TypeScript Type Import Issues in Worker Search Modules | ~377 |
|
||||
| #36390 | 8:50 PM | 🔄 | Comprehensive Monolith Refactor with Modular Architecture | ~724 |
|
||||
|
||||
**ProjectFilter.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #36529 | 9:34 PM | 🔵 | Search Module Architecture Discovery | ~302 |
|
||||
</claude-mem-context>
|
||||
@@ -0,0 +1,45 @@
|
||||
<claude-mem-context>
|
||||
# Recent Activity
|
||||
|
||||
<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->
|
||||
|
||||
### Jan 3, 2026
|
||||
|
||||
**SearchStrategy.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #36670 | 11:37 PM | ✅ | Resolved merge conflicts by accepting branch changes for 39 files | ~435 |
|
||||
| #36534 | 9:35 PM | 🔵 | SearchStrategy Interface Pattern | ~341 |
|
||||
| #36523 | 9:34 PM | 🔴 | Fixed TypeScript Type Import Issues in Worker Services | ~386 |
|
||||
| #36519 | " | 🔴 | Fixed Type Import Issues Preventing Worker Tests | ~308 |
|
||||
| #36516 | 9:33 PM | 🔴 | Fixed TypeScript Type Import Issues in Worker Search Modules | ~377 |
|
||||
| #36449 | 9:02 PM | 🔵 | Search Strategy Base Implementation | ~410 |
|
||||
| #36419 | 8:57 PM | 🔵 | Search Strategy Interface Pattern | ~380 |
|
||||
|
||||
**SQLiteSearchStrategy.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #36545 | 9:41 PM | 🟣 | Phase 3 Search Strategy Test Suite Completion | ~564 |
|
||||
| #36544 | 9:40 PM | 🟣 | Phase 3 Search Strategy Test Suite Complete | ~449 |
|
||||
| #36538 | 9:38 PM | 🟣 | SQLiteSearchStrategy Test Suite Created | ~527 |
|
||||
| #36527 | 9:34 PM | 🔵 | Search Strategy Architecture Analysis for Phase 3 Testing | ~486 |
|
||||
| #36526 | " | 🔵 | SQLite Search Strategy Architecture | ~439 |
|
||||
| #36451 | 9:02 PM | 🔵 | SQLite Search Strategy Implementation | ~453 |
|
||||
|
||||
**ChromaSearchStrategy.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #36543 | 9:40 PM | 🟣 | Phase 3 Search Strategy Tests Completed | ~458 |
|
||||
| #36536 | 9:38 PM | 🟣 | ChromaSearchStrategy Test Suite Created | ~430 |
|
||||
| #36530 | 9:34 PM | 🔵 | Chroma Vector Search Strategy Architecture | ~508 |
|
||||
| #36529 | " | 🔵 | Search Module Architecture Discovery | ~302 |
|
||||
| #36390 | 8:50 PM | 🔄 | Comprehensive Monolith Refactor with Modular Architecture | ~724 |
|
||||
|
||||
**HybridSearchStrategy.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #36537 | 9:38 PM | 🟣 | HybridSearchStrategy Test Suite Created | ~435 |
|
||||
| #36532 | 9:34 PM | 🔵 | HybridSearchStrategy Four-Step Pattern | ~333 |
|
||||
| #36528 | " | 🔵 | Hybrid Search Strategy Combining Metadata Filtering with Semantic Ranking | ~525 |
|
||||
| #36459 | 9:03 PM | 🔵 | Hybrid Search Strategy with Four-Step Algorithm | ~530 |
|
||||
</claude-mem-context>
|
||||
@@ -0,0 +1,103 @@
|
||||
<claude-mem-context>
|
||||
# Recent Activity
|
||||
|
||||
<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->
|
||||
|
||||
### Dec 7, 2025
|
||||
|
||||
**SessionCompletionHandler.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #21829 | 11:05 PM | 🔄 | Massive refactor adds 8,671 lines and removes 5,585 lines across 60 files | ~619 |
|
||||
| #21825 | 11:00 PM | 🔵 | SessionCompletionHandler methods called 3 times in SessionRoutes | ~342 |
|
||||
| #21824 | 10:59 PM | 🔵 | SessionEventBroadcaster methods called 7 times across SessionRoutes and SessionCompletionHandler | ~398 |
|
||||
| #21822 | " | 🔵 | SessionEventBroadcaster instantiated in WorkerService and injected into routes and handlers | ~372 |
|
||||
| #21818 | 10:58 PM | 🔵 | SessionCompletionHandler is instantiated in SessionRoutes | ~282 |
|
||||
| #21817 | " | 🔵 | SessionCompletionHandler consolidates session completion logic | ~414 |
|
||||
| #21807 | 10:49 PM | ⚖️ | KISS Audit Identified 587 Lines of Ceremonial Complexity | ~699 |
|
||||
| #21794 | 10:46 PM | 🔵 | SessionCompletionHandler Consolidates Duplicate Completion Logic | ~341 |
|
||||
| #21764 | 10:23 PM | ✅ | Phase 4 Build and Deployment Successful | ~376 |
|
||||
| #21759 | 10:21 PM | 🟣 | SessionCompletionHandler Service Created | ~426 |
|
||||
|
||||
### Dec 11, 2025
|
||||
|
||||
**SessionCompletionHandler.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #23962 | 1:59 PM | 🔵 | Services Layer Implements Full Backend Architecture | ~490 |
|
||||
|
||||
### Dec 14, 2025
|
||||
|
||||
**SessionCompletionHandler.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #26088 | 7:32 PM | 🔵 | API Endpoint Architecture Discovery | ~416 |
|
||||
|
||||
### Dec 20, 2025
|
||||
|
||||
**SessionCompletionHandler.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #30725 | 5:12 PM | 🔵 | Revealed extensive work-in-progress changes across hook and worker systems | ~479 |
|
||||
| #30569 | 4:56 PM | 🔄 | SessionCompletionHandler Broadcasting Implementation | ~264 |
|
||||
| #30568 | " | 🔄 | SessionCompletionHandler Event Broadcasting Refactor | ~282 |
|
||||
| #30566 | " | 🔵 | Session Completion Handler Consolidation | ~323 |
|
||||
|
||||
### Dec 24, 2025
|
||||
|
||||
**SessionCompletionHandler.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #32350 | 8:42 PM | 🔵 | Detailed Cleanup Hook Evolution Documentation Retrieved | ~597 |
|
||||
| #32316 | 8:41 PM | 🔄 | Removed markSessionComplete method from DatabaseManager | ~251 |
|
||||
| #32194 | 7:42 PM | 🔵 | Session completion handler implementation analysis | ~329 |
|
||||
| #32193 | " | 🔵 | Session completion endpoint usage across codebase | ~278 |
|
||||
| #32182 | 7:15 PM | 🔄 | Removed markSessionComplete database call from session completion flow | ~316 |
|
||||
| #32179 | 7:11 PM | 🔄 | SessionCompletionHandler switched to direct SQL query | ~273 |
|
||||
| #32153 | 6:40 PM | 🔵 | Session Identifier Architecture Across Codebase | ~529 |
|
||||
|
||||
### Dec 25, 2025
|
||||
|
||||
**SessionCompletionHandler.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #32597 | 8:40 PM | 🔵 | Identified session completion mechanism and potential method discrepancy | ~470 |
|
||||
| #32456 | 5:41 PM | ✅ | Completed merge of main branch into feature/titans-phase1-3 | ~354 |
|
||||
| #32198 | 7:41 PM | 🔄 | Removed redundant SessionEnd cleanup hook | ~317 |
|
||||
|
||||
### Dec 27, 2025
|
||||
|
||||
**SessionCompletionHandler.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #33099 | 7:10 PM | 🔵 | SessionCompletionHandler Manual Session Termination Flow | ~348 |
|
||||
|
||||
### Dec 28, 2025
|
||||
|
||||
**SessionCompletionHandler.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #33328 | 3:10 PM | 🟣 | Merged centralized logger and session continuity diagnostics to main | ~397 |
|
||||
| #33280 | 3:07 PM | 🔄 | Logger coverage refactor for background services | ~428 |
|
||||
|
||||
### Dec 30, 2025
|
||||
|
||||
**SessionCompletionHandler.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #34388 | 1:40 PM | 🔵 | SessionCompletionHandler Relies on SessionManager Abort Without Process Cleanup | ~309 |
|
||||
|
||||
### Dec 31, 2025
|
||||
|
||||
**SessionCompletionHandler.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #34707 | 4:45 PM | 🔵 | SessionCompletionHandler Aborts SDK Agent During Cleanup | ~291 |
|
||||
|
||||
### Jan 2, 2026
|
||||
|
||||
**SessionCompletionHandler.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #35951 | 4:42 PM | 🔵 | Multi-Layer Service Architecture Discovery | ~395 |
|
||||
</claude-mem-context>
|
||||
@@ -0,0 +1,77 @@
|
||||
<claude-mem-context>
|
||||
# Recent Activity
|
||||
|
||||
<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->
|
||||
|
||||
### Dec 7, 2025
|
||||
|
||||
**PrivacyCheckValidator.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #21829 | 11:05 PM | 🔄 | Massive refactor adds 8,671 lines and removes 5,585 lines across 60 files | ~619 |
|
||||
| #21820 | 10:59 PM | 🔵 | PrivacyCheckValidator used twice in SessionRoutes for observation and summarize endpoints | ~303 |
|
||||
| #21814 | 10:58 PM | 🔵 | PrivacyCheckValidator centralizes user prompt privacy validation | ~359 |
|
||||
| #21807 | 10:49 PM | ⚖️ | KISS Audit Identified 587 Lines of Ceremonial Complexity | ~699 |
|
||||
| #21797 | 10:46 PM | 🔵 | PrivacyCheckValidator Implements Single Validation Method | ~349 |
|
||||
| #21770 | 10:36 PM | 🟣 | Implemented PrivacyCheckValidator for Centralized Privacy Validation | ~318 |
|
||||
|
||||
### Dec 8, 2025
|
||||
|
||||
**PrivacyCheckValidator.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #22274 | 9:22 PM | 🔵 | Event-Driven Architecture for SDK Response Coordination Fully Mapped | ~1136 |
|
||||
| #22270 | 9:12 PM | 🔵 | DRY violations identified in endless-mode-v7.1 branch | ~553 |
|
||||
|
||||
### Dec 9, 2025
|
||||
|
||||
**PrivacyCheckValidator.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #22808 | 2:01 PM | 🔵 | Logger Utility Pattern Identified | ~300 |
|
||||
| #22750 | 1:27 PM | 🔵 | PrivacyCheckValidator Centralizes Privacy Logic | ~450 |
|
||||
|
||||
### Dec 11, 2025
|
||||
|
||||
**PrivacyCheckValidator.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #23962 | 1:59 PM | 🔵 | Services Layer Implements Full Backend Architecture | ~490 |
|
||||
|
||||
### Dec 20, 2025
|
||||
|
||||
**PrivacyCheckValidator.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #30609 | 5:01 PM | 🔄 | Phase 4: Eliminated Over-Engineering in Hook/Worker System | ~504 |
|
||||
| #30598 | 5:00 PM | 🔄 | Removed PrivacyCheckValidator module | ~201 |
|
||||
| #30549 | 4:53 PM | 🔵 | PrivacyCheckValidator for User Prompt Filtering | ~325 |
|
||||
|
||||
### Dec 24, 2025
|
||||
|
||||
**PrivacyCheckValidator.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #32153 | 6:40 PM | 🔵 | Session Identifier Architecture Across Codebase | ~529 |
|
||||
|
||||
### Dec 25, 2025
|
||||
|
||||
**PrivacyCheckValidator.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #32580 | 8:22 PM | 🔵 | Grep for resetStuckMessages and processing | ~242 |
|
||||
|
||||
### Dec 28, 2025
|
||||
|
||||
**PrivacyCheckValidator.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #33439 | 10:15 PM | 🔄 | Extended Session ID Renaming to Additional Codebase Components | ~352 |
|
||||
|
||||
### Jan 2, 2026
|
||||
|
||||
**PrivacyCheckValidator.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #35951 | 4:42 PM | 🔵 | Multi-Layer Service Architecture Discovery | ~395 |
|
||||
</claude-mem-context>
|
||||
+86
-36
@@ -3,20 +3,65 @@
|
||||
|
||||
<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->
|
||||
|
||||
### Jan 5, 2026
|
||||
### Nov 10, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #6295 | 1:18 PM | 🔵 | Path Configuration Structure for claude-mem | ~305 |
|
||||
| #6268 | 12:56 PM | 🔵 | Package Root Resolution Uses Relative Path from Bundle Location | ~379 |
|
||||
|
||||
### Dec 5, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #20730 | 9:06 PM | 🔵 | Path Configuration Module with ESM/CJS Compatibility | ~578 |
|
||||
| #20718 | 9:00 PM | 🔵 | Worker Service Auto-Start and Health Check System | ~448 |
|
||||
| #20410 | 7:21 PM | 🔵 | Path utilities provide cross-runtime directory management with Claude integration support | ~478 |
|
||||
| #20409 | 7:20 PM | 🔵 | Worker utilities provide automatic PM2 startup with health checking and port configuration | ~479 |
|
||||
|
||||
### Dec 9, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #23141 | 6:42 PM | 🔵 | Located getSettingsPath Function in paths.ts | ~261 |
|
||||
| #23134 | 6:41 PM | ✅ | Set CLAUDE_MEM_SKIP_TOOLS Default Value in SettingsDefaultsManager | ~261 |
|
||||
| #23133 | " | ✅ | Added CLAUDE_MEM_SKIP_TOOLS to SettingsDefaults Interface | ~231 |
|
||||
| #23131 | 6:40 PM | 🔵 | SettingsDefaultsManager Structure and Configuration Schema | ~363 |
|
||||
| #22858 | 2:28 PM | 🔄 | Removed Brittle save.md Validation from paths.ts | ~305 |
|
||||
| #22852 | 2:26 PM | 🔵 | Located save.md Validation Logic in paths.ts | ~255 |
|
||||
| #22805 | 2:01 PM | 🔵 | Early Settings Silent Failure Point Identified | ~363 |
|
||||
| #22803 | " | 🔵 | Worker Utilities Current Implementation Review | ~390 |
|
||||
| #22518 | 12:59 AM | 🔵 | Worker Utils StartWorker Implementation Uses Plugin Root for PM2 | ~311 |
|
||||
|
||||
### Dec 10, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #23831 | 11:15 PM | 🔵 | Current hook-error-handler.ts References PM2 | ~277 |
|
||||
| #23830 | " | 🔵 | Current worker-utils.ts Implementation Uses PM2 | ~431 |
|
||||
| #23812 | 10:49 PM | 🔵 | Current Worker Startup Uses PM2 and PowerShell; Phase 2 Will Replace | ~428 |
|
||||
| #23811 | " | 🔵 | Existing Paths Configuration for Phase 2 Reference | ~297 |
|
||||
|
||||
### Dec 12, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #24405 | 8:12 PM | 🔵 | PM2 Legacy Cleanup Migration in Worker Startup | ~303 |
|
||||
| #24400 | 8:10 PM | 🔵 | Retrieved PM2 Cleanup Implementation Details from Memory | ~355 |
|
||||
| #24362 | 7:00 PM | 🟣 | Implemented PM2 Cleanup One-Time Marker in worker-utils.ts | ~376 |
|
||||
| #24361 | " | ✅ | Added File System Imports to worker-utils.ts for PM2 Marker | ~263 |
|
||||
| #24360 | " | 🔵 | worker-utils.ts Contains PM2 Cleanup Logic Without One-Time Marker | ~390 |
|
||||
|
||||
### Dec 13, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #25088 | 7:18 PM | 🟣 | Added CLAUDE_MEM_EMBEDDING_FUNCTION to Settings Interface | ~269 |
|
||||
|
||||
### Dec 14, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #32616 | 8:43 PM | 🔵 | Comprehensive analysis of "enable billing" setting and its impact on rate limiting | ~533 |
|
||||
| #32538 | 7:28 PM | ✅ | Set default Gemini billing to disabled | ~164 |
|
||||
| #31086 | 7:59 PM | 🔵 | Transcript Parser Extracts Messages from JSONL Hook Files | ~327 |
|
||||
| #30939 | 6:57 PM | 🔵 | Worker Utils File Examined for Error Handling Inconsistency | ~393 |
|
||||
| #30855 | 6:22 PM | 🔵 | Transcript Parser Content Format Handling Examined | ~406 |
|
||||
| #29797 | 7:09 PM | 🔵 | Settings System Uses CLAUDE_MEM_MODE for Mode Selection | ~353 |
|
||||
| #29234 | 12:10 AM | 🔵 | Centralized Settings Management with Environment Defaults | ~394 |
|
||||
| #28464 | 4:25 PM | 🔵 | Platform-Adjusted Hook Timeout Configuration | ~468 |
|
||||
| #28461 | " | 🔵 | Dual ESM/CJS Path Resolution System | ~479 |
|
||||
| #28452 | 4:23 PM | 🔵 | Worker Version Matching and Auto-Restart System | ~510 |
|
||||
| #26790 | 11:38 PM | 🔴 | Fixed Undefined Port Variable in Error Logger | ~340 |
|
||||
| #26789 | " | 🔴 | Fixed Undefined Port Variable in Error Logging | ~316 |
|
||||
| #26788 | " | 🔵 | Worker Utils Already Imports Required Dependencies for Implementation | ~283 |
|
||||
@@ -32,29 +77,34 @@
|
||||
| #26731 | 11:24 PM | 🔵 | ensureWorkerRunning Implementation Shows 2.5 Second Startup Wait With Version Check | ~522 |
|
||||
| #25695 | 4:27 PM | 🟣 | Added comprehensive error logging to transcript parser for debugging message extraction failures | ~473 |
|
||||
| #25693 | 4:24 PM | 🔵 | Transcript parser extracts messages from JSONL file by scanning backwards for role-specific entries | ~491 |
|
||||
| #25088 | 7:18 PM | 🟣 | Added CLAUDE_MEM_EMBEDDING_FUNCTION to Settings Interface | ~269 |
|
||||
| #24405 | 8:12 PM | 🔵 | PM2 Legacy Cleanup Migration in Worker Startup | ~303 |
|
||||
| #24400 | 8:10 PM | 🔵 | Retrieved PM2 Cleanup Implementation Details from Memory | ~355 |
|
||||
| #24362 | 7:00 PM | 🟣 | Implemented PM2 Cleanup One-Time Marker in worker-utils.ts | ~376 |
|
||||
| #24361 | " | ✅ | Added File System Imports to worker-utils.ts for PM2 Marker | ~263 |
|
||||
| #24360 | " | 🔵 | worker-utils.ts Contains PM2 Cleanup Logic Without One-Time Marker | ~390 |
|
||||
| #23831 | 11:15 PM | 🔵 | Current hook-error-handler.ts References PM2 | ~277 |
|
||||
| #23830 | " | 🔵 | Current worker-utils.ts Implementation Uses PM2 | ~431 |
|
||||
| #23812 | 10:49 PM | 🔵 | Current Worker Startup Uses PM2 and PowerShell; Phase 2 Will Replace | ~428 |
|
||||
| #23811 | " | 🔵 | Existing Paths Configuration for Phase 2 Reference | ~297 |
|
||||
| #23141 | 6:42 PM | 🔵 | Located getSettingsPath Function in paths.ts | ~261 |
|
||||
| #23134 | 6:41 PM | ✅ | Set CLAUDE_MEM_SKIP_TOOLS Default Value in SettingsDefaultsManager | ~261 |
|
||||
| #23133 | " | ✅ | Added CLAUDE_MEM_SKIP_TOOLS to SettingsDefaults Interface | ~231 |
|
||||
| #23131 | 6:40 PM | 🔵 | SettingsDefaultsManager Structure and Configuration Schema | ~363 |
|
||||
| #22858 | 2:28 PM | 🔄 | Removed Brittle save.md Validation from paths.ts | ~305 |
|
||||
| #22852 | 2:26 PM | 🔵 | Located save.md Validation Logic in paths.ts | ~255 |
|
||||
| #22805 | 2:01 PM | 🔵 | Early Settings Silent Failure Point Identified | ~363 |
|
||||
| #22803 | " | 🔵 | Worker Utilities Current Implementation Review | ~390 |
|
||||
| #22518 | 12:59 AM | 🔵 | Worker Utils StartWorker Implementation Uses Plugin Root for PM2 | ~311 |
|
||||
| #20730 | 9:06 PM | 🔵 | Path Configuration Module with ESM/CJS Compatibility | ~578 |
|
||||
| #20718 | 9:00 PM | 🔵 | Worker Service Auto-Start and Health Check System | ~448 |
|
||||
| #20410 | 7:21 PM | 🔵 | Path utilities provide cross-runtime directory management with Claude integration support | ~478 |
|
||||
| #20409 | 7:20 PM | 🔵 | Worker utilities provide automatic PM2 startup with health checking and port configuration | ~479 |
|
||||
| #6295 | 1:18 PM | 🔵 | Path Configuration Structure for claude-mem | ~305 |
|
||||
| #6268 | 12:56 PM | 🔵 | Package Root Resolution Uses Relative Path from Bundle Location | ~379 |
|
||||
|
||||
### Dec 17, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #28464 | 4:25 PM | 🔵 | Platform-Adjusted Hook Timeout Configuration | ~468 |
|
||||
| #28461 | " | 🔵 | Dual ESM/CJS Path Resolution System | ~479 |
|
||||
| #28452 | 4:23 PM | 🔵 | Worker Version Matching and Auto-Restart System | ~510 |
|
||||
|
||||
### Dec 18, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #29797 | 7:09 PM | 🔵 | Settings System Uses CLAUDE_MEM_MODE for Mode Selection | ~353 |
|
||||
| #29234 | 12:10 AM | 🔵 | Centralized Settings Management with Environment Defaults | ~394 |
|
||||
|
||||
### Dec 20, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #31086 | 7:59 PM | 🔵 | Transcript Parser Extracts Messages from JSONL Hook Files | ~327 |
|
||||
| #30939 | 6:57 PM | 🔵 | Worker Utils File Examined for Error Handling Inconsistency | ~393 |
|
||||
| #30855 | 6:22 PM | 🔵 | Transcript Parser Content Format Handling Examined | ~406 |
|
||||
|
||||
### Dec 25, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #32616 | 8:43 PM | 🔵 | Comprehensive analysis of "enable billing" setting and its impact on rate limiting | ~533 |
|
||||
| #32538 | 7:28 PM | ✅ | Set default Gemini billing to disabled | ~164 |
|
||||
</claude-mem-context>
|
||||
@@ -76,11 +76,30 @@ export function toRelativePath(filePath: string, cwd: string): string {
|
||||
}
|
||||
|
||||
/**
|
||||
* Extract first file from files_modified JSON array, or return 'General'
|
||||
* Extract first relevant file from files_modified OR files_read JSON arrays.
|
||||
* Prefers files_modified, falls back to files_read.
|
||||
* Returns 'General' only if both are empty.
|
||||
*/
|
||||
export function extractFirstFile(filesModified: string | null, cwd: string): string {
|
||||
const files = parseJsonArray(filesModified);
|
||||
return files.length > 0 ? toRelativePath(files[0], cwd) : 'General';
|
||||
export function extractFirstFile(
|
||||
filesModified: string | null,
|
||||
cwd: string,
|
||||
filesRead?: string | null
|
||||
): string {
|
||||
// Try files_modified first
|
||||
const modified = parseJsonArray(filesModified);
|
||||
if (modified.length > 0) {
|
||||
return toRelativePath(modified[0], cwd);
|
||||
}
|
||||
|
||||
// Fall back to files_read
|
||||
if (filesRead) {
|
||||
const read = parseJsonArray(filesRead);
|
||||
if (read.length > 0) {
|
||||
return toRelativePath(read[0], cwd);
|
||||
}
|
||||
}
|
||||
|
||||
return 'General';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,169 @@
|
||||
<claude-mem-context>
|
||||
# Recent Activity
|
||||
|
||||
<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->
|
||||
|
||||
### Nov 21, 2025
|
||||
|
||||
**transcript.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #13598 | 5:39 PM | 🔵 | Full transcript schema structure with all content type definitions revealed | ~493 |
|
||||
| #13593 | 5:38 PM | 🔵 | Transcript schema defines five transcript entry types with comprehensive structures | ~610 |
|
||||
|
||||
### Nov 23, 2025
|
||||
|
||||
**transcript.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #14665 | 7:25 PM | 🔵 | Tool Use ID Now Available in Hook Input Schema | ~395 |
|
||||
| #14613 | 6:07 PM | 🔵 | Transcript Transformation System Analyzed for Test Creation | ~632 |
|
||||
| #14580 | 5:37 PM | 🔵 | AssistantMessage type definition includes all required schema fields | ~395 |
|
||||
|
||||
### Nov 25, 2025
|
||||
|
||||
**transcript.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #15387 | 5:35 PM | 🔵 | Existing Transcript Processing Infrastructure with TypeScript Parser | ~430 |
|
||||
| #15022 | 2:37 PM | ✅ | README.md Updated with Empirically Validated 50-60% Token Reduction | ~336 |
|
||||
| #15003 | 2:28 PM | 🔵 | Comprehensive Transcript Processing Infrastructure | ~309 |
|
||||
|
||||
### Dec 7, 2025
|
||||
|
||||
**database.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #21829 | 11:05 PM | 🔄 | Massive refactor adds 8,671 lines and removes 5,585 lines across 60 files | ~619 |
|
||||
| #21659 | 9:35 PM | 🟣 | Database Type Definitions Created for Type Safety | ~355 |
|
||||
|
||||
### Dec 8, 2025
|
||||
|
||||
**transcript.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #22273 | 9:22 PM | 🔵 | Transcript Modification Flow in Endless Mode Fully Traced | ~1061 |
|
||||
| #22035 | 6:00 PM | 🔵 | Identified tool_use_id tracking across 13 TypeScript modules | ~329 |
|
||||
|
||||
**database.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #22047 | 6:03 PM | 🔵 | Database types define schema interfaces for SQLite query results with better-sqlite3 type safety | ~620 |
|
||||
| #21925 | 4:55 PM | 🔵 | Database Schema Types Review | ~350 |
|
||||
|
||||
### Dec 10, 2025
|
||||
|
||||
**database.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #23734 | 9:03 PM | 🔵 | Database Type Definitions Identified | ~290 |
|
||||
|
||||
### Dec 11, 2025
|
||||
|
||||
**database.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #23959 | 1:58 PM | 🔵 | TypeScript Codebase Architecture Mapped | ~337 |
|
||||
|
||||
### Dec 12, 2025
|
||||
|
||||
**database.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #24394 | 7:24 PM | 🟣 | Phase 6 Agent Completed Git Commit and PR Update | ~444 |
|
||||
| #24391 | " | ✅ | Committed Complete Migration from better-sqlite3 to bun:sqlite | ~436 |
|
||||
| #24390 | 7:23 PM | ✅ | Staged All 19 Modified Files for Git Commit | ~301 |
|
||||
| #24389 | " | 🟣 | Phase 5 Agent Completed Full System Verification | ~726 |
|
||||
| #24388 | 7:22 PM | 🟣 | Phase 5 Complete - All Verification Passed for Production Deployment | ~600 |
|
||||
| #24387 | " | 🔵 | Uncommitted Changes Identified Across Documentation and Core Services | ~368 |
|
||||
|
||||
### Dec 14, 2025
|
||||
|
||||
**database.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #26543 | 10:21 PM | 🔵 | Comprehensive Schema Migration from Legacy to SDK Architecture | ~902 |
|
||||
| #26527 | 10:18 PM | 🔵 | Database Type Definitions with Schema and Record Interfaces | ~564 |
|
||||
| #26523 | 10:17 PM | 🔵 | Shared Database Type Definitions | ~399 |
|
||||
| #25904 | 6:21 PM | 🔵 | Database Type Definitions for SQLite Records | ~396 |
|
||||
|
||||
### Dec 16, 2025
|
||||
|
||||
**transcript.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #28038 | 8:05 PM | 🔵 | Transcript Type Definitions | ~412 |
|
||||
| #28027 | 8:04 PM | 🔵 | Transcript Type Definitions | ~395 |
|
||||
|
||||
### Dec 18, 2025
|
||||
|
||||
**database.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #29773 | 7:01 PM | 🔵 | Observation Type Definitions Across Codebase | ~362 |
|
||||
|
||||
### Dec 20, 2025
|
||||
|
||||
**transcript.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #30785 | 6:01 PM | 🔵 | Transcript Type System Models Claude Code JSONL Structure | ~563 |
|
||||
|
||||
**database.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #30784 | 6:01 PM | 🔵 | Database Type System Defines SQLite Schema Contracts | ~538 |
|
||||
| #30272 | 3:23 PM | 🟣 | Added UserPromptWithContext TypeScript interface | ~230 |
|
||||
|
||||
**bun-sqlite.d.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #30332 | 3:39 PM | 🟣 | Created PR #399 for TypeScript Compilation Fixes | ~293 |
|
||||
| #30330 | 3:38 PM | 🔴 | TypeScript errors fixed across 21 files with type definitions added | ~378 |
|
||||
| #30321 | 3:34 PM | ✅ | Removed Ragtime Script and Staged Bun-SQLite Types | ~229 |
|
||||
| #30315 | 3:33 PM | 🔴 | Comprehensive TypeScript Error Resolution | ~560 |
|
||||
| #30302 | 3:30 PM | 🔴 | Corrected Bun SQLite Transaction Method Signature | ~333 |
|
||||
| #30294 | 3:27 PM | 🔴 | Fixed bun:sqlite type declarations to match actual runtime API | ~313 |
|
||||
| #30268 | 3:22 PM | 🔴 | Added TypeScript declarations for bun:sqlite module | ~276 |
|
||||
|
||||
### Dec 22, 2025
|
||||
|
||||
**mode-config.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #31951 | 8:17 PM | 🟣 | Mode System with Inheritance and Multilingual Support | ~776 |
|
||||
|
||||
### Dec 24, 2025
|
||||
|
||||
**database.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #32158 | 6:42 PM | 🔵 | Database Type Definitions and Identifier Patterns | ~479 |
|
||||
| #32157 | 6:41 PM | 🔵 | Shared Type Definitions Use SDK Session ID | ~300 |
|
||||
|
||||
### Dec 25, 2025
|
||||
|
||||
**database.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #32558 | 8:18 PM | 🔵 | Identified files containing 'summary' or 'Summary' | ~167 |
|
||||
|
||||
### Dec 28, 2025
|
||||
|
||||
**database.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #33438 | 10:15 PM | 🔄 | Bulk Rename Session ID Fields Across Entire Codebase | ~384 |
|
||||
|
||||
### Jan 4, 2026
|
||||
|
||||
**database.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #36824 | 1:00 AM | 🔵 | Database Types Define Canonical Record Interfaces | ~654 |
|
||||
| #36775 | 12:43 AM | 🔵 | Database Record Type Definitions | ~542 |
|
||||
| #36770 | 12:42 AM | 🔵 | Export Script Type Duplication Analysis Complete | ~555 |
|
||||
| #36761 | 12:36 AM | ✅ | Created Implementation Plans for Four GitHub Issues | ~507 |
|
||||
| #36760 | 12:34 AM | ✅ | Created Issue #531 Report: Export Script Type Duplication | ~430 |
|
||||
| #36758 | " | 🔵 | Issue #531 Root Cause - 73 Lines of Duplicated Export Type Definitions | ~529 |
|
||||
</claude-mem-context>
|
||||
@@ -0,0 +1,39 @@
|
||||
<claude-mem-context>
|
||||
# Recent Activity
|
||||
|
||||
<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->
|
||||
|
||||
### Dec 25, 2025
|
||||
|
||||
**viewer-template.html**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #32516 | 6:58 PM | 🟣 | Spinning favicon animation during processing | ~347 |
|
||||
|
||||
### Dec 26, 2025
|
||||
|
||||
**viewer-template.html**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #32977 | 11:13 PM | 🔵 | User questions Save button placement in settings modal | ~172 |
|
||||
| #32976 | 11:12 PM | 🔵 | UI button placement questioned in settings modal | ~166 |
|
||||
|
||||
### Jan 1, 2026
|
||||
|
||||
**viewer-template.html**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #35609 | 10:53 PM | ✅ | Removed logs-btn from Mobile Responsive Styles | ~221 |
|
||||
| #35608 | " | ✅ | Removed logs-icon Class from Icon Sizing Styles | ~173 |
|
||||
| #35607 | " | ✅ | Removed Legacy Logs Button Styles from CSS | ~217 |
|
||||
| #35606 | " | 🟣 | Complete CSS Implementation for Chrome DevTools-Style Console Drawer | ~650 |
|
||||
|
||||
### Jan 2, 2026
|
||||
|
||||
**viewer-template.html**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #35901 | 2:49 PM | 🔵 | PR #525 File Changes Summary | ~376 |
|
||||
| #35878 | 2:40 PM | 🔵 | Console Drawer Styling and Structure in HTML Template | ~531 |
|
||||
| #35814 | 2:25 PM | 🟣 | Console Filter Bar and Log Line Styling Added | ~328 |
|
||||
</claude-mem-context>
|
||||
@@ -0,0 +1,11 @@
|
||||
<claude-mem-context>
|
||||
# Recent Activity
|
||||
|
||||
<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->
|
||||
|
||||
### Nov 30, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #17551 | 4:34 PM | 🔴 | Added missing props to Sidebar component instantiation | ~356 |
|
||||
</claude-mem-context>
|
||||
@@ -0,0 +1,117 @@
|
||||
<claude-mem-context>
|
||||
# Recent Activity
|
||||
|
||||
<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->
|
||||
|
||||
### Dec 25, 2025
|
||||
|
||||
**ContextSettingsModal.tsx**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #32789 | 9:49 PM | 🟣 | Gemini AI Provider Integration Merged to Main | ~409 |
|
||||
| #32640 | 8:46 PM | 🟣 | Renamed "Billing Enabled" setting to "Rate Limiting" with inverted logic | ~546 |
|
||||
| #32630 | 8:45 PM | ✅ | Updated UI toggle for rate limiting in `ContextSettingsModal` | ~345 |
|
||||
| #32622 | 8:44 PM | ✅ | Updated UI toggle for rate limiting in `ContextSettingsModal` | ~375 |
|
||||
| #32615 | 8:43 PM | 🔵 | Confirmed UI text for "Billing Enabled" toggle | ~244 |
|
||||
| #32613 | " | 🔵 | Comprehensive identification of `CLAUDE_MEM_GEMINI_BILLING_ENABLED` usage | ~407 |
|
||||
| #32608 | 8:42 PM | 🔵 | Identified UI component for "Billing Enabled" toggle | ~348 |
|
||||
| #32604 | " | 🔵 | Identified "billing" setting and its direct link to rate limiting | ~405 |
|
||||
| #32603 | " | 🔵 | Identified widespread use of "Gemini" across application components | ~312 |
|
||||
| #32559 | 8:18 PM | 🔵 | Listed files changed in the current branch | ~169 |
|
||||
| #32550 | 7:31 PM | 🟣 | Added Gemini Billing Enabled toggle in UI | ~189 |
|
||||
|
||||
### Dec 26, 2025
|
||||
|
||||
**ContextSettingsModal.tsx**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #32977 | 11:13 PM | 🔵 | User questions Save button placement in settings modal | ~172 |
|
||||
| #32976 | 11:12 PM | 🔵 | UI button placement questioned in settings modal | ~166 |
|
||||
| #32978 | 11:04 PM | 🔵 | ContextSettingsModal component structure examined | ~199 |
|
||||
| #32979 | " | 🔵 | Save button implemented in modal footer section | ~195 |
|
||||
| #32980 | " | 🔄 | Save button moved inside modal body structure | ~182 |
|
||||
| #32925 | 10:26 PM | 🔵 | OpenRouter Provider Integration Proposed in PR 448 | ~543 |
|
||||
| #32923 | 10:18 PM | 🔵 | OpenRouter Integration Architecture in claude-mem | ~610 |
|
||||
| #32922 | 10:17 PM | 🔵 | OpenRouter Integration in Settings UI | ~362 |
|
||||
| #32913 | 10:05 PM | 🔵 | PR #448 Code Review: OpenRouter Provider Integration | ~523 |
|
||||
| #32909 | 10:01 PM | 🔵 | ContextSettingsModal provides rich UI for settings with live preview and provider configuration | ~611 |
|
||||
|
||||
### Dec 28, 2025
|
||||
|
||||
**ContextSettingsModal.tsx**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #33279 | 3:07 PM | ✅ | Changed Default OpenRouter Model to Free Tier Option | ~285 |
|
||||
|
||||
### Dec 30, 2025
|
||||
|
||||
**ContextSettingsModal.tsx**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #34384 | 1:39 PM | 🔵 | UI Provides "haiku" as Model Selection Option | ~296 |
|
||||
|
||||
### Jan 1, 2026
|
||||
|
||||
**LogsModal.tsx**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #35668 | 11:40 PM | ✅ | Main branch updated with major feature additions | ~377 |
|
||||
| #35598 | 10:51 PM | 🔄 | Logs UI Refactored from Modal to Bottom Drawer | ~505 |
|
||||
| #35597 | 10:29 PM | 🟣 | Logs Viewer Modal Component Created | ~299 |
|
||||
|
||||
**Header.tsx**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #35603 | 10:52 PM | 🟣 | Removed Logs Button from Header UI | ~274 |
|
||||
| #35602 | " | ✅ | Removed onLogsToggle from Header Destructuring | ~215 |
|
||||
| #35601 | " | 🔄 | Removed onLogsToggle Prop from Header Interface | ~191 |
|
||||
|
||||
### Jan 2, 2026
|
||||
|
||||
**LogsModal.tsx**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #35999 | 5:32 PM | 🟣 | Alignment Quick Filter Added to Console Logs UI | ~308 |
|
||||
| #35982 | 5:09 PM | ✅ | Built and deployed claude-mem version 8.5.4 with LogsModal UI component | ~295 |
|
||||
| #35981 | 5:08 PM | 🟣 | Implemented alignment quick filter UI in LogsModal | ~281 |
|
||||
| #35980 | " | 🟣 | Alignment-only filter added to LogsModal | ~323 |
|
||||
| #35979 | " | 🟣 | Added alignment filter state to LogsModal component | ~219 |
|
||||
| #35978 | " | 🔵 | LogsModal viewer component with filtering and parsing capabilities | ~447 |
|
||||
| #35904 | 2:49 PM | 🟣 | Implemented Structured Log Parsing in LogsModal | ~400 |
|
||||
| #35901 | " | 🔵 | PR #525 File Changes Summary | ~376 |
|
||||
| #35879 | 2:41 PM | 🟣 | Enhanced LogsModal with Parsing, Filtering, Colors, Icons, and Auto-Scroll | ~726 |
|
||||
| #35877 | 2:40 PM | 🔵 | LogsDrawer Component Current Implementation | ~426 |
|
||||
| #35820 | 2:28 PM | 🔵 | Current LogsDrawer implementation analyzed | ~289 |
|
||||
|
||||
**Header.tsx**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #35875 | 2:39 PM | 🔵 | Logging UI Architecture Mapped | ~599 |
|
||||
| #35839 | 2:30 PM | 🔵 | Header component with project filter dropdown | ~245 |
|
||||
|
||||
**SummaryCard.tsx**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #35834 | 2:30 PM | 🔵 | SummaryCard demonstrates icon usage pattern | ~281 |
|
||||
|
||||
**Feed.tsx**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #35832 | 2:29 PM | 🔵 | Feed component with intersection observer for infinite scroll | ~300 |
|
||||
|
||||
**ObservationCard.tsx**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #35828 | 2:29 PM | 🔵 | ObservationCard styling and interaction patterns | ~275 |
|
||||
|
||||
### Jan 4, 2026
|
||||
|
||||
**ContextSettingsModal.tsx**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #36781 | 12:45 AM | 🔵 | Complete GeminiAgent Model Configuration Gap Analysis | ~552 |
|
||||
| #36773 | 12:43 AM | 🔵 | Gemini Model Options in Settings UI | ~490 |
|
||||
| #36757 | 12:33 AM | 🔵 | Issue #511 Root Cause Identified - Gemini-3-Flash Configuration Mismatch | ~416 |
|
||||
| #36756 | " | 🔵 | UI Component Also Lists gemini-3-flash | ~339 |
|
||||
| #36754 | " | 🔵 | Gemini-3-Flash Model Already Supported | ~301 |
|
||||
</claude-mem-context>
|
||||
@@ -0,0 +1,11 @@
|
||||
<claude-mem-context>
|
||||
# Recent Activity
|
||||
|
||||
<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->
|
||||
|
||||
### Dec 26, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #32982 | 11:04 PM | 🔵 | Read default settings configuration file | ~233 |
|
||||
</claude-mem-context>
|
||||
@@ -0,0 +1,63 @@
|
||||
<claude-mem-context>
|
||||
# Recent Activity
|
||||
|
||||
<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->
|
||||
|
||||
### Nov 5, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #3944 | 9:06 PM | 🔵 | UI Codebase Technical Debt Analysis | ~562 |
|
||||
| #3926 | 8:57 PM | ✅ | Built viewer with SSE processing fix | ~149 |
|
||||
| #3925 | " | 🔴 | Removed premature session processing flag on prompt arrival | ~240 |
|
||||
| #3901 | 8:10 PM | 🔴 | Fixed Temporal Dead Zone Error in Viewer App | ~292 |
|
||||
| #3900 | " | 🔵 | Pagination Hook Examined for Fix Implementation | ~202 |
|
||||
| #3890 | 7:50 PM | 🔄 | Refactored project filtering to use database queries instead of client-side filtering | ~515 |
|
||||
| #3880 | 7:35 PM | ⚖️ | Deployed Focused Diagnosis Agent for Filter Bug Root Cause | ~343 |
|
||||
| #3879 | 7:32 PM | ⚖️ | Deployed Investigation Agent for Project Filtering Bug | ~296 |
|
||||
| #3848 | 6:49 PM | 🟣 | Created usePagination Hook for Infinite Scroll | ~372 |
|
||||
| #3835 | 6:34 PM | 🔵 | SSE hook for viewer UI exploration | ~278 |
|
||||
| #3796 | 5:50 PM | 🟣 | Migrated viewer UI from static HTML to React with TypeScript | ~797 |
|
||||
|
||||
### Nov 7, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #4705 | 8:02 PM | 🔄 | Removed Redundant stateRef Update Effect | ~302 |
|
||||
| #4696 | 7:58 PM | 🔵 | PR Review Feedback Analysis Completed | ~382 |
|
||||
| #4680 | 7:40 PM | 🔴 | Fixed Pagination Filter Change Race Condition | ~329 |
|
||||
| #4678 | 7:39 PM | 🔵 | Pagination Hook Implementation in Claude-Mem Viewer | ~402 |
|
||||
| #4674 | 7:36 PM | 🔵 | React Pagination Hook with Concurrent Request Prevention | ~421 |
|
||||
| #4668 | 7:32 PM | 🔵 | Pagination hook manages filter-aware data loading with concurrent request prevention | ~430 |
|
||||
| #4636 | 7:12 PM | 🔴 | Added Missing 'investigated' Field to Summary Type Definitions and UI Display | ~521 |
|
||||
| #4375 | 1:23 PM | 🔵 | Pagination Hook for Historical Data Loading | ~351 |
|
||||
| #4373 | 1:22 PM | 🔵 | React SSE Hook for Real-time UI Updates | ~342 |
|
||||
|
||||
### Nov 8, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #4916 | 1:49 PM | ⚖️ | Claude Mem Pro Premium Offering Implementation Plan Finalized | ~946 |
|
||||
| #4902 | 1:35 PM | 🟣 | Claude Mem Pro Premium Project Initialization | ~679 |
|
||||
| #4901 | 1:31 PM | ⚖️ | Premium claude-mem Project Architecture and Planning | ~797 |
|
||||
|
||||
### Nov 10, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #6210 | 12:32 PM | ✅ | Updated useSettings Hook to Load MCP Setting from API | ~289 |
|
||||
|
||||
### Nov 23, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #14565 | 5:23 PM | 🔵 | SSE Hook Handles new_summary Events | ~305 |
|
||||
|
||||
### Dec 26, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #32949 | 10:55 PM | 🔵 | Complete settings persistence flow for Xiaomi MIMO v2 Flash model | ~320 |
|
||||
| #32944 | 10:53 PM | 🔵 | useSettings hook provides complete settings persistence lifecycle | ~289 |
|
||||
| #32974 | " | 🟣 | Added OpenRouter and Gemini rate limiting configuration support | ~215 |
|
||||
</claude-mem-context>
|
||||
@@ -0,0 +1,58 @@
|
||||
<claude-mem-context>
|
||||
# Recent Activity
|
||||
|
||||
<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->
|
||||
|
||||
### Nov 5, 2025
|
||||
|
||||
**data.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #4057 | 10:48 PM | 🟣 | Web-Based Viewer UI for Real-Time Memory Stream | ~610 |
|
||||
| #3956 | 9:10 PM | 🔄 | Extracted mergeAndDeduplicateByProject helper function to eliminate duplicate filtering logic | ~404 |
|
||||
|
||||
**formatters.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #3960 | 9:11 PM | 🟣 | Added formatDate utility function to formatters.ts | ~268 |
|
||||
| #3865 | 7:17 PM | 🔄 | Extracted formatting utilities into shared module | ~337 |
|
||||
|
||||
### Nov 7, 2025
|
||||
|
||||
**data.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #4726 | 8:28 PM | ✅ | Merged PR #70 with project filter improvements to main branch | ~382 |
|
||||
| #4715 | 8:04 PM | ✅ | Committed PR feedback fixes to bugfix/project-filter branch | ~337 |
|
||||
| #4712 | " | 🔄 | Simplified validation in data.ts mergeAndDeduplicateByProject | ~249 |
|
||||
| #4692 | 7:44 PM | 🔴 | Fixed Critical Project Filter Synchronization Issues in Viewer UI | ~435 |
|
||||
| #4690 | " | 🟣 | Enhanced Session and Summary Handling with Filtering and Pagination | ~420 |
|
||||
| #4667 | 7:32 PM | 🔵 | Examined Data Utility for Merging SSE and Paginated Items | ~422 |
|
||||
| #4660 | 7:29 PM | 🔴 | Fixed project filtering in UI header | ~328 |
|
||||
|
||||
### Dec 2, 2025
|
||||
|
||||
**formatNumber.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #19683 | 11:53 PM | 🔵 | PR Diff Shows 3,140 Insertions Across 17 Files | ~331 |
|
||||
| #19220 | 6:06 PM | ✅ | GitHub Stars Button Component Deployed to Production | ~256 |
|
||||
| #19214 | 6:03 PM | 🟣 | Number Formatting Utility Created | ~402 |
|
||||
|
||||
**textDiff.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #19556 | 10:54 PM | 🟣 | Implemented prefix/suffix token diff algorithm | ~364 |
|
||||
|
||||
**ansiTokenizer.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #19555 | 10:54 PM | 🟣 | ANSI Tokenizer Utility Created | ~447 |
|
||||
|
||||
### Dec 11, 2025
|
||||
|
||||
**data.ts**
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #23959 | 1:58 PM | 🔵 | TypeScript Codebase Architecture Mapped | ~337 |
|
||||
</claude-mem-context>
|
||||
+50
-10
@@ -3,18 +3,58 @@
|
||||
|
||||
<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->
|
||||
|
||||
### Jan 5, 2026
|
||||
### Nov 5, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #4035 | 10:24 PM | 🔵 | logger.ts file exists but is empty | ~220 |
|
||||
|
||||
### Nov 10, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #6521 | 5:43 PM | 🔵 | Code Review: Enhanced HTTP Logging and Double Entries Bug Fix | ~482 |
|
||||
|
||||
### Nov 17, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #10019 | 12:14 AM | 🔵 | TranscriptParser Utility: JSONL Parsing with Type-Safe Entry Filtering | ~569 |
|
||||
|
||||
### Nov 23, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #14626 | 6:25 PM | 🔵 | Stop Hook Summary Not in Transcript Validator Schema | ~359 |
|
||||
|
||||
### Nov 28, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #17238 | 11:34 PM | 🔵 | Existing TranscriptParser TypeScript implementation handles nested message structure | ~493 |
|
||||
|
||||
### Dec 5, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #20407 | 7:20 PM | 🔵 | Tag stripping utilities implement dual-tag privacy system with ReDoS protection | ~415 |
|
||||
|
||||
### Dec 8, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #22310 | 9:46 PM | 🟣 | Complete Hook Lifecycle Documentation Generated | ~603 |
|
||||
| #22306 | 9:45 PM | 🔵 | Dual-Tag Privacy System with ReDoS Protection | ~461 |
|
||||
|
||||
### Dec 14, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #25691 | 4:24 PM | 🔵 | happy_path_error__with_fallback utility logs errors to silent.log and returns fallback values | ~460 |
|
||||
|
||||
### Dec 20, 2025
|
||||
|
||||
| ID | Time | T | Title | Read |
|
||||
|----|------|---|-------|------|
|
||||
| #30883 | 6:38 PM | 🔵 | Tag-Stripping DRY Violation Analysis | ~152 |
|
||||
| #25691 | 4:24 PM | 🔵 | happy_path_error__with_fallback utility logs errors to silent.log and returns fallback values | ~460 |
|
||||
| #22310 | 9:46 PM | 🟣 | Complete Hook Lifecycle Documentation Generated | ~603 |
|
||||
| #22306 | 9:45 PM | 🔵 | Dual-Tag Privacy System with ReDoS Protection | ~461 |
|
||||
| #20407 | 7:20 PM | 🔵 | Tag stripping utilities implement dual-tag privacy system with ReDoS protection | ~415 |
|
||||
| #17238 | 11:34 PM | 🔵 | Existing TranscriptParser TypeScript implementation handles nested message structure | ~493 |
|
||||
| #14626 | 6:25 PM | 🔵 | Stop Hook Summary Not in Transcript Validator Schema | ~359 |
|
||||
| #10019 | 12:14 AM | 🔵 | TranscriptParser Utility: JSONL Parsing with Type-Safe Entry Filtering | ~569 |
|
||||
| #6521 | 5:43 PM | 🔵 | Code Review: Enhanced HTTP Logging and Double Entries Bug Fix | ~482 |
|
||||
| #4035 | 10:24 PM | 🔵 | logger.ts file exists but is empty | ~220 |
|
||||
</claude-mem-context>
|
||||
@@ -0,0 +1,291 @@
|
||||
/**
|
||||
* CLAUDE.md File Utilities
|
||||
*
|
||||
* Shared utilities for writing folder-level CLAUDE.md files with
|
||||
* auto-generated context sections. Preserves user content outside
|
||||
* <claude-mem-context> tags.
|
||||
*/
|
||||
|
||||
import { existsSync, readFileSync, writeFileSync, renameSync, mkdirSync } from 'fs';
|
||||
import path from 'path';
|
||||
import os from 'os';
|
||||
import { logger } from './logger.js';
|
||||
import { formatDate, groupByDate } from '../shared/timeline-formatting.js';
|
||||
import { SettingsDefaultsManager } from '../shared/SettingsDefaultsManager.js';
|
||||
import { getWorkerHost } from '../shared/worker-utils.js';
|
||||
|
||||
const SETTINGS_PATH = path.join(os.homedir(), '.claude-mem', 'settings.json');
|
||||
|
||||
/**
|
||||
* Replace tagged content in existing file, preserving content outside tags.
|
||||
*
|
||||
* Handles three cases:
|
||||
* 1. No existing content → wraps new content in tags
|
||||
* 2. Has existing tags → replaces only tagged section
|
||||
* 3. No tags in existing content → appends tagged content at end
|
||||
*/
|
||||
export function replaceTaggedContent(existingContent: string, newContent: string): string {
|
||||
const startTag = '<claude-mem-context>';
|
||||
const endTag = '</claude-mem-context>';
|
||||
|
||||
// If no existing content, wrap new content in tags
|
||||
if (!existingContent) {
|
||||
return `${startTag}\n${newContent}\n${endTag}`;
|
||||
}
|
||||
|
||||
// If existing has tags, replace only tagged section
|
||||
const startIdx = existingContent.indexOf(startTag);
|
||||
const endIdx = existingContent.indexOf(endTag);
|
||||
|
||||
if (startIdx !== -1 && endIdx !== -1) {
|
||||
return existingContent.substring(0, startIdx) +
|
||||
`${startTag}\n${newContent}\n${endTag}` +
|
||||
existingContent.substring(endIdx + endTag.length);
|
||||
}
|
||||
|
||||
// If no tags exist, append tagged content at end
|
||||
return existingContent + `\n\n${startTag}\n${newContent}\n${endTag}`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Write CLAUDE.md file to folder with atomic writes.
|
||||
* Creates directory structure if needed.
|
||||
*
|
||||
* @param folderPath - Absolute path to the folder
|
||||
* @param newContent - Content to write inside tags
|
||||
*/
|
||||
export function writeClaudeMdToFolder(folderPath: string, newContent: string): void {
|
||||
const claudeMdPath = path.join(folderPath, 'CLAUDE.md');
|
||||
const tempFile = `${claudeMdPath}.tmp`;
|
||||
|
||||
// Ensure directory exists
|
||||
mkdirSync(folderPath, { recursive: true });
|
||||
|
||||
// Read existing content if file exists
|
||||
let existingContent = '';
|
||||
if (existsSync(claudeMdPath)) {
|
||||
existingContent = readFileSync(claudeMdPath, 'utf-8');
|
||||
}
|
||||
|
||||
// Replace only tagged content, preserve user content
|
||||
const finalContent = replaceTaggedContent(existingContent, newContent);
|
||||
|
||||
// Atomic write: temp file + rename
|
||||
writeFileSync(tempFile, finalContent);
|
||||
renameSync(tempFile, claudeMdPath);
|
||||
}
|
||||
|
||||
/**
|
||||
* Parsed observation from API response text
|
||||
*/
|
||||
interface ParsedObservation {
|
||||
id: string;
|
||||
time: string;
|
||||
typeEmoji: string;
|
||||
title: string;
|
||||
tokens: string;
|
||||
epoch: number; // For date grouping
|
||||
}
|
||||
|
||||
/**
|
||||
* Format timeline text from API response to timeline format.
|
||||
*
|
||||
* Uses the same format as search results:
|
||||
* - Grouped by date (### Jan 4, 2026)
|
||||
* - Grouped by file within each date (**filename**)
|
||||
* - Table with columns: ID, Time, T (type emoji), Title, Read (tokens)
|
||||
* - Ditto marks for repeated times
|
||||
*
|
||||
* @param timelineText - Raw API response text
|
||||
* @returns Formatted markdown with date/file grouping
|
||||
*/
|
||||
export function formatTimelineForClaudeMd(timelineText: string): string {
|
||||
const lines: string[] = [];
|
||||
lines.push('# Recent Activity');
|
||||
lines.push('');
|
||||
lines.push('<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->');
|
||||
lines.push('');
|
||||
|
||||
// Parse the API response to extract observation rows
|
||||
const apiLines = timelineText.split('\n');
|
||||
|
||||
// Note: We skip file grouping since we're querying by folder - all results are from the same folder
|
||||
|
||||
// Parse observations: | #123 | 4:30 PM | 🔧 | Title | ~250 | ... |
|
||||
const observations: ParsedObservation[] = [];
|
||||
let lastTimeStr = '';
|
||||
let currentDate: Date | null = null;
|
||||
|
||||
for (const line of apiLines) {
|
||||
// Check for date headers: ### Jan 4, 2026
|
||||
const dateMatch = line.match(/^###\s+(.+)$/);
|
||||
if (dateMatch) {
|
||||
const dateStr = dateMatch[1].trim();
|
||||
const parsedDate = new Date(dateStr);
|
||||
// Validate the parsed date
|
||||
if (!isNaN(parsedDate.getTime())) {
|
||||
currentDate = parsedDate;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
// Match table rows: | #123 | 4:30 PM | 🔧 | Title | ~250 | ... |
|
||||
// Also handles ditto marks and session IDs (#S123)
|
||||
const match = line.match(/^\|\s*(#[S]?\d+)\s*\|\s*([^|]+)\s*\|\s*([^|]+)\s*\|\s*([^|]+)\s*\|\s*([^|]+)\s*\|/);
|
||||
if (match) {
|
||||
const [, id, timeStr, typeEmoji, title, tokens] = match;
|
||||
|
||||
// Handle ditto mark (″) - use last time
|
||||
let time: string;
|
||||
if (timeStr.trim() === '″' || timeStr.trim() === '"') {
|
||||
time = lastTimeStr;
|
||||
} else {
|
||||
time = timeStr.trim();
|
||||
lastTimeStr = time;
|
||||
}
|
||||
|
||||
// Parse time and combine with current date header (or fallback to today)
|
||||
const baseDate = currentDate ? new Date(currentDate) : new Date();
|
||||
const timeParts = time.match(/(\d+):(\d+)\s*(AM|PM)/i);
|
||||
let epoch = baseDate.getTime();
|
||||
if (timeParts) {
|
||||
let hours = parseInt(timeParts[1], 10);
|
||||
const minutes = parseInt(timeParts[2], 10);
|
||||
const isPM = timeParts[3].toUpperCase() === 'PM';
|
||||
if (isPM && hours !== 12) hours += 12;
|
||||
if (!isPM && hours === 12) hours = 0;
|
||||
baseDate.setHours(hours, minutes, 0, 0);
|
||||
epoch = baseDate.getTime();
|
||||
}
|
||||
|
||||
observations.push({
|
||||
id: id.trim(),
|
||||
time,
|
||||
typeEmoji: typeEmoji.trim(),
|
||||
title: title.trim(),
|
||||
tokens: tokens.trim(),
|
||||
epoch
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (observations.length === 0) {
|
||||
lines.push('*No recent activity*');
|
||||
return lines.join('\n');
|
||||
}
|
||||
|
||||
// Group by date
|
||||
const byDate = groupByDate(observations, obs => new Date(obs.epoch).toISOString());
|
||||
|
||||
// Render each date group
|
||||
for (const [day, dayObs] of byDate) {
|
||||
lines.push(`### ${day}`);
|
||||
lines.push('');
|
||||
lines.push('| ID | Time | T | Title | Read |');
|
||||
lines.push('|----|------|---|-------|------|');
|
||||
|
||||
let lastTime = '';
|
||||
for (const obs of dayObs) {
|
||||
const timeDisplay = obs.time === lastTime ? '"' : obs.time;
|
||||
lastTime = obs.time;
|
||||
lines.push(`| ${obs.id} | ${timeDisplay} | ${obs.typeEmoji} | ${obs.title} | ${obs.tokens} |`);
|
||||
}
|
||||
|
||||
lines.push('');
|
||||
}
|
||||
|
||||
return lines.join('\n').trim();
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a folder is a project root (contains .git directory).
|
||||
* Project root CLAUDE.md files should remain user-managed, not auto-updated.
|
||||
*/
|
||||
function isProjectRoot(folderPath: string): boolean {
|
||||
const gitPath = path.join(folderPath, '.git');
|
||||
return existsSync(gitPath);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update CLAUDE.md files for folders containing the given files.
|
||||
* Fetches timeline from worker API and writes formatted content.
|
||||
*
|
||||
* NOTE: Project root folders (containing .git) are excluded to preserve
|
||||
* user-managed root CLAUDE.md files. Only subfolder CLAUDE.md files are auto-updated.
|
||||
*
|
||||
* @param filePaths - Array of absolute file paths (modified or read)
|
||||
* @param project - Project identifier for API query
|
||||
* @param port - Worker API port
|
||||
*/
|
||||
export async function updateFolderClaudeMdFiles(
|
||||
filePaths: string[],
|
||||
project: string,
|
||||
port: number,
|
||||
projectRoot?: string
|
||||
): Promise<void> {
|
||||
// Load settings to get configurable observation limit
|
||||
const settings = SettingsDefaultsManager.loadFromFile(SETTINGS_PATH);
|
||||
const limit = parseInt(settings.CLAUDE_MEM_CONTEXT_OBSERVATIONS, 10) || 50;
|
||||
|
||||
// Extract unique folder paths from file paths
|
||||
const folderPaths = new Set<string>();
|
||||
for (const filePath of filePaths) {
|
||||
if (!filePath || filePath === '') continue;
|
||||
// Resolve relative paths to absolute using projectRoot
|
||||
let absoluteFilePath = filePath;
|
||||
if (projectRoot && !path.isAbsolute(filePath)) {
|
||||
absoluteFilePath = path.join(projectRoot, filePath);
|
||||
}
|
||||
const folderPath = path.dirname(absoluteFilePath);
|
||||
if (folderPath && folderPath !== '.' && folderPath !== '/') {
|
||||
// Skip project root - root CLAUDE.md should remain user-managed
|
||||
if (isProjectRoot(folderPath)) {
|
||||
logger.debug('FOLDER_INDEX', 'Skipping project root CLAUDE.md', { folderPath });
|
||||
continue;
|
||||
}
|
||||
folderPaths.add(folderPath);
|
||||
}
|
||||
}
|
||||
|
||||
if (folderPaths.size === 0) return;
|
||||
|
||||
logger.debug('FOLDER_INDEX', 'Updating CLAUDE.md files', {
|
||||
project,
|
||||
folderCount: folderPaths.size
|
||||
});
|
||||
|
||||
// Process each folder
|
||||
for (const folderPath of folderPaths) {
|
||||
try {
|
||||
// Fetch timeline via existing API
|
||||
const host = getWorkerHost();
|
||||
const response = await fetch(
|
||||
`http://${host}:${port}/api/search/by-file?filePath=${encodeURIComponent(folderPath)}&limit=${limit}&project=${encodeURIComponent(project)}&isFolder=true`
|
||||
);
|
||||
|
||||
if (!response.ok) {
|
||||
logger.warn('FOLDER_INDEX', 'Failed to fetch timeline', { folderPath, status: response.status });
|
||||
continue;
|
||||
}
|
||||
|
||||
const result = await response.json();
|
||||
if (!result.content?.[0]?.text) {
|
||||
logger.debug('FOLDER_INDEX', 'No content for folder', { folderPath });
|
||||
continue;
|
||||
}
|
||||
|
||||
const formatted = formatTimelineForClaudeMd(result.content[0].text);
|
||||
writeClaudeMdToFolder(folderPath, formatted);
|
||||
|
||||
logger.debug('FOLDER_INDEX', 'Updated CLAUDE.md', { folderPath });
|
||||
} catch (error) {
|
||||
// Fire-and-forget: log warning but don't fail
|
||||
const err = error as Error;
|
||||
logger.warn('FOLDER_INDEX', 'Failed to update CLAUDE.md', {
|
||||
folderPath,
|
||||
errorMessage: err.message,
|
||||
errorStack: err.stack
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -15,7 +15,7 @@ export enum LogLevel {
|
||||
SILENT = 4
|
||||
}
|
||||
|
||||
export type Component = 'HOOK' | 'WORKER' | 'SDK' | 'PARSER' | 'DB' | 'SYSTEM' | 'HTTP' | 'SESSION' | 'CHROMA';
|
||||
export type Component = 'HOOK' | 'WORKER' | 'SDK' | 'PARSER' | 'DB' | 'SYSTEM' | 'HTTP' | 'SESSION' | 'CHROMA' | 'FOLDER_INDEX';
|
||||
|
||||
interface LogContext {
|
||||
sessionId?: number;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import path from 'path';
|
||||
import { logger } from './logger.js';
|
||||
import { detectWorktree } from './worktree.js';
|
||||
|
||||
/**
|
||||
* Extract project name from working directory path
|
||||
@@ -37,3 +38,48 @@ export function getProjectName(cwd: string | null | undefined): string {
|
||||
|
||||
return basename;
|
||||
}
|
||||
|
||||
/**
|
||||
* Project context with worktree awareness
|
||||
*/
|
||||
export interface ProjectContext {
|
||||
/** The current project name (worktree or main repo) */
|
||||
primary: string;
|
||||
/** Parent project name if in a worktree, null otherwise */
|
||||
parent: string | null;
|
||||
/** True if currently in a worktree */
|
||||
isWorktree: boolean;
|
||||
/** All projects to query: [primary] for main repo, [parent, primary] for worktree */
|
||||
allProjects: string[];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get project context with worktree detection.
|
||||
*
|
||||
* When in a worktree, returns both the worktree project name and parent project name
|
||||
* for unified timeline queries.
|
||||
*
|
||||
* @param cwd - Current working directory (absolute path)
|
||||
* @returns ProjectContext with worktree info
|
||||
*/
|
||||
export function getProjectContext(cwd: string | null | undefined): ProjectContext {
|
||||
const primary = getProjectName(cwd);
|
||||
|
||||
if (!cwd) {
|
||||
return { primary, parent: null, isWorktree: false, allProjects: [primary] };
|
||||
}
|
||||
|
||||
const worktreeInfo = detectWorktree(cwd);
|
||||
|
||||
if (worktreeInfo.isWorktree && worktreeInfo.parentProjectName) {
|
||||
// In a worktree: include parent first for chronological ordering
|
||||
return {
|
||||
primary,
|
||||
parent: worktreeInfo.parentProjectName,
|
||||
isWorktree: true,
|
||||
allProjects: [worktreeInfo.parentProjectName, primary]
|
||||
};
|
||||
}
|
||||
|
||||
return { primary, parent: null, isWorktree: false, allProjects: [primary] };
|
||||
}
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
/**
|
||||
* Worktree Detection Utility
|
||||
*
|
||||
* Detects if the current working directory is a git worktree and extracts
|
||||
* information about the parent repository.
|
||||
*
|
||||
* Git worktrees have a `.git` file (not directory) containing:
|
||||
* gitdir: /path/to/parent/.git/worktrees/<name>
|
||||
*/
|
||||
|
||||
import { statSync, readFileSync } from 'fs';
|
||||
import path from 'path';
|
||||
|
||||
export interface WorktreeInfo {
|
||||
isWorktree: boolean;
|
||||
worktreeName: string | null; // e.g., "yokohama"
|
||||
parentRepoPath: string | null; // e.g., "/Users/alex/main"
|
||||
parentProjectName: string | null; // e.g., "main"
|
||||
}
|
||||
|
||||
const NOT_A_WORKTREE: WorktreeInfo = {
|
||||
isWorktree: false,
|
||||
worktreeName: null,
|
||||
parentRepoPath: null,
|
||||
parentProjectName: null
|
||||
};
|
||||
|
||||
/**
|
||||
* Detect if a directory is a git worktree and extract parent info.
|
||||
*
|
||||
* @param cwd - Current working directory (absolute path)
|
||||
* @returns WorktreeInfo with parent details if worktree, otherwise isWorktree=false
|
||||
*/
|
||||
export function detectWorktree(cwd: string): WorktreeInfo {
|
||||
const gitPath = path.join(cwd, '.git');
|
||||
|
||||
// Check if .git is a file (worktree) or directory (main repo)
|
||||
let stat;
|
||||
try {
|
||||
stat = statSync(gitPath);
|
||||
} catch {
|
||||
// No .git at all - not a git repo
|
||||
return NOT_A_WORKTREE;
|
||||
}
|
||||
|
||||
if (!stat.isFile()) {
|
||||
// .git is a directory = main repo, not a worktree
|
||||
return NOT_A_WORKTREE;
|
||||
}
|
||||
|
||||
// Parse .git file to find parent repo
|
||||
let content: string;
|
||||
try {
|
||||
content = readFileSync(gitPath, 'utf-8').trim();
|
||||
} catch {
|
||||
return NOT_A_WORKTREE;
|
||||
}
|
||||
|
||||
// Format: gitdir: /path/to/parent/.git/worktrees/<name>
|
||||
const match = content.match(/^gitdir:\s*(.+)$/);
|
||||
if (!match) {
|
||||
return NOT_A_WORKTREE;
|
||||
}
|
||||
|
||||
const gitdirPath = match[1];
|
||||
|
||||
// Extract: /path/to/parent from /path/to/parent/.git/worktrees/name
|
||||
// Handle both Unix and Windows paths
|
||||
const worktreesMatch = gitdirPath.match(/^(.+)[/\\]\.git[/\\]worktrees[/\\]([^/\\]+)$/);
|
||||
if (!worktreesMatch) {
|
||||
return NOT_A_WORKTREE;
|
||||
}
|
||||
|
||||
const parentRepoPath = worktreesMatch[1];
|
||||
const worktreeName = path.basename(cwd);
|
||||
const parentProjectName = path.basename(parentRepoPath);
|
||||
|
||||
return {
|
||||
isWorktree: true,
|
||||
worktreeName,
|
||||
parentRepoPath,
|
||||
parentProjectName
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user