refactor: implement in-process worker architecture for hooks (#722)
* fix: stop generating empty CLAUDE.md files - Return empty string instead of "No recent activity" when no observations exist - Skip writing CLAUDE.md files when formatted content is empty - Remove redundant "auto-generated by claude-mem" HTML comment - Clean up 98 existing empty CLAUDE.md files across the codebase - Update tests to expect empty string for empty input Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * build assets * refactor: implement in-process worker architecture for hooks Replaces spawn-based worker startup with in-process architecture: - Hook processes now become the worker when port 37777 is free - Eliminates Windows spawn issues (NO SPAWN rule) - SessionStart chains: smart-install && stop && context Key changes: - worker-service.ts: hook case starts WorkerService in-process - hook-command.ts: skipExit option prevents process.exit() when hosting worker - hooks.json: single chained command replaces separate start/hook commands - worker-utils.ts: ensureWorkerRunning() returns boolean, doesn't block - handlers: graceful fallback when worker unavailable All 761 tests pass. Manual verification confirms hook stays alive as worker. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * context * a * MAESTRO: Mark PR #722 test verification task complete All 797 tests passed (3 skipped, 0 failed) after merge conflict resolution. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * MAESTRO: Mark PR #722 build verification task complete * MAESTRO: Mark PR #722 code review task complete Code review verified: - worker-service.ts hook case starts WorkerService in-process - hook-command.ts has skipExit option - hooks.json uses single chained command - worker-utils.ts ensureWorkerRunning() returns boolean Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * MAESTRO: Mark PR #722 conflict resolution push task complete Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,169 +0,0 @@
|
||||
<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>
|
||||
Reference in New Issue
Block a user