indelible-mcp 3.4.0 → 3.5.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "indelible-mcp",
3
- "version": "3.4.0",
3
+ "version": "3.5.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.4.0)
257
+ Indelible MCP — Blockchain memory for Claude Code (v3.5.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.4.0',
469
+ version: '3.5.0',
470
470
  description: 'Blockchain-backed memory and code storage for Claude Code'
471
471
  }
472
472
 
@@ -9,7 +9,7 @@
9
9
  * diary_chat({ message: 'How should we architect this?', context: 'Working on SPV bridge...' })
10
10
  */
11
11
 
12
- import { loadConfig, getWif } from '../lib/config.js'
12
+ import { loadConfig, saveConfig, getWif } from '../lib/config.js'
13
13
  import { checkProTier, getLatestSessions } from '../lib/api-client.js'
14
14
  import { decrypt } from '../lib/crypto.js'
15
15
 
@@ -43,6 +43,20 @@ export async function diaryChat({ message, context, systemPrompt }) {
43
43
  if (!tier.ok) return { success: false, error: tier.error }
44
44
  }
45
45
 
46
+ // If no local diary config or model, try pulling from server
47
+ if (!config.diary || !config.diary.model) {
48
+ try {
49
+ const res = await fetch(`https://indelible.one/api/mcp/settings?address=${config.address}`)
50
+ const server = await res.json()
51
+ if (server.diary_model) {
52
+ config.diary = config.diary || {}
53
+ config.diary.model = server.diary_model
54
+ config.diary.name = server.diary_name || 'Codex'
55
+ saveConfig(config)
56
+ }
57
+ } catch { /* server fetch is best-effort */ }
58
+ }
59
+
46
60
  if (!config.diary || !config.diary.apiKey) {
47
61
  return {
48
62
  success: false,
@@ -108,7 +122,9 @@ export async function diaryChat({ message, context, systemPrompt }) {
108
122
  body: JSON.stringify({
109
123
  model: model || 'gpt-4o',
110
124
  messages,
111
- max_tokens: 4096,
125
+ ...(model?.startsWith('gpt-5') || model?.startsWith('o1') || model?.startsWith('o3')
126
+ ? { max_completion_tokens: 4096 }
127
+ : { max_tokens: 4096 }),
112
128
  temperature: 0.7
113
129
  })
114
130
  })
@@ -50,6 +50,21 @@ export async function diaryConnect({ apiKey, model, name }) {
50
50
 
51
51
  saveConfig(config)
52
52
 
53
+ // Push to server so dashboard stays in sync
54
+ try {
55
+ await fetch('https://indelible.one/api/mcp/settings', {
56
+ method: 'PATCH',
57
+ headers: { 'Content-Type': 'application/json' },
58
+ body: JSON.stringify({
59
+ address: config.address,
60
+ diary_model: config.diary.model,
61
+ diary_name: config.diary.name,
62
+ diary_connected: true,
63
+ diary_enabled: true
64
+ })
65
+ })
66
+ } catch { /* server sync is best-effort */ }
67
+
53
68
  return {
54
69
  success: true,
55
70
  message: `Diary AI connected! Using ${config.diary.model} as "${config.diary.name}"`,