claude-mem 12.7.2 → 12.7.3
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/.codex-plugin/plugin.json +1 -1
- package/.mcp.json +1 -1
- package/dist/binaries/worker-service-v10.3.1-win-x64.exe +0 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +8 -0
- package/dist/npx-cli/index.js +105 -105
- package/dist/sdk/index.d.ts +109 -0
- package/dist/sdk/index.js +183 -0
- package/openclaw/openclaw.plugin.json +1 -1
- package/package.json +2 -1
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/.codex-plugin/plugin.json +1 -1
- package/plugin/.mcp.json +1 -1
- package/plugin/hooks/codex-hooks.json +7 -7
- package/plugin/hooks/hooks.json +7 -7
- package/plugin/package.json +1 -1
- package/plugin/scripts/context-generator.cjs +89 -81
- package/plugin/scripts/mcp-server.cjs +26 -26
- package/plugin/scripts/version-check.js +22 -2
- package/plugin/scripts/worker-service.cjs +228 -215
- package/plugin/skills/version-bump/SKILL.md +6 -1
|
@@ -32,6 +32,24 @@ function emitUpgradeHint(message) {
|
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
+
const LEGACY_VERSION_MARKER_RE =
|
|
36
|
+
/^v?\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?$/;
|
|
37
|
+
|
|
38
|
+
function readInstallMarkerVersion(markerPath) {
|
|
39
|
+
const content = readFileSync(markerPath, 'utf-8');
|
|
40
|
+
try {
|
|
41
|
+
const marker = JSON.parse(content);
|
|
42
|
+
return marker && typeof marker === 'object' && typeof marker.version === 'string'
|
|
43
|
+
? marker.version
|
|
44
|
+
: null;
|
|
45
|
+
} catch {
|
|
46
|
+
const legacyVersion = content.trim();
|
|
47
|
+
return LEGACY_VERSION_MARKER_RE.test(legacyVersion)
|
|
48
|
+
? legacyVersion.replace(/^v/i, '')
|
|
49
|
+
: null;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
35
53
|
try {
|
|
36
54
|
const pkg = JSON.parse(readFileSync(join(ROOT, 'package.json'), 'utf-8'));
|
|
37
55
|
const markerPath = join(ROOT, '.install-version');
|
|
@@ -39,8 +57,10 @@ try {
|
|
|
39
57
|
emitUpgradeHint('claude-mem: runtime not yet set up - run: npx claude-mem@latest install');
|
|
40
58
|
process.exit(0);
|
|
41
59
|
}
|
|
42
|
-
const
|
|
43
|
-
if (
|
|
60
|
+
const markerVersion = readInstallMarkerVersion(markerPath);
|
|
61
|
+
if (!markerVersion) {
|
|
62
|
+
emitUpgradeHint('claude-mem: install marker unreadable - run: npx claude-mem@latest install');
|
|
63
|
+
} else if (markerVersion !== pkg.version) {
|
|
44
64
|
emitUpgradeHint(`claude-mem: upgraded to v${pkg.version} - run: npx claude-mem@latest install`);
|
|
45
65
|
}
|
|
46
66
|
} catch {
|