opencode-claude-memory 1.5.1 → 1.5.2

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
@@ -174,7 +174,7 @@ Yes. Set `OPENCODE_MEMORY_AUTODREAM=0`. You can also tune gates with:
174
174
 
175
175
  ### Logs
176
176
 
177
- Logs are written to `/tmp/opencode-claude-memory/<project-hash>/`:
177
+ Logs are written to `$TMPDIR/opencode-memory-logs/`:
178
178
  - `extract-*.log`: automatic memory extraction
179
179
  - `dream-*.log`: auto-dream consolidation
180
180
 
@@ -204,7 +204,13 @@ AUTODREAM_STALE_LOCK_SECS=$((60 * 60))
204
204
 
205
205
  WORKING_DIR="${OPENCODE_MEMORY_DIR:-$(pwd)}"
206
206
 
207
- LOG_BASE_DIR="/tmp/opencode-claude-memory"
207
+ TMP_BASE_DIR="${TMPDIR:-/tmp}"
208
+ while [ "$TMP_BASE_DIR" != "/" ] && [ "${TMP_BASE_DIR%/}" != "$TMP_BASE_DIR" ]; do
209
+ TMP_BASE_DIR="${TMP_BASE_DIR%/}"
210
+ done
211
+ if [ -z "$TMP_BASE_DIR" ]; then
212
+ TMP_BASE_DIR="/"
213
+ fi
208
214
 
209
215
  # Scope lock files at project root granularity (not per-subdirectory).
210
216
  PROJECT_SCOPE_DIR="$WORKING_DIR"
@@ -215,7 +221,7 @@ fi
215
221
  PROJECT_KEY="$(printf '%s' "$PROJECT_SCOPE_DIR" | cksum | awk '{print $1}')"
216
222
 
217
223
  # Lock files (prevent concurrent work on the same project)
218
- LOCK_DIR="/tmp/opencode-memory-locks"
224
+ LOCK_DIR="$TMP_BASE_DIR/opencode-memory-locks"
219
225
  mkdir -p "$LOCK_DIR"
220
226
  EXTRACT_LOCK_FILE="$LOCK_DIR/${PROJECT_KEY}.extract.lock"
221
227
 
@@ -224,7 +230,7 @@ mkdir -p "$STATE_DIR"
224
230
  CONSOLIDATION_LOCK_FILE="$STATE_DIR/${PROJECT_KEY}.consolidate-lock"
225
231
 
226
232
  # Logs
227
- LOG_DIR="$LOG_BASE_DIR/${PROJECT_KEY}"
233
+ LOG_DIR="$TMP_BASE_DIR/opencode-memory-logs"
228
234
  mkdir -p "$LOG_DIR"
229
235
  TASK_LOG_PREFIX="$(date +%Y%m%d-%H%M%S)-${PROJECT_KEY}"
230
236
  EXTRACT_LOG_FILE="$LOG_DIR/extract-${TASK_LOG_PREFIX}.log"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-claude-memory",
3
- "version": "1.5.1",
3
+ "version": "1.5.2",
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",