@stackmemoryai/stackmemory 0.8.0 → 0.8.1
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 +39 -1
- package/dist/src/cli/claude-sm.js +69 -372
- package/dist/src/cli/claude-sm.js.map +2 -2
- package/dist/src/cli/codex-sm.js +28 -0
- package/dist/src/cli/codex-sm.js.map +2 -2
- package/dist/src/cli/commands/onboard.js +22 -6
- package/dist/src/cli/commands/onboard.js.map +2 -2
- package/dist/src/cli/commands/setup.js +1 -2
- package/dist/src/cli/commands/setup.js.map +2 -2
- package/dist/src/cli/index.js +1 -71
- package/dist/src/cli/index.js.map +3 -3
- package/dist/src/cli/opencode-sm.js +28 -0
- package/dist/src/cli/opencode-sm.js.map +2 -2
- package/dist/src/core/config/feature-flags.js +1 -13
- package/dist/src/core/config/feature-flags.js.map +2 -2
- package/dist/src/features/sweep/pty-wrapper.js +11 -1
- package/dist/src/features/sweep/pty-wrapper.js.map +2 -2
- package/dist/src/hooks/index.js +0 -3
- package/dist/src/hooks/index.js.map +2 -2
- package/dist/src/hooks/schemas.js +0 -117
- package/dist/src/hooks/schemas.js.map +2 -2
- package/dist/src/hooks/session-summary.js.map +1 -1
- package/package.json +2 -2
- package/scripts/smoke-init-db.sh +77 -0
- package/scripts/test-pre-publish-quick.sh +26 -34
- package/scripts/install-notify-hook.sh +0 -84
- package/scripts/setup-notify-webhook.sh +0 -103
- package/templates/claude-hooks/notify-review-hook.js +0 -360
- package/templates/claude-hooks/sms-response-handler.js +0 -174
package/README.md
CHANGED
|
@@ -16,7 +16,8 @@ StackMemory is a **production-ready memory runtime** for AI coding tools that pr
|
|
|
16
16
|
- **Hierarchical frame organization** (nested call stack model)
|
|
17
17
|
- **Skills system** with `/spec` and `/linear-run` for Claude Code
|
|
18
18
|
- **Automatic hooks** for task tracking, Linear sync, and spec progress
|
|
19
|
-
- **
|
|
19
|
+
- **Memory monitor daemon** with automatic capture/clear on RAM pressure
|
|
20
|
+
- **650+ tests passing** with comprehensive coverage
|
|
20
21
|
|
|
21
22
|
Instead of a linear chat log, StackMemory organizes memory as a **call stack** of scoped work (frames), with intelligent LLM-driven retrieval and team collaboration features.
|
|
22
23
|
|
|
@@ -241,6 +242,43 @@ When a task completes (via hook or `/linear-run`), StackMemory fuzzy-matches the
|
|
|
241
242
|
|
|
242
243
|
---
|
|
243
244
|
|
|
245
|
+
## Memory Monitor Daemon (v0.8.0)
|
|
246
|
+
|
|
247
|
+
Automatically monitors system RAM and Node.js heap usage, triggering capture/clear cycles when memory pressure exceeds thresholds. Prevents long-running sessions from degrading performance.
|
|
248
|
+
|
|
249
|
+
### How it works
|
|
250
|
+
|
|
251
|
+
1. Daemon checks RAM and heap usage every 30 seconds
|
|
252
|
+
2. If either exceeds 90%, it captures context (`stackmemory capture --no-commit --basic`)
|
|
253
|
+
3. Clears context (`stackmemory clear --save`)
|
|
254
|
+
4. Writes a signal file (`.stackmemory/.memory-clear-signal`)
|
|
255
|
+
5. On next prompt, a Claude Code hook reads the signal and alerts you to run `/clear`
|
|
256
|
+
|
|
257
|
+
### Configuration
|
|
258
|
+
|
|
259
|
+
Configured via `stackmemory daemon` with these defaults:
|
|
260
|
+
|
|
261
|
+
| Option | Default | Description |
|
|
262
|
+
|--------|---------|-------------|
|
|
263
|
+
| `ramThreshold` | 0.9 (90%) | System RAM usage trigger |
|
|
264
|
+
| `heapThreshold` | 0.9 (90%) | Node.js heap usage trigger |
|
|
265
|
+
| `cooldownMinutes` | 10 | Minimum time between triggers |
|
|
266
|
+
| `interval` | 0.5 (30s) | Check frequency in minutes |
|
|
267
|
+
|
|
268
|
+
### CLI
|
|
269
|
+
|
|
270
|
+
```bash
|
|
271
|
+
stackmemory daemon start # Start daemon (includes memory monitor)
|
|
272
|
+
stackmemory daemon status # Show memory stats, trigger count, thresholds
|
|
273
|
+
stackmemory daemon stop # Stop daemon
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
### Hook
|
|
277
|
+
|
|
278
|
+
The memory guard hook (`.claude/hooks/memory-guard.sh`) is registered as a `user-prompt-submit` hook. When the daemon writes a signal file, the hook alerts you on the next prompt to run `/clear` and restore.
|
|
279
|
+
|
|
280
|
+
---
|
|
281
|
+
|
|
244
282
|
## Prompt Forge (GEPA)
|
|
245
283
|
|
|
246
284
|
When launching via `claude-sm`, StackMemory watches `CLAUDE.md`, `AGENT.md`, and `AGENTS.md` for changes. On file modification, the GEPA optimizer analyzes content and suggests improvements for prompt clarity and structure. Runs as a detached background process.
|