Files
claude-mem/scripts/CLAUDE.md
T
Alex Newman 05323c9db5 Cleanup worker-service.ts: remove dead code and fallback concept (#706)
* refactor(worker): remove dead code from worker-service.ts

Remove ~216 lines of unreachable code:
- Delete `runInteractiveSetup` function (defined but never called)
- Remove unused imports: fs namespace, spawn, homedir, readline,
  existsSync/writeFileSync/readFileSync/mkdirSync
- Clean up CursorHooksInstaller imports (keep only used exports)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(worker): only enable SDK fallback when Claude is configured

Add isConfigured() method to SDKAgent that checks for ANTHROPIC_API_KEY
or claude CLI availability. Worker now only sets SDK agent as fallback
for third-party providers when credentials exist, preventing cascading
failures for users who intentionally use Gemini/OpenRouter without Claude.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* refactor(worker): remove misleading re-export indirection

Remove unnecessary re-export of updateCursorContextForProject from
worker-service.ts. ResponseProcessor now imports directly from
CursorHooksInstaller.ts where the function is defined. This eliminates
misleading indirection that suggested a circular dependency existed.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* refactor(mcp): use build-time injected version instead of hardcoded strings

Replace hardcoded '1.0.0' version strings with __DEFAULT_PACKAGE_VERSION__
constant that esbuild replaces at build time. This ensures MCP server and
client versions stay synchronized with package.json.

- worker-service.ts: MCP client version now uses packageVersion
- ChromaSync.ts: MCP client version now uses packageVersion
- mcp-server.ts: MCP server version now uses packageVersion
- Added clarifying comments for empty MCP capabilities objects

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* feat: Implement cleanup and validation plans for worker-service.ts

- Added a comprehensive cleanup plan addressing 23 identified issues in worker-service.ts, focusing on safe deletions, low-risk simplifications, and medium-risk improvements.
- Created an execution plan for validating intentional patterns in worker-service.ts, detailing necessary actions and priorities.
- Generated a report on unjustified logic in worker-service.ts, categorizing issues by severity and providing recommendations for immediate and short-term actions.
- Introduced documentation for recent activity in the mem-search plugin, enhancing traceability and context for changes.

* fix(sdk): remove dangerous ANTHROPIC_API_KEY check from isConfigured

Claude Code uses CLI authentication, not direct API calls. Checking for
ANTHROPIC_API_KEY could accidentally use a user's API key (from other
projects) which costs 20x more than Claude Code's pricing.

Now only checks for claude CLI availability.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(worker): remove fallback agent concept entirely

Users who choose Gemini/OpenRouter want those providers, not secret
fallback behavior. Removed setFallbackAgent calls and the unused
isConfigured() method.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 23:30:13 -05:00

120 lines
5.5 KiB
Markdown

