clawmem 0.3.0 → 0.3.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/clawmem.ts +8 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clawmem",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "description": "On-device context engine and memory for AI agents. Claude Code and OpenClaw. Hooks + MCP server + hybrid RAG search.",
5
5
  "type": "module",
6
6
  "bin": {
package/src/clawmem.ts CHANGED
@@ -970,11 +970,15 @@ async function cmdSetupHooks(args: string[]) {
970
970
  Stop: ["decision-extractor", "handoff-generator", "feedback-loop"],
971
971
  };
972
972
 
973
+ // Use Claude Code's native timeout property instead of shell `timeout` wrapper.
974
+ // Shell `timeout` kills the process with SIGTERM (exit 124) which produces
975
+ // "Stop hook error: Failed with non-blocking status code" in Claude Code.
976
+ // Native timeout is handled gracefully by the hook runner.
973
977
  const timeouts: Record<string, number> = {
974
978
  UserPromptSubmit: 8,
975
979
  SessionStart: 5,
976
980
  PreCompact: 5,
977
- Stop: 10,
981
+ Stop: 30, // LLM-based extraction hooks need more time
978
982
  };
979
983
 
980
984
  for (const [event, hooks] of Object.entries(hookConfig)) {
@@ -987,12 +991,13 @@ async function cmdSetupHooks(args: string[]) {
987
991
 
988
992
  const timeout = timeouts[event] || 5;
989
993
 
990
- // Add new entries with timeout wrappers
994
+ // Add new entries with native timeout property
991
995
  settings.hooks[event].push({
992
996
  matcher: "",
993
997
  hooks: hooks.map(name => ({
994
998
  type: "command",
995
- command: `timeout ${timeout} ${binPath} hook ${name}`,
999
+ command: `${binPath} hook ${name}`,
1000
+ timeout,
996
1001
  })),
997
1002
  });
998
1003
  }