indelible-mcp 3.8.0 → 3.9.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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Indelible MCP Server
2
2
 
3
- Blockchain-backed memory for Claude Code. Save your AI conversations permanently on BSV.
3
+ Blockchain-backed memory for Claude Code. Save your AI conversations permanently on BSV via a federated mesh of SPV bridges.
4
4
 
5
5
  ## Quick Start
6
6
 
@@ -71,6 +71,12 @@ indelible-mcp hook post-compact Post-compaction restore hook
71
71
  3. The signed transaction is broadcast via Indelible's SPV bridge
72
72
  4. Your private key **never** leaves your machine
73
73
 
74
+ ## Federation
75
+
76
+ Indelible uses a multi-seed architecture — your saves and loads automatically try multiple federation bridges. If one bridge is down, the next picks up. No single point of failure.
77
+
78
+ The federation mesh is powered by [Relay Federation](https://github.com/zcoolz/relay-federation).
79
+
74
80
  ## Security
75
81
 
76
82
  - **Zero-knowledge encryption** - your WIF-derived AES-256-GCM key encrypts all data before it touches the network
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "indelible-mcp",
3
- "version": "3.8.0",
3
+ "version": "3.9.0",
4
4
  "description": "Blockchain-backed memory and code storage for Claude Code. Save AI conversations and source code permanently on BSV.",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
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.8.0)
257
+ Indelible MCP — Blockchain memory for Claude Code (v3.9.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.8.0',
469
+ version: '3.9.0',
470
470
  description: 'Blockchain-backed memory and code storage for Claude Code'
471
471
  }
472
472
 
package/src/lib/spv.js CHANGED
@@ -246,6 +246,24 @@ export async function broadcastTx(rawTxHex) {
246
246
  throw new Error(`Broadcast failed on all bridges: ${errors.join(', ')}`)
247
247
  }
248
248
 
249
+ /**
250
+ * Index session metadata on all federation bridges (best-effort).
251
+ * @param {object} sessionData — { txId, address, session_id, summary, message_count, save_type, timestamp, ... }
252
+ */
253
+ export async function indexSessionOnBridge(sessionData) {
254
+ const bridges = await getBridges()
255
+ for (const bridge of bridges) {
256
+ try {
257
+ await fetch(`${bridge.url}/api/sessions/index`, {
258
+ method: 'POST',
259
+ headers: { 'Content-Type': 'application/json' },
260
+ body: JSON.stringify(sessionData),
261
+ signal: AbortSignal.timeout(5000)
262
+ })
263
+ } catch {} // best-effort
264
+ }
265
+ }
266
+
249
267
  function pushDataChunk(data) {
250
268
  const len = data.length
251
269
  let op
@@ -539,14 +539,7 @@ export async function saveSession(transcriptPath, summary) {
539
539
  // Build the blockchain payload
540
540
  const payload = {
541
541
  protocol: 'indelible.claude-code',
542
- version: 2,
543
- address: config.address,
544
- session_id: sessionId,
545
- prev_session_id: prevSessionId,
546
- summary: session.summary,
547
- message_count: session.message_count,
548
- encrypted,
549
- timestamp: session.created_at
542
+ encrypted
550
543
  }
551
544
 
552
545
  // Build + sign transaction LOCALLY with @bsv/sdk
@@ -574,6 +567,19 @@ export async function saveSession(transcriptPath, summary) {
574
567
  }, config)
575
568
  } catch { /* indexing failure doesn't block save */ }
576
569
 
570
+ // Index session on federation bridges (LevelDB)
571
+ try {
572
+ await spv.indexSessionOnBridge({
573
+ txId: finalTxId, address: config.address,
574
+ session_id: sessionId,
575
+ prev_session_id: prevSessionId,
576
+ summary: session.summary,
577
+ message_count: session.message_count,
578
+ save_type: isDelta ? 'delta' : 'full',
579
+ timestamp: session.created_at
580
+ })
581
+ } catch { /* bridge indexing failure doesn't block save */ }
582
+
577
583
  // Update session history with txId now that we have it
578
584
  const structuredCtx = session.structured_context || {}
579
585
  updateSessionHistory(