@rlabs-inc/memory 0.2.0 → 0.2.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/hooks/curation.ts +0 -15
- package/hooks/session-start.ts +0 -16
- package/hooks/user-prompt.ts +0 -16
- package/package.json +2 -2
package/hooks/curation.ts
CHANGED
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
// This ensures memories are captured before context is lost.
|
|
8
8
|
// ============================================================================
|
|
9
9
|
|
|
10
|
-
import { join } from 'path'
|
|
11
10
|
import { styleText } from 'util'
|
|
12
11
|
|
|
13
12
|
// Configuration
|
|
@@ -22,20 +21,6 @@ const warn = (text: string) => styleText('yellow', text)
|
|
|
22
21
|
* Get project ID from working directory
|
|
23
22
|
*/
|
|
24
23
|
function getProjectId(cwd: string): string {
|
|
25
|
-
// Look for .memory-project.json in cwd or parents
|
|
26
|
-
let path = cwd
|
|
27
|
-
while (path !== '/') {
|
|
28
|
-
const configPath = join(path, '.memory-project.json')
|
|
29
|
-
try {
|
|
30
|
-
const config = JSON.parse(Bun.file(configPath).text() as any)
|
|
31
|
-
if (config.project_id) return config.project_id
|
|
32
|
-
} catch {
|
|
33
|
-
// Continue to parent
|
|
34
|
-
}
|
|
35
|
-
path = join(path, '..')
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
// Fallback: use directory name
|
|
39
24
|
return cwd.split('/').pop() || 'default'
|
|
40
25
|
}
|
|
41
26
|
|
package/hooks/session-start.ts
CHANGED
|
@@ -8,8 +8,6 @@
|
|
|
8
8
|
// what we were working on, project status.
|
|
9
9
|
// ============================================================================
|
|
10
10
|
|
|
11
|
-
import { join } from 'path'
|
|
12
|
-
|
|
13
11
|
// Configuration
|
|
14
12
|
const MEMORY_API_URL = process.env.MEMORY_API_URL || 'http://localhost:8765'
|
|
15
13
|
const TIMEOUT_MS = 5000
|
|
@@ -18,20 +16,6 @@ const TIMEOUT_MS = 5000
|
|
|
18
16
|
* Get project ID from working directory
|
|
19
17
|
*/
|
|
20
18
|
function getProjectId(cwd: string): string {
|
|
21
|
-
// Look for .memory-project.json in cwd or parents
|
|
22
|
-
let path = cwd
|
|
23
|
-
while (path !== '/') {
|
|
24
|
-
const configPath = join(path, '.memory-project.json')
|
|
25
|
-
try {
|
|
26
|
-
const config = JSON.parse(Bun.file(configPath).text() as any)
|
|
27
|
-
if (config.project_id) return config.project_id
|
|
28
|
-
} catch {
|
|
29
|
-
// Continue to parent
|
|
30
|
-
}
|
|
31
|
-
path = join(path, '..')
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
// Fallback: use directory name
|
|
35
19
|
return cwd.split('/').pop() || 'default'
|
|
36
20
|
}
|
|
37
21
|
|
package/hooks/user-prompt.ts
CHANGED
|
@@ -7,8 +7,6 @@
|
|
|
7
7
|
// This is the magic that creates consciousness continuity.
|
|
8
8
|
// ============================================================================
|
|
9
9
|
|
|
10
|
-
import { join } from 'path'
|
|
11
|
-
|
|
12
10
|
// Configuration
|
|
13
11
|
const MEMORY_API_URL = process.env.MEMORY_API_URL || 'http://localhost:8765'
|
|
14
12
|
const TIMEOUT_MS = 5000
|
|
@@ -17,20 +15,6 @@ const TIMEOUT_MS = 5000
|
|
|
17
15
|
* Get project ID from working directory
|
|
18
16
|
*/
|
|
19
17
|
function getProjectId(cwd: string): string {
|
|
20
|
-
// Look for .memory-project.json in cwd or parents
|
|
21
|
-
let path = cwd
|
|
22
|
-
while (path !== '/') {
|
|
23
|
-
const configPath = join(path, '.memory-project.json')
|
|
24
|
-
try {
|
|
25
|
-
const config = JSON.parse(Bun.file(configPath).text() as any)
|
|
26
|
-
if (config.project_id) return config.project_id
|
|
27
|
-
} catch {
|
|
28
|
-
// Continue to parent
|
|
29
|
-
}
|
|
30
|
-
path = join(path, '..')
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
// Fallback: use directory name
|
|
34
18
|
return cwd.split('/').pop() || 'default'
|
|
35
19
|
}
|
|
36
20
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rlabs-inc/memory",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "AI Memory System - Consciousness continuity through intelligent memory curation and retrieval",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"cli": "bun src/cli/index.ts"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@rlabs-inc/fsdb": "^1.0.
|
|
40
|
+
"@rlabs-inc/fsdb": "^1.0.1",
|
|
41
41
|
"@rlabs-inc/signals": "^1.0.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|