Skip to content

Releases: wgsim/history-graph-protocol

v0.4.0 — SubagentStart/Stop HGP integration

Choose a tag to compare

@wgsim wgsim released this 16 Apr 23:22

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 subagents
  • hgp_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

Choose a tag to compare

@wgsim wgsim released this 10 Apr 23:09

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:

  1. MCP registration — registers HGP as an MCP server via the client CLI (claude mcp add, gemini mcp add, or Codex config.toml)
  2. Hooks — copies hook scripts and wires them into the client settings (global or project-local)
  3. Agent instructions — appends the HGP usage block to CLAUDE.md / GEMINI.md / AGENTS.md with 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 global

hgp 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.toml directly (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-protocol

v0.3.0 — Hook policy control, token-reduced mutation responses, docs polish

Choose a tag to compare

@wgsim wgsim released this 09 Apr 18:32

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`