diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 1f0daced..c1e1b94c 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -10,7 +10,7 @@ "plugins": [ { "name": "claude-mem", - "version": "6.4.0", + "version": "6.4.1", "source": "./plugin", "description": "Persistent memory system for Claude Code - context compression across sessions" } diff --git a/CLAUDE.md b/CLAUDE.md index c91cfbf6..f0dbf0c8 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -6,7 +6,7 @@ Claude-mem is a Claude Code plugin providing persistent memory across sessions. It captures tool usage, compresses observations using the Claude Agent SDK, and injects relevant context into future sessions. -**Current Version**: 6.4.0 +**Current Version**: 6.4.1 ## Architecture diff --git a/package.json b/package.json index 47ed6832..4308e329 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "claude-mem", - "version": "6.4.0", + "version": "6.4.1", "description": "Memory compression system for Claude Code - persist context across sessions", "keywords": [ "claude", diff --git a/plugin/.claude-plugin/plugin.json b/plugin/.claude-plugin/plugin.json index b472d757..69df20f3 100644 --- a/plugin/.claude-plugin/plugin.json +++ b/plugin/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "claude-mem", - "version": "6.4.0", + "version": "6.4.1", "description": "Persistent memory system for Claude Code - seamlessly preserve context across sessions", "author": { "name": "Alex Newman" diff --git a/plugin/scripts/user-message-hook.js b/plugin/scripts/user-message-hook.js index 33716741..c30b39b5 100755 --- a/plugin/scripts/user-message-hook.js +++ b/plugin/scripts/user-message-hook.js @@ -1,5 +1,5 @@ #!/usr/bin/env node -import{execSync as _}from"child_process";import{join as i}from"path";import{homedir as p}from"os";import{existsSync as y}from"fs";import l from"path";import{homedir as f}from"os";import{existsSync as g,readFileSync as h}from"fs";import{join as t,dirname as m,basename as T}from"path";import{homedir as a}from"os";import{fileURLToPath as u}from"url";function d(){return typeof __dirname<"u"?__dirname:m(u(import.meta.url))}var P=d(),e=process.env.CLAUDE_MEM_DATA_DIR||t(a(),".claude-mem"),s=process.env.CLAUDE_CONFIG_DIR||t(a(),".claude"),A=t(e,"archives"),C=t(e,"logs"),S=t(e,"trash"),v=t(e,"backups"),I=t(e,"settings.json"),b=t(e,"claude-mem.db"),M=t(e,"vector-db"),U=t(s,"settings.json"),j=t(s,"commands"),L=t(s,"CLAUDE.md");function c(){try{let o=l.join(f(),".claude-mem","settings.json");if(g(o)){let n=JSON.parse(h(o,"utf-8")),r=parseInt(n.env?.CLAUDE_MEM_WORKER_PORT,10);if(!isNaN(r))return r}}catch{}return parseInt(process.env.CLAUDE_MEM_WORKER_PORT||"37777",10)}var x=i(p(),".claude","plugins","marketplaces","thedotmack"),D=i(x,"node_modules");y(D)||(console.error(` +import{execSync as A}from"child_process";import{join as c}from"path";import{homedir as d}from"os";import{existsSync as C}from"fs";import x from"path";import{homedir as E}from"os";import{existsSync as k,readFileSync as R}from"fs";import{join as t,dirname as T,basename as U}from"path";import{homedir as u}from"os";import{fileURLToPath as y}from"url";function w(){return typeof __dirname<"u"?__dirname:T(y(import.meta.url))}var H=w(),e=process.env.CLAUDE_MEM_DATA_DIR||t(u(),".claude-mem"),a=process.env.CLAUDE_CONFIG_DIR||t(u(),".claude"),W=t(e,"archives"),j=t(e,"logs"),N=t(e,"trash"),$=t(e,"backups"),F=t(e,"settings.json"),K=t(e,"claude-mem.db"),B=t(e,"vector-db"),G=t(a,"settings.json"),V=t(a,"commands"),J=t(a,"CLAUDE.md");function l(){try{let o=x.join(E(),".claude-mem","settings.json");if(k(o)){let s=JSON.parse(R(o,"utf-8")),n=parseInt(s.env?.CLAUDE_MEM_WORKER_PORT,10);if(!isNaN(n))return n}}catch{}return parseInt(process.env.CLAUDE_MEM_WORKER_PORT||"37777",10)}var P=c(d(),".claude","plugins","marketplaces","thedotmack"),S=c(P,"node_modules");C(S)||(console.error(` --- \u{1F389} Note: This appears under Plugin Hook Error, but it's not an error. That's the only option for user messages in Claude Code UI until a better method is provided. @@ -17,16 +17,19 @@ Dependencies have been installed in the background. This only happens once. Thank you for installing Claude-Mem! This message was not added to your startup context, so you can continue working as normal. -`),process.exit(3));try{let o=i(p(),".claude","plugins","marketplaces","thedotmack","plugin","scripts","context-hook.js"),n=_(`node "${o}" --colors`,{encoding:"utf8"}),r=c();console.error(` +`),process.exit(3));try{let o=c(d(),".claude","plugins","marketplaces","thedotmack","plugin","scripts","context-hook.js"),s=A(`node "${o}" --colors`,{encoding:"utf8"}),n=l(),r=new Date,f=new Date("2025-12-06T00:00:00Z"),i="";if(r=1&&p<=5,_=m>=17&&m<19;D&&_?i=` + \u{1F534} LIVE NOW: AMA w/ Dev (@thedotmack) until 7pm EST +`:i=` + \u2013 LIVE AMA w/ Dev (@thedotmack) Dec 1st\u20135th, 5pm to 7pm EST +`}console.error(` \u{1F4DD} Claude-Mem Context Loaded \u2139\uFE0F Note: This appears as stderr but is informational only -`+n+` +`+s+` \u{1F4A1} New! Wrap all or part of any message with ... to prevent storing sensitive information in your observation history. -\u{1F4AC} Community https://discord.gg/J4wttp9vDu - -\u{1F4FA} Watch live in browser http://localhost:${r}/ +\u{1F4AC} Community https://discord.gg/J4wttp9vDu`+i+` +\u{1F4FA} Watch live in browser http://localhost:${n}/ `)}catch(o){console.error(`\u274C Failed to load context display: ${o}`)}process.exit(3); diff --git a/src/hooks/user-message-hook.ts b/src/hooks/user-message-hook.ts index 94016382..a2a0e18a 100644 --- a/src/hooks/user-message-hook.ts +++ b/src/hooks/user-message-hook.ts @@ -48,12 +48,38 @@ try { }); const port = getWorkerPort(); + + // If it's after Dec 5, 2025 7pm EST, patch this out + const now = new Date(); + const amaEndDate = new Date('2025-12-06T00:00:00Z'); // Dec 5, 2025 7pm EST + + let amaAnnouncement = ""; + if (now < amaEndDate) { + // Check if we're during the live event (Dec 1-5, 5pm-7pm EST daily) + const estOffset = 5 * 60; // EST is UTC-5 + const nowUtcMinutes = now.getUTCHours() * 60 + now.getUTCMinutes(); + const estHour = Math.floor((nowUtcMinutes - estOffset + 1440) % 1440 / 60); + const day = now.getUTCDate(); + const month = now.getUTCMonth(); + const year = now.getUTCFullYear(); + + const isDec1to5 = year === 2025 && month === 11 && day >= 1 && day <= 5; + const isDuringLiveHours = estHour >= 17 && estHour < 19; // 5pm-7pm EST + + if (isDec1to5 && isDuringLiveHours) { + amaAnnouncement = "\n ๐Ÿ”ด LIVE NOW: AMA w/ Dev (@thedotmack) until 7pm EST\n"; + } else { + amaAnnouncement = "\n โ€“ LIVE AMA w/ Dev (@thedotmack) Dec 1stโ€“5th, 5pm to 7pm EST\n"; + } + } + console.error( "\n\n๐Ÿ“ Claude-Mem Context Loaded\n" + " โ„น๏ธ Note: This appears as stderr but is informational only\n\n" + output + "\n\n๐Ÿ’ก New! Wrap all or part of any message with ... to prevent storing sensitive information in your observation history.\n" + - "\n๐Ÿ’ฌ Community https://discord.gg/J4wttp9vDu\n" + + "\n๐Ÿ’ฌ Community https://discord.gg/J4wttp9vDu" + + amaAnnouncement + `\n๐Ÿ“บ Watch live in browser http://localhost:${port}/\n` );