@rlabs-inc/memory 0.5.3 → 0.5.9

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.
@@ -53,7 +53,8 @@ async function main() {
53
53
  claude_session_id: sessionId,
54
54
  trigger,
55
55
  cwd,
56
- cli_type: 'gemini-cli'
56
+ cli_type: 'gemini-cli',
57
+ gemini_api_key: process.env.GEMINI_API_KEY,
57
58
  }),
58
59
  signal: AbortSignal.timeout(5000),
59
60
  }).catch(() => null)
@@ -55,9 +55,10 @@ async function main() {
55
55
  const primer = result.context_text || ''
56
56
 
57
57
  if (primer) {
58
- // Show user exactly what we inject - same formatted content
59
- // systemMessage: shown to user in terminal
60
- // additionalContext: injected into model context
58
+ // Log to stderr for visibility
59
+ console.error(`\x1b[36m[Memory] Injecting session primer (${primer.length} chars)\x1b[0m`)
60
+
61
+ // systemMessage IS supported for SessionStart
61
62
  console.log(JSON.stringify({
62
63
  systemMessage: primer,
63
64
  hookSpecificOutput: {
@@ -65,6 +66,8 @@ async function main() {
65
66
  additionalContext: primer
66
67
  }
67
68
  }))
69
+ } else {
70
+ console.log(JSON.stringify({}))
68
71
  }
69
72
  } catch (e) {
70
73
  // Fail silently, but ensure we don't output invalid JSON if we crashed mid-stream
@@ -55,20 +55,18 @@ async function main() {
55
55
  const context = result.context_text || ''
56
56
 
57
57
  if (context) {
58
- // Show user exactly what we inject - same formatted content
59
- // systemMessage: shown to user in terminal
60
- // additionalContext: injected into model context
58
+ // Log to stderr for visibility (BeforeAgent doesn't support systemMessage)
59
+ console.error(`\x1b[36m[Memory] Injecting ${context.length} chars of context\x1b[0m`)
60
+
61
61
  console.log(JSON.stringify({
62
- decision: "allow",
63
- systemMessage: context,
64
62
  hookSpecificOutput: {
65
63
  hookEventName: "BeforeAgent",
66
64
  additionalContext: context
67
65
  }
68
66
  }))
69
67
  } else {
70
- // No memories to surface - just allow without message
71
- console.log(JSON.stringify({ decision: "allow" }))
68
+ // No memories to surface - output empty JSON (implicit allow)
69
+ console.log(JSON.stringify({}))
72
70
  }
73
71
  } catch {
74
72
  // Fail safe
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rlabs-inc/memory",
3
- "version": "0.5.3",
3
+ "version": "0.5.9",
4
4
  "description": "AI Memory System - Consciousness continuity through intelligent memory curation and retrieval",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",