opencode-claude-memory 1.4.0 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -65,6 +65,12 @@ opencode-memory uninstall # removes shell hook from .zshrc/.bashrc
65
65
  npm uninstall -g opencode-claude-memory
66
66
  ```
67
67
 
68
+ To print the wrapper package version:
69
+
70
+ ```bash
71
+ opencode-memory self -v
72
+ ```
73
+
68
74
  This removes the shell hook, the CLI, and the plugin. Your saved memories in `~/.claude/projects/` are **not** deleted.
69
75
 
70
76
  ## 💡 Why this exists
@@ -8,6 +8,7 @@
8
8
  # Subcommands:
9
9
  # opencode-memory install — Install shell hook to ~/.zshrc or ~/.bashrc
10
10
  # opencode-memory uninstall — Remove shell hook
11
+ # opencode-memory self -v — Print the wrapper package version
11
12
  # opencode-memory [args...] — Run opencode with post-session memory maintenance
12
13
  #
13
14
  # How it works:
@@ -39,6 +40,22 @@
39
40
 
40
41
  set -euo pipefail
41
42
 
43
+ SCRIPT_DIR="$(CDPATH= cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
44
+ PACKAGE_JSON="$SCRIPT_DIR/../package.json"
45
+
46
+ print_wrapper_version() {
47
+ local version
48
+
49
+ version=$(awk -F'"' '/^[[:space:]]*"version"[[:space:]]*:/ { print $4; exit }' "$PACKAGE_JSON")
50
+
51
+ if [ -z "$version" ]; then
52
+ echo "[opencode-memory] ERROR: Cannot read package version from $PACKAGE_JSON" >&2
53
+ exit 1
54
+ fi
55
+
56
+ printf '%s\n' "$version"
57
+ }
58
+
42
59
  # ============================================================================
43
60
  # Shell Hook Management
44
61
  # ============================================================================
@@ -138,6 +155,14 @@ case "${1:-}" in
138
155
  uninstall_hook
139
156
  exit 0
140
157
  ;;
158
+ self)
159
+ case "${2:-}" in
160
+ -v|--version|version)
161
+ print_wrapper_version
162
+ exit 0
163
+ ;;
164
+ esac
165
+ ;;
141
166
  esac
142
167
 
143
168
  # ============================================================================
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-claude-memory",
3
- "version": "1.4.0",
3
+ "version": "1.5.0",
4
4
  "type": "module",
5
5
  "description": "Claude Code-compatible memory compatibility layer for OpenCode — zero config, local-first, no migration",
6
6
  "main": "src/index.ts",