indelible-mcp 4.9.2 → 4.9.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/package.json +1 -1
- package/src/index.js +32 -3
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -7989,7 +7989,7 @@ Commands:
|
|
|
7989
7989
|
}
|
|
7990
7990
|
function printHelp() {
|
|
7991
7991
|
console.log(`
|
|
7992
|
-
Indelible MCP \u2014 Blockchain memory for Claude Code (v4.9.
|
|
7992
|
+
Indelible MCP \u2014 Blockchain memory for Claude Code (v4.9.3)
|
|
7993
7993
|
|
|
7994
7994
|
Setup:
|
|
7995
7995
|
indelible-mcp setup --wif=KEY --pin=PIN Import and encrypt your private key
|
|
@@ -8036,13 +8036,41 @@ Get your key: Sign in at indelible.one \u2192 Settings \u2192 Private Key
|
|
|
8036
8036
|
Learn more: https://indelible.one
|
|
8037
8037
|
`);
|
|
8038
8038
|
}
|
|
8039
|
+
function findNewestTranscript() {
|
|
8040
|
+
const projectsDir = join19(homedir15(), ".claude", "projects");
|
|
8041
|
+
if (!existsSync19(projectsDir)) return null;
|
|
8042
|
+
let newestTime = 0;
|
|
8043
|
+
let newest = null;
|
|
8044
|
+
try {
|
|
8045
|
+
for (const project of readdirSync(projectsDir)) {
|
|
8046
|
+
const projectPath = join19(projectsDir, project);
|
|
8047
|
+
try {
|
|
8048
|
+
if (!statSync4(projectPath).isDirectory()) continue;
|
|
8049
|
+
for (const file of readdirSync(projectPath)) {
|
|
8050
|
+
if (!file.endsWith(".jsonl")) continue;
|
|
8051
|
+
const p = join19(projectPath, file);
|
|
8052
|
+
const t = statSync4(p).mtimeMs;
|
|
8053
|
+
if (t > newestTime) {
|
|
8054
|
+
newestTime = t;
|
|
8055
|
+
newest = p;
|
|
8056
|
+
}
|
|
8057
|
+
}
|
|
8058
|
+
} catch {
|
|
8059
|
+
}
|
|
8060
|
+
}
|
|
8061
|
+
} catch {
|
|
8062
|
+
}
|
|
8063
|
+
return newest;
|
|
8064
|
+
}
|
|
8039
8065
|
async function runPreCompactSave() {
|
|
8040
8066
|
let trigger = "auto";
|
|
8067
|
+
let transcriptPath = null;
|
|
8041
8068
|
try {
|
|
8042
8069
|
const stdin = await readStdin();
|
|
8043
8070
|
if (stdin) {
|
|
8044
8071
|
const meta = JSON.parse(stdin);
|
|
8045
8072
|
trigger = meta.trigger || "auto";
|
|
8073
|
+
transcriptPath = meta.transcript_path || null;
|
|
8046
8074
|
}
|
|
8047
8075
|
} catch {
|
|
8048
8076
|
}
|
|
@@ -8051,7 +8079,8 @@ async function runPreCompactSave() {
|
|
|
8051
8079
|
process.stderr.write("Indelible: MCP disabled, skipping save\n");
|
|
8052
8080
|
process.exit(0);
|
|
8053
8081
|
}
|
|
8054
|
-
const
|
|
8082
|
+
const target = transcriptPath && existsSync19(transcriptPath) ? transcriptPath : findNewestTranscript() || CONTEXT_FILE2;
|
|
8083
|
+
const result = await saveSession(target, `Auto-save before ${trigger} compaction`);
|
|
8055
8084
|
if (result.success) {
|
|
8056
8085
|
process.stderr.write(`Indelible: Saved ${result.newMessages} messages (${result.saveType}) tx:${result.txId?.slice(0, 12)}...
|
|
8057
8086
|
`);
|
|
@@ -8209,7 +8238,7 @@ function readStdin() {
|
|
|
8209
8238
|
}
|
|
8210
8239
|
var SERVER_INFO = {
|
|
8211
8240
|
name: "indelible",
|
|
8212
|
-
version: "4.9.
|
|
8241
|
+
version: "4.9.3",
|
|
8213
8242
|
description: "Blockchain-backed memory and code storage for Claude Code"
|
|
8214
8243
|
};
|
|
8215
8244
|
var TOOLS = [
|