indelible-mcp 5.3.0 → 5.3.2

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/CLI_HANDBOOK.md CHANGED
@@ -1,267 +1,291 @@
1
- # Indelible CLI Handbook
2
-
3
- ## Two Pilots (5.2.0)
4
-
5
- Indelible works with Claude Code, with OpenAI's Codex CLI, or with both at once on the same memory.
6
-
7
- - **Claude Code:** `claude mcp add indelible -- indelible-mcp`
8
- - **Codex CLI:** add to `~/.codex/config.toml` and restart Codex:
9
-
10
- ```toml
11
- [mcp_servers.indelible]
12
- command = "indelible-mcp"
13
- ```
14
-
15
- Every save is stamped with its author inside the encrypted record (`Saved by Claude` / `Saved by Codex` in the Context tab on indelible.one). Each pilot can only save its own conversations — a Codex call binds to its own rollout file, a Claude call binds to its own transcript, and a save with no valid binding refuses instead of guessing. The wallet admits one writer at a time, so concurrent pilots take turns instead of colliding; a busy wallet answers with a retryable message, not a double-spend.
16
-
17
- > Name check: the Diary companion below is also named "Codex" by default — that is a chat companion, not the OpenAI coding agent. The author stamps only ever come from the coding hosts.
18
-
19
- Standalone command-line interface for Indelible blockchain memory. Same wallet, same blockchain, same functions as the MCP server — but runnable directly.
20
-
21
- ---
22
-
23
- ## Quick Reference
24
-
25
- ### Save Session
26
- ```bash
27
- node C:/Indelible-main/indelible-cli/src/index.js save --summary "what happened"
28
- ```
29
-
30
- ### Load from Blockchain
31
- ```bash
32
- node C:/Indelible-main/indelible-cli/src/index.js load --sessions=5
33
- ```
34
-
35
- ### Check Status
36
- ```bash
37
- node C:/Indelible-main/indelible-cli/src/index.js status
38
- ```
39
-
40
- ### Save a File
41
- ```bash
42
- node C:/Indelible-main/indelible-cli/src/index.js vault save-file /path/to/file.js
43
- ```
44
-
45
- ### Ask Codex
46
- ```bash
47
- node C:/Indelible-main/indelible-cli/src/index.js diary chat "How should we architect this?"
48
- ```
49
-
50
- ---
51
-
52
- ## All Commands
53
-
54
- ### Sessions
55
- ```
56
- save Save current session to blockchain
57
- save --summary "note" Save with custom summary
58
- load Load context from blockchain (default: 5 sessions)
59
- load --sessions=10 Load N sessions
60
- status Show wallet address, API key, last session
61
- ```
62
-
63
- ### Code Vault
64
- ```
65
- vault save-file <path> Save a file (encrypted, chunked if >50KB)
66
- vault save-project <dir> [--name=NAME] Save a project directory
67
- vault load-file <txid> [--output=path] Load a file from blockchain
68
- vault load-project <txid> [--output-dir=dir] Load a project from blockchain
69
- vault save-style <file> [--name=N] [--desc=D] Save an AI style to blockchain
70
- vault load-style [txid] Load an AI style from blockchain
71
- vault update-index Update on-chain vault index
72
- ```
73
-
74
- ### Diary AI (Dual-Agent)
75
- ```
76
- diary connect --key=SK [--model=MODEL] [--name=NAME] Connect OpenAI companion
77
- diary chat "message" Ask the AI companion
78
- diary save [--summary="..."] Save exchange to blockchain
79
- ```
80
-
81
- ### Setup & Hooks
82
- ```
83
- setup --wif=KEY --pin=PIN Import and encrypt your private key
84
- install-hooks Install auto-save/restore hooks into Claude Code
85
- hook pre-compact Auto-save before compaction (called by hook)
86
- hook post-compact Auto-restore after compaction (called by hook)
87
- ```
88
-
89
- ---
90
-
91
- ## Relationship to MCP
92
-
93
- The CLI and MCP server are the **same codebase**. They import the same tool functions (`saveSession`, `loadContext`, `saveFile`, `diaryChat`, etc.) and use the same wallet at `~/.indelible/config.json`.
94
-
95
- | | CLI | MCP Server |
96
- |---|---|---|
97
- | **Location** | `C:/Indelible-main/indelible-cli/src/` | `C:/bsv-claude-wrapper/mcp-server/` |
98
- | **Config** | Sync (`readFileSync`/`writeFileSync`) | Async (`await loadConfig()`) |
99
- | **Fetch** | Native `fetch` (Node 18+) | `node-fetch` package |
100
- | **Timeout** | `AbortSignal.timeout(ms)` | Manual `AbortController` + `setTimeout` |
101
- | **Entry point** | CLI arg parser in `index.js` | JSON-RPC stdin/stdout in `index.js` |
102
- | **How Claude calls it** | `node src/index.js <command>` | MCP protocol via Claude Code hooks |
103
-
104
- **Sync rule:** Any feature, fix, or change that goes into one MUST go into both. No exceptions. Adapt sync/async config pattern accordingly.
105
-
106
- ---
107
-
108
- ## Testing / Dog-Fooding
109
-
110
- The CLI is a live test harness for the MCP. When you test a CLI command, you're testing the exact same function the MCP calls.
111
-
112
- ### Safe tests (no sats spent)
113
- ```bash
114
- # Config loads correctly
115
- node C:/Indelible-main/indelible-cli/src/index.js status
116
-
117
- # Blockchain read works
118
- node C:/Indelible-main/indelible-cli/src/index.js load --sessions=1
119
-
120
- # Style loads from chain
121
- node C:/Indelible-main/indelible-cli/src/index.js vault load-style
122
- ```
123
-
124
- ### Function-level tests (no sats spent)
125
- ```bash
126
- cd "C:/Indelible-main/indelible-cli" && node --input-type=module -e "
127
- import { checkConfirmation } from './src/lib/spv.js';
128
- const r = await checkConfirmation('TXID_HERE');
129
- console.log(JSON.stringify(r, null, 2));
130
- " 2>&1
131
-
132
- cd "C:/Indelible-main/indelible-cli" && node --input-type=module -e "
133
- import { checkTier } from './src/lib/api-client.js';
134
- import { loadConfig } from './src/lib/config.js';
135
- const config = loadConfig();
136
- const r = await checkTier(config.api_key);
137
- console.log(JSON.stringify(r, null, 2));
138
- " 2>&1
139
-
140
- cd "C:/Indelible-main/indelible-cli" && node --input-type=module -e "
141
- import { verifyRecentSaves } from './src/tools/save_file.js';
142
- const r = await verifyRecentSaves();
143
- console.log(JSON.stringify(r, null, 2));
144
- " 2>&1
145
- ```
146
-
147
- ### Live tests (spends sats)
148
- ```bash
149
- # Session save (delta if prior save exists)
150
- node C:/Indelible-main/indelible-cli/src/index.js save --summary "test save"
151
-
152
- # File save
153
- node C:/Indelible-main/indelible-cli/src/index.js vault save-file /path/to/small/file.txt
154
-
155
- # Style save (auto-prepends core rules via ensureCoreRules)
156
- node C:/Indelible-main/indelible-cli/src/index.js vault save-style /path/to/rules.txt --name=test
157
-
158
- # Diary chat (costs OpenAI tokens, not sats)
159
- node C:/Indelible-main/indelible-cli/src/index.js diary chat "hello"
160
- ```
161
-
162
- ---
163
-
164
- ## Architecture
165
-
166
- ```
167
- indelible-cli/src/
168
- ├── index.js CLI arg parser + MCP JSON-RPC server (dual mode)
169
- ├── lib/
170
- │ ├── config.js Sync config: loadConfig(), saveConfig(), getWif()
171
- │ ├── crypto.js AES-256-GCM encrypt/decrypt, SHA-256, WIF derivation
172
- │ ├── spv.js Multi-bridge SPV client, UTXO chaining, health tracking
173
- │ └── api-client.js commitSession(), getLatestSessions(), checkTier()
174
- ├── tools/
175
- │ ├── save_session.js Parse transcript, delta detect, encrypt, broadcast
176
- │ │ + getRecentPlans() — scans ~/.claude/plans/
177
- │ │ + updateMemory() — MEMORY.md hierarchy enforcement
178
- │ │ + dashboard sync — PATCH to indelible.one
179
- │ ├── load_context.js Fetch + decrypt + merge deltas + smart format
180
- │ ├── setup_wallet.js Generate BSV keypair, encrypt WIF with PIN
181
- │ ├── save_file.js Encrypt + broadcast file (chunked if >50KB)
182
- │ │ + cacheTx() — local backup for re-broadcast
183
- │ │ + verifyRecentSaves() — check confirmations
184
- │ ├── save_project.js Walk dir + save each file + broadcast manifest
185
- │ │ + cacheTx() — local backup for re-broadcast
186
- │ ├── load_file.js Fetch + decrypt file from blockchain
187
- │ ├── load_project.js Fetch manifest + decrypt + restore files
188
- │ ├── save_style.js Encrypt style rules + broadcast
189
- │ │ + ensureCoreRules() — auto-prepend core rules
190
- │ ├── load_style.js Fetch + decrypt style from blockchain
191
- │ ├── update_vault_index.js Update on-chain file/project index
192
- │ ├── diary_connect.js Store OpenAI API key in config
193
- │ ├── diary_chat.js Send message to Codex via OpenAI API
194
- │ │ + blockchain history loading (last 3 sessions)
195
- │ └── diary_save.js Save diary exchange to blockchain
196
- └── dist/
197
- └── indelible.exe Compiled standalone (bun build --compile)
198
- ```
199
-
200
- ### Key Internal Features
201
-
202
- | Feature | What It Does |
203
- |---|---|
204
- | **Bridge health tracking** | Tracks success/failure per SPV bridge, skips unhealthy ones |
205
- | **UTXO chaining** | Back-to-back saves chain change outputs — no mempool conflicts |
206
- | **Delta saves** | Only commits new messages since last save |
207
- | **tx-cache** | Caches broadcast payloads to `~/.indelible/tx-cache/` for re-broadcast |
208
- | **MEMORY.md enforcement** | Strips rules, archives done items, enforces 200-line / 20-line limits |
209
- | **Core rules injection** | `ensureCoreRules()` auto-prepends infrastructure rules to every style |
210
- | **Diary history** | `diary chat` loads last 3 blockchain sessions for conversation continuity |
211
- | **Dashboard sync** | PATCHes indelible.one after every save |
212
-
213
- ---
214
-
215
- ## Rebuild the Executable
216
-
217
- ```bash
218
- cd "C:/Indelible-main/indelible-cli" && bun build --compile src/index.js --outfile dist/indelible.exe
219
- ```
220
-
221
- This creates a standalone `indelible.exe` — no Node.js required on the target machine.
222
-
223
- ---
224
-
225
- ## Common Errors
226
-
227
- | Error | Cause | Fix |
228
- |-------|-------|-----|
229
- | `Wallet not configured` | No config.json or no WIF | Run `setup --wif=KEY --pin=PIN` |
230
- | `No UTXOs available` | Wallet is empty | Send BSV to your address |
231
- | `Broadcast failed on all bridges` | All 4 SPV relays down or rejecting | Check relay health, wait and retry |
232
- | `No new messages since last save` | Already saved this transcript | Nothing to do — this is fine |
233
- | `File not found` | Bad path or backslashes | Use forward slashes: `C:/path/to/file` |
234
- | `Decrypt failed` | Wrong WIF or tampered data | Check `~/.indelible/config.json` has correct WIF |
235
- | `txn-mempool-conflict` | Spending already-spent UTXO | UTXO chaining should prevent this — check code |
236
- | `OpenAI rate limit exceeded` | Too many diary chat calls | Wait a moment and retry |
237
- | `Diary AI not configured` | No OpenAI key | Run `diary connect --key=SK` |
238
-
239
- ---
240
-
241
- ## Config File
242
-
243
- `C:/Users/oorel/.indelible/config.json` — shared with MCP server.
244
-
245
- | Setting | Description |
246
- |---------|-------------|
247
- | `wif` or `wif_encrypted` | BSV private key (plaintext or PIN-encrypted) |
248
- | `address` | BSV address (derived from WIF) |
249
- | `spv_bridges` | Array of `{url, name}` relay objects |
250
- | `api_url` | Indelible web app URL (`https://indelible.one`) |
251
- | `api_key` | API key for authenticated endpoints |
252
- | `auto_delta` | Auto-save every N messages (bool) |
253
- | `auto_delta_interval` | Messages between auto-saves (default: 10) |
254
- | `file_txids` | *(auto)* Index of files saved to chain |
255
- | `project_txids` | *(auto)* Index of projects saved to chain |
256
- | `last_session_id` | *(auto)* Previous session for chaining |
257
- | `last_tx_id` | *(auto)* Last committed tx |
258
- | `diary` | `{ apiKey, model, name }` — OpenAI companion config |
259
-
260
- ---
261
-
262
- ## Wallet
263
-
264
- - **Address:** shown by `indelible-mcp status` (yours is generated at setup and lives in `~/.indelible/config.json` — back that file up)
265
- - **Balance:** `indelible-mcp status`, or look your address up in the Chain Browser at indelible.one/explorer
266
- - **Fund it:** Send BSV to your own address
267
- - **Cost:** ~$0.21/MB at BSV=$16. Session saves are fractions of a cent.
1
+ # Indelible CLI Handbook
2
+
3
+ ## Two Pilots (5.2.0)
4
+
5
+ Indelible works with Claude Code, with OpenAI's Codex CLI, or with both at once on the same memory.
6
+
7
+ - **Claude Code:** `claude mcp add indelible -- indelible-mcp`
8
+ - **Codex CLI:** add to `~/.codex/config.toml` and restart Codex:
9
+
10
+ ```toml
11
+ [mcp_servers.indelible]
12
+ command = "indelible-mcp"
13
+ ```
14
+
15
+ Every save is stamped with its author inside the encrypted record (`Saved by Claude` / `Saved by Codex` in the Context tab on indelible.one). Each pilot can only save its own conversations — a Codex call binds to its own rollout file, a Claude call binds to its own transcript, and a save with no valid binding refuses instead of guessing. The wallet admits one writer at a time, so concurrent pilots take turns instead of colliding; a busy wallet answers with a retryable message, not a double-spend.
16
+
17
+ > Name check: the Diary companion below is also named "Codex" by default — that is a chat companion, not the OpenAI coding agent. The author stamps only ever come from the coding hosts.
18
+
19
+ Standalone command-line interface for Indelible blockchain memory. Same wallet, same blockchain, same functions as the MCP server — but runnable directly.
20
+
21
+ ---
22
+
23
+ ## The Drift Wire (5.3.x)
24
+
25
+ Your two pilots don't just share the memory anymore — they talk to each other through a
26
+ durable wire on your machine, with provable order and a brake only you hold.
27
+
28
+ ```
29
+ indelible-mcp drift read # see their conversation (ids + causal edges)
30
+ indelible-mcp drift post --as=claude "…" # post (--reply-to=<id> cites what it answers)
31
+ indelible-mcp drift wait --from=codex # hold the wire for the next message (instant via the bell)
32
+ indelible-mcp drift loop --as=claude # run a seat's heartbeat
33
+ indelible-mcp drift summon # THE SUMMONER: watches the wire; when a message sits
34
+ # unanswered, spawns a FRESH pilot via its own vendor
35
+ # CLI to read the wire and reply. Both pilots, no setup.
36
+ indelible-mcp drift pause | resume # YOUR brake — freezes everything, works with no wallet
37
+ indelible-mcp drift listen "stop, listen" # freeze both AND hand them your message
38
+ ```
39
+
40
+ Three delivery layers, honestly labeled: the **bell** wakes a seat that is holding the wire
41
+ (measured 185ms against a 20s poll); the **summoner** answers for an idle seat by conjuring a
42
+ fresh instance — the permanent shared memory means it arrives already caught up; and your
43
+ **brake** outranks all of it. Summons cost real usage on your vendor account: the summoner
44
+ carries a per-run cap, a cooldown, one-in-flight per seat, and logs every summon. Full manual:
45
+ indelible.one → Docs → The Drift Wire.
46
+
47
+ ## Quick Reference
48
+
49
+ ### Save Session
50
+ ```bash
51
+ node C:/Indelible-main/indelible-cli/src/index.js save --summary "what happened"
52
+ ```
53
+
54
+ ### Load from Blockchain
55
+ ```bash
56
+ node C:/Indelible-main/indelible-cli/src/index.js load --sessions=5
57
+ ```
58
+
59
+ ### Check Status
60
+ ```bash
61
+ node C:/Indelible-main/indelible-cli/src/index.js status
62
+ ```
63
+
64
+ ### Save a File
65
+ ```bash
66
+ node C:/Indelible-main/indelible-cli/src/index.js vault save-file /path/to/file.js
67
+ ```
68
+
69
+ ### Ask Codex
70
+ ```bash
71
+ node C:/Indelible-main/indelible-cli/src/index.js diary chat "How should we architect this?"
72
+ ```
73
+
74
+ ---
75
+
76
+ ## All Commands
77
+
78
+ ### Sessions
79
+ ```
80
+ save Save current session to blockchain
81
+ save --summary "note" Save with custom summary
82
+ load Load context from blockchain (default: 5 sessions)
83
+ load --sessions=10 Load N sessions
84
+ status Show wallet address, API key, last session
85
+ ```
86
+
87
+ ### Code Vault
88
+ ```
89
+ vault save-file <path> Save a file (encrypted, chunked if >50KB)
90
+ vault save-project <dir> [--name=NAME] Save a project directory
91
+ vault load-file <txid> [--output=path] Load a file from blockchain
92
+ vault load-project <txid> [--output-dir=dir] Load a project from blockchain
93
+ vault save-style <file> [--name=N] [--desc=D] Save an AI style to blockchain
94
+ vault load-style [txid] Load an AI style from blockchain
95
+ vault update-index Update on-chain vault index
96
+ ```
97
+
98
+ ### Diary AI (Dual-Agent)
99
+ ```
100
+ diary connect --key=SK [--model=MODEL] [--name=NAME] Connect OpenAI companion
101
+ diary chat "message" Ask the AI companion
102
+ diary save [--summary="..."] Save exchange to blockchain
103
+ ```
104
+
105
+ ### Setup & Hooks
106
+ ```
107
+ setup --wif=KEY --pin=PIN Import and encrypt your private key
108
+ install-hooks Install auto-save/restore hooks into Claude Code
109
+ hook pre-compact Auto-save before compaction (called by hook)
110
+ hook post-compact Auto-restore after compaction (called by hook)
111
+ ```
112
+
113
+ ---
114
+
115
+ ## Relationship to MCP
116
+
117
+ The CLI and MCP server are the **same codebase**. They import the same tool functions (`saveSession`, `loadContext`, `saveFile`, `diaryChat`, etc.) and use the same wallet at `~/.indelible/config.json`.
118
+
119
+ | | CLI | MCP Server |
120
+ |---|---|---|
121
+ | **Location** | `C:/Indelible-main/indelible-cli/src/` | `C:/bsv-claude-wrapper/mcp-server/` |
122
+ | **Config** | Sync (`readFileSync`/`writeFileSync`) | Async (`await loadConfig()`) |
123
+ | **Fetch** | Native `fetch` (Node 18+) | `node-fetch` package |
124
+ | **Timeout** | `AbortSignal.timeout(ms)` | Manual `AbortController` + `setTimeout` |
125
+ | **Entry point** | CLI arg parser in `index.js` | JSON-RPC stdin/stdout in `index.js` |
126
+ | **How Claude calls it** | `node src/index.js <command>` | MCP protocol via Claude Code hooks |
127
+
128
+ **Sync rule:** Any feature, fix, or change that goes into one MUST go into both. No exceptions. Adapt sync/async config pattern accordingly.
129
+
130
+ ---
131
+
132
+ ## Testing / Dog-Fooding
133
+
134
+ The CLI is a live test harness for the MCP. When you test a CLI command, you're testing the exact same function the MCP calls.
135
+
136
+ ### Safe tests (no sats spent)
137
+ ```bash
138
+ # Config loads correctly
139
+ node C:/Indelible-main/indelible-cli/src/index.js status
140
+
141
+ # Blockchain read works
142
+ node C:/Indelible-main/indelible-cli/src/index.js load --sessions=1
143
+
144
+ # Style loads from chain
145
+ node C:/Indelible-main/indelible-cli/src/index.js vault load-style
146
+ ```
147
+
148
+ ### Function-level tests (no sats spent)
149
+ ```bash
150
+ cd "C:/Indelible-main/indelible-cli" && node --input-type=module -e "
151
+ import { checkConfirmation } from './src/lib/spv.js';
152
+ const r = await checkConfirmation('TXID_HERE');
153
+ console.log(JSON.stringify(r, null, 2));
154
+ " 2>&1
155
+
156
+ cd "C:/Indelible-main/indelible-cli" && node --input-type=module -e "
157
+ import { checkTier } from './src/lib/api-client.js';
158
+ import { loadConfig } from './src/lib/config.js';
159
+ const config = loadConfig();
160
+ const r = await checkTier(config.api_key);
161
+ console.log(JSON.stringify(r, null, 2));
162
+ " 2>&1
163
+
164
+ cd "C:/Indelible-main/indelible-cli" && node --input-type=module -e "
165
+ import { verifyRecentSaves } from './src/tools/save_file.js';
166
+ const r = await verifyRecentSaves();
167
+ console.log(JSON.stringify(r, null, 2));
168
+ " 2>&1
169
+ ```
170
+
171
+ ### Live tests (spends sats)
172
+ ```bash
173
+ # Session save (delta if prior save exists)
174
+ node C:/Indelible-main/indelible-cli/src/index.js save --summary "test save"
175
+
176
+ # File save
177
+ node C:/Indelible-main/indelible-cli/src/index.js vault save-file /path/to/small/file.txt
178
+
179
+ # Style save (auto-prepends core rules via ensureCoreRules)
180
+ node C:/Indelible-main/indelible-cli/src/index.js vault save-style /path/to/rules.txt --name=test
181
+
182
+ # Diary chat (costs OpenAI tokens, not sats)
183
+ node C:/Indelible-main/indelible-cli/src/index.js diary chat "hello"
184
+ ```
185
+
186
+ ---
187
+
188
+ ## Architecture
189
+
190
+ ```
191
+ indelible-cli/src/
192
+ ├── index.js CLI arg parser + MCP JSON-RPC server (dual mode)
193
+ ├── lib/
194
+ │ ├── config.js Sync config: loadConfig(), saveConfig(), getWif()
195
+ │ ├── crypto.js AES-256-GCM encrypt/decrypt, SHA-256, WIF derivation
196
+ │ ├── spv.js Multi-bridge SPV client, UTXO chaining, health tracking
197
+ │ └── api-client.js commitSession(), getLatestSessions(), checkTier()
198
+ ├── tools/
199
+ │ ├── save_session.js Parse transcript, delta detect, encrypt, broadcast
200
+ │ │ + getRecentPlans() — scans ~/.claude/plans/
201
+ │ │ + updateMemory() — MEMORY.md hierarchy enforcement
202
+ │ │ + dashboard sync — PATCH to indelible.one
203
+ │ ├── load_context.js Fetch + decrypt + merge deltas + smart format
204
+ │ ├── setup_wallet.js Generate BSV keypair, encrypt WIF with PIN
205
+ │ ├── save_file.js Encrypt + broadcast file (chunked if >50KB)
206
+ │ │ + cacheTx() — local backup for re-broadcast
207
+ │ │ + verifyRecentSaves() — check confirmations
208
+ │ ├── save_project.js Walk dir + save each file + broadcast manifest
209
+ │ │ + cacheTx() — local backup for re-broadcast
210
+ │ ├── load_file.js Fetch + decrypt file from blockchain
211
+ │ ├── load_project.js Fetch manifest + decrypt + restore files
212
+ │ ├── save_style.js Encrypt style rules + broadcast
213
+ │ │ + ensureCoreRules() — auto-prepend core rules
214
+ │ ├── load_style.js Fetch + decrypt style from blockchain
215
+ │ ├── update_vault_index.js Update on-chain file/project index
216
+ │ ├── diary_connect.js Store OpenAI API key in config
217
+ │ ├── diary_chat.js Send message to Codex via OpenAI API
218
+ │ │ + blockchain history loading (last 3 sessions)
219
+ │ └── diary_save.js Save diary exchange to blockchain
220
+ └── dist/
221
+ └── indelible.exe Compiled standalone (bun build --compile)
222
+ ```
223
+
224
+ ### Key Internal Features
225
+
226
+ | Feature | What It Does |
227
+ |---|---|
228
+ | **Bridge health tracking** | Tracks success/failure per SPV bridge, skips unhealthy ones |
229
+ | **UTXO chaining** | Back-to-back saves chain change outputs — no mempool conflicts |
230
+ | **Delta saves** | Only commits new messages since last save |
231
+ | **tx-cache** | Caches broadcast payloads to `~/.indelible/tx-cache/` for re-broadcast |
232
+ | **MEMORY.md enforcement** | Strips rules, archives done items, enforces 200-line / 20-line limits |
233
+ | **Core rules injection** | `ensureCoreRules()` auto-prepends infrastructure rules to every style |
234
+ | **Diary history** | `diary chat` loads last 3 blockchain sessions for conversation continuity |
235
+ | **Dashboard sync** | PATCHes indelible.one after every save |
236
+
237
+ ---
238
+
239
+ ## Rebuild the Executable
240
+
241
+ ```bash
242
+ cd "C:/Indelible-main/indelible-cli" && bun build --compile src/index.js --outfile dist/indelible.exe
243
+ ```
244
+
245
+ This creates a standalone `indelible.exe` — no Node.js required on the target machine.
246
+
247
+ ---
248
+
249
+ ## Common Errors
250
+
251
+ | Error | Cause | Fix |
252
+ |-------|-------|-----|
253
+ | `Wallet not configured` | No config.json or no WIF | Run `setup --wif=KEY --pin=PIN` |
254
+ | `No UTXOs available` | Wallet is empty | Send BSV to your address |
255
+ | `Broadcast failed on all bridges` | All 4 SPV relays down or rejecting | Check relay health, wait and retry |
256
+ | `No new messages since last save` | Already saved this transcript | Nothing to do — this is fine |
257
+ | `File not found` | Bad path or backslashes | Use forward slashes: `C:/path/to/file` |
258
+ | `Decrypt failed` | Wrong WIF or tampered data | Check `~/.indelible/config.json` has correct WIF |
259
+ | `txn-mempool-conflict` | Spending already-spent UTXO | UTXO chaining should prevent this — check code |
260
+ | `OpenAI rate limit exceeded` | Too many diary chat calls | Wait a moment and retry |
261
+ | `Diary AI not configured` | No OpenAI key | Run `diary connect --key=SK` |
262
+
263
+ ---
264
+
265
+ ## Config File
266
+
267
+ `C:/Users/oorel/.indelible/config.json` — shared with MCP server.
268
+
269
+ | Setting | Description |
270
+ |---------|-------------|
271
+ | `wif` or `wif_encrypted` | BSV private key (plaintext or PIN-encrypted) |
272
+ | `address` | BSV address (derived from WIF) |
273
+ | `spv_bridges` | Array of `{url, name}` relay objects |
274
+ | `api_url` | Indelible web app URL (`https://indelible.one`) |
275
+ | `api_key` | API key for authenticated endpoints |
276
+ | `auto_delta` | Auto-save every N messages (bool) |
277
+ | `auto_delta_interval` | Messages between auto-saves (default: 10) |
278
+ | `file_txids` | *(auto)* Index of files saved to chain |
279
+ | `project_txids` | *(auto)* Index of projects saved to chain |
280
+ | `last_session_id` | *(auto)* Previous session for chaining |
281
+ | `last_tx_id` | *(auto)* Last committed tx |
282
+ | `diary` | `{ apiKey, model, name }` — OpenAI companion config |
283
+
284
+ ---
285
+
286
+ ## Wallet
287
+
288
+ - **Address:** shown by `indelible-mcp status` (yours is generated at setup and lives in `~/.indelible/config.json` — back that file up)
289
+ - **Balance:** `indelible-mcp status`, or look your address up in the Chain Browser at indelible.one/explorer
290
+ - **Fund it:** Send BSV to your own address
291
+ - **Cost:** ~$0.21/MB at BSV=$16. Session saves are fractions of a cent.