@totalreclaw/mcp-server 1.3.0 → 1.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/dist/prompts.js CHANGED
@@ -3,34 +3,49 @@
3
3
  // Returned in the MCP `initialize` response. Clients SHOULD inject this into the
4
4
  // system prompt, giving the LLM persistent behavioral guidance for the session.
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.PROMPT_DEFINITIONS = exports.IMPORT_TOOL_DESCRIPTION = exports.IMPORT_FROM_TOOL_DESCRIPTION = exports.UPGRADE_TOOL_DESCRIPTION = exports.STATUS_TOOL_DESCRIPTION = exports.EXPORT_TOOL_DESCRIPTION = exports.FORGET_TOOL_DESCRIPTION = exports.RECALL_TOOL_DESCRIPTION = exports.REMEMBER_TOOL_DESCRIPTION = exports.SYSTEM_PROMPT_FRAGMENT = exports.SERVER_INSTRUCTIONS = void 0;
6
+ exports.PROMPT_DEFINITIONS = exports.IMPORT_TOOL_DESCRIPTION = exports.IMPORT_FROM_TOOL_DESCRIPTION = exports.MIGRATE_TOOL_DESCRIPTION = exports.UPGRADE_TOOL_DESCRIPTION = exports.STATUS_TOOL_DESCRIPTION = exports.EXPORT_TOOL_DESCRIPTION = exports.FORGET_TOOL_DESCRIPTION = exports.RECALL_TOOL_DESCRIPTION = exports.REMEMBER_TOOL_DESCRIPTION = exports.SYSTEM_PROMPT_FRAGMENT = exports.SERVER_INSTRUCTIONS = void 0;
7
7
  exports.getPromptMessages = getPromptMessages;
8
8
  exports.SERVER_INSTRUCTIONS = `
9
- You have access to TotalReclaw, an end-to-end encrypted memory vault that persists across conversations.
9
+ You have access to TotalReclaw, a persistent encrypted memory system. You SHOULD use these tools PROACTIVELY -- do not wait for the user to say "remember this" or "recall that."
10
+
11
+ ## CRITICAL SAFETY: Recovery Phrase
12
+ TotalReclaw uses a 12-word BIP-39 recovery phrase as the user's identity. If a user tries to import a phrase they already use for a CRYPTO WALLET, you MUST warn them: "Do NOT use a recovery phrase from an existing crypto wallet. TotalReclaw should have its own dedicated phrase to keep your funds safe." Always generate a fresh phrase for new users.
10
13
 
11
14
  ## CRITICAL: Automatic Memory Behaviors
12
15
 
13
16
  ### At Conversation Start
14
17
  ALWAYS call totalreclaw_recall at the beginning of EVERY new conversation with a brief summary of the user's first message as the query. This loads relevant context from past conversations. Present recalled memories naturally as context -- do not announce "I found these memories" or list them explicitly unless the user asks.
15
18
 
16
- ### During Conversation
17
- When the user shares ANY of the following, call totalreclaw_remember to store it:
19
+ ### Proactive Memory Storage (IMPORTANT)
20
+ You should call totalreclaw_remember WITHOUT being asked whenever the user shares:
18
21
  - Personal preferences ("I prefer...", "I like...", "I hate...")
19
22
  - Personal information (name, location, occupation, family details)
20
- - Decisions or goals ("I decided to...", "I want to...")
21
- - Corrections to previous information ("Actually, I'm vegan now")
22
- - Important events or dates ("My birthday is...", "I started a new job")
23
- - Technical preferences (programming language, tools, frameworks)
23
+ - Decisions or goals ("I decided to...", "I want to...", "I chose X because Y")
24
+ - Corrections to previous information ("Actually, I'm vegan now", "We moved to Berlin")
25
+ - Important events or dates ("My birthday is...", "I started a new job at...")
26
+ - Technical preferences (programming language, tools, frameworks, workflows)
27
+ - Project context (what they're working on, deadlines, team details)
28
+ - Opinions and values that shape future interactions
29
+
30
+ The user should NOT have to tell you to remember things. If information would be valuable in a future conversation, store it automatically. Think of yourself as a thoughtful assistant who naturally takes notes on important details.
24
31
 
25
32
  Do NOT store:
26
- - Temporary/transient context (weather, current task details)
27
- - Information about third parties the user hasn't asked to remember
33
+ - Temporary/transient context (weather today, a one-time task)
34
+ - Generic knowledge unrelated to the user
28
35
  - Sensitive credentials (passwords, API keys, tokens)
29
36
 
37
+ ### Memory Recall
38
+ Call totalreclaw_recall proactively when:
39
+ - Starting any new conversation (query based on the user's first message)
40
+ - The user asks about something that might relate to past conversations
41
+ - You need context about the user's background, projects, or preferences
42
+ - The user says "remember when...", "what did I say about...", "do you know my..."
43
+
30
44
  ### Memory Hygiene
31
45
  - Before storing a new fact, check recalled memories to avoid duplicates
32
46
  - When the user corrects information, store the correction (the system handles deduplication)
33
47
  - Use importance 7-9 for core identity/preferences, 4-6 for moderate facts, 1-3 for minor details
48
+ - Extract atomic facts: "User prefers dark mode" not "User said they prefer dark mode and also use VS Code"
34
49
 
35
50
  ### Billing & Quota
36
51
  When a totalreclaw_remember call fails with "quota_exceeded":
@@ -39,6 +54,8 @@ When a totalreclaw_remember call fails with "quota_exceeded":
39
54
  3. If they want to upgrade, use totalreclaw_upgrade to get a checkout link
40
55
  Do NOT repeatedly attempt to store memories after a quota error.
41
56
 
57
+ Note: Billing status is cached locally for up to 2 hours. After upgrading to Pro, the new tier may take up to 2 hours to take effect. If the user reports that Pro features are not active after upgrading, suggest restarting their agent to force a billing cache refresh.
58
+
42
59
  ### Importing memories from other tools
43
60
  If the user mentions migrating from Mem0, MCP Memory Server, MemoClaw, or any other AI memory tool, offer to use totalreclaw_import_from. Start with dry_run=true to preview, then confirm before importing.
44
61
  API keys provided by the user are used only for the import and are never stored.
@@ -46,9 +63,9 @@ API keys provided by the user are used only for the import and are never stored.
46
63
  // Keep backward-compat export name (some callers may still reference it)
47
64
  exports.SYSTEM_PROMPT_FRAGMENT = exports.SERVER_INSTRUCTIONS;
48
65
  // ── Layer 2: Enhanced Tool Descriptions ──────────────────────────────────────
49
- exports.REMEMBER_TOOL_DESCRIPTION = `Store one or more facts in the encrypted memory vault.
66
+ exports.REMEMBER_TOOL_DESCRIPTION = `Store important information the user shares. Call this PROACTIVELY -- do not wait for the user to say "remember this."
50
67
 
51
- Call this tool whenever the user shares personal information, preferences, decisions, or important facts worth remembering across conversations.
68
+ Whenever the user mentions preferences, facts about themselves, decisions, project context, goals, or anything they would want remembered across conversations, call this tool immediately. You are the user's memory -- take notes automatically.
52
69
 
53
70
  IMPORTANT: Extract atomic facts, not entire conversation snippets.
54
71
  Good: "User is vegan"
@@ -67,21 +84,21 @@ Each fact needs:
67
84
  - type: Category (optional) -- "fact", "preference", "decision", "episodic", "goal", "context", "summary"
68
85
 
69
86
  The vault handles deduplication automatically. If a similar fact exists, it will be updated rather than duplicated.`;
