Repository navigation
Merry v0.1.2
English
Anthropic Provider
- Compaction & message-role normalization — Fixes HTTP 400 errors on Anthropic Messages after checkpoint compaction or during tool loops by ensuring
messages[0]always uses the"user"role (prepending a lightweight user bridge when compacted history begins with an assistant turn) and merging adjacent same-role content blocks (assistantcommentary +tool_use, consecutiveassistanttext, andtool_result+ followingusercontent such as append-mode compaction directives), while keepingtool_resultblocks first and preserving stable prompt-cache blocks.
CLI & Terminal Integration
- OSC 7501 Program Status Protocol — Emits spec-compliant OSC 7501 lifecycle updates (
idle,working,done,blockedwithpermission/auth,error, andclear) underapp=merryso terminals and workspace managers (such as Ghostty and RootShell's Agent Inbox) can track live status over local shells, SSH, and containers without screen scraping. Automatically deduplicated, suppressed underTERM=dumb, cleared on TUI exit, and emitted tostderrin headlessmerry runonly whenstderris a TTY.
Build & Packaging
- Additive optional Cargo features &
release-smallprofile — Decouples heavy, C-linked, and OS-confinement subsystems behind five default-enabled additive features (pdf,syntax-highlight,sandbox,bundled-sqlite,bash-ast) while preserving default behavior and provider-visible tool schemas (disabled builds fail closed on explicit isolation or bash AST classification), and adds[profile.release-small](opt-level = "z",lto = "fat",panic = "abort",strip = "symbols").
简体中文
Anthropic Provider
- 压缩与消息角色规范化 — 修复 Anthropic Messages 在上下文压缩后或工具循环中返回 HTTP 400 的问题:当压缩后的历史以
assistant开头时自动前置一条轻量的user衔接消息以满足首条必须为user的要求,并自动合并相邻同 role 内容块(assistantcommentary +tool_use、连续assistant文本,以及tool_result+ 后续user内容如 Append 模式压缩指令),同时保持tool_result块置顶且不破坏 stable prefix 的 Prompt Cache。
CLI 与终端集成
- OSC 7501 程序状态协议 — 新增符合规范的 OSC 7501 状态上报(
idle、working、done、带permission/auth原因的blocked、error、clear,app=merry),便于 Ghostty、RootShell Agent Inbox 等终端与工作区管理器在本地、SSH 和容器环境下实时感知 Merry 生命周期状态;支持去重、TERM=dumb自动静默、TUI 退出时自动clear,以及 headlessmerry run仅在stderr为 TTY 时输出。
构建与打包
- 可选加法 Cargo Features 与
release-smallProfile — 将较重、含 C 依赖或 OS 隔离相关的子系统拆分为 5 个默认开启的加法 feature(pdf、syntax-highlight、sandbox、bundled-sqlite、bash-ast),完全保持默认行为和模型可见的工具 schema 不变(关闭对应 feature 时显式隔离与 shell AST 校验按 fail-closed 保守降级),并新增[profile.release-small](opt-level = "z"、lto = "fat"、panic = "abort"、strip = "symbols")。
Install / 安装
# Linux (static musl: x86_64 / arm64) & macOS (Apple Silicon / Intel) — includes Alt+G Web viewer
curl -fsSL https://github.com/locez/merry/releases/download/v0.1.2/install.sh | sh# Windows (x86_64)
irm https://github.com/locez/merry/releases/download/v0.1.2/install.ps1 | iexcargo install --locked merry-cli --features web # crates.io CLI (Rust 1.95+) / cargo binstall merry-cli
cargo add merry --features anthropic # Rust SDK
pip install merry-agent # Python SDK (imports as `merry`)
nix run github:locez/merry # Nix flakeFull Changelog: v0.1.1...v0.1.2