Releases: SonicBotMan/lobster-press
v5.1.0 — Production Hardening + CI Enforcement
v5.1.0 — Production Hardening + CI Enforcement
Fixed (end-to-end runtime)
- save_message 端到端契约: 修复
conversations行从未创建导致search_messagesINNER JOIN 返回 0 行——命名空间隔离从此从未生效 - seq 字段自动分配: 客户端不传
seq时自动分配,避免 NOT NULL 约束失败 - 6 个端到端集成测试:
test_mcp_e2e.py真实 spawn MCP server 子进程验证 round-trip - DeprecationWarning 消除:
datetime.utcnow()→datetime.now(timezone.utc),全部 0 警告 - semantic_memory.py 导入路径:
from prompts→from src.prompts - database.py
__del__: 自动关闭 sqlite 连接,消除 ResourceWarning - TypeScript TS2742 修复:
definePluginEntry()默认导出加显式类型注解
Changed (docs)
- README.md: 移除未核实的 arXiv ID,MCP 工具数 22 → 17
- mcp_server/README.md: 整段重写,列出 v5.0 实际 17 个工具
- 6 个 docs 加 v2-era 弃用 banner
Removed (dead code)
scripts/(20 个文件, ~200 KB): v2.x 时代脚本,功能已迁入src/pipeline/systemd/(6 个文件): ExecStart 指向不存在的脚本
Changed (lint + CI)
- Black 格式化: 78 个 Python 文件统一格式
- autoflake: 移除 87 个未使用 import,51 个空 f-string
.flake8配置: 忽略 E203/E402/E501/F841(Black 冲突 + 结构性)continue-on-error全部移除: CI 失败现在真正阻断 PRnpm install修复: 移除| head -100管道截断
Dependencies
- openclaw 2026.5.27 → 2026.6.6
- vitest 4.1.7 → 4.1.8
- @vitest/coverage-v8 4.1.7 → 4.1.8
- @types/node 25.9.1 → 25.9.3
Stats
- Tests: 634 passed, 0 failed, 4 skipped
- Coverage: 77% (gate: 60%)
- Security alerts: 0 open
- Lint: Black ✅ isort ✅ flake8 ✅ tsc ✅
Full Changelog: v5.0.3...v5.1.0
v5.0.3 — Engineering Hardening
🔧 Engineering Hardening
Comprehensive code quality and security improvements across the entire codebase.
P0 — Must-fix
| # | Fix | Impact |
|---|---|---|
| 1 | pyproject.toml created | Standard Python package definition, pip install -e . now works |
| 2 | 5 .tgz artifacts removed | Release tarballs (4.0.93-97) no longer bloat the repo |
| 3 | 6 bare except: fixed |
Replaced with specific exception types (JSONDecodeError, ValueError, TypeError) |
| 4 | Version unified to 5.0.0 | Single source of truth in src/__init__.py, MCP Server imports dynamically |
| 5 | print() → logging (17 files) | All source files now use logging module with proper levels |
P1 — Code Quality
| # | Fix | Impact |
|---|---|---|
| 6 | cosine_similarity dedup | 4 duplicate implementations → 1 shared function in src/utils/math.py |
| 7 | estimate_tokens dedup | 3 duplicate implementations → 1 shared function in src/utils/tokens.py |
| 8 | LLM provider dedup | Extracted OpenAICompatibleClient base class. 422 → 290 lines (-31%) |
| 9 | CI lint enforced | Removed continue-on-error from lint steps |
| 10 | Viewer login → POST | Password no longer leaks in URL/query string |
| 11 | Viewer CORS restricted | Access-Control-Allow-Origin: * → localhost only |
| 12 | sys.path cleanup | Removed 4 sys.path.insert hacks, standard from src.xxx imports |
Stats
- Net code reduction: ~400 lines
- Tests: 481 passed, 0 failed
- Security: 0 vulnerabilities (npm audit)
Upgrade
git pull origin master
pip install -e . # Now works with pyproject.tomlFull Changelog: v5.0.2...v5.0.3
v5.0.2 — Bug fixes (OpenClaw v2026.4.2)
Fixed (OpenClaw v2026.4.2 Compatibility)
- 🐛 definePluginEntry(): 迁移到
openclaw/plugin-sdk/plugin-entry标准导出模式 - 🐛 kind: "context-engine": 在 lobsterEngine.info 中添加类型声明
- 🐛 debugLog 保护:
debugLog()仅在LOBSTER_DEBUG=1时写入日志 - 🐛 console.log 删除: register() 末尾的 bare
console.log已移除
Fixed (Config Consistency)
- 🐛 maxContextTokens 统一: schema 默认值和 runtime fallback 均为
40000 - 🐛 过时配置删除:
mcp_server/lobster.config.json已删除
Fixed (Security)
- 🔒 硬编码 API Key → 环境变量
- 🔒 /tmp 路径泄漏修复
v5.0.1 — OpenClaw v2026.4.2 Full Compatibility Patch
v5.0.1 → v5.0.2 — Full Compatibility Patch
This release consolidates all OpenClaw v2026.4.2 compatibility fixes.
v5.0.2 (commit c262c44) — Documentation + P2 Cleanup
P1 - OpenClaw v2026.4.2:
definePluginEntry()— migrated from plain object exportkind: "context-engine"— added to lobsterEngine.info- Hook names verified:
before_agent_start,agent_endconfirmed in v2026.4.2
P2 - Debug/Logging:
debugLog()guarded behindLOBSTER_DEBUG=1env var- Bare
console.logremoved
P2 - Config:
maxContextTokensunified to 40000 everywheremcp_server/lobster.config.json(v1.2.8) deleted
P2 - Security:
- Leaked ZHIPU API key →
ZHIPU_API_KEYenv var - Hardcoded
/tmppaths → relative project-root paths
Docs:
- CHANGELOG.md: v5.0.2 + v5.0.1 + v5.0.0 entries added
- README_EN.md: v5.0.0 MemOS 4-Phase (full refresh)
- README.md: confirmed v5.0.0 ✅
v5.0.1 (commit 731bce5) — P0 Compatibility Fixes
peerDependencies: >=2026.3.0 → >=2026.4.2
SIGINT/SIGTERM handlers: Python subprocess lifecycle cleanup
P0 Bug Fixes:
- C-HLR+ formula:
math.exp(-t/h)→0.5 ** (t/h) - Double scoring removed from retention
- Pass 4 lossless: user/assistant skip dedup
Tests: 423 passed
Full Commit History v5.0.x
```
c09f459 docs: update CHANGELOG.md and README_EN.md for v5.0.2
c262c44 fix(v5.0.2): OpenClaw v2026.4.2 compatibility + P2 cleanup
731bce5 fix(v5.0.1): P0 compatibility fixes for OpenClaw v2026.4.2
fb5f378 feat(v5.0): MemOS 4-Phase Optimization
```
v5.0.0 - MemOS 4-Phase Optimization
v5.0.0 - MemOS 4-Phase Optimization
What's New
Phase 1: Core Intelligence
- Vector Embedder - OpenAI Compatible API + numpy offline fallback, BLOB storage in SQLite
- Hybrid Retriever - FTS5 + Vector → RRF(k=60) → MMR(λ=0.7) → 14d Decay → Filter(≥0.45)
- LLM Fallback Chain - 4-level chain: skill → summary → native → mock
- Dual Decay Parameters - 12h compression / 14d retrieval (independent)
Phase 2: Skill Evolution
- Task Detector - 2h timeout + LLM topic judgment (SAME bias)
- Skill Evolver - Rule filter → LLM eval → SKILL.md → quality score → save
- MCP lobster_skill - get/install/list actions
Phase 3: Multi-Agent
- Owner Field - migrate_v50, owner on messages/summaries/notes
- Public Memory - lobster_memory_write_public
- Skill Sharing - lobster_skill_search (self/public/mix), lobster_skill_publish/unpublish
Phase 4: Engineering
- Viewer Web UI - 127.0.0.1, SHA-256 auth, HttpOnly cookie
- Async Queue - Background worker for embed/task_detect/skill_eval
- OpenClaw Migration - 🦐 prefix, SHA-256 dedup, checkpoint resume
Bug Fixes (P0)
- C-HLR+ formula: math.exp → 0.5 (correct forgetting curve)
- Pass 4 lossless: user/assistant messages skip dedup
- Missing _get_llm() method
- Path traversal vulnerability fix
- Dual scoring removal (access_count bonus)
Test Results
- 436 tests pass (+297 new)
- 22 MCP tools (+7 new)
Breaking Changes
- None - fully backward compatible
🧠 LobsterPress v4.0.0「深海」
🎉 LobsterPress v4.0.0「深海」版本
🚀 核心目标
超越 lossless-claw,实现学术级认知记忆系统
✨ 五大模块重构
🔧 模块一:CMV 三遍无损压缩
- Pass 1: 剥离 base64/长 JSON 冗余
- Pass 2: 去重工具结果
- Pass 3: 折叠系统样板代码
- 无损原则:user/assistant 消息永不修改
🧬 模块二:C-HLR+ 自适应遗忘曲线
- 复杂度驱动半衰期:h = base_h × (1 + α × complexity) × spaced_bonus
- 对数稳定性增长:避免无限膨胀
- 指数底数优化:从 e 改为 2
- Ref: arXiv:2004.11327
⚡ 模块三:Focus 主动压缩触发
- 定时触发:每 12 轮主动压缩
- 紧急触发:上下文使用率 > 85%
- 被动触发:原有阈值逻辑
- Ref: arXiv:2502.15957
🔄 模块四:R³Mem 可逆三层压缩
- Layer 1: Document-Level(返回子摘要)
- Layer 2: Paragraph-Level(返回原始消息)
- Layer 3: Entity-Level(按实体过滤)
- 实体追踪:人名、文件名、概念自动提取
- Ref: arXiv:2502.15957
🛠️ 模块五:WMR 框架重构
- Write 层:lobster_compact + lobster_correct
- Manage 层:lobster_sweep + lobster_assemble + lobster_prune
- Read 层:lobster_grep + lobster_describe + lobster_expand + lobster_status
📚 学术参考
- arXiv:2004.11327 — Adaptive Forgetting Curves for Spaced Repetition
- arXiv:2502.15957 — Focus: Context-Aware Prompt Compression for LLMs
- arXiv:2502.15957 — R³Mem: Bridging Memory Retention and Retrieval
- CMV: Context Maintenance and Retrieval
📦 安装
npm install @sonicbotman/lobster-press@4.0.0🔗 链接
Published with ❤️ by 小云 (Xiao Yun)
v3.0.0 - Cognitive Memory System Complete
🧠 v3.0.0 - 认知记忆系统完整版
✨ 新增功能
Feature 3: 语义记忆层 (Semantic Memory Layer)
- 独立于 DAG 的稳定知识库
- LLM 自动提取决策、偏好、约束、事实
- 上下文注入 notes(<500 tokens)
- 去重机制
Feature 4: 矛盾检测与记忆重巩固
- NLI 模型检测(可选)+ 规则降级检测
- 记忆重巩固机制
- 保留完整溯源链
📊 测试结果
4/4 测试通过
🔄 向后兼容
- v2.6.0 schema 完全兼容
- llm_client 参数可选
认知科学驱动: 基于 EM-LLM、HiMem 等研究论文设计
PR: #99
基于: v2.6.0
🦞 LobsterPress v2.0.0-alpha - Lossless Memory System
🎉 Major Release: Lossless Memory System
This release introduces a complete lossless memory architecture with DAG-based hierarchical compression.
✨ New Features
Phase 1: Lossless Storage (100%)
- SQLite + FTS5 full-text search
- Permanent message storage (never lose data)
- DAG structure for traceability
Phase 2: DAG Compression (100%)
- Leaf compression (messages → leaf summaries)
- Condensed compression (summaries → condensed summaries)
- 67.8% compression ratio (416 → 134 tokens)
- Fresh tail protection (last 32 messages)
Phase 3: Agent Tools (100%)
lobster_grep- Search messages and summarieslobster_describe- Inspect summary structureslobster_expand- Expand summaries to original messages
Phase 4: Incremental Compression (100%)
- Auto-trigger compression (75% context threshold)
- Real-time monitoring
- Multi-conversation support
📊 Performance
- Compression ratio: 67.8%
- Memory efficiency: 70.8% reduction
- Compression speed: ~2s for 30 messages
🙏 Acknowledgments
Inspired by lossless-claw (Martian Engineering) LCM plugin architecture.
🦞 LobsterPress v1.0.0
🎉 首次发布
功能特性
- 🦞 智能上下文压缩引擎 v5 - 多维度消息评估,三级压缩策略
- 🧠 消息重要性评估引擎 - 自动识别决策、错误、配置等关键信息
- 🎓 自适应学习系统 - 学习用户偏好,动态调整参数
- 🔮 预测性压缩引擎 - 预测 Token 需求,提前执行压缩
- 💰 成本优化器 - 分析 API 成本,推荐最经济的策略
文档
- 📖 完整的 README(背景、理念、通用性、价值、部署方案)
- 🏗️ 架构设计文档
- 🔌 API 文档
- 🎨 自定义指南
- ❓ FAQ
示例
- 基础用法示例
- 高级配置示例
- 集成示例(Python, Node.js, Bash)
统计
- 核心脚本: 6 个(1289 行代码)
- 文档文件: 4 个(1298 行)
- 示例文件: 3 个
- Systemd 服务: 6 个
- 总大小: 500K
核心价值
- 💰 节省 30-50% Token 成本
- ⚡ 自动化管理,零干预
- 🧠 保留重要信息
- 🎯 个性化体验
- 🔒 本地运行,数据安全
兼容性
- ✅ OpenAI ChatGPT
- ✅ Claude
- ✅ GLM 系列
- ✅ Qwen 系列
- ✅ 任何基于对话的 AI 系统
许可证
MIT License - 自由使用、修改、分发
🦞 让 AI 记忆永不溢出!
Made with ❤️ by the LobsterPress Team