<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 |
|----|------|---|-------|------|
| #23818 | 10:52 PM | ✅ | Build Script Updated to Bundle Worker CLI with Bun Shebang | ~225 |
| #23817 | " | 🔵 | Build Script Handles Hook Bundling; Worker Shebang Currently Uses Node | ~323 |
| #23793 | 10:14 PM | 🔄 | Smart Install Script Simplified for Clarity | ~479 |
| #23667 | 8:35 PM | 🔵 | Export-Memories Script Structure and Database Query Pattern | ~287 |
| #23649 | 8:13 PM | 🔴 | Fixed Sessions Array Type in Export Script | ~189 |
| #23648 | " | 🔴 | Applied Type Annotations to Export Script Variables | ~305 |
| #23647 | 8:12 PM | 🔴 | Improved Type Safety in Export Script | ~352 |
| #23646 | " | 🔴 | Fixed Variable Shadowing in Export Script | ~234 |
| #23645 | " | 🔵 | Export Script Has Variable Shadowing Issue | ~234 |
| #23644 | 8:11 PM | 🔴 | Added Database Existence Check to Export Script | ~245 |
| #23643 | " | 🔵 | Export Script Opens Database Without Existence Check | ~238 |
| #23642 | " | 🔴 | Fixed Export Script Hardcoded Port - Now Reads from User Settings | ~244 |
| #23641 | " | ✅ | Added Settings Import to Export Script | ~189 |
| #23640 | " | 🔵 | Export Script Has Hardcoded Port Parameter | ~213 |
| #23639 | " | 🔴 | Fixed Import Script insertSession.run() Call Parameters | ~218 |
### Dec 11, 2025
| ID | Time | T | Title | Read |
|----|------|---|-------|------|
| #24051 | 2:54 PM | 🟣 | Auto-Restart Worker After Marketplace Sync | ~384 |
| #24050 | " | ✅ | Build Worker Binary Script Made Executable | ~225 |
| #24049 | 2:53 PM | 🟣 | Windows Binary Build Script Created | ~362 |
| #24048 | " | ✅ | MCP Server Shebang Updated to Bun Runtime | ~342 |
| #24047 | " | ✅ | Hook Scripts Shebang Updated to Bun Runtime | ~305 |
| #24046 | " | ✅ | Worker Service Shebang Updated to Bun Runtime | ~306 |
| #24045 | 2:52 PM | 🔵 | Sync Marketplace Script Analysis for Auto-Restart Integration | ~366 |
| #24043 | " | 🔵 | Build Script Analysis for Phase 4 Updates | ~380 |
| #23922 | 1:34 PM | 🔵 | Three Node Shebangs Found in Build Configuration | ~349 |
| #23917 | 1:33 PM | 🔵 | Worker Service Build Configuration Current State | ~365 |
### Dec 12, 2025
| ID | Time | T | Title | Read |
|----|------|---|-------|------|
| #24639 | 10:46 PM | 🔴 | Enhanced UV Detection to Support Fresh Installs Before PATH Reload | ~326 |
| #24638 | " | 🔴 | Enhanced Bun Detection to Support Fresh Installs Before PATH Reload | ~338 |
| #24637 | " | 🔵 | Bun Installation Detection Using spawnSync | ~288 |
| #24636 | " | 🔵 | Duplicate Smart Install Scripts in Project Structure | ~288 |
### Dec 14, 2025
| ID | Time | T | Title | Read |
|----|------|---|-------|------|
| #26768 | 11:31 PM | 🔵 | Build Script Generates Empty plugin/package.json Without Postinstall Hook | ~492 |
| #26767 | " | 🔵 | Build Script Generates Empty Plugin Package.json Without Postinstall Hook | ~523 |
| #26766 | 11:30 PM | ⚖️ | Root Cause Identified: Missing Post-Install Worker Restart Trigger in Plugin Update Flow | ~604 |
| #26765 | " | 🔵 | Explore Agent Confirms Root Cause: No Proactive Worker Restart After Plugin Updates | ~613 |
| #25815 | 5:31 PM | 🔵 | Comprehensive MCP Server and SKILL.md Structure Analysis | ~575 |
| #25809 | 5:30 PM | 🔵 | Build System Architecture Using esbuild for Component Bundling | ~484 |
### Dec 16, 2025
| ID | Time | T | Title | Read |
|----|------|---|-------|------|
| #27725 | 5:45 PM | 🔵 | Export script uses hybrid search API to export observations, sessions, summaries, and prompts | ~335 |
| #27705 | 5:38 PM | ✅ | Switched import-memories.ts from better-sqlite3 to bun:sqlite | ~212 |
### Dec 17, 2025
| ID | Time | T | Title | Read |
|----|------|---|-------|------|
| #29052 | 10:02 PM | 🔵 | Sync Script Manages Multiple Plugin Installation Locations | ~394 |
### Dec 18, 2025
| ID | Time | T | Title | Read |
|----|------|---|-------|------|
| #29565 | 5:28 PM | ✅ | Output File Changed from code.yaml to code.json | ~234 |
| #29564 | " | 🔄 | Script Refactored to Generate JSON Instead of YAML | ~332 |
### Dec 19, 2025
| ID | Time | T | Title | Read |
|----|------|---|-------|------|
| #30109 | 8:11 PM | 🔵 | RAGTIME Script Uses Agent SDK Without Plugin Loading | ~490 |
| #30076 | 8:05 PM | 🔵 | RAGTIME Script Uses Agent SDK Query Function for Email Processing | ~389 |
### Dec 20, 2025
| ID | Time | T | Title | Read |
|----|------|---|-------|------|
| #30340 | 3:42 PM | 🔄 | Relocated simple ragtime.ts to ragtime folder | ~219 |
| #30337 | 3:40 PM | 🔵 | Simplified Ragtime Runner in Scripts Directory | ~456 |
| #30256 | 3:18 PM | 🔵 | Plugin Path Resolution Strategy | ~386 |
| #30250 | 3:17 PM | 🟣 | RAGTIME Email Investigation Runner Implemented | ~503 |
### Dec 26, 2025
| ID | Time | T | Title | Read |
|----|------|---|-------|------|
| #32983 | 11:04 PM | 🟣 | Complete build and deployment pipeline executed | ~260 |
### Dec 28, 2025
| ID | Time | T | Title | Read |
|----|------|---|-------|------|
| #33261 | 2:58 PM | 🔄 | Build script cleanup removes obsolete worker-wrapper and worker-cli build steps | ~335 |
### Dec 30, 2025
| ID | Time | T | Title | Read |
|----|------|---|-------|------|
| #34460 | 2:23 PM | 🔵 | Build System Architecture Using ESBuild | ~492 |
### Jan 4, 2026
| ID | Time | T | Title | Read |
|----|------|---|-------|------|
| #36765 | 12:41 AM | 🔵 | Smart Install Script Path Detection Logic | ~405 |
</claude-mem-context>