@rlabs-inc/memory 0.5.9 → 0.5.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rlabs-inc/memory",
3
- "version": "0.5.9",
3
+ "version": "0.5.10",
4
4
  "description": "AI Memory System - Consciousness continuity through intelligent memory curation and retrieval",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -135,6 +135,14 @@ export async function serve(options: ServeOptions) {
135
135
  console.log(c.muted(` Use 'memory migrate --dry-run' to preview changes first`))
136
136
  }
137
137
 
138
+ // Note for Gemini CLI API key auth users (OAuth users don't need this)
139
+ if (!process.env.GEMINI_API_KEY) {
140
+ console.log()
141
+ console.log(c.muted(` ${symbols.info} Using Gemini CLI with API key auth?`))
142
+ console.log(c.muted(` Run: GEMINI_API_KEY=your-key memory serve`))
143
+ console.log(c.muted(` (OAuth users can ignore this)`))
144
+ }
145
+
138
146
  console.log()
139
147
  console.log(c.muted(` Press Ctrl+C to stop`))
140
148
  console.log()
@@ -241,12 +241,15 @@ export async function createServer(config: ServerConfig = {}) {
241
241
  // Branch on CLI type - Gemini CLI vs Claude Code
242
242
  if (body.cli_type === 'gemini-cli') {
243
243
  // Use Gemini CLI for curation (no Claude dependency)
244
+ // Fallback to server's GEMINI_API_KEY if hook didn't pass one
245
+ // (hooks spawned by Gemini CLI may not inherit env vars)
246
+ const geminiApiKey = body.gemini_api_key || process.env.GEMINI_API_KEY
244
247
  logger.debug('Using Gemini CLI for curation', 'server')
245
248
  result = await curator.curateWithGeminiCLI(
246
249
  body.claude_session_id,
247
250
  body.trigger,
248
251
  body.cwd, // Run from original project directory
249
- body.gemini_api_key
252
+ geminiApiKey
250
253
  )
251
254
  } else {
252
255
  // Default: Use Claude Code (session resume or transcript parsing)
@@ -303,13 +306,15 @@ export async function createServer(config: ServerConfig = {}) {
303
306
  let managementResult
304
307
  if (cliType === 'gemini-cli') {
305
308
  // Use Gemini CLI for management (no Claude dependency)
309
+ // Use same API key fallback as curation (hooks don't inherit env vars)
310
+ const geminiApiKey = body.gemini_api_key || process.env.GEMINI_API_KEY
306
311
  logger.debug('Using Gemini CLI for management', 'server')
307
312
  managementResult = await manager.manageWithGeminiCLI(
308
313
  body.project_id,
309
314
  sessionNumber,
310
315
  result,
311
316
  storagePaths,
312
- body.gemini_api_key
317
+ geminiApiKey
313
318
  )
314
319
  } else {
315
320
  // Use Claude Agent SDK mode - more reliable than CLI