Skip to content

Merry v0.1.2

Choose a tag to compare

@locez locez released this 30 Nov 09:25
· 56 commits to main since this release
v0.1.2
965d4f6

English · 简体中文 · Install


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 (assistant commentary + tool_use, consecutive assistant text, and tool_result + following user content such as append-mode compaction directives), while keeping tool_result blocks 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, blocked with permission/auth, error, and clear) under app=merry so 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 under TERM=dumb, cleared on TUI exit, and emitted to stderr in headless merry run only when stderr is a TTY.

Build & Packaging

  • Additive optional Cargo features & release-small profile — 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 内容块(assistant commentary + 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,以及 headless merry run 仅在 stderr 为 TTY 时输出。

构建与打包

  • 可选加法 Cargo Features 与 release-small Profile — 将较重、含 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 | iex
cargo 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 flake

Full Changelog: v0.1.1...v0.1.2