brain-memory 0.1.0-beta.29 → 0.1.0-beta.30
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/CHANGELOG.md +44 -0
- package/assets/brand/README.md +28 -0
- package/assets/brand/icon-dark.svg +19 -0
- package/assets/brand/icon-light.svg +20 -0
- package/assets/brand/linkedin_cover.png +0 -0
- package/assets/brand/linkedin_cover_light.png +0 -0
- package/assets/brand/mark-dark.svg +19 -0
- package/assets/brand/mark-light.svg +20 -0
- package/assets/brand/png/icon-dark-1024.png +0 -0
- package/assets/brand/png/icon-dark-128.png +0 -0
- package/assets/brand/png/icon-dark-256.png +0 -0
- package/assets/brand/png/icon-dark-512.png +0 -0
- package/assets/brand/png/icon-dark-64.png +0 -0
- package/assets/brand/png/icon-light-1024.png +0 -0
- package/assets/brand/png/icon-light-128.png +0 -0
- package/assets/brand/png/icon-light-256.png +0 -0
- package/assets/brand/png/icon-light-512.png +0 -0
- package/assets/brand/png/icon-light-64.png +0 -0
- package/assets/brand/png/mark-dark-1024.png +0 -0
- package/assets/brand/png/mark-light-1024.png +0 -0
- package/bin/forget.js +4 -2
- package/bin/memorize.js +18 -1
- package/package.json +4 -2
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,50 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.1.0-beta.30] - 2026-07-01
|
|
10
|
+
|
|
11
|
+
### Security
|
|
12
|
+
|
|
13
|
+
- **Connector purges plaintext working copies.** The hosted MCP connector already
|
|
14
|
+
kept per-user working copies in RAM only (tmpfs, never on disk); it now also
|
|
15
|
+
**wipes them proactively** — on an idle TTL, at session end, and via a dedicated
|
|
16
|
+
ephemeral working path — so a decrypted brain never lingers in memory longer than
|
|
17
|
+
an active session needs it. Local-only and Git/export use are unaffected. See
|
|
18
|
+
[SECURITY.md](SECURITY.md).
|
|
19
|
+
|
|
20
|
+
### Added
|
|
21
|
+
|
|
22
|
+
- **`memorize` tags each memory with its origin agent.** New memories record
|
|
23
|
+
`encoding_context.agent` — the detected host (`claude-code`, `gemini-cli`,
|
|
24
|
+
`codex`, `opencode`), a `BRAIN_AGENT` override, or `unknown` — in both frontmatter
|
|
25
|
+
and the index. This powers the Brain Cloud dashboard's "where your brain is used"
|
|
26
|
+
attribution. Existing memories are unaffected; the field is additive.
|
|
27
|
+
|
|
28
|
+
### Fixed
|
|
29
|
+
|
|
30
|
+
- **`forget` now actually clears a memory from recall.** `forget` sourced its
|
|
31
|
+
search index differently from `recall`, so a forgotten memory could keep surfacing
|
|
32
|
+
until the index was rebuilt out-of-band; it now sources the index via the same
|
|
33
|
+
TF-IDF path as `recall`, so forgetting takes effect immediately. Added CLI test
|
|
34
|
+
coverage for `recall` and `forget`, and de-flaked the stress-test performance gate.
|
|
35
|
+
|
|
36
|
+
### Changed
|
|
37
|
+
|
|
38
|
+
- **Website NL/EU compliance pass.** Privacy and Terms were revised for NL/EU law —
|
|
39
|
+
sub-processor list and EU data location, a cookies/browser-storage section,
|
|
40
|
+
retention periods, KMS-accurate at-rest-encryption language, the Omelas controller
|
|
41
|
+
identity, a VAT (EU OSS) clause, and the 14-day consumer right of withdrawal — plus
|
|
42
|
+
a site-wide transparency notice (not a consent CMP; the site sets no tracking
|
|
43
|
+
cookies).
|
|
44
|
+
- **Brand asset set.** Added `assets/brand/` — light + dark firing-neuron tiles and
|
|
45
|
+
marks (SVG + PNG 64–1024), transparent marks, icon-centered LinkedIn covers
|
|
46
|
+
(6336×1584, no text), and a usage README — with a dependency-free regeneration
|
|
47
|
+
script. No behavior change.
|
|
48
|
+
|
|
49
|
+
## [0.1.0-beta.29] - 2026-06-26
|
|
50
|
+
|
|
51
|
+
Version marker only — no functional changes since beta.28.
|
|
52
|
+
|
|
9
53
|
## [0.1.0-beta.28] - 2026-06-26
|
|
10
54
|
|
|
11
55
|
### Fixed
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Brain Memory — brand icon exports
|
|
2
|
+
|
|
3
|
+
The firing-neuron "activation" mark in the technical-white identity's brand cyan
|
|
4
|
+
(`#46C6FF`). Regenerate everything from the canonical geometry with
|
|
5
|
+
`website/scripts/gen-icon.mjs` (favicons/app icon) — these files mirror that mark
|
|
6
|
+
for use on external surfaces.
|
|
7
|
+
|
|
8
|
+
## Which file to use
|
|
9
|
+
|
|
10
|
+
| You're placing it on… | Use |
|
|
11
|
+
|----------------------------------|---------------------------------------|
|
|
12
|
+
| A **dark** UI / near-black tile | `icon-dark.svg` · `png/icon-dark-*.png` |
|
|
13
|
+
| A **light** UI / paper surface | `icon-light.svg` · `png/icon-light-*.png` |
|
|
14
|
+
| A surface that already has a bg (no tile) | `mark-dark.svg` (light/white mark) · `mark-light.svg` (deep-cyan mark) |
|
|
15
|
+
|
|
16
|
+
- **Tiles** (`icon-*`) include the rounded-square background and are self-contained.
|
|
17
|
+
- **Marks** (`mark-*`) are transparent — the neuron only.
|
|
18
|
+
- **Dark** keeps the white-hot core; **light** deepens the cyans + uses a dark-cyan
|
|
19
|
+
core so the mark stays legible on paper.
|
|
20
|
+
|
|
21
|
+
PNG sizes: 1024 / 512 / 256 / 128 / 64.
|
|
22
|
+
|
|
23
|
+
## Wide images
|
|
24
|
+
|
|
25
|
+
`linkedin_cover.png` / `linkedin_cover_light.png` — 6336×1584 (4× the 1584×396
|
|
26
|
+
LinkedIn banner): the app tile centered on a flat canvas, no text (dark =
|
|
27
|
+
`#252525`, light = paper). Regenerate with
|
|
28
|
+
`node website/scripts/gen-linkedin-cover.mjs` (writes `website/public/`).
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" role="img" aria-label="Brain Memory"><defs><radialGradient id="core" cx="50%" cy="50%" r="50%"><stop offset="0%" stop-color="#8FDDFF" stop-opacity="0.95"/><stop offset="100%" stop-color="#46C6FF" stop-opacity="0"/></radialGradient></defs><rect width="32" height="32" rx="7" ry="7" fill="#07090A"/>
|
|
2
|
+
<circle cx="16" cy="16" r="12" fill="url(#core)" opacity="0.7"/>
|
|
3
|
+
<g stroke="#2E9FD6" stroke-width="1.25" stroke-linecap="round">
|
|
4
|
+
<line x1="16" y1="16" x2="8" y2="8" stroke-opacity="0.4"/>
|
|
5
|
+
<line x1="16" y1="16" x2="25" y2="8" stroke-opacity="0.82"/>
|
|
6
|
+
<line x1="16" y1="16" x2="27" y2="17" stroke-opacity="0.5"/>
|
|
7
|
+
<line x1="16" y1="16" x2="24" y2="25" stroke-opacity="0.75"/>
|
|
8
|
+
<line x1="16" y1="16" x2="8" y2="23" stroke-opacity="0.4"/>
|
|
9
|
+
<line x1="16" y1="16" x2="6" y2="16" stroke-opacity="0.35"/>
|
|
10
|
+
</g>
|
|
11
|
+
<circle cx="8" cy="8" r="1.6" fill="#1C7FB0"/>
|
|
12
|
+
<circle cx="27" cy="17" r="1.4" fill="#4FB8E6"/>
|
|
13
|
+
<circle cx="24" cy="25" r="1.9" fill="#2E9FD6"/>
|
|
14
|
+
<circle cx="8" cy="23" r="1.6" fill="#2389BE"/>
|
|
15
|
+
<circle cx="6" cy="16" r="1.3" fill="#1B6E97"/>
|
|
16
|
+
<circle cx="25" cy="8" r="2.4" fill="#6FD3FF"/>
|
|
17
|
+
<circle cx="21" cy="11.5" r="1.3" fill="#CFEEFF"/>
|
|
18
|
+
<circle cx="16" cy="16" r="3.7" fill="#DFF4FF"/>
|
|
19
|
+
<circle cx="16" cy="16" r="1.9" fill="#FFFFFF"/></svg>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" role="img" aria-label="Brain Memory"><defs><radialGradient id="core" cx="50%" cy="50%" r="50%"><stop offset="0%" stop-color="#46C6FF" stop-opacity="0.95"/><stop offset="100%" stop-color="#46C6FF" stop-opacity="0"/></radialGradient></defs><rect width="32" height="32" rx="7" ry="7" fill="#F4F2EC"/>
|
|
2
|
+
<circle cx="16" cy="16" r="12" fill="url(#core)" opacity="0.5"/>
|
|
3
|
+
<g stroke="#1C7FB0" stroke-width="1.25" stroke-linecap="round">
|
|
4
|
+
<line x1="16" y1="16" x2="8" y2="8" stroke-opacity="0.4"/>
|
|
5
|
+
<line x1="16" y1="16" x2="25" y2="8" stroke-opacity="0.85"/>
|
|
6
|
+
<line x1="16" y1="16" x2="27" y2="17" stroke-opacity="0.55"/>
|
|
7
|
+
<line x1="16" y1="16" x2="24" y2="25" stroke-opacity="0.8"/>
|
|
8
|
+
<line x1="16" y1="16" x2="8" y2="23" stroke-opacity="0.4"/>
|
|
9
|
+
<line x1="16" y1="16" x2="6" y2="16" stroke-opacity="0.35"/>
|
|
10
|
+
</g>
|
|
11
|
+
<circle cx="8" cy="8" r="1.6" fill="#1C7FB0"/>
|
|
12
|
+
<circle cx="27" cy="17" r="1.4" fill="#2E9FD6"/>
|
|
13
|
+
<circle cx="24" cy="25" r="1.9" fill="#1C7FB0"/>
|
|
14
|
+
<circle cx="8" cy="23" r="1.6" fill="#2389BE"/>
|
|
15
|
+
<circle cx="6" cy="16" r="1.3" fill="#1B6E97"/>
|
|
16
|
+
<circle cx="25" cy="8" r="2.4" fill="#2E9FD6"/>
|
|
17
|
+
<circle cx="21" cy="11.5" r="1.3" fill="#5BC8FF"/>
|
|
18
|
+
<circle cx="16" cy="16" r="3.7" fill="#1C7FB0"/>
|
|
19
|
+
<circle cx="16" cy="16" r="1.9" fill="#0B4D6E"/>
|
|
20
|
+
<circle cx="16" cy="16" r="0.8" fill="#5BC8FF"/></svg>
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" role="img" aria-label="Brain Memory"><defs><radialGradient id="core" cx="50%" cy="50%" r="50%"><stop offset="0%" stop-color="#8FDDFF" stop-opacity="0.95"/><stop offset="100%" stop-color="#46C6FF" stop-opacity="0"/></radialGradient></defs>
|
|
2
|
+
<circle cx="16" cy="16" r="12" fill="url(#core)" opacity="0.7"/>
|
|
3
|
+
<g stroke="#2E9FD6" stroke-width="1.25" stroke-linecap="round">
|
|
4
|
+
<line x1="16" y1="16" x2="8" y2="8" stroke-opacity="0.4"/>
|
|
5
|
+
<line x1="16" y1="16" x2="25" y2="8" stroke-opacity="0.82"/>
|
|
6
|
+
<line x1="16" y1="16" x2="27" y2="17" stroke-opacity="0.5"/>
|
|
7
|
+
<line x1="16" y1="16" x2="24" y2="25" stroke-opacity="0.75"/>
|
|
8
|
+
<line x1="16" y1="16" x2="8" y2="23" stroke-opacity="0.4"/>
|
|
9
|
+
<line x1="16" y1="16" x2="6" y2="16" stroke-opacity="0.35"/>
|
|
10
|
+
</g>
|
|
11
|
+
<circle cx="8" cy="8" r="1.6" fill="#1C7FB0"/>
|
|
12
|
+
<circle cx="27" cy="17" r="1.4" fill="#4FB8E6"/>
|
|
13
|
+
<circle cx="24" cy="25" r="1.9" fill="#2E9FD6"/>
|
|
14
|
+
<circle cx="8" cy="23" r="1.6" fill="#2389BE"/>
|
|
15
|
+
<circle cx="6" cy="16" r="1.3" fill="#1B6E97"/>
|
|
16
|
+
<circle cx="25" cy="8" r="2.4" fill="#6FD3FF"/>
|
|
17
|
+
<circle cx="21" cy="11.5" r="1.3" fill="#CFEEFF"/>
|
|
18
|
+
<circle cx="16" cy="16" r="3.7" fill="#DFF4FF"/>
|
|
19
|
+
<circle cx="16" cy="16" r="1.9" fill="#FFFFFF"/></svg>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" role="img" aria-label="Brain Memory"><defs><radialGradient id="core" cx="50%" cy="50%" r="50%"><stop offset="0%" stop-color="#46C6FF" stop-opacity="0.95"/><stop offset="100%" stop-color="#46C6FF" stop-opacity="0"/></radialGradient></defs>
|
|
2
|
+
<circle cx="16" cy="16" r="12" fill="url(#core)" opacity="0.5"/>
|
|
3
|
+
<g stroke="#1C7FB0" stroke-width="1.25" stroke-linecap="round">
|
|
4
|
+
<line x1="16" y1="16" x2="8" y2="8" stroke-opacity="0.4"/>
|
|
5
|
+
<line x1="16" y1="16" x2="25" y2="8" stroke-opacity="0.85"/>
|
|
6
|
+
<line x1="16" y1="16" x2="27" y2="17" stroke-opacity="0.55"/>
|
|
7
|
+
<line x1="16" y1="16" x2="24" y2="25" stroke-opacity="0.8"/>
|
|
8
|
+
<line x1="16" y1="16" x2="8" y2="23" stroke-opacity="0.4"/>
|
|
9
|
+
<line x1="16" y1="16" x2="6" y2="16" stroke-opacity="0.35"/>
|
|
10
|
+
</g>
|
|
11
|
+
<circle cx="8" cy="8" r="1.6" fill="#1C7FB0"/>
|
|
12
|
+
<circle cx="27" cy="17" r="1.4" fill="#2E9FD6"/>
|
|
13
|
+
<circle cx="24" cy="25" r="1.9" fill="#1C7FB0"/>
|
|
14
|
+
<circle cx="8" cy="23" r="1.6" fill="#2389BE"/>
|
|
15
|
+
<circle cx="6" cy="16" r="1.3" fill="#1B6E97"/>
|
|
16
|
+
<circle cx="25" cy="8" r="2.4" fill="#2E9FD6"/>
|
|
17
|
+
<circle cx="21" cy="11.5" r="1.3" fill="#5BC8FF"/>
|
|
18
|
+
<circle cx="16" cy="16" r="3.7" fill="#1C7FB0"/>
|
|
19
|
+
<circle cx="16" cy="16" r="1.9" fill="#0B4D6E"/>
|
|
20
|
+
<circle cx="16" cy="16" r="0.8" fill="#5BC8FF"/></svg>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/bin/forget.js
CHANGED
|
@@ -25,9 +25,11 @@ const {
|
|
|
25
25
|
readAssociations, writeAssociations, removeEdgesForMemory,
|
|
26
26
|
readReviewQueue, writeReviewQueue, removeFromReviewQueue,
|
|
27
27
|
readArchiveIndex, writeArchiveIndex,
|
|
28
|
-
readSearchIndex, writeSearchIndex,
|
|
29
28
|
} = require('../src/index-manager');
|
|
30
|
-
|
|
29
|
+
// Search-index helpers take (brainDir) — the same signature memorize/recall use.
|
|
30
|
+
// (index-manager exports same-named helpers with a (projectRoot) signature that
|
|
31
|
+
// re-appends `.brain`, which would silently no-op the search-index update here.)
|
|
32
|
+
const { removeDocument, readSearchIndex, writeSearchIndex } = require('../src/tfidf');
|
|
31
33
|
|
|
32
34
|
function main(argv) {
|
|
33
35
|
const args = argv || process.argv.slice(2);
|
package/bin/memorize.js
CHANGED
|
@@ -36,6 +36,22 @@ const {
|
|
|
36
36
|
} = require('../src/index-manager');
|
|
37
37
|
const { addDocument, createSearchIndex, readSearchIndex, writeSearchIndex } = require('../src/tfidf');
|
|
38
38
|
|
|
39
|
+
// Best-effort detection of the host AI agent, recorded on each memory's
|
|
40
|
+
// encoding_context for "where your brain is used" analytics. An explicit
|
|
41
|
+
// BRAIN_AGENT env var always wins (a per-agent install can set it); otherwise we
|
|
42
|
+
// sniff known markers. Unrecognized hosts record "unknown" (the cloud tolerates
|
|
43
|
+
// it). The non-Claude markers are best-effort.
|
|
44
|
+
function detectAgent() {
|
|
45
|
+
const e = process.env;
|
|
46
|
+
if (e.BRAIN_AGENT) return e.BRAIN_AGENT;
|
|
47
|
+
if (e.CLAUDECODE || e.CLAUDE_CODE_ENTRYPOINT) return 'claude-code';
|
|
48
|
+
if (e.GEMINI_CLI || e.GEMINI_CLI_VERSION) return 'gemini-cli';
|
|
49
|
+
if (e.CODEX_HOME || e.CODEX_SANDBOX) return 'codex';
|
|
50
|
+
if (e.OPENCODE || e.OPENCODE_BIN) return 'opencode';
|
|
51
|
+
return 'unknown';
|
|
52
|
+
}
|
|
53
|
+
const HOST_AGENT = detectAgent();
|
|
54
|
+
|
|
39
55
|
// --- Type defaults ---
|
|
40
56
|
|
|
41
57
|
const TYPE_DEFAULTS = {
|
|
@@ -119,6 +135,7 @@ function buildMemoryFileContent(mem, id, now) {
|
|
|
119
135
|
` project: "${(mem.encoding_context && mem.encoding_context.project) || ''}"`,
|
|
120
136
|
` topics: [${((mem.encoding_context && mem.encoding_context.topics) || []).map(t => `"${t}"`).join(', ')}]`,
|
|
121
137
|
` task_type: "${(mem.encoding_context && mem.encoding_context.task_type) || ''}"`,
|
|
138
|
+
` agent: "${HOST_AGENT}"`,
|
|
122
139
|
'---',
|
|
123
140
|
'',
|
|
124
141
|
);
|
|
@@ -142,7 +159,7 @@ function buildIndexEntry(mem, id, strength, decayRate, now) {
|
|
|
142
159
|
confidence: mem.confidence ?? 0.7,
|
|
143
160
|
tags: mem.tags || [],
|
|
144
161
|
related: mem.related || [],
|
|
145
|
-
encoding_context: mem.encoding_context || {},
|
|
162
|
+
encoding_context: { ...(mem.encoding_context || {}), agent: HOST_AGENT },
|
|
146
163
|
// CoALA Phase 0: cheap chars/4 token estimate for working-memory budgeting.
|
|
147
164
|
token_estimate: Math.ceil((mem.content || '').length / 4),
|
|
148
165
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "brain-memory",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.30",
|
|
4
4
|
"description": "A brain-inspired hierarchical memory system for AI coding agents. Deep nested file structure that mimics human memory with time-decay and strength-based recall.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"claude-code",
|
|
@@ -44,8 +44,10 @@
|
|
|
44
44
|
"url": "git+https://github.com/omelas-tech/brain.git"
|
|
45
45
|
},
|
|
46
46
|
"scripts": {
|
|
47
|
-
"test": "node --test test/index-manager.test.js test/scorer.test.js test/tfidf.test.js test/recall.test.js test/functional.test.js test/erasure.test.js test/stress.test.js test/crypto.test.js test/git-sync.test.js test/cloud-sync.test.js test/export-import.test.js test/install.test.js test/prompts.test.js test/session-start.test.js test/memorize.test.js test/pinning.test.js test/skills.test.js test/contradiction.test.js",
|
|
47
|
+
"test": "node --test test/index-manager.test.js test/scorer.test.js test/tfidf.test.js test/recall.test.js test/recall-cli.test.js test/forget.test.js test/functional.test.js test/erasure.test.js test/stress.test.js test/crypto.test.js test/git-sync.test.js test/cloud-sync.test.js test/export-import.test.js test/install.test.js test/prompts.test.js test/session-start.test.js test/memorize.test.js test/pinning.test.js test/skills.test.js test/contradiction.test.js",
|
|
48
48
|
"prerelease": "npm test",
|
|
49
|
+
"changelog": "node scripts/release.mjs",
|
|
50
|
+
"changelog:status": "node scripts/release.mjs status",
|
|
49
51
|
"release:beta": "npm version prerelease --preid beta && npm publish --tag beta && npm dist-tag add brain-memory@$(node -p \"require('./package.json').version\") latest",
|
|
50
52
|
"release:patch": "npm version patch && npm publish",
|
|
51
53
|
"release:minor": "npm version minor && npm publish",
|