@remem-ai/remem 0.5.97 → 0.5.141
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/README.md +5 -2
- package/package.json +10 -5
- package/scripts/install.js +67 -3
package/README.md
CHANGED
|
@@ -23,5 +23,8 @@ Environment variables:
|
|
|
23
23
|
- `REMEM_NPM_SKIP_DOWNLOAD=1`: skip binary download during npm install
|
|
24
24
|
- `REMEM_NPM_BINARY=/path/to/remem`: run an explicit existing binary
|
|
25
25
|
|
|
26
|
-
See the main project README for Claude Code
|
|
27
|
-
|
|
26
|
+
See the product site and main project README for Claude Code, OpenAI Codex,
|
|
27
|
+
Codex CLI, and MCP setup details:
|
|
28
|
+
|
|
29
|
+
- https://majiayu000.github.io/remem/
|
|
30
|
+
- https://github.com/majiayu000/remem
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remem-ai/remem",
|
|
3
|
-
"version": "0.5.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.5.141",
|
|
4
|
+
"description": "Local-first coding agent memory for Claude Code and OpenAI Codex",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://majiayu000.github.io/remem/",
|
|
7
7
|
"repository": {
|
|
@@ -32,15 +32,20 @@
|
|
|
32
32
|
],
|
|
33
33
|
"keywords": [
|
|
34
34
|
"claude-code",
|
|
35
|
-
"openai-codex",
|
|
36
35
|
"codex",
|
|
36
|
+
"codex-cli",
|
|
37
|
+
"claude-code-memory",
|
|
38
|
+
"codex-memory",
|
|
39
|
+
"openai-codex",
|
|
37
40
|
"memory",
|
|
38
41
|
"agent-memory",
|
|
39
|
-
"coding-
|
|
42
|
+
"coding-agent-memory",
|
|
43
|
+
"persistent-memory",
|
|
40
44
|
"mcp",
|
|
41
45
|
"mcp-server",
|
|
46
|
+
"coding-agent",
|
|
42
47
|
"rust-cli",
|
|
43
|
-
"
|
|
48
|
+
"developer-tools"
|
|
44
49
|
],
|
|
45
50
|
"publishConfig": {
|
|
46
51
|
"access": "public"
|
package/scripts/install.js
CHANGED
|
@@ -94,12 +94,71 @@ function sha256(file) {
|
|
|
94
94
|
return hash.digest("hex");
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
+
function shouldCodesign(platform = process.platform, arch = process.arch) {
|
|
98
|
+
return platform === "darwin" && arch === "arm64";
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
function codesignBinary(binary, options = {}) {
|
|
102
|
+
const platform = options.platform || process.platform;
|
|
103
|
+
const arch = options.arch || process.arch;
|
|
104
|
+
if (!shouldCodesign(platform, arch)) {
|
|
105
|
+
return false;
|
|
106
|
+
}
|
|
107
|
+
const spawn = options.spawnSync || spawnSync;
|
|
108
|
+
const result = spawn("codesign", ["--force", "--sign", "-", binary], {
|
|
109
|
+
encoding: "utf8",
|
|
110
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
111
|
+
timeout: 5000,
|
|
112
|
+
});
|
|
113
|
+
if (result.error) {
|
|
114
|
+
throw new Error(`codesign failed for ${binary}: ${result.error.message}`);
|
|
115
|
+
}
|
|
116
|
+
if (result.status !== 0) {
|
|
117
|
+
const reason = (result.stderr || result.stdout || `exit ${result.status}`).trim();
|
|
118
|
+
throw new Error(`codesign failed for ${binary}: ${reason}`);
|
|
119
|
+
}
|
|
120
|
+
return true;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
function smokeBinary(binary, options = {}) {
|
|
124
|
+
const spawn = options.spawnSync || spawnSync;
|
|
125
|
+
const result = spawn(binary, ["--version"], {
|
|
126
|
+
encoding: "utf8",
|
|
127
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
128
|
+
timeout: 5000,
|
|
129
|
+
});
|
|
130
|
+
if (result.error) {
|
|
131
|
+
throw new Error(`installed remem binary is not executable: ${result.error.message}`);
|
|
132
|
+
}
|
|
133
|
+
if (result.status !== 0) {
|
|
134
|
+
const reason = (result.stderr || result.stdout || `exit ${result.status}`).trim();
|
|
135
|
+
throw new Error(`installed remem binary failed --version: ${reason}`);
|
|
136
|
+
}
|
|
137
|
+
return (result.stdout || result.stderr || "").trim();
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
function expectedAssetFile(key) {
|
|
141
|
+
if (!/^(darwin|linux)-(arm64|x64)$/.test(key)) {
|
|
142
|
+
throw new Error(`Unsupported release asset platform key: ${key}`);
|
|
143
|
+
}
|
|
144
|
+
return `remem-${key}.tar.gz`;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
function validateAssetFile(file, key) {
|
|
148
|
+
const expected = expectedAssetFile(key);
|
|
149
|
+
if (file !== expected) {
|
|
150
|
+
throw new Error(`Release manifest asset ${key} has unsafe file name: ${file}`);
|
|
151
|
+
}
|
|
152
|
+
return file;
|
|
153
|
+
}
|
|
154
|
+
|
|
97
155
|
function resolveAsset(manifest, version, key) {
|
|
98
156
|
const release = manifest?.versions?.[version];
|
|
99
157
|
const asset = release?.assets?.[key];
|
|
100
158
|
if (!asset || typeof asset.file !== "string") {
|
|
101
159
|
throw new Error(`Release manifest for remem ${version} is missing asset ${key}`);
|
|
102
160
|
}
|
|
161
|
+
const file = validateAssetFile(asset.file, key);
|
|
103
162
|
if (!/^[0-9a-f]{64}$/i.test(asset.sha256 || "")) {
|
|
104
163
|
throw new Error(`Release manifest asset ${key} is missing a valid sha256`);
|
|
105
164
|
}
|
|
@@ -107,9 +166,9 @@ function resolveAsset(manifest, version, key) {
|
|
|
107
166
|
? release.base_url.replace(/\/$/, "")
|
|
108
167
|
: BASE_URL;
|
|
109
168
|
return {
|
|
110
|
-
file
|
|
169
|
+
file,
|
|
111
170
|
sha256: asset.sha256.toLowerCase(),
|
|
112
|
-
url: `${baseUrl}/${
|
|
171
|
+
url: `${baseUrl}/${file}`,
|
|
113
172
|
};
|
|
114
173
|
}
|
|
115
174
|
|
|
@@ -135,7 +194,7 @@ async function main() {
|
|
|
135
194
|
const manifestUrl = `${BASE_URL}/remem-releases.json`;
|
|
136
195
|
const manifest = await fetchJson(manifestUrl);
|
|
137
196
|
const asset = resolveAsset(manifest, VERSION, key);
|
|
138
|
-
const archive = path.join(tmpDir,
|
|
197
|
+
const archive = path.join(tmpDir, "remem-release.tar.gz");
|
|
139
198
|
|
|
140
199
|
console.log(`Downloading remem ${VERSION} for ${key}`);
|
|
141
200
|
await download(asset.url, archive);
|
|
@@ -151,6 +210,8 @@ async function main() {
|
|
|
151
210
|
if (tar.status !== 0) throw new Error(`tar exited with status ${tar.status}`);
|
|
152
211
|
|
|
153
212
|
fs.chmodSync(binary, 0o755);
|
|
213
|
+
codesignBinary(binary);
|
|
214
|
+
smokeBinary(binary);
|
|
154
215
|
console.log(`Installed remem binary to ${binary}`);
|
|
155
216
|
} finally {
|
|
156
217
|
fs.rmSync(tmpDir, { recursive: true, force: true });
|
|
@@ -167,5 +228,8 @@ if (require.main === module) {
|
|
|
167
228
|
module.exports = {
|
|
168
229
|
BASE_URL,
|
|
169
230
|
VERSION,
|
|
231
|
+
codesignBinary,
|
|
170
232
|
resolveAsset,
|
|
233
|
+
shouldCodesign,
|
|
234
|
+
smokeBinary,
|
|
171
235
|
};
|