indelible-mcp 3.6.0 → 3.7.0
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 +2 -2
- package/src/lib/spv.js +1 -1
- package/src/tools/save_file.js +6 -3
- package/src/tools/save_project.js +2 -1
- package/src/tools/save_session.js +26 -6
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -254,7 +254,7 @@ Commands:
|
|
|
254
254
|
|
|
255
255
|
function printHelp() {
|
|
256
256
|
console.log(`
|
|
257
|
-
Indelible MCP — Blockchain memory for Claude Code (v3.
|
|
257
|
+
Indelible MCP — Blockchain memory for Claude Code (v3.7.0)
|
|
258
258
|
|
|
259
259
|
Setup:
|
|
260
260
|
indelible-mcp setup --wif=KEY --pin=PIN Import and encrypt your private key
|
|
@@ -466,7 +466,7 @@ function readStdin() {
|
|
|
466
466
|
|
|
467
467
|
const SERVER_INFO = {
|
|
468
468
|
name: 'indelible',
|
|
469
|
-
version: '3.
|
|
469
|
+
version: '3.7.0',
|
|
470
470
|
description: 'Blockchain-backed memory and code storage for Claude Code'
|
|
471
471
|
}
|
|
472
472
|
|
package/src/lib/spv.js
CHANGED
package/src/tools/save_file.js
CHANGED
|
@@ -69,9 +69,10 @@ export async function saveFile(filePath, options = {}) {
|
|
|
69
69
|
timestamp
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
const { txHex, txId, changeUtxos } = await spv.buildOpReturnTxWithChange(
|
|
72
|
+
const { txHex, txId, changeUtxos, fee, txSize } = await spv.buildOpReturnTxWithChange(
|
|
73
73
|
wif, utxos, JSON.stringify(payload)
|
|
74
74
|
)
|
|
75
|
+
process.stderr.write(`[indelible] save_file: ${fee} sats (${txSize} bytes)\n`)
|
|
75
76
|
const result = await spv.broadcastTx(txHex)
|
|
76
77
|
cacheTx(txId, payload)
|
|
77
78
|
masterTxId = result.txid || txId
|
|
@@ -92,9 +93,10 @@ export async function saveFile(filePath, options = {}) {
|
|
|
92
93
|
data: chunks[i]
|
|
93
94
|
})
|
|
94
95
|
|
|
95
|
-
const { txHex, txId, changeUtxos } = await spv.buildOpReturnTxWithChange(
|
|
96
|
+
const { txHex, txId, changeUtxos, fee, txSize } = await spv.buildOpReturnTxWithChange(
|
|
96
97
|
wif, utxos, chunkPayload
|
|
97
98
|
)
|
|
99
|
+
process.stderr.write(`[indelible] save_file chunk ${i + 1}/${chunks.length}: ${fee} sats (${txSize} bytes)\n`)
|
|
98
100
|
const result = await spv.broadcastTx(txHex)
|
|
99
101
|
cacheTx(txId, JSON.parse(chunkPayload))
|
|
100
102
|
chunkTxIds.push(result.txid || txId)
|
|
@@ -133,9 +135,10 @@ export async function saveFile(filePath, options = {}) {
|
|
|
133
135
|
await new Promise(r => setTimeout(r, 500))
|
|
134
136
|
utxos = await spv.getUtxos(config.address)
|
|
135
137
|
}
|
|
136
|
-
const { txHex, txId, changeUtxos: masterChangeUtxos } = await spv.buildOpReturnTxWithChange(
|
|
138
|
+
const { txHex, txId, changeUtxos: masterChangeUtxos, fee: masterFee, txSize: masterTxSize } = await spv.buildOpReturnTxWithChange(
|
|
137
139
|
wif, utxos, JSON.stringify(masterPayload)
|
|
138
140
|
)
|
|
141
|
+
process.stderr.write(`[indelible] save_file master index: ${masterFee} sats (${masterTxSize} bytes)\n`)
|
|
139
142
|
const result = await spv.broadcastTx(txHex)
|
|
140
143
|
cacheTx(txId, masterPayload)
|
|
141
144
|
masterTxId = result.txid || txId
|
|
@@ -141,9 +141,10 @@ export async function saveProject(dirPath, options = {}) {
|
|
|
141
141
|
return { success: false, error: 'No UTXOs available. Fund your wallet first.' }
|
|
142
142
|
}
|
|
143
143
|
|
|
144
|
-
const { txHex, txId } = await spv.buildOpReturnTxWithChange(
|
|
144
|
+
const { txHex, txId, fee, txSize } = await spv.buildOpReturnTxWithChange(
|
|
145
145
|
wif, utxos, JSON.stringify(payload), 'INDELIBLE_PROJECT_BUNDLE'
|
|
146
146
|
)
|
|
147
|
+
process.stderr.write(`[indelible] save_project "${projectName}": ${fee} sats (${txSize} bytes)\n`)
|
|
147
148
|
await spv.broadcastTx(txHex)
|
|
148
149
|
cacheTx(txId, payload)
|
|
149
150
|
|
|
@@ -430,10 +430,25 @@ export async function saveSession(transcriptPath, summary) {
|
|
|
430
430
|
|
|
431
431
|
// Check tier for rich mode
|
|
432
432
|
let richMode = false
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
richMode =
|
|
436
|
-
}
|
|
433
|
+
const richSetting = config.rich_saves
|
|
434
|
+
if (richSetting === false || richSetting === 'disabled') {
|
|
435
|
+
richMode = false
|
|
436
|
+
} else {
|
|
437
|
+
try {
|
|
438
|
+
const tierResult = await checkProTier(config.address)
|
|
439
|
+
richMode = tierResult.ok === true
|
|
440
|
+
} catch { /* offline or error — stay text-only */ }
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
// First-time rich mode warning
|
|
444
|
+
if (richMode && !config.rich_saves_acknowledged) {
|
|
445
|
+
process.stderr.write(
|
|
446
|
+
`[indelible] Rich mode active — saves capture tool calls, results, and thinking blocks (~6-8x larger). ` +
|
|
447
|
+
`To disable: set "rich_saves": false in ~/.indelible/config.json\n`
|
|
448
|
+
)
|
|
449
|
+
config.rich_saves_acknowledged = true
|
|
450
|
+
saveConfig({ ...config })
|
|
451
|
+
}
|
|
437
452
|
|
|
438
453
|
// Parse transcript
|
|
439
454
|
const allMessages = parseTranscript(actualPath, richMode)
|
|
@@ -530,7 +545,8 @@ export async function saveSession(transcriptPath, summary) {
|
|
|
530
545
|
// Build + sign transaction LOCALLY with @bsv/sdk
|
|
531
546
|
try {
|
|
532
547
|
const utxos = await spv.getUtxos(config.address)
|
|
533
|
-
const { txHex, txId, changeUtxos } = await spv.buildOpReturnTxWithChange(wif, utxos, JSON.stringify(payload))
|
|
548
|
+
const { txHex, txId, changeUtxos, fee, txSize } = await spv.buildOpReturnTxWithChange(wif, utxos, JSON.stringify(payload))
|
|
549
|
+
process.stderr.write(`[indelible] save_session: ${fee} sats (${txSize} bytes)\n`)
|
|
534
550
|
|
|
535
551
|
// Broadcast via SPV bridge (gated by API key)
|
|
536
552
|
const broadcastResult = await spv.broadcastTx(txHex)
|
|
@@ -655,9 +671,13 @@ export async function saveSession(transcriptPath, summary) {
|
|
|
655
671
|
: ` (full: ${allMessages.length} messages)`
|
|
656
672
|
const memInfo = memoryTxId ? ' Memory files saved.' : ''
|
|
657
673
|
|
|
674
|
+
const costInfo = fee ? ` Cost: ${fee} sats.` : ''
|
|
675
|
+
|
|
658
676
|
return {
|
|
659
677
|
success: true,
|
|
660
678
|
txId: finalTxId,
|
|
679
|
+
fee,
|
|
680
|
+
txSize,
|
|
661
681
|
sessionId,
|
|
662
682
|
prevSessionId,
|
|
663
683
|
messageCount: allMessages.length,
|
|
@@ -666,7 +686,7 @@ export async function saveSession(transcriptPath, summary) {
|
|
|
666
686
|
summary: session.summary,
|
|
667
687
|
memoryTxId,
|
|
668
688
|
historyTxId,
|
|
669
|
-
message: `Session saved!${deltaInfo} committed to blockchain.${prevSessionId ? ' Linked to previous session.' : ' (First session)'}${memInfo}`
|
|
689
|
+
message: `Session saved!${deltaInfo} committed to blockchain.${costInfo}${prevSessionId ? ' Linked to previous session.' : ' (First session)'}${memInfo}`
|
|
670
690
|
}
|
|
671
691
|
} catch (error) {
|
|
672
692
|
return { success: false, error: `Failed to commit: ${error.message}` }
|