From a2ab45a461152ba77051fd42c011d88c129dd6ab Mon Sep 17 00:00:00 2001 From: Alex Newman Date: Sat, 10 Jan 2026 18:22:08 -0500 Subject: [PATCH] feat: move development commands to plugin distribution (#666) * feat: move development commands to plugin distribution Move /do, /make-plan, and /anti-pattern-czar commands from project-level .claude/commands/ to plugin/commands/ so they are distributed with the plugin and available to all users as /claude-mem:do, /claude-mem:make-plan, and /claude-mem:anti-pattern-czar. Co-Authored-By: Claude Opus 4.5 * chore: Update CLAUDE.md and package version; fix bugs and enhance tests - Updated CLAUDE.md to reflect changes and new entries for January 2026. - Bumped package version from 9.0.2 to 9.0.3 in package.json. - Refactored worker-service.cjs for improved error handling and process management. - Added new bugfix documentation for critical issues identified on January 10, 2026. - Cleaned up integration test logs and removed outdated entries in tests/integration/CLAUDE.md. - Updated server test documentation to reflect recent changes and removed old entries. - Enhanced hook response patterns and added new entries in hooks/CLAUDE.md. * fix: keep anti-pattern-czar as internal dev tool The anti-pattern-czar command relies on scripts that only exist in the claude-mem development repository, so it shouldn't be distributed with the plugin. Moving it back to .claude/commands/ for internal use. Co-Authored-By: Claude Opus 4.5 --------- Co-authored-by: Claude Opus 4.5 --- .claude/CLAUDE.md | 22 +---- .claude/commands/CLAUDE.md | 28 ++---- plugin/CLAUDE.md | 59 +------------ plugin/commands/CLAUDE.md | 18 ++++ {.claude => plugin}/commands/do.md | 0 {.claude => plugin}/commands/make-plan.md | 0 plugin/hooks/bugfixes-2026-01-10.md | 92 ++++++++++++++++++++ plugin/package.json | 2 +- plugin/scripts/worker-service.cjs | 2 +- src/hooks/CLAUDE.md | 7 +- tests/integration/CLAUDE.md | 101 +--------------------- tests/server/CLAUDE.md | 39 +-------- 12 files changed, 131 insertions(+), 239 deletions(-) create mode 100644 plugin/commands/CLAUDE.md rename {.claude => plugin}/commands/do.md (100%) rename {.claude => plugin}/commands/make-plan.md (100%) create mode 100644 plugin/hooks/bugfixes-2026-01-10.md diff --git a/.claude/CLAUDE.md b/.claude/CLAUDE.md index 6d748f3b..e2782952 100644 --- a/.claude/CLAUDE.md +++ b/.claude/CLAUDE.md @@ -3,27 +3,9 @@ -### Dec 21, 2025 +### Nov 3, 2025 -**test-analysis-report.md** | ID | Time | T | Title | Read | |----|------|---|-------|------| -| #31743 | 10:36 PM | ๐Ÿ”ต | PR #412 proposes mode system with inheritance and multilingual support | ~523 | - -### Dec 22, 2025 - -**test-analysis-report.md** -| ID | Time | T | Title | Read | -|----|------|---|-------|------| -| #31865 | 6:56 PM | โœ… | ้–‹็™บใƒ‰ใ‚ญใƒฅใƒกใƒณใƒˆใฎใ‚ฏใƒชใƒผใƒณใ‚ขใƒƒใƒ—ใ‚’ใ‚ณใƒŸใƒƒใƒˆ | ~150 | -| #31864 | " | โœ… | ่จˆ็”ปใƒ‰ใ‚ญใƒฅใƒกใƒณใƒˆใจๅˆ†ๆžใƒ•ใ‚กใ‚คใƒซใฎๅ‰Š้™ค | ~142 | -| #31859 | 6:55 PM | โœ… | ่จˆ็”ปใƒ‰ใ‚ญใƒฅใƒกใƒณใƒˆใƒ•ใ‚กใ‚คใƒซใฎๅ‰Š้™ค | ~109 | -| #31855 | 6:53 PM | โœ… | ใƒ†ใ‚นใƒˆใ‚นใ‚คใƒผใƒˆใฎๅคง่ฆๆจกๅ‰Š้™คใจใƒ†ใ‚นใƒˆๅˆ†ๆžใƒฌใƒใƒผใƒˆใฎ่ฟฝๅŠ  | ~197 | - -### Dec 25, 2025 - -**settings.json** -| ID | Time | T | Title | Read | -|----|------|---|-------|------| -| #32602 | 8:42 PM | ๐Ÿ”ต | Identified potential settings configuration files | ~224 | +| #3366 | 3:40 PM | ๐Ÿ”ต | Claude Mem MCP Search Architecture and Timeline Tool Capabilities | ~438 | \ No newline at end of file diff --git a/.claude/commands/CLAUDE.md b/.claude/commands/CLAUDE.md index b5bd293d..2aa3649b 100644 --- a/.claude/commands/CLAUDE.md +++ b/.claude/commands/CLAUDE.md @@ -5,30 +5,16 @@ ### Oct 25, 2025 -**changelog.md** | ID | Time | T | Title | Read | |----|------|---|-------|------| -| #2491 | 10:59 PM | ๐ŸŸฃ | Added changelog viewer slash command | ~290 | +| #2484 | 6:33 PM | ๐Ÿ”ด | Removed slash commands from incorrect root .claude/commands directory | ~268 | + +### Jan 10, 2026 -**terminal-shortcut.md** | ID | Time | T | Title | Read | |----|------|---|-------|------| -| #2480 | 6:32 PM | ๐ŸŸฃ | Cross-platform terminal shortcut command for claude-mem CLI | ~459 | - -**setup-alias.md** -| ID | Time | T | Title | Read | -|----|------|---|-------|------| -| #2479 | 6:29 PM | ๐ŸŸฃ | Shell Alias Setup Slash Command | ~423 | - -**version-bump.md** -| ID | Time | T | Title | Read | -|----|------|---|-------|------| -| #2358 | 1:07 PM | ๐ŸŸฃ | Created version-bump slash command for automated version updates | ~361 | - -### Jan 1, 2026 - -**anti-pattern-czar.md** -| ID | Time | T | Title | Read | -|----|------|---|-------|------| -| #35638 | 11:17 PM | ๐ŸŸฃ | Anti-Pattern Czar Custom Command Created | ~583 | +| #39054 | 3:45 PM | ๐Ÿ”„ | Development commands removed from root .claude directory | ~249 | +| #39053 | " | ๐ŸŸฃ | Added development commands to plugin distribution | ~276 | +| #39051 | 3:44 PM | ๐Ÿ”ต | Development commands confirmed in .claude/commands/ | ~315 | +| #39049 | " | ๐Ÿ”ต | Development commands located in .claude/commands/ directory | ~293 | \ No newline at end of file diff --git a/plugin/CLAUDE.md b/plugin/CLAUDE.md index b3000e32..8afb2b06 100644 --- a/plugin/CLAUDE.md +++ b/plugin/CLAUDE.md @@ -3,64 +3,9 @@ -### Nov 10, 2025 +### Jan 10, 2026 | ID | Time | T | Title | Read | |----|------|---|-------|------| -| #6276 | 12:58 PM | ๐Ÿ”ด | MCP Configuration Path Missing "plugin/" Directory Component | ~418 | -| #6274 | 12:57 PM | ๐Ÿ”ต | Installed MCP Configuration Uses Incorrect Path | ~389 | -| #6270 | " | ๐Ÿ”ต | MCP Search Server Enable/Disable Documentation | ~314 | -| #6253 | 12:55 PM | ๐Ÿ”ต | MCP Configuration Files Are Identical | ~311 | -| #6250 | 12:54 PM | ๐Ÿ”ต | MCP Search Server Connection Failure Reported | ~329 | -| #6249 | " | ๐Ÿ”ด | MCP Enable/Disable Implementation Overcomplicated | ~329 | -| #6244 | 12:50 PM | ๐Ÿ”ด | MCP search configuration persistence fixed in settings UI | ~378 | -| #6225 | 12:44 PM | ๐Ÿ”„ | Renamed MCP Template File from .optional to .template Convention | ~336 | -| #6217 | 12:40 PM | โœ… | MCP Documentation Updated to Reference UI Toggle | ~360 | -| #6214 | 12:39 PM | โœ… | Repository Cleanup - Removed Temporary Documentation Files | ~321 | -| #6201 | 12:28 PM | ๐ŸŸฃ | Created Quick Start Guide for Enabling MCP Search | ~338 | -| #6193 | 12:27 PM | ๐ŸŸฃ | Created Optional MCP Configuration File | ~313 | -| #6190 | " | ๐ŸŸฃ | Created optional MCP configuration file for user-controlled search server enablement | ~364 | -| #6189 | " | ๐ŸŸฃ | Created MCP search server enable/disable documentation | ~307 | -| #6183 | 12:26 PM | ๐Ÿ”ต | MCP Search Server Commented Out in Plugin Configuration | ~322 | -| #6180 | 12:25 PM | ๐Ÿ”ต | MCP configuration file current state | ~127 | - -### Dec 10, 2025 - -| ID | Time | T | Title | Read | -|----|------|---|-------|------| -| #23444 | 2:25 PM | ๐ŸŸฃ | Build Pipeline Execution Successful | ~293 | - -### Dec 11, 2025 - -| ID | Time | T | Title | Read | -|----|------|---|-------|------| -| #24055 | 2:55 PM | โœ… | Build Successful with Bun Runtime Shebangs | ~355 | - -### Dec 14, 2025 - -| ID | Time | T | Title | Read | -|----|------|---|-------|------| -| #26800 | 11:39 PM | โœ… | Version 7.2.3 Build Complete With Worker Restart Fix | ~394 | -| #26766 | 11:30 PM | โš–๏ธ | Root Cause Identified: Missing Post-Install Worker Restart Trigger in Plugin Update Flow | ~604 | -| #25815 | 5:31 PM | ๐Ÿ”ต | Comprehensive MCP Server and SKILL.md Structure Analysis | ~575 | -| #25813 | " | ๐Ÿ”ต | MCP Server Configuration with Stdio Transport | ~367 | - -### Dec 16, 2025 - -| ID | Time | T | Title | Read | -|----|------|---|-------|------| -| #27555 | 4:48 PM | โœ… | Version bump committed to main branch | ~242 | -| #27554 | " | โœ… | Project built successfully with version 7.3.1 | ~306 | - -### Dec 17, 2025 - -| ID | Time | T | Title | Read | -|----|------|---|-------|------| -| #28922 | 7:28 PM | ๐Ÿ”ต | Plugin MCP Server Configuration for mem-search | ~245 | - -### Dec 19, 2025 - -| ID | Time | T | Title | Read | -|----|------|---|-------|------| -| #30096 | 8:09 PM | ๐Ÿ”ต | Claude-Mem Plugin Includes MCP Server Configuration | ~246 | +| #39048 | 3:44 PM | ๐Ÿ”ต | Plugin directory contains commands folder | ~276 | \ No newline at end of file diff --git a/plugin/commands/CLAUDE.md b/plugin/commands/CLAUDE.md new file mode 100644 index 00000000..99923558 --- /dev/null +++ b/plugin/commands/CLAUDE.md @@ -0,0 +1,18 @@ + +# Recent Activity + + + +### Oct 25, 2025 + +| ID | Time | T | Title | Read | +|----|------|---|-------|------| +| #2437 | 4:32 PM | ๐ŸŸฃ | Slash Command Files Created for Quick Settings Toggling | ~478 | + +### Jan 10, 2026 + +| ID | Time | T | Title | Read | +|----|------|---|-------|------| +| #39052 | 3:44 PM | ๐ŸŸฃ | Commands added to plugin distribution | ~268 | +| #39050 | " | ๐Ÿ”ต | Plugin commands directory is empty | ~255 | + \ No newline at end of file diff --git a/.claude/commands/do.md b/plugin/commands/do.md similarity index 100% rename from .claude/commands/do.md rename to plugin/commands/do.md diff --git a/.claude/commands/make-plan.md b/plugin/commands/make-plan.md similarity index 100% rename from .claude/commands/make-plan.md rename to plugin/commands/make-plan.md diff --git a/plugin/hooks/bugfixes-2026-01-10.md b/plugin/hooks/bugfixes-2026-01-10.md new file mode 100644 index 00000000..1f3d9986 --- /dev/null +++ b/plugin/hooks/bugfixes-2026-01-10.md @@ -0,0 +1,92 @@ +# Bugfix Sprint: 2026-01-10 + +## Critical Priority (Blocks Users) + +### #646 - Plugin bricks Claude Code - stdin fstat EINVAL crash +- **Impact**: Plugin completely bricks Claude Code on Linux. Users cannot recover without manual config editing. +- **Root Cause**: Bun's stdin handling causes fstat EINVAL when reading piped input +- **Related Discussion**: Check if this is a Bun upstream issue +- [ ] Investigate stdin handling in hook scripts +- [ ] Test on Linux with stdin piping +- [ ] Implement fix + +### #623 - Crash-recovery loop when memory_session_id not captured +- **Impact**: Infinite loop consuming API tokens, growing queue unbounded +- **Root Cause**: memory_session_id not captured, causes repeated crash-recovery +- [ ] Add null/undefined check for memory_session_id +- [ ] Add circuit breaker for crash-recovery attempts + +## High Priority + +### #638 - Worker startup missing JSON output causes hooks to appear stuck +- **Impact**: UI appears stuck during worker startup +- [ ] Ensure worker startup emits proper JSON status +- [ ] Add progress feedback to hook output + +### #641/#609 - CLAUDE.md files in subdirectories +- **Impact**: CLAUDE.md files scattered throughout project directories +- **Note**: This is a documented feature request that was never implemented (setting exists but doesn't work) +- [ ] Implement the `disableSubdirectoryCLAUDEmd` setting properly +- [ ] Or change default behavior to not create subdirectory files + +### #635 - JSON parsing error prevents folder context generation +- **Impact**: Folder context not generating, breaks context injection +- **Root Cause**: String spread instead of array spread +- [ ] Fix the JSON parsing logic +- [ ] Add proper error handling + +## Medium Priority + +### #582 - Tilde paths create literal ~ directories +- **Impact**: Directories named "~" created instead of expanding to home +- [ ] Use path expansion for tilde in all path operations +- [ ] Audit all path handling code + +### #642/#643 - ChromaDB search fails due to initialization timing +- **Impact**: Search fails with JSON parse error +- **Note**: #643 is a duplicate of #642 +- [ ] Fix initialization timing issue +- [ ] Add proper async/await handling + +### #626 - HealthMonitor hardcodes ~/.claude path +- **Impact**: Fails for users with custom config directories +- [ ] Use configurable path instead of hardcoded ~/.claude +- [ ] Respect CLAUDE_CONFIG_DIR or similar env var + +### #598 - Too many messages pollute conversation history +- **Impact**: Hook messages clutter conversation +- [ ] Reduce verbosity of hook messages +- [ ] Make message frequency configurable + +## Low Priority (Code Quality) + +### #648 - Empty catch blocks swallow JSON parse errors +- [ ] Add proper error logging to catch blocks in SessionSearch.ts + +### #649 - Inconsistent logging in CursorHooksInstaller +- [ ] Replace console.log with structured logger +- **Note**: 177 console.log calls across 20 files identified + +## Won't Fix / Not a Bug + +### #632 - Feature request for disabling CLAUDE.md in subdirectories +- **Note**: Covered by #641 implementation + +### #633 - Help request about Cursor integration +- **Note**: Documentation/support issue, not a bug + +### #640 - Arabic README translation +- **Note**: Documentation PR, not a bugfix + +### #624 - Beta testing strategy proposal +- **Note**: Enhancement proposal, not a bugfix + +## Already Fixed in v9.0.2 + +- Windows Terminal tab accumulation (#625/#628) +- Windows 11 compatibility - WMIC to PowerShell migration +- Claude Code 2.1.1 compatibility + path validation (#614) + +--- + +**Recommended Approach**: Fix #646 first (critical blocker), then #623 (crash loop), then work through high priority issues in order of impact. diff --git a/plugin/package.json b/plugin/package.json index cc521d61..3ff5afd8 100644 --- a/plugin/package.json +++ b/plugin/package.json @@ -1,6 +1,6 @@ { "name": "claude-mem-plugin", - "version": "9.0.2", + "version": "9.0.3", "private": true, "description": "Runtime dependencies for claude-mem bundled hooks", "type": "module", diff --git a/plugin/scripts/worker-service.cjs b/plugin/scripts/worker-service.cjs index 3dac4582..db249c45 100755 --- a/plugin/scripts/worker-service.cjs +++ b/plugin/scripts/worker-service.cjs @@ -749,7 +749,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs. `}var mG=yl.default.platform==="win32"?["APPDATA","HOMEDRIVE","HOMEPATH","LOCALAPPDATA","PATH","PROCESSOR_ARCHITECTURE","SYSTEMDRIVE","SYSTEMROOT","TEMP","USERNAME","USERPROFILE","PROGRAMFILES"]:["HOME","LOGNAME","PATH","SHELL","TERM","USER"];function hG(){let t={};for(let e of mG){let r=yl.default.env[e];r!==void 0&&(r.startsWith("()")||(t[e]=r))}return t}var Es=class{constructor(e){this._readBuffer=new am,this._stderrStream=null,this._serverParams=e,(e.stderr==="pipe"||e.stderr==="overlapped")&&(this._stderrStream=new DR.PassThrough)}async start(){if(this._process)throw new Error("StdioClientTransport already started! If using Client class, note that connect() calls start() automatically.");return new Promise((e,r)=>{this._process=(0,MR.default)(this._serverParams.command,this._serverParams.args??[],{env:{...hG(),...this._serverParams.env},stdio:["pipe","pipe",this._serverParams.stderr??"inherit"],shell:!1,windowsHide:yl.default.platform==="win32"&&gG(),cwd:this._serverParams.cwd}),this._process.on("error",n=>{r(n),this.onerror?.(n)}),this._process.on("spawn",()=>{e()}),this._process.on("close",n=>{this._process=void 0,this.onclose?.()}),this._process.stdin?.on("error",n=>{this.onerror?.(n)}),this._process.stdout?.on("data",n=>{this._readBuffer.append(n),this.processReadBuffer()}),this._process.stdout?.on("error",n=>{this.onerror?.(n)}),this._stderrStream&&this._process.stderr&&this._process.stderr.pipe(this._stderrStream)})}get stderr(){return this._stderrStream?this._stderrStream:this._process?.stderr??null}get pid(){return this._process?.pid??null}processReadBuffer(){for(;;)try{let e=this._readBuffer.readMessage();if(e===null)break;this.onmessage?.(e)}catch(e){this.onerror?.(e)}}async close(){if(this._process){let e=this._process;this._process=void 0;let r=new Promise(n=>{e.once("close",()=>{n()})});try{e.stdin?.end()}catch{}if(await Promise.race([r,new Promise(n=>setTimeout(n,2e3).unref())]),e.exitCode===null){try{e.kill("SIGTERM")}catch{}await Promise.race([r,new Promise(n=>setTimeout(n,2e3).unref())])}if(e.exitCode===null)try{e.kill("SIGKILL")}catch{}}this._readBuffer.clear()}send(e){return new Promise(r=>{if(!this._process?.stdin)throw new Error("Not connected");let n=AR(e);this._process.stdin.write(n)?r():this._process.stdin.once("drain",r)})}};function gG(){return"type"in yl.default}Zr();$e();var W0=ut(require("path"),1),XR=require("os"),Hn=require("fs"),ks=require("child_process"),YR=require("util");$e();xl();var cm=(0,YR.promisify)(ks.exec),QR=W0.default.join((0,XR.homedir)(),".claude-mem"),ro=W0.default.join(QR,"worker.pid");function K0(t){(0,Hn.mkdirSync)(QR,{recursive:!0}),(0,Hn.writeFileSync)(ro,JSON.stringify(t,null,2))}function eC(){if(!(0,Hn.existsSync)(ro))return null;try{return JSON.parse((0,Hn.readFileSync)(ro,"utf-8"))}catch(t){return k.warn("SYSTEM","Failed to parse PID file",{path:ro},t),null}}function Ui(){if((0,Hn.existsSync)(ro))try{(0,Hn.unlinkSync)(ro)}catch(t){k.warn("SYSTEM","Failed to remove PID file",{path:ro},t)}}function no(t){return process.platform==="win32"?Math.round(t*2):t}async function tC(t){if(process.platform!=="win32")return[];if(!Number.isInteger(t)||t<=0)return k.warn("SYSTEM","Invalid parent PID for child process enumeration",{parentPid:t}),[];try{let e=`powershell -NoProfile -NonInteractive -Command "Get-Process | Where-Object { \\$_.ParentProcessId -eq ${t} } | Select-Object -ExpandProperty Id"`,{stdout:r}=await cm(e,{timeout:ma.POWERSHELL_COMMAND});return r.split(` `).map(n=>n.trim()).filter(n=>n.length>0&&/^\d+$/.test(n)).map(n=>parseInt(n,10)).filter(n=>n>0)}catch(e){return k.error("SYSTEM","Failed to enumerate child processes",{parentPid:t},e),[]}}async function rC(t){if(!Number.isInteger(t)||t<=0){k.warn("SYSTEM","Invalid PID for force kill",{pid:t});return}try{process.platform==="win32"?await cm(`taskkill /PID ${t} /T /F`,{timeout:ma.POWERSHELL_COMMAND}):process.kill(t,"SIGKILL"),k.info("SYSTEM","Killed process",{pid:t})}catch(e){k.debug("SYSTEM","Process already exited during force kill",{pid:t},e)}}async function nC(t,e){let r=Date.now();for(;Date.now()-r{try{return process.kill(i,0),!0}catch{return!1}});if(n.length===0){k.info("SYSTEM","All child processes exited");return}k.debug("SYSTEM","Waiting for processes to exit",{stillAlive:n}),await new Promise(i=>setTimeout(i,100))}k.warn("SYSTEM","Timeout waiting for child processes to exit")}async function iC(){let t=process.platform==="win32",e=[];try{if(t){let r=`powershell -NoProfile -NonInteractive -Command "Get-CimInstance Win32_Process | Where-Object { \\$_.Name -like '*python*' -and \\$_.CommandLine -like '*chroma-mcp*' } | Select-Object -ExpandProperty ProcessId"`,{stdout:n}=await cm(r,{timeout:ma.POWERSHELL_COMMAND});if(!n.trim()){k.debug("SYSTEM","No orphaned chroma-mcp processes found (Windows)");return}let i=n.split(` `).map(a=>a.trim()).filter(a=>a.length>0&&/^\d+$/.test(a));for(let a of i){let o=parseInt(a,10);!isNaN(o)&&Number.isInteger(o)&&o>0&&e.push(o)}}else{let{stdout:r}=await cm('ps aux | grep "chroma-mcp" | grep -v grep || true');if(!r.trim()){k.debug("SYSTEM","No orphaned chroma-mcp processes found (Unix)");return}let n=r.trim().split(` -`);for(let i of n){let a=i.trim().split(/\s+/);if(a.length>1){let o=parseInt(a[1],10);!isNaN(o)&&Number.isInteger(o)&&o>0&&e.push(o)}}}}catch(r){k.error("SYSTEM","Failed to enumerate orphaned processes",{},r);return}if(e.length!==0){if(k.info("SYSTEM","Cleaning up orphaned chroma-mcp processes",{platform:t?"Windows":"Unix",count:e.length,pids:e}),t)for(let r of e){if(!Number.isInteger(r)||r<=0){k.warn("SYSTEM","Skipping invalid PID",{pid:r});continue}try{(0,ks.execSync)(`taskkill /PID ${r} /T /F`,{timeout:ma.POWERSHELL_COMMAND,stdio:"ignore"})}catch(n){k.debug("SYSTEM","Failed to kill process, may have already exited",{pid:r},n)}}else for(let r of e)try{process.kill(r,"SIGKILL")}catch(n){k.debug("SYSTEM","Process already exited",{pid:r},n)}k.info("SYSTEM","Orphaned processes cleaned up",{count:e.length})}}function J0(t,e,r={}){let n=(0,ks.spawn)(process.execPath,[t,"--daemon"],{detached:!0,stdio:"ignore",windowsHide:!0,env:{...process.env,CLAUDE_MEM_WORKER_PORT:String(e),...r}});if(n.pid!==void 0)return n.unref(),n.pid}function aC(t,e){return async r=>{if(e.value){k.warn("SYSTEM",`Received ${r} but shutdown already in progress`);return}e.value=!0,k.info("SYSTEM",`Received ${r}, shutting down...`);try{await t(),process.exit(0)}catch(n){k.error("SYSTEM","Error during shutdown",{},n),process.exit(0)}}}var X0=ut(require("path"),1),oC=require("os"),sC=require("fs");$e();async function um(t){try{return(await fetch(`http://127.0.0.1:${t}/api/health`)).ok}catch{return!1}}async function El(t,e=3e4){let r=Date.now();for(;Date.now()-rsetTimeout(n,500))}return!1}async function lm(t,e=1e4){let r=Date.now();for(;Date.now()-rsetTimeout(n,500))}return!1}async function dm(t){try{let e=await fetch(`http://127.0.0.1:${t}/api/admin/shutdown`,{method:"POST"});return e.ok?!0:(k.warn("SYSTEM","Shutdown request returned error",{port:t,status:e.status}),!1)}catch(e){return e instanceof Error&&e.message?.includes("ECONNREFUSED")?(k.debug("SYSTEM","Worker already stopped",{port:t},e),!1):(k.error("SYSTEM","Shutdown request failed unexpectedly",{port:t},e),!1)}}function SG(){let t=X0.default.join((0,oC.homedir)(),".claude","plugins","marketplaces","thedotmack"),e=X0.default.join(t,"package.json");return JSON.parse((0,sC.readFileSync)(e,"utf-8")).version}async function wG(t){try{let e=await fetch(`http://127.0.0.1:${t}/api/version`);return e.ok?(await e.json()).version:null}catch{return k.debug("SYSTEM","Could not fetch worker version",{port:t}),null}}async function cC(t){let e=SG(),r=await wG(t);return r?{matches:e===r,pluginVersion:e,workerVersion:r}:{matches:!0,pluginVersion:e,workerVersion:r}}$e();async function uC(t){k.info("SYSTEM","Shutdown initiated"),Ui();let e=await tC(process.pid);if(k.info("SYSTEM","Found child processes",{count:e.length,pids:e}),t.server&&(await $G(t.server),k.info("SYSTEM","HTTP server closed")),await t.sessionManager.shutdownAll(),t.mcpClient&&(await t.mcpClient.close(),k.info("SYSTEM","MCP client closed")),t.dbManager&&await t.dbManager.close(),e.length>0){k.info("SYSTEM","Force killing remaining children");for(let r of e)await rC(r);await nC(e,5e3)}k.info("SYSTEM","Worker shutdown complete")}async function $G(t){t.closeAllConnections(),process.platform==="win32"&&await new Promise(e=>setTimeout(e,500)),await new Promise((e,r)=>{t.close(n=>n?r(n):e())}),process.platform==="win32"&&(await new Promise(e=>setTimeout(e,500)),k.info("SYSTEM","Waited for Windows port cleanup"))}var I4=ut(_h(),1),a$=ut(require("fs"),1),o$=ut(require("path"),1);$e();var r$=ut(_h(),1),w4=ut(f4(),1),$4=ut(require("path"),1);ln();$e();function n$(t){let e=[];e.push(r$.default.json({limit:"50mb"})),e.push((0,w4.default)()),e.push((i,a,o)=>{let c=[".html",".js",".css",".svg",".png",".jpg",".jpeg",".webp",".woff",".woff2",".ttf",".eot"].some(g=>i.path.endsWith(g)),u=i.path==="/api/logs";if(i.path.startsWith("/health")||i.path==="/"||c||u)return o();let l=Date.now(),d=`${i.method}-${Date.now()}`,p=t(i.method,i.path,i.body);k.info("HTTP",`\u2192 ${i.method} ${i.path}`,{requestId:d},p);let f=a.send.bind(a);a.send=function(g){let _=Date.now()-l;return k.info("HTTP",`\u2190 ${a.statusCode} ${i.path}`,{requestId:d,duration:`${_}ms`}),f(g)},o()});let r=Kr(),n=$4.default.join(r,"plugin","ui");return e.push(r$.default.static(n)),e}function bh(t,e,r){let n=t.ip||t.connection.remoteAddress||"";if(!(n==="127.0.0.1"||n==="::1"||n==="::ffff:127.0.0.1"||n==="localhost")){k.warn("SECURITY","Admin endpoint access denied - not localhost",{endpoint:t.path,clientIp:n,method:t.method}),e.status(403).json({error:"Forbidden",message:"Admin endpoints are only accessible from localhost"});return}r()}function i$(t,e,r){if(!r||Object.keys(r).length===0||e.includes("/init"))return"";if(e.includes("/observations")){let n=r.tool_name||"?",i=r.tool_input;return`tool=${k.formatTool(n,i)}`}return e.includes("/summarize")?"requesting summary":""}$e();var Qs=class extends Error{constructor(r,n=500,i,a){super(r);this.statusCode=n;this.code=i;this.details=a;this.name="AppError"}};function E4(t,e,r,n){let i={error:t,message:e};return r&&(i.code=r),n&&(i.details=n),i}var k4=(t,e,r,n)=>{let i=t instanceof Qs?t.statusCode:500;k.error("HTTP",`Error handling ${e.method} ${e.path}`,{statusCode:i,error:t.message,code:t instanceof Qs?t.code:void 0},t);let a=E4(t.name||"Error",t.message,t instanceof Qs?t.code:void 0,t instanceof Qs?t.details:void 0);r.status(i).json(a)};function T4(t,e){e.status(404).json(E4("NotFound",`Cannot ${t.method} ${t.path}`))}var zne="9.0.2",xh=class{app;server=null;options;startTime=Date.now();constructor(e){this.options=e,this.app=(0,I4.default)(),this.setupMiddleware(),this.setupCoreRoutes()}getHttpServer(){return this.server}async listen(e,r){return new Promise((n,i)=>{this.server=this.app.listen(e,r,()=>{k.info("SYSTEM","HTTP server started",{host:r,port:e,pid:process.pid}),n()}),this.server.on("error",i)})}async close(){this.server&&(this.server.closeAllConnections(),process.platform==="win32"&&await new Promise(e=>setTimeout(e,500)),await new Promise((e,r)=>{this.server.close(n=>n?r(n):e())}),process.platform==="win32"&&await new Promise(e=>setTimeout(e,500)),this.server=null,k.info("SYSTEM","HTTP server closed"))}registerRoutes(e){e.setupRoutes(this.app)}finalizeRoutes(){this.app.use(T4),this.app.use(k4)}setupMiddleware(){n$(i$).forEach(r=>this.app.use(r))}setupCoreRoutes(){let e="TEST-008-wrapper-ipc";this.app.get("/api/health",(r,n)=>{n.status(200).json({status:"ok",build:e,managed:process.env.CLAUDE_MEM_MANAGED==="true",hasIpc:typeof process.send=="function",platform:process.platform,pid:process.pid,initialized:this.options.getInitializationComplete(),mcpReady:this.options.getMcpReady()})}),this.app.get("/api/readiness",(r,n)=>{this.options.getInitializationComplete()?n.status(200).json({status:"ready",mcpReady:this.options.getMcpReady()}):n.status(503).json({status:"initializing",message:"Worker is still initializing, please retry"})}),this.app.get("/api/version",(r,n)=>{n.status(200).json({version:zne})}),this.app.get("/api/instructions",async(r,n)=>{let i=r.query.topic||"all",a=r.query.operation;try{let o;if(a){let s=o$.default.join(__dirname,"../skills/mem-search/operations",`${a}.md`);o=await a$.promises.readFile(s,"utf-8")}else{let s=o$.default.join(__dirname,"../skills/mem-search/SKILL.md"),c=await a$.promises.readFile(s,"utf-8");o=this.extractInstructionSection(c,i)}n.json({content:[{type:"text",text:o}]})}catch{n.status(404).json({error:"Instruction not found"})}}),this.app.post("/api/admin/restart",bh,async(r,n)=>{n.json({status:"restarting"}),process.platform==="win32"&&process.env.CLAUDE_MEM_MANAGED==="true"&&process.send?(k.info("SYSTEM","Sending restart request to wrapper"),process.send({type:"restart"})):setTimeout(async()=>{await this.options.onRestart()},100)}),this.app.post("/api/admin/shutdown",bh,async(r,n)=>{n.json({status:"shutting_down"}),process.platform==="win32"&&process.env.CLAUDE_MEM_MANAGED==="true"&&process.send?(k.info("SYSTEM","Sending shutdown request to wrapper"),process.send({type:"shutdown"})):setTimeout(async()=>{await this.options.onShutdown()},100)})}extractInstructionSection(e,r){let n={workflow:this.extractBetween(e,"## The Workflow","## Search Parameters"),search_params:this.extractBetween(e,"## Search Parameters","## Examples"),examples:this.extractBetween(e,"## Examples","## Why This Workflow"),all:e};return n[r]||n.all}extractBetween(e,r,n){let i=e.indexOf(r),a=e.indexOf(n);return i===-1?e:a===-1?e.substring(i):e.substring(i,a).trim()}};var lt=ut(require("path"),1),ec=require("os"),Vt=require("fs"),R4=require("child_process"),C4=require("util");$e();Zr();var In=require("fs"),ud=require("path");$e();function O4(t){try{return(0,In.existsSync)(t)?JSON.parse((0,In.readFileSync)(t,"utf-8")):{}}catch(e){return k.error("CONFIG","Failed to read Cursor registry, using empty registry",{file:t,error:e instanceof Error?e.message:String(e)}),{}}}function P4(t,e){let r=(0,ud.join)(t,"..");(0,In.mkdirSync)(r,{recursive:!0}),(0,In.writeFileSync)(t,JSON.stringify(e,null,2))}function s$(t,e){let r=(0,ud.join)(t,".cursor","rules"),n=(0,ud.join)(r,"claude-mem-context.mdc"),i=`${n}.tmp`;(0,In.mkdirSync)(r,{recursive:!0});let a=`--- +`);for(let i of n){let a=i.trim().split(/\s+/);if(a.length>1){let o=parseInt(a[1],10);!isNaN(o)&&Number.isInteger(o)&&o>0&&e.push(o)}}}}catch(r){k.error("SYSTEM","Failed to enumerate orphaned processes",{},r);return}if(e.length!==0){if(k.info("SYSTEM","Cleaning up orphaned chroma-mcp processes",{platform:t?"Windows":"Unix",count:e.length,pids:e}),t)for(let r of e){if(!Number.isInteger(r)||r<=0){k.warn("SYSTEM","Skipping invalid PID",{pid:r});continue}try{(0,ks.execSync)(`taskkill /PID ${r} /T /F`,{timeout:ma.POWERSHELL_COMMAND,stdio:"ignore"})}catch(n){k.debug("SYSTEM","Failed to kill process, may have already exited",{pid:r},n)}}else for(let r of e)try{process.kill(r,"SIGKILL")}catch(n){k.debug("SYSTEM","Process already exited",{pid:r},n)}k.info("SYSTEM","Orphaned processes cleaned up",{count:e.length})}}function J0(t,e,r={}){let n=(0,ks.spawn)(process.execPath,[t,"--daemon"],{detached:!0,stdio:"ignore",windowsHide:!0,env:{...process.env,CLAUDE_MEM_WORKER_PORT:String(e),...r}});if(n.pid!==void 0)return n.unref(),n.pid}function aC(t,e){return async r=>{if(e.value){k.warn("SYSTEM",`Received ${r} but shutdown already in progress`);return}e.value=!0,k.info("SYSTEM",`Received ${r}, shutting down...`);try{await t(),process.exit(0)}catch(n){k.error("SYSTEM","Error during shutdown",{},n),process.exit(0)}}}var X0=ut(require("path"),1),oC=require("os"),sC=require("fs");$e();async function um(t){try{return(await fetch(`http://127.0.0.1:${t}/api/health`)).ok}catch{return!1}}async function El(t,e=3e4){let r=Date.now();for(;Date.now()-rsetTimeout(n,500))}return!1}async function lm(t,e=1e4){let r=Date.now();for(;Date.now()-rsetTimeout(n,500))}return!1}async function dm(t){try{let e=await fetch(`http://127.0.0.1:${t}/api/admin/shutdown`,{method:"POST"});return e.ok?!0:(k.warn("SYSTEM","Shutdown request returned error",{port:t,status:e.status}),!1)}catch(e){return e instanceof Error&&e.message?.includes("ECONNREFUSED")?(k.debug("SYSTEM","Worker already stopped",{port:t},e),!1):(k.error("SYSTEM","Shutdown request failed unexpectedly",{port:t},e),!1)}}function SG(){let t=X0.default.join((0,oC.homedir)(),".claude","plugins","marketplaces","thedotmack"),e=X0.default.join(t,"package.json");return JSON.parse((0,sC.readFileSync)(e,"utf-8")).version}async function wG(t){try{let e=await fetch(`http://127.0.0.1:${t}/api/version`);return e.ok?(await e.json()).version:null}catch{return k.debug("SYSTEM","Could not fetch worker version",{port:t}),null}}async function cC(t){let e=SG(),r=await wG(t);return r?{matches:e===r,pluginVersion:e,workerVersion:r}:{matches:!0,pluginVersion:e,workerVersion:r}}$e();async function uC(t){k.info("SYSTEM","Shutdown initiated"),Ui();let e=await tC(process.pid);if(k.info("SYSTEM","Found child processes",{count:e.length,pids:e}),t.server&&(await $G(t.server),k.info("SYSTEM","HTTP server closed")),await t.sessionManager.shutdownAll(),t.mcpClient&&(await t.mcpClient.close(),k.info("SYSTEM","MCP client closed")),t.dbManager&&await t.dbManager.close(),e.length>0){k.info("SYSTEM","Force killing remaining children");for(let r of e)await rC(r);await nC(e,5e3)}k.info("SYSTEM","Worker shutdown complete")}async function $G(t){t.closeAllConnections(),process.platform==="win32"&&await new Promise(e=>setTimeout(e,500)),await new Promise((e,r)=>{t.close(n=>n?r(n):e())}),process.platform==="win32"&&(await new Promise(e=>setTimeout(e,500)),k.info("SYSTEM","Waited for Windows port cleanup"))}var I4=ut(_h(),1),a$=ut(require("fs"),1),o$=ut(require("path"),1);$e();var r$=ut(_h(),1),w4=ut(f4(),1),$4=ut(require("path"),1);ln();$e();function n$(t){let e=[];e.push(r$.default.json({limit:"50mb"})),e.push((0,w4.default)()),e.push((i,a,o)=>{let c=[".html",".js",".css",".svg",".png",".jpg",".jpeg",".webp",".woff",".woff2",".ttf",".eot"].some(g=>i.path.endsWith(g)),u=i.path==="/api/logs";if(i.path.startsWith("/health")||i.path==="/"||c||u)return o();let l=Date.now(),d=`${i.method}-${Date.now()}`,p=t(i.method,i.path,i.body);k.info("HTTP",`\u2192 ${i.method} ${i.path}`,{requestId:d},p);let f=a.send.bind(a);a.send=function(g){let _=Date.now()-l;return k.info("HTTP",`\u2190 ${a.statusCode} ${i.path}`,{requestId:d,duration:`${_}ms`}),f(g)},o()});let r=Kr(),n=$4.default.join(r,"plugin","ui");return e.push(r$.default.static(n)),e}function bh(t,e,r){let n=t.ip||t.connection.remoteAddress||"";if(!(n==="127.0.0.1"||n==="::1"||n==="::ffff:127.0.0.1"||n==="localhost")){k.warn("SECURITY","Admin endpoint access denied - not localhost",{endpoint:t.path,clientIp:n,method:t.method}),e.status(403).json({error:"Forbidden",message:"Admin endpoints are only accessible from localhost"});return}r()}function i$(t,e,r){if(!r||Object.keys(r).length===0||e.includes("/init"))return"";if(e.includes("/observations")){let n=r.tool_name||"?",i=r.tool_input;return`tool=${k.formatTool(n,i)}`}return e.includes("/summarize")?"requesting summary":""}$e();var Qs=class extends Error{constructor(r,n=500,i,a){super(r);this.statusCode=n;this.code=i;this.details=a;this.name="AppError"}};function E4(t,e,r,n){let i={error:t,message:e};return r&&(i.code=r),n&&(i.details=n),i}var k4=(t,e,r,n)=>{let i=t instanceof Qs?t.statusCode:500;k.error("HTTP",`Error handling ${e.method} ${e.path}`,{statusCode:i,error:t.message,code:t instanceof Qs?t.code:void 0},t);let a=E4(t.name||"Error",t.message,t instanceof Qs?t.code:void 0,t instanceof Qs?t.details:void 0);r.status(i).json(a)};function T4(t,e){e.status(404).json(E4("NotFound",`Cannot ${t.method} ${t.path}`))}var zne="9.0.3",xh=class{app;server=null;options;startTime=Date.now();constructor(e){this.options=e,this.app=(0,I4.default)(),this.setupMiddleware(),this.setupCoreRoutes()}getHttpServer(){return this.server}async listen(e,r){return new Promise((n,i)=>{this.server=this.app.listen(e,r,()=>{k.info("SYSTEM","HTTP server started",{host:r,port:e,pid:process.pid}),n()}),this.server.on("error",i)})}async close(){this.server&&(this.server.closeAllConnections(),process.platform==="win32"&&await new Promise(e=>setTimeout(e,500)),await new Promise((e,r)=>{this.server.close(n=>n?r(n):e())}),process.platform==="win32"&&await new Promise(e=>setTimeout(e,500)),this.server=null,k.info("SYSTEM","HTTP server closed"))}registerRoutes(e){e.setupRoutes(this.app)}finalizeRoutes(){this.app.use(T4),this.app.use(k4)}setupMiddleware(){n$(i$).forEach(r=>this.app.use(r))}setupCoreRoutes(){let e="TEST-008-wrapper-ipc";this.app.get("/api/health",(r,n)=>{n.status(200).json({status:"ok",build:e,managed:process.env.CLAUDE_MEM_MANAGED==="true",hasIpc:typeof process.send=="function",platform:process.platform,pid:process.pid,initialized:this.options.getInitializationComplete(),mcpReady:this.options.getMcpReady()})}),this.app.get("/api/readiness",(r,n)=>{this.options.getInitializationComplete()?n.status(200).json({status:"ready",mcpReady:this.options.getMcpReady()}):n.status(503).json({status:"initializing",message:"Worker is still initializing, please retry"})}),this.app.get("/api/version",(r,n)=>{n.status(200).json({version:zne})}),this.app.get("/api/instructions",async(r,n)=>{let i=r.query.topic||"all",a=r.query.operation;try{let o;if(a){let s=o$.default.join(__dirname,"../skills/mem-search/operations",`${a}.md`);o=await a$.promises.readFile(s,"utf-8")}else{let s=o$.default.join(__dirname,"../skills/mem-search/SKILL.md"),c=await a$.promises.readFile(s,"utf-8");o=this.extractInstructionSection(c,i)}n.json({content:[{type:"text",text:o}]})}catch{n.status(404).json({error:"Instruction not found"})}}),this.app.post("/api/admin/restart",bh,async(r,n)=>{n.json({status:"restarting"}),process.platform==="win32"&&process.env.CLAUDE_MEM_MANAGED==="true"&&process.send?(k.info("SYSTEM","Sending restart request to wrapper"),process.send({type:"restart"})):setTimeout(async()=>{await this.options.onRestart()},100)}),this.app.post("/api/admin/shutdown",bh,async(r,n)=>{n.json({status:"shutting_down"}),process.platform==="win32"&&process.env.CLAUDE_MEM_MANAGED==="true"&&process.send?(k.info("SYSTEM","Sending shutdown request to wrapper"),process.send({type:"shutdown"})):setTimeout(async()=>{await this.options.onShutdown()},100)})}extractInstructionSection(e,r){let n={workflow:this.extractBetween(e,"## The Workflow","## Search Parameters"),search_params:this.extractBetween(e,"## Search Parameters","## Examples"),examples:this.extractBetween(e,"## Examples","## Why This Workflow"),all:e};return n[r]||n.all}extractBetween(e,r,n){let i=e.indexOf(r),a=e.indexOf(n);return i===-1?e:a===-1?e.substring(i):e.substring(i,a).trim()}};var lt=ut(require("path"),1),ec=require("os"),Vt=require("fs"),R4=require("child_process"),C4=require("util");$e();Zr();var In=require("fs"),ud=require("path");$e();function O4(t){try{return(0,In.existsSync)(t)?JSON.parse((0,In.readFileSync)(t,"utf-8")):{}}catch(e){return k.error("CONFIG","Failed to read Cursor registry, using empty registry",{file:t,error:e instanceof Error?e.message:String(e)}),{}}}function P4(t,e){let r=(0,ud.join)(t,"..");(0,In.mkdirSync)(r,{recursive:!0}),(0,In.writeFileSync)(t,JSON.stringify(e,null,2))}function s$(t,e){let r=(0,ud.join)(t,".cursor","rules"),n=(0,ud.join)(r,"claude-mem-context.mdc"),i=`${n}.tmp`;(0,In.mkdirSync)(r,{recursive:!0});let a=`--- alwaysApply: true description: "Claude-mem context from past sessions (auto-updated)" --- diff --git a/src/hooks/CLAUDE.md b/src/hooks/CLAUDE.md index 75f845db..426cd0c2 100644 --- a/src/hooks/CLAUDE.md +++ b/src/hooks/CLAUDE.md @@ -25,7 +25,6 @@ | #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 | ### Dec 10, 2025 @@ -97,4 +96,10 @@ | #38173 | 7:25 PM | ๐Ÿ”ต | Standard Hook Response Pattern for Non-SessionStart Hooks | ~343 | | #38172 | 7:22 PM | ๐Ÿ”ต | Claude Code Hook Output Architecture Clarified - Exit Code Pattern is Correct for User-Only Display | ~523 | | #38170 | 7:21 PM | ๐Ÿ”ต | User-Message-Hook TypeScript Source Shows Exit Code 1 Strategy for User-Only Display | ~203 | + +### Jan 9, 2026 + +| ID | Time | T | Title | Read | +|----|------|---|-------|------| +| #38783 | 4:59 PM | ๐Ÿ”ต | Standard Hook Response Pattern | ~263 | \ No newline at end of file diff --git a/tests/integration/CLAUDE.md b/tests/integration/CLAUDE.md index 819c7d6f..3c96c99d 100644 --- a/tests/integration/CLAUDE.md +++ b/tests/integration/CLAUDE.md @@ -5,106 +5,7 @@ ### Dec 5, 2025 -**full-lifecycle.test.ts** | ID | Time | T | Title | Read | |----|------|---|-------|------| -| #20670 | 8:48 PM | ๐Ÿ”ต | Full Lifecycle Integration Test Analysis | ~428 | -| #20664 | 8:46 PM | ๐Ÿ”ต | Test Suite Verification Complete | ~238 | -| #20651 | 8:43 PM | ๐ŸŸฃ | Comprehensive Test Suite Merged | ~312 | -| #20447 | 7:39 PM | ๐ŸŸฃ | Full Lifecycle Integration Test Suite Created | ~665 | - -### Dec 7, 2025 - -**full-lifecycle.test.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 | - -### Dec 8, 2025 - -**full-lifecycle.test.ts** -| ID | Time | T | Title | Read | -|----|------|---|-------|------| -| #22081 | 6:28 PM | โœ… | Clean Test Suite Execution Without Integration Tests | ~399 | -| #22080 | 6:27 PM | โœ… | Full Test Suite Execution Results | ~456 | -| #22039 | 6:01 PM | ๐Ÿ”ต | Discovered comprehensive TypeScript test suite with 11 test files | ~355 | - -### Dec 9, 2025 - -**full-lifecycle.test.ts** -| ID | Time | T | Title | Read | -|----|------|---|-------|------| -| #22606 | 11:33 AM | ๐Ÿ”ต | Hardcoded port 37777 found across multiple codebase locations | ~371 | - -### Dec 11, 2025 - -**full-lifecycle.test.ts** -| ID | Time | T | Title | Read | -|----|------|---|-------|------| -| #24076 | 3:16 PM | ๐Ÿ”ต | 45 files modified with nearly equal additions and deletions during Bun migration | ~443 | -| #23951 | 1:45 PM | ๐Ÿ”„ | Integration Test Updated to Use Dynamic Port Configuration | ~272 | -| #23933 | 1:36 PM | ๐Ÿ”ต | Comprehensive Port 37777 References Across Documentation and Code | ~427 | - -### Dec 12, 2025 - -**full-lifecycle.test.ts** -| ID | Time | T | Title | Read | -|----|------|---|-------|------| -| #24318 | 5:48 PM | ๐ŸŸฃ | Phase 6 Complete: Comprehensive Bun Worker Testing Passed | ~486 | -| #24317 | 5:47 PM | ๐Ÿ”ต | Test Suite Passes with 42 Tests Across 7 Files | ~326 | -| #24126 | 12:27 AM | ๐ŸŸฃ | Comprehensive Bun Runtime Migration Statistics | ~287 | - -### Dec 13, 2025 - -**hook-execution-environments.test.ts** -| ID | Time | T | Title | Read | -|----|------|---|-------|------| -| #25551 | 11:32 PM | ๐ŸŸฃ | Enhanced error handling system merged into main branch | ~471 | -| #25521 | 11:05 PM | ๐ŸŸฃ | Hook Execution Environment Tests Created | ~529 | - -**full-lifecycle.test.ts** -| ID | Time | T | Title | Read | -|----|------|---|-------|------| -| #25518 | 10:37 PM | ๐Ÿ”ต | Integration Test Coverage Analyzed | ~502 | -| #25499 | 10:30 PM | ๐Ÿ”ต | Full Test Suite Passes with 52 Tests | ~350 | - -### Dec 14, 2025 - -**context-inject-early.test.ts** -| ID | Time | T | Title | Read | -|----|------|---|-------|------| -| #25595 | 2:33 PM | โœ… | PR #310 merged into main branch | ~292 | - -### Dec 18, 2025 - -**hook-execution-environments.test.ts** -| ID | Time | T | Title | Read | -|----|------|---|-------|------| -| #29603 | 5:37 PM | ๐Ÿ”ต | Full Test Suite Results - 120/121 Tests Passing | ~424 | - -### Dec 20, 2025 - -**hook-execution-environments.test.ts** -| ID | Time | T | Title | Read | -|----|------|---|-------|------| -| #30494 | 4:43 PM | ๐Ÿ”ต | Test Suite Status with Bun Path Resolution Failures | ~330 | - -### Dec 21, 2025 - -**hook-execution-environments.test.ts** -| ID | Time | T | Title | Read | -|----|------|---|-------|------| -| #31371 | 6:08 PM | โœ… | Removed Five Incomplete Test Files | ~180 | - -**full-lifecycle.test.ts** -| ID | Time | T | Title | Read | -|----|------|---|-------|------| -| #31370 | 6:07 PM | โœ… | Removed 9 Mock-Based Test Files | ~286 | - -### Dec 22, 2025 - -**context-inject-early.test.ts** -| ID | Time | T | Title | Read | -|----|------|---|-------|------| -| #31855 | 6:53 PM | โœ… | ใƒ†ใ‚นใƒˆใ‚นใ‚คใƒผใƒˆใฎๅคง่ฆๆจกๅ‰Š้™คใจใƒ†ใ‚นใƒˆๅˆ†ๆžใƒฌใƒใƒผใƒˆใฎ่ฟฝๅŠ  | ~197 | +| #20721 | 9:02 PM | ๐Ÿ”ต | Full Lifecycle Integration Test Suite | ~563 | \ No newline at end of file diff --git a/tests/server/CLAUDE.md b/tests/server/CLAUDE.md index 5fb4a7e6..adfdcb11 100644 --- a/tests/server/CLAUDE.md +++ b/tests/server/CLAUDE.md @@ -3,42 +3,5 @@ -### Jan 3, 2026 - -**server.test.ts** -| ID | Time | T | Title | Read | -|----|------|---|-------|------| -| #36583 | 9:57 PM | ๐ŸŸฃ | Server Test Suite Created | ~485 | - -**error-handler.test.ts** -| ID | Time | T | Title | Read | -|----|------|---|-------|------| -| #36581 | 9:57 PM | ๐ŸŸฃ | ErrorHandler Test Suite Created for Phase 6 | ~444 | - -### Jan 4, 2026 - -**error-handler.test.ts** -| ID | Time | T | Title | Read | -|----|------|---|-------|------| -| #36841 | 1:43 AM | ๐Ÿ”ต | Error Handler Testing with Custom Error Classes | ~445 | - -### Jan 5, 2026 - -**CLAUDE.md** -| ID | Time | T | Title | Read | -|----|------|---|-------|------| -| #38078 | 9:54 PM | โœ… | CLAUDE.md Documentation Cleanup - 1,233 Lines Removed Across 18 Files | ~590 | - -**server.test.ts** -| ID | Time | T | Title | Read | -|----|------|---|-------|------| -| #38018 | 9:14 PM | ๐ŸŸฃ | Added comprehensive test coverage for worktree detection and projectRoot path resolution | ~450 | -| #37758 | 6:25 PM | โš–๏ธ | Integration Test Design for Four Critical Testing Gaps | ~729 | -| #37710 | 6:11 PM | ๐Ÿ”ต | Test Audit: server.test.ts Integration Tests with Minimal Mocking for HTTP Server | ~582 | - -**error-handler.test.ts** -| ID | Time | T | Title | Read | -|----|------|---|-------|------| -| #37629 | 5:36 PM | ๐Ÿ”ต | Comprehensive Testing Patterns Documentation Generated | ~629 | -| #37625 | 5:35 PM | ๐Ÿ”ต | Bun Test Pattern for Error Classes and Mock Restoration | ~573 | +*No recent activity* \ No newline at end of file