Skip to content

Solution for long term memory for agent coding CLIs and to facilitate handoff between different agent vendors

Rust

Merge branch 'land/1307' into batch/3.1-round2

AkitaOnRailsf7e725b48f23
diff --cc CHANGELOG.md
index b06b2be7,a888fa69..3439e0fe
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@@ -104,25 -94,12 +104,31 @@@ version in [`docs/changelog/`](docs/cha
through `UserPromptSubmit` `additionalContext`, OpenCode V1/V2 through the
plugin's system/context hook, and Grok Build on the next `PostToolUse`.
Serving the recap writes nothing, so a reload never consumes a baton (#1230).
+- Added first-party CodeBuddy Code (Tencent) support. `codebuddy` is an
+ `AgentKind` (migration V81), so hook events are attributed to it and a
+ Claude Code-shaped tool payload (`tool_name`, `tool_input`, `tool_response`)
+ is stored as a closed tool observation instead of an empty `other` capture.
+ `install-hooks --agent codebuddy` (alias `code-buddy`) merges native
+ `ai-memory hook --event … --agent codebuddy` commands for seven events
+ (`SessionStart`, `UserPromptSubmit`, `PreToolUse`, `PostToolUse`,
+ `PreCompact`, `Stop`, `SessionEnd`) into the `hooks` key of
+ `~/.codebuddy/settings.json`, keeps sibling settings and your own hooks,
+ and changes nothing on a re-run. There is no script bundle. The
+ `SessionStart` hook delivers the pending handoff through
+ `hookSpecificOutput.additionalContext`, and a capture-only `SessionStart` or
+ `UserPromptSubmit` prints nothing, since CodeBuddy appends that output to
+ the session. A `SessionStart` without `cwd` falls back to
+ `CODEBUDDY_PROJECT_DIR`. `setup` wires CodeBuddy when
+ `~/.codebuddy` exists, `setup-agent --agent codebuddy` prints the hook
+ block, and `uninstall` removes the entries. Transcript backfill and
+ headless `codebuddy -p` session close are not part of this change.
+ Requested in #1299. (#1312)
+ - Added the `memory_restore_page` MCP tool: without `rev` it lists the git
+ checkpoints that changed a page, and with `rev` it writes that version back
+ through the wiki write path (sanitizer, admission, slots and supersession
+ apply), keeping the checkpoint's frontmatter. Restoring can bring back text
+ a root deleted or purged, so both listing and restoring need the same admin
+ authority as `/admin/restore-page`. The MCP surface is now 24 tools. (#1307)
### Changed
- `ai-memory setup` now ends by naming the agents to restart and the question