70
- exports.RECALL_TOOL_DESCRIPTION = `Search your encrypted memory vault for relevant past context.
87
+ exports.RECALL_TOOL_DESCRIPTION = `Search your memory for relevant context. Returns the top 8 most relevant memories (not all — this is a targeted search, not a full dump).
71
88
 
72
- IMPORTANT: You SHOULD call this tool at the START of every conversation with a query based on the user's first message. This ensures continuity across sessions.
73
-
74
- Use this tool when:
75
- - Starting a new conversation (query = summary of user's first message)
76
- - User asks about their preferences or past information
77
- - User references something from a previous conversation
78
- - You need context about the user's background
89
+ Call this proactively when:
90
+ - The user's message suggests they've told you something before ("remember when I said...", "what's my...")
91
+ - The conversation topic likely relates to previously stored information
92
+ - The user asks about their preferences, history, or past decisions
93
+ - The user references something from a previous conversation
94
+ - You need context about the user's background, projects, or work style
95
+ - The user's question could be answered or enriched by stored memories
79
96
 
80
97
  Parameters:
81
98
  - query: Natural language search (required). Keep it concise -- 5-15 words work best.
82
99
  - k: Number of results (default 8, max 50). Use 3-5 for quick lookups, 8-12 for broad context.
83
100
 
84
- The results are end-to-end encrypted. The server never sees plaintext.`;
101
+ Present recalled memories naturally as context. Do not announce "I found these memories" unless the user asks.`;
85
102
  exports.FORGET_TOOL_DESCRIPTION = `Delete a specific memory from your vault.
86
103
 
87
104
  WHEN TO USE:
@@ -131,16 +148,34 @@ Use this when:
131
148
  - User asks about billing or subscription`;
132
149
  exports.UPGRADE_TOOL_DESCRIPTION = `Upgrade to TotalReclaw Pro for unlimited encrypted memories.
133
150
 
134
- Returns a checkout URL for the user to complete payment.
135
-
136
- Payment options:
137
- - card: Stripe checkout (credit/debit card)
138
- - crypto: Coinbase Commerce (USDC, USDT, ETH on multiple chains)
151
+ Returns a Stripe checkout URL for the user to complete payment via credit/debit card.
139
152
 
140
153
  Use this when:
141
154
  - User hits their free tier limit
142
155
  - User asks about upgrading or pricing
143
156
  - A remember call returns a quota_exceeded error`;
157
+ exports.MIGRATE_TOOL_DESCRIPTION = `Migrate memories from testnet (Base Sepolia) to mainnet (Gnosis) after upgrading to Pro.
158
+
159
+ When a user upgrades from Free to Pro, their memories are on the Base Sepolia testnet. This tool copies them to Gnosis mainnet for permanent storage. No re-encryption needed -- the encrypted data is chain-agnostic.
160
+
161
+ SAFETY:
162
+ - Dry-run by default: call without confirm=true to see a preview of what will be migrated
163
+ - Idempotent: running it again skips facts that already exist on mainnet
164
+ - Testnet facts are never deleted (they remain as a backup)
165
+
166
+ WHEN TO USE:
167
+ - After a user successfully upgrades to Pro via totalreclaw_upgrade
168
+ - User asks about migrating their testnet memories to mainnet
169
+ - User wants to ensure their memories are on permanent storage
170
+
171
+ PARAMETERS:
172
+ - confirm: Set to true to execute the migration. Without it, returns a dry-run preview showing how many memories will be migrated.
173
+
174
+ WORKFLOW:
175
+ 1. First call with confirm=false (or omit) to see the preview
176
+ 2. Share the preview with the user
177
+ 3. If they confirm, call again with confirm=true
178
+ 4. Report progress as batches complete`;
144
179
  exports.IMPORT_FROM_TOOL_DESCRIPTION = `Import memories from other AI memory tools into TotalReclaw.
145
180
 
146
181
  Supported sources:
@@ -1 +1 @@
1
- {"version":3,"file":"prompts.js","sourceRoot":"","sources":["../src/prompts.ts"],"names":[],"mappings":";AAAA,iFAAiF;AACjF,iFAAiF;AACjF,gFAAgF;;;AAgNhF,8CAwCC;AAtPY,QAAA,mBAAmB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqClC,CAAC;AAEF,yEAAyE;AAC5D,QAAA,sBAAsB,GAAG,2BAAmB,CAAC;AAE1D,gFAAgF;AAEnE,QAAA,yBAAyB,GAAG;;;;;;;;;;;;;;;;;;;;oHAoB2E,CAAC;AAExG,QAAA,uBAAuB,GAAG;;;;;;;;;;;;;;uEAcgC,CAAC;AAE3D,QAAA,uBAAuB,GAAG;;;;;;;;;;;;;;;;;;uDAkBgB,CAAC;AAE3C,QAAA,uBAAu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F;KACF;IACD;QACE,IAAI,EAAE,kBAAkB;QACxB,KAAK,EAAE,gBAAgB;QACvB,WAAW,EACT,+EAA+E;QACjF,SAAS,EAAE,EAAqE;KACjF;CACF,CAAC;AAEF,SAAgB,iBAAiB,CAC/B,UAAkB,EAClB,IAA6B;IAE7B,QAAQ,UAAU,EAAE,CAAC;QACnB,KAAK,mBAAmB,CAAC,CAAC,CAAC;YACzB,MAAM,KAAK,GAAG,IAAI,EAAE,KAAK,IAAI,gBAAgB,CAAC;YAC9C,OAAO;gBACL;oBACE,IAAI,EAAE,MAAM;oBACZ,OAAO,EAAE;wBACP,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,4CAA4C,KAAK,gDAAgD;qBACxG;iBACF;aACF,CAAC;QACJ,CAAC;QAED,KAAK,kBAAkB;YACrB,OAAO;gBACL;oBACE,IAAI,EAAE,MAAM;oBACZ,OAAO,EAAE;wBACP,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,uOAAuO;qBAC9O;iBACF;aACF,CAAC;QAEJ,KAAK,0BAA0B;YAC7B,OAAO;gBACL;oBACE,IAAI,EAAE,WAAW;oBACjB,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,2BAAmB,EAAE;iBACrD;aACF,CAAC;QAEJ;YACE,MAAM,IAAI,KAAK,CAAC,mBAAmB,UAAU,EAAE,CAAC,CAAC;IACrD,CAAC;AACH,CAAC"}
@@ -7,4 +7,6 @@ export { importFromToolDefinition, handleImportFrom } from './import-from.js';
7
7
  export { consolidateToolDefinition, handleConsolidate } from './consolidate.js';
8
8
  export { statusToolDefinition, handleStatus } from './status.js';
9
9
  export { upgradeToolDefinition, handleUpgrade } from './upgrade.js';
10
+ export { migrateToolDefinition } from './migrate.js';
11
+ export { fetchAllFactsFromSubgraph, fetchMainnetContentFps, fetchBlindIndicesForFacts, checkBillingTier, type SubgraphFactFull, type MigrationResult, } from './migrate.js';
10
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAC9E,OAAO,EAAE,yBAAyB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAChF,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAC9E,OAAO,EAAE,yBAAyB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAChF,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACpE,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EACL,yBAAyB,EACzB,sBAAsB,EACtB,yBAAyB,EACzB,gBAAgB,EAChB,KAAK,gBAAgB,EACrB,KAAK,eAAe,GACrB,MAAM,cAAc,CAAC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.handleUpgrade = exports.upgradeToolDefinition = exports.handleStatus = exports.statusToolDefinition = exports.handleConsolidate = exports.consolidateToolDefinition = exports.handleImportFrom = exports.importFromToolDefinition = exports.handleImport = exports.importToolDefinition = exports.handleExport = exports.exportToolDefinition = exports.handleForget = exports.forgetToolDefinition = exports.handleRecall = exports.recallToolDefinition = exports.handleRemember = exports.rememberToolDefinition = void 0;
3
+ exports.checkBillingTier = exports.fetchBlindIndicesForFacts = exports.fetchMainnetContentFps = exports.fetchAllFactsFromSubgraph = exports.migrateToolDefinition = exports.handleUpgrade = exports.upgradeToolDefinition = exports.handleStatus = exports.statusToolDefinition = exports.handleConsolidate = exports.consolidateToolDefinition = exports.handleImportFrom = exports.importFromToolDefinition = exports.handleImport = exports.importToolDefinition = exports.handleExport = exports.exportToolDefinition = exports.handleForget = exports.forgetToolDefinition = exports.handleRecall = exports.recallToolDefinition = exports.handleRemember = exports.rememberToolDefinition = void 0;
4
4
  var remember_js_1 = require("./remember.js");
5
5
  Object.defineProperty(exports, "rememberToolDefinition", { enumerable: true, get: function () { return remember_js_1.rememberToolDefinition; } });
6
6
  Object.defineProperty(exports, "handleRemember", { enumerable: true, get: function () { return remember_js_1.handleRemember; } });
@@ -28,4 +28,11 @@ Object.defineProperty(exports, "handleStatus", { enumerable: true, get: function
28
28
  var upgrade_js_1 = require("./upgrade.js");
29
29
  Object.defineProperty(exports, "upgradeToolDefinition", { enumerable: true, get: function () { return upgrade_js_1.upgradeToolDefinition; } });
30
30
  Object.defineProperty(exports, "handleUpgrade", { enumerable: true, get: function () { return upgrade_js_1.handleUpgrade; } });
31
+ var migrate_js_1 = require("./migrate.js");
32
+ Object.defineProperty(exports, "migrateToolDefinition", { enumerable: true, get: function () { return migrate_js_1.migrateToolDefinition; } });
33
+ var migrate_js_2 = require("./migrate.js");
34
+ Object.defineProperty(exports, "fetchAllFactsFromSubgraph", { enumerable: true, get: function () { return migrate_js_2.fetchAllFactsFromSubgraph; } });
35
+ Object.defineProperty(exports, "fetchMainnetContentFps", { enumerable: true, get: function () { return migrate_js_2.fetchMainnetContentFps; } });
36
+ Object.defineProperty(exports, "fetchBlindIndicesForFacts", { enumerable: true, get: function () { return migrate_js_2.fetchBlindIndicesForFacts; } });
37
+ Object.defineProperty(exports, "checkBillingTier", { enumerable: true, get: function () { return migrate_js_2.checkBillingTier; } });
31
38
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":";;;AAAA,6CAAuE;AAA9D,qHAAA,sBAAsB,OAAA;AAAE,6GAAA,cAAc,OAAA;AAC/C,yCAAiE;AAAxD,iHAAA,oBAAoB,OAAA;AAAE,yGAAA,YAAY,OAAA;AAC3C,yCAAiE;AAAxD,iHAAA,oBAAoB,OAAA;AAAE,yGAAA,YAAY,OAAA;AAC3C,yCAAiE;AAAxD,iHAAA,oBAAoB,OAAA;AAAE,yGAAA,YAAY,OAAA;AAC3C,yCAAiE;AAAxD,iHAAA,oBAAoB,OAAA;AAAE,yGAAA,YAAY,OAAA;AAC3C,mDAA8E;AAArE,0HAAA,wBAAwB,OAAA;AAAE,kHAAA,gBAAgB,OAAA;AACnD,mDAAgF;AAAvE,2HAAA,yBAAyB,OAAA;AAAE,mHAAA,iBAAiB,OAAA;AACrD,yCAAiE;AAAxD,iHAAA,oBAAoB,OAAA;AAAE,yGAAA,YAAY,OAAA;AAC3C,2CAAoE;AAA3D,mHAAA,qBAAqB,OAAA;AAAE,2GAAA,aAAa,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":";;;AAAA,6CAAuE;AAA9D,qHAAA,sBAAsB,OAAA;AAAE,6GAAA,cAAc,OAAA;AAC/C,yCAAiE;AAAxD,iHAAA,oBAAoB,OAAA;AAAE,yGAAA,YAAY,OAAA;AAC3C,yCAAiE;AAAxD,iHAAA,oBAAoB,OAAA;AAAE,yGAAA,YAAY,OAAA;AAC3C,yCAAiE;AAAxD,iHAAA,oBAAoB,OAAA;AAAE,yGAAA,YAAY,OAAA;AAC3C,yCAAiE;AAAxD,iHAAA,oBAAoB,OAAA;AAAE,yGAAA,YAAY,OAAA;AAC3C,mDAA8E;AAArE,0HAAA,wBAAwB,OAAA;AAAE,kHAAA,gBAAgB,OAAA;AACnD,mDAAgF;AAAvE,2HAAA,yBAAyB,OAAA;AAAE,mHAAA,iBAAiB,OAAA;AACrD,yCAAiE;AAAxD,iHAAA,oBAAoB,OAAA;AAAE,yGAAA,YAAY,OAAA;AAC3C,2CAAoE;AAA3D,mHAAA,qBAAqB,OAAA;AAAE,2GAAA,aAAa,OAAA;AAC7C,2CAAqD;AAA5C,mHAAA,qBAAqB,OAAA;AAC9B,2CAOsB;AANpB,uHAAA,yBAAyB,OAAA;AACzB,oHAAA,sBAAsB,OAAA;AACtB,uHAAA,yBAAyB,OAAA;AACzB,8GAAA,gBAAgB,OAAA"}
@@ -0,0 +1,88 @@
1
+ /**
2
+ * TotalReclaw MCP - Testnet-to-Mainnet Migration Tool
3
+ *
4
+ * Migrates encrypted memories from Base Sepolia (free tier testnet) to
5
+ * Gnosis mainnet (Pro tier) after a user upgrades.
6
+ *
7
+ * The encrypted data is chain-agnostic: same AES-256-GCM ciphertext works
8
+ * on any chain. Smart Account addresses are deterministic (CREATE2), so
9
+ * the owner is the same on both chains. No re-encryption needed.
10
+ *
11
+ * Flow:
12
+ * 1. Verify user is Pro tier (via billing endpoint)
13
+ * 2. Fetch ALL active facts from testnet subgraph (paginated)
14
+ * 3. Fetch existing mainnet facts (by contentFp) for idempotency
15
+ * 4. Filter out facts that already exist on mainnet
16
+ * 5. Re-encode each fact as protobuf and batch-submit to mainnet via relay
17
+ * 6. Report progress and summary
18
+ *
19
+ * Safety:
20
+ * - Dry-run by default (confirm=false): shows preview without migrating
21
+ * - Testnet facts are never deleted (they remain as a backup)
22
+ * - Idempotent: skips facts that already exist on mainnet (by contentFp)
23
+ * - Handles partial failures gracefully (reports per-batch results)
24
+ */
25
+ export declare const migrateToolDefinition: {
26
+ name: string;
27
+ description: string;
28
+ inputSchema: {
29
+ type: string;
30
+ properties: {
31
+ confirm: {
32
+ type: string;
33
+ description: string;
34
+ default: boolean;
35
+ };
36
+ };
37
+ };
38
+ annotations: {
39
+ readOnlyHint: boolean;
40
+ destructiveHint: boolean;
41
+ idempotentHint: boolean;
42
+ };
43
+ };
44
+ export interface SubgraphFactFull {
45
+ id: string;
46
+ owner: string;
47
+ encryptedBlob: string;
48
+ encryptedEmbedding: string | null;
49
+ decayScore: string;
50
+ isActive: boolean;
51
+ contentFp: string;
52
+ source: string;
53
+ agentId: string;
54
+ version: number;
55
+ timestamp: string;
56
+ }
57
+ export interface MigrationResult {
58
+ success: boolean;
59
+ mode: 'dry_run' | 'executed';
60
+ testnet_facts: number;
61
+ already_on_mainnet: number;
62
+ to_migrate: number;
63
+ migrated: number;
64
+ failed_batches: number;
65
+ batch_results: Array<{
66
+ batch_number: number;
67
+ size: number;
68
+ success: boolean;
69
+ tx_hash?: string;
70
+ error?: string;
71
+ }>;
72
+ message: string;
73
+ }
74
+ export declare function fetchAllFactsFromSubgraph(subgraphUrl: string, owner: string, authKeyHex?: string): Promise<SubgraphFactFull[]>;
75
+ export declare function fetchMainnetContentFps(subgraphUrl: string, owner: string, authKeyHex?: string): Promise<Set<string>>;
76
+ export declare function checkBillingTier(serverUrl: string, walletAddress: string, authKeyHex: string): Promise<{
77
+ tier: string;
78
+ error?: string;
79
+ }>;
80
+ /**
81
+ * Fetch blind index hashes for a list of fact IDs from the subgraph.
82
+ * Returns a Map from fact ID to array of blind index hashes.
83
+ *
84
+ * Processes fact IDs in chunks of 50 to avoid query limits.
85
+ * Each fact may have ~25-35 blind indices (20 LSH + word indices).
86
+ */
87
+ export declare function fetchBlindIndicesForFacts(subgraphUrl: string, factIds: string[], authKeyHex: string): Promise<Map<string, string[]>>;
88
+ //# sourceMappingURL=migrate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migrate.d.ts","sourceRoot":"","sources":["../../src/tools/migrate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAIH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;CAkBjC,CAAC;AAMF,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,MAAM,CAAC;IACtB,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,SAAS,GAAG,UAAU,CAAC;IAC7B,aAAa,EAAE,MAAM,CAAC;IACtB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,KAAK,CAAC;QACnB,YAAY,EAAE,MAAM,CAAC;QACrB,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,OAAO,CAAC;QACjB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC,CAAC;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AA6HD,wBAAsB,yBAAyB,CAC7C,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,MAAM,EACb,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC,gBAAgB,EAAE,CAAC,CA+B7B;AAMD,wBAAsB,sBAAsB,CAC1C,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,MAAM,EACb,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CA8BtB;AAYD,wBAAsB,gBAAgB,CACpC,SAAS,EAAE,MAAM,EACjB,aAAa,EAAE,MAAM,EACrB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAqB3C;AAoBD;;;;;;GAMG;AACH,wBAAsB,yBAAyB,CAC7C,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,MAAM,EAAE,EACjB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,CAwBhC"}
@@ -0,0 +1,270 @@
1
+ "use strict";
2
+ /**
3
+ * TotalReclaw MCP - Testnet-to-Mainnet Migration Tool
4
+ *
5
+ * Migrates encrypted memories from Base Sepolia (free tier testnet) to
6
+ * Gnosis mainnet (Pro tier) after a user upgrades.
7
+ *
8
+ * The encrypted data is chain-agnostic: same AES-256-GCM ciphertext works
9
+ * on any chain. Smart Account addresses are deterministic (CREATE2), so
10
+ * the owner is the same on both chains. No re-encryption needed.
11
+ *
12
+ * Flow:
13
+ * 1. Verify user is Pro tier (via billing endpoint)
14
+ * 2. Fetch ALL active facts from testnet subgraph (paginated)
15
+ * 3. Fetch existing mainnet facts (by contentFp) for idempotency
16
+ * 4. Filter out facts that already exist on mainnet
17
+ * 5. Re-encode each fact as protobuf and batch-submit to mainnet via relay
18
+ * 6. Report progress and summary
19
+ *
20
+ * Safety:
21
+ * - Dry-run by default (confirm=false): shows preview without migrating
22
+ * - Testnet facts are never deleted (they remain as a backup)
23
+ * - Idempotent: skips facts that already exist on mainnet (by contentFp)
24
+ * - Handles partial failures gracefully (reports per-batch results)
25
+ */
26
+ Object.defineProperty(exports, "__esModule", { value: true });
27
+ exports.migrateToolDefinition = void 0;
28
+ exports.fetchAllFactsFromSubgraph = fetchAllFactsFromSubgraph;
29
+ exports.fetchMainnetContentFps = fetchMainnetContentFps;
30
+ exports.checkBillingTier = checkBillingTier;
31
+ exports.fetchBlindIndicesForFacts = fetchBlindIndicesForFacts;
32
+ const prompts_js_1 = require("../prompts.js");
33
+ exports.migrateToolDefinition = {
34
+ name: 'totalreclaw_migrate',
35
+ description: prompts_js_1.MIGRATE_TOOL_DESCRIPTION,
36
+ inputSchema: {
37
+ type: 'object',
38
+ properties: {
39
+ confirm: {
40
+ type: 'boolean',
41
+ description: 'Set to true to execute the migration. Without confirm=true, returns a dry-run preview.',
42
+ default: false,
43
+ },
44
+ },
45
+ },
46
+ annotations: {
47
+ readOnlyHint: false,
48
+ destructiveHint: false,
49
+ idempotentHint: true,
50
+ },
51
+ };
52
+ // ---------------------------------------------------------------------------
53
+ // GraphQL queries for migration
54
+ // ---------------------------------------------------------------------------
55
+ /** Fetch all active facts by owner — paginated with cursor (id_gt) */
56
+ const FETCH_FACTS_QUERY = `
57
+ query FetchFacts($owner: Bytes!, $first: Int!, $lastId: String!) {
58
+ facts(
59
+ where: { owner: $owner, isActive: true, id_gt: $lastId }
60
+ first: $first
61
+ orderBy: id
62
+ orderDirection: asc
63
+ ) {
64
+ id
65
+ owner
66
+ encryptedBlob
67
+ encryptedEmbedding
68
+ decayScore
69
+ isActive
70
+ contentFp
71
+ source
72
+ agentId
73
+ version
74
+ timestamp
75
+ }
76
+ }
77
+ `;
78
+ /** Initial fetch (no cursor) */
79
+ const FETCH_FACTS_INITIAL_QUERY = `
80
+ query FetchFactsInitial($owner: Bytes!, $first: Int!) {
81
+ facts(
82
+ where: { owner: $owner, isActive: true }
83
+ first: $first
84
+ orderBy: id
85
+ orderDirection: asc
86
+ ) {
87
+ id
88
+ owner
89
+ encryptedBlob
90
+ encryptedEmbedding
91
+ decayScore
92
+ isActive
93
+ contentFp
94
+ source
95
+ agentId
96
+ version
97
+ timestamp
98
+ }
99
+ }
100
+ `;
101
+ /** Fetch contentFps from mainnet for idempotency check */
102
+ const FETCH_CONTENT_FPS_QUERY = `
103
+ query FetchContentFps($owner: Bytes!, $first: Int!, $lastId: String!) {
104
+ facts(
105
+ where: { owner: $owner, isActive: true, id_gt: $lastId }
106
+ first: $first
107
+ orderBy: id
108
+ orderDirection: asc
109
+ ) {
110
+ id
111
+ contentFp
112
+ }
113
+ }
114
+ `;
115
+ const FETCH_CONTENT_FPS_INITIAL_QUERY = `
116
+ query FetchContentFpsInitial($owner: Bytes!, $first: Int!) {
117
+ facts(
118
+ where: { owner: $owner, isActive: true }
119
+ first: $first
120
+ orderBy: id
121
+ orderDirection: asc
122
+ ) {
123
+ id
124
+ contentFp
125
+ }
126
+ }
127
+ `;
128
+ // ---------------------------------------------------------------------------
129
+ // GraphQL helper
130
+ // ---------------------------------------------------------------------------
131
+ const PAGE_SIZE = 1000; // Graph Studio limit
132
+ async function gqlQuery(endpoint, query, variables, authKeyHex) {
133
+ try {
134
+ const headers = {
135
+ 'Content-Type': 'application/json',
136
+ 'X-TotalReclaw-Client': 'mcp-server',
137
+ };
138
+ if (authKeyHex)
139
+ headers['Authorization'] = `Bearer ${authKeyHex}`;
140
+ const response = await fetch(endpoint, {
141
+ method: 'POST',
142
+ headers,
143
+ body: JSON.stringify({ query, variables }),
144
+ });
145
+ if (!response.ok) {
146
+ console.error(`[migrate] gqlQuery HTTP ${response.status}: ${await response.text().catch(() => 'no body')}`);
147
+ return null;
148
+ }
149
+ const json = await response.json();
150
+ if (json.errors) {
151
+ console.error(`[migrate] gqlQuery GraphQL errors:`, JSON.stringify(json.errors));
152
+ }
153
+ return json.data ?? null;
154
+ }
155
+ catch (err) {
156
+ console.error(`[migrate] gqlQuery exception:`, err);
157
+ return null;
158
+ }
159
+ }
160
+ // ---------------------------------------------------------------------------
161
+ // Fetch all facts from a subgraph (paginated)
162
+ // ---------------------------------------------------------------------------
163
+ async function fetchAllFactsFromSubgraph(subgraphUrl, owner, authKeyHex) {
164
+ const allFacts = [];
165
+ let lastId = '';
166
+ let page = 0;
167
+ while (true) {
168
+ page++;
169
+ const isInitial = lastId === '';
170
+ const query = isInitial ? FETCH_FACTS_INITIAL_QUERY : FETCH_FACTS_QUERY;
171
+ const variables = isInitial
172
+ ? { owner, first: PAGE_SIZE }
173
+ : { owner, first: PAGE_SIZE, lastId };
174
+ const data = await gqlQuery(subgraphUrl, query, variables, authKeyHex);
175
+ const facts = data?.facts ?? [];
176
+ if (facts.length === 0)
177
+ break;
178
+ allFacts.push(...facts);
179
+ console.error(`[migrate] Fetched page ${page}: ${facts.length} facts (total: ${allFacts.length})`);
180
+ if (facts.length < PAGE_SIZE)
181
+ break; // Last page
182
+ lastId = facts[facts.length - 1].id;
183
+ }
184
+ return allFacts;
185
+ }
186
+ // ---------------------------------------------------------------------------
187
+ // Fetch content fingerprints from mainnet for idempotency
188
+ // ---------------------------------------------------------------------------
189
+ async function fetchMainnetContentFps(subgraphUrl, owner, authKeyHex) {
190
+ const fps = new Set();
191
+ let lastId = '';
192
+ while (true) {
193
+ const isInitial = lastId === '';
194
+ const query = isInitial ? FETCH_CONTENT_FPS_INITIAL_QUERY : FETCH_CONTENT_FPS_QUERY;
195
+ const variables = isInitial
196
+ ? { owner, first: PAGE_SIZE }
197
+ : { owner, first: PAGE_SIZE, lastId };
198
+ const data = await gqlQuery(subgraphUrl, query, variables, authKeyHex);
199
+ const facts = data?.facts ?? [];
200
+ if (facts.length === 0)
201
+ break;
202
+ for (const f of facts) {
203
+ if (f.contentFp)
204
+ fps.add(f.contentFp);
205
+ }
206
+ if (facts.length < PAGE_SIZE)
207
+ break;
208
+ lastId = facts[facts.length - 1].id;
209
+ }
210
+ return fps;
211
+ }
212
+ async function checkBillingTier(serverUrl, walletAddress, authKeyHex) {
213
+ try {
214
+ const url = `${serverUrl.replace(/\/+$/, '')}/v1/billing/status?wallet_address=${encodeURIComponent(walletAddress)}`;
215
+ const response = await fetch(url, {
216
+ method: 'GET',
217
+ headers: {
218
+ 'Authorization': `Bearer ${authKeyHex}`,
219
+ 'Content-Type': 'application/json',
220
+ 'X-TotalReclaw-Client': 'mcp-server',
221
+ },
222
+ });
223
+ if (!response.ok) {
224
+ return { tier: 'unknown', error: `Billing check failed (HTTP ${response.status})` };
225
+ }
226
+ const data = (await response.json());
227
+ return { tier: data.tier };
228
+ }
229
+ catch (err) {
230
+ return { tier: 'unknown', error: err instanceof Error ? err.message : 'Unknown error' };
231
+ }
232
+ }
233
+ // ---------------------------------------------------------------------------
234
+ // Blind index fetching for migration
235
+ // ---------------------------------------------------------------------------
236
+ const BLIND_INDEX_QUERY = `
237
+ query FetchBlindIndices($factIds: [String!]!, $first: Int!) {
238
+ blindIndexes(
239
+ where: { fact_in: $factIds }
240
+ first: $first
241
+ ) {
242
+ hash
243
+ fact {
244
+ id
245
+ }
246
+ }
247
+ }
248
+ `;
249
+ /**
250
+ * Fetch blind index hashes for a list of fact IDs from the subgraph.
251
+ * Returns a Map from fact ID to array of blind index hashes.
252
+ *
253
+ * Processes fact IDs in chunks of 50 to avoid query limits.
254
+ * Each fact may have ~25-35 blind indices (20 LSH + word indices).
255
+ */
256
+ async function fetchBlindIndicesForFacts(subgraphUrl, factIds, authKeyHex) {
257
+ const result = new Map();
258
+ const CHUNK_SIZE = 50;
259
+ for (let i = 0; i < factIds.length; i += CHUNK_SIZE) {
260
+ const chunk = factIds.slice(i, i + CHUNK_SIZE);
261
+ const data = await gqlQuery(subgraphUrl, BLIND_INDEX_QUERY, { factIds: chunk, first: 1000 }, authKeyHex);
262
+ for (const entry of data?.blindIndexes ?? []) {
263
+ const existing = result.get(entry.fact.id) || [];
264
+ existing.push(entry.hash);
265
+ result.set(entry.fact.id, existing);
266
+ }
267
+ }
268
+ return result;
269
+ }
270
+ //# sourceMappingURL=migrate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migrate.js","sourceRoot":"","sources":["../../src/tools/migrate.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;;;AAuLH,8DAmCC;AAMD,wDAkCC;AAYD,4CAyBC;AA2BD,8DA4BC;AA5VD,8CAAyD;AAE5C,QAAA,qBAAqB,GAAG;IACnC,IAAI,EAAE,qBAAqB;IAC3B,WAAW,EAAE,qCAAwB;IACrC,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,OAAO,EAAE;gBACP,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,wFAAwF;gBACrG,OAAO,EAAE,KAAK;aACf;SACF;KACF;IACD,WAAW,EAAE;QACX,YAAY,EAAE,KAAK;QACnB,eAAe,EAAE,KAAK;QACtB,cAAc,EAAE,IAAI;KACrB;CACF,CAAC;AAsCF,8EAA8E;AAC9E,gCAAgC;AAChC,8EAA8E;AAE9E,sEAAsE;AACtE,MAAM,iBAAiB,GAAG;;;;;;;;;;;;;;;;;;;;;CAqBzB,CAAC;AAEF,gCAAgC;AAChC,MAAM,yBAAyB,GAAG;;;;;;;;;;;;;;;;;;;;;CAqBjC,CAAC;AAEF,0DAA0D;AAC1D,MAAM,uBAAuB,GAAG;;;;;;;;;;;;CAY/B,CAAC;AAEF,MAAM,+BAA+B,GAAG;;;;;;;;;;;;CAYvC,CAAC;AAEF,8EAA8E;AAC9E,iBAAiB;AACjB,8EAA8E;AAE9E,MAAM,SAAS,GAAG,IAAI,CAAC,CAAC,qBAAqB;AAE7C,KAAK,UAAU,QAAQ,CACrB,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AAC;YAC7C,MAAM,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;YACjD,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YAC1B,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAC;QACtC,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -1,8 +1,7 @@
1
1
  /**
2
2
  * TotalReclaw MCP - Billing Upgrade Tool
3
3
  *
4
- * Creates a checkout session for upgrading to Pro tier.
5
- * Supports both Stripe (card) and Coinbase Commerce (crypto) payment methods.
4
+ * Creates a Stripe checkout session for upgrading to Pro tier.
6
5
  */
7
6
  export declare const upgradeToolDefinition: {
8
7
  name: string;
@@ -14,12 +13,6 @@ export declare const upgradeToolDefinition: {
14
13
  type: string;
15
14
  description: string;
16
15
  };
17
- payment_method: {
18
- type: string;
19
- enum: string[];
20
- default: string;
21
- description: string;
22
- };
23
16
  };
24
17
  required: string[];
25
18
  };
@@ -1 +1 @@
1
- {"version":3,"file":"upgrade.d.ts","sourceRoot":"","sources":["../../src/tools/upgrade.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;CAwBjC,CAAC;AAEF,MAAM,WAAW,gBAAgB;IAC/B,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;GAKG;AACH,wBAAsB,aAAa,CACjC,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,OAAO,GACZ,OAAO,CAAC;IAAE,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE,CAAC,CAsF7D"}
1
+ {"version":3,"file":"upgrade.d.ts","sourceRoot":"","sources":["../../src/tools/upgrade.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;CAkBjC,CAAC;AAEF,MAAM,WAAW,gBAAgB;IAC/B,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;GAKG;AACH,wBAAsB,aAAa,CACjC,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,OAAO,GACZ,OAAO,CAAC;IAAE,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE,CAAC,CAmE7D"}