Releases: wgsim/history-graph-protocol
Releases · wgsim/history-graph-protocol
Release list
v0.4.0 — SubagentStart/Stop HGP integration
What's New
SubagentStart / SubagentStop Hook Integration
- SubagentStart: Injects session root op_id into spawned subagent context via
additionalContext - SubagentStop: Records subagent HGP tool usage summary as a file-based handoff for
hgp_get_context hgp_set_context: Register a session root op for propagation to subagentshgp_get_context: Retrieve session context and consume pending subagent summaries
Fixes
- Mode gating applied to
hgp_set_context/hgp_get_context - Summary filenames are now collision-resistant (UUID suffix)
v0.3.1 — hgp install: unified MCP + hooks + instructions
What's new
hgp install — unified one-step setup
Replaces the hooks-only hgp install-hooks with a unified installer that covers all three setup steps per client:
- MCP registration — registers HGP as an MCP server via the client CLI (
claude mcp add,gemini mcp add, or Codex config.toml) - Hooks — copies hook scripts and wires them into the client settings (global or project-local)
- Agent instructions — appends the HGP usage block to
CLAUDE.md/GEMINI.md/AGENTS.mdwith idempotency markers
hgp install # Claude Code + Gemini CLI + Codex (global, recommended)
hgp install --claude # Claude Code only
hgp install --gemini # Gemini CLI only
hgp install --codex # Codex only
hgp install --local # project-local scope instead of globalhgp install-hooks is kept for backward compatibility with a deprecation notice.
Installer details
- Global scope: hook commands use absolute paths in settings.json
- Local scope: hook commands use relative paths
- Existing non-HGP hooks in event buckets are preserved (non-destructive merge)
- Instruction injection is idempotent — reruns update in place, no duplication
- Codex local MCP: edits
.codex/config.tomldirectly (no external TOML deps) - Missing client CLI (claude/gemini/codex not on PATH): step skipped with a warning
Installation
pip install --upgrade history-graph-protocol
# or
uv pip install --upgrade history-graph-protocolv0.3.0 — Hook policy control, token-reduced mutation responses, docs polish
New
- `hgp hook-policy` CLI — persistent `advisory`/`block` enforcement for native file tool hooks
- `verbose=False` on all 6 mutation tools — omits optional hash fields from success responses; estimated savings are ~59 tokens per call (~73%) for the five artifact-producing mutation tools, and ~30 tokens for `hgp_delete_file`
Improved
- Stale hook detection now uses anchored regex to prevent comment-based false positives
- `hgp_anchor_git` docs now clarify that commit SHAs must be full 40-character lowercase hex
- Memory tier docs are now cross-linked from the README
- `verbose=False` is now documented in `tools-reference.md` and the README
Upgrade note
- If hooks were installed before hook-policy support was added, rerun `hgp install-hooks`