From fcde9d18fe597363a186d39a0c5d8cfee5b8ed80 Mon Sep 17 00:00:00 2001 From: kigland Date: Thu, 25 Jun 2026 14:49:33 +0800 Subject: [PATCH] Keep Claude Code plugin version current --- .../claude-code/.claude-plugin/plugin.json | 2 +- .../claude-code/tests/test_manifest.py | 12 ++++++++++++ scripts/release.sh | 11 +++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/hindsight-integrations/claude-code/.claude-plugin/plugin.json b/hindsight-integrations/claude-code/.claude-plugin/plugin.json index 0b008ad97..6b8ef01f9 100644 --- a/hindsight-integrations/claude-code/.claude-plugin/plugin.json +++ b/hindsight-integrations/claude-code/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "hindsight-memory", "description": "Automatic long-term memory for Claude Code via Hindsight. Recalls relevant memories before each prompt, retains conversation transcripts, and provides knowledge page tools.", - "version": "0.7.2", + "version": "0.8.3", "author": {"name": "Hindsight Team", "url": "https://vectorize.io/hindsight"}, "license": "MIT", "keywords": ["memory", "hindsight", "recall", "retain"] diff --git a/hindsight-integrations/claude-code/tests/test_manifest.py b/hindsight-integrations/claude-code/tests/test_manifest.py index bd52efc2b..78182107d 100644 --- a/hindsight-integrations/claude-code/tests/test_manifest.py +++ b/hindsight-integrations/claude-code/tests/test_manifest.py @@ -1,9 +1,11 @@ """Validate that JSON manifests are strict-valid JSON (no trailing commas, etc.).""" import json +import tomllib from pathlib import Path INTEGRATION_ROOT = Path(__file__).resolve().parent.parent +REPO_ROOT = INTEGRATION_ROOT.parent.parent def test_hooks_json_is_valid(): @@ -12,3 +14,13 @@ def test_hooks_json_is_valid(): parsed = json.loads(raw) assert "hooks" in parsed assert isinstance(parsed["hooks"], dict) + + +def test_plugin_manifest_version_is_not_behind_core_release(): + plugin_path = INTEGRATION_ROOT / ".claude-plugin" / "plugin.json" + core_pyproject_path = REPO_ROOT / "hindsight-dev" / "pyproject.toml" + + plugin_version = json.loads(plugin_path.read_text())["version"] + core_version = tomllib.loads(core_pyproject_path.read_text())["project"]["version"] + + assert tuple(map(int, plugin_version.split("."))) >= tuple(map(int, core_version.split("."))) diff --git a/scripts/release.sh b/scripts/release.sh index e1bc78b6b..479d306ed 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -145,6 +145,17 @@ else print_warn "File $CONTROL_PLANE_PKG not found, skipping" fi +# Update Claude Code plugin manifest. Claude Code's plugin manager uses this +# manifest version to decide whether an installed plugin should refresh. +CLAUDE_CODE_PLUGIN_MANIFEST="hindsight-integrations/claude-code/.claude-plugin/plugin.json" +if [ -f "$CLAUDE_CODE_PLUGIN_MANIFEST" ]; then + print_info "Updating $CLAUDE_CODE_PLUGIN_MANIFEST" + sed -i.bak "s/\"version\": \".*\"/\"version\": \"$VERSION\"/" "$CLAUDE_CODE_PLUGIN_MANIFEST" + rm "${CLAUDE_CODE_PLUGIN_MANIFEST}.bak" +else + print_warn "File $CLAUDE_CODE_PLUGIN_MANIFEST not found, skipping" +fi + # Update hindsight-all npm wrapper package.json ALL_NPM_PKG="hindsight-all-npm/package.json" if [ -f "$ALL_NPM_PKG" ]; then