@totalreclaw/mcp-server 3.3.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/README.md +61 -2
- package/SKILL.md +1 -1
- package/dist/claims-helper.d.ts +1 -1
- package/dist/claims-helper.d.ts.map +1 -1
- package/dist/claims-helper.js +31 -31
- package/dist/claims-helper.js.map +1 -1
- package/dist/cli/setup.d.ts +10 -0
- package/dist/cli/setup.d.ts.map +1 -1
- package/dist/cli/setup.js +15 -5
- package/dist/cli/setup.js.map +1 -1
- package/dist/consolidation.d.ts +3 -5
- package/dist/consolidation.d.ts.map +1 -1
- package/dist/consolidation.js +47 -122
- package/dist/consolidation.js.map +1 -1
- package/dist/contradiction-sync.d.ts +2 -2
- package/dist/contradiction-sync.d.ts.map +1 -1
- package/dist/contradiction-sync.js +17 -16
- package/dist/contradiction-sync.js.map +1 -1
- package/dist/dispatch.d.ts +95 -0
- package/dist/dispatch.d.ts.map +1 -0
- package/dist/dispatch.js +191 -0
- package/dist/dispatch.js.map +1 -0
- package/dist/embedding-codec.d.ts +81 -0
- package/dist/embedding-codec.d.ts.map +1 -0
- package/dist/embedding-codec.js +223 -0
- package/dist/embedding-codec.js.map +1 -0
- package/dist/extraction/extractor.d.ts +1 -0
- package/dist/extraction/extractor.d.ts.map +1 -1
- package/dist/extraction/extractor.js +15 -15
- package/dist/extraction/extractor.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +484 -767
- package/dist/index.js.map +1 -1
- package/dist/pair-remote-client.d.ts +41 -0
- package/dist/pair-remote-client.d.ts.map +1 -1
- package/dist/pair-remote-client.js +130 -32
- package/dist/pair-remote-client.js.map +1 -1
- package/dist/prompts.d.ts +3 -4
- package/dist/prompts.d.ts.map +1 -1
- package/dist/prompts.js +3 -9
- package/dist/prompts.js.map +1 -1
- package/dist/server-setup.d.ts +35 -0
- package/dist/server-setup.d.ts.map +1 -0
- package/dist/server-setup.js +102 -0
- package/dist/server-setup.js.map +1 -0
- package/dist/subgraph/bundle.d.ts +129 -0
- package/dist/subgraph/bundle.d.ts.map +1 -0
- package/dist/subgraph/bundle.js +232 -0
- package/dist/subgraph/bundle.js.map +1 -0
- package/dist/subgraph/chain-config.d.ts +128 -0
- package/dist/subgraph/chain-config.d.ts.map +1 -0
- package/dist/subgraph/chain-config.js +135 -0
- package/dist/subgraph/chain-config.js.map +1 -0
- package/dist/subgraph/credentials.d.ts +83 -0
- package/dist/subgraph/credentials.d.ts.map +1 -0
- package/dist/subgraph/credentials.js +210 -0
- package/dist/subgraph/credentials.js.map +1 -0
- package/dist/subgraph/search.js +13 -13
- package/dist/subgraph/search.js.map +1 -1
- package/dist/subgraph/store.d.ts +39 -2
- package/dist/subgraph/store.d.ts.map +1 -1
- package/dist/subgraph/store.js +48 -13
- package/dist/subgraph/store.js.map +1 -1
- package/dist/tools/account.d.ts +5 -2
- package/dist/tools/account.d.ts.map +1 -1
- package/dist/tools/account.js +17 -4
- package/dist/tools/account.js.map +1 -1
- package/dist/tools/consolidate.d.ts +2 -2
- package/dist/tools/consolidate.d.ts.map +1 -1
- package/dist/tools/consolidate.js +2 -1
- package/dist/tools/consolidate.js.map +1 -1
- package/dist/tools/debrief.d.ts +2 -2
- package/dist/tools/debrief.d.ts.map +1 -1
- package/dist/tools/debrief.js +2 -1
- package/dist/tools/debrief.js.map +1 -1
- package/dist/tools/export.d.ts +2 -2
- package/dist/tools/export.d.ts.map +1 -1
- package/dist/tools/export.js +2 -1
- package/dist/tools/export.js.map +1 -1
- package/dist/tools/forget.d.ts +8 -2
- package/dist/tools/forget.d.ts.map +1 -1
- package/dist/tools/forget.js +14 -7
- package/dist/tools/forget.js.map +1 -1
- package/dist/tools/helpers.d.ts +40 -0
- package/dist/tools/helpers.d.ts.map +1 -0
- package/dist/tools/helpers.js +64 -0
- package/dist/tools/helpers.js.map +1 -0
- package/dist/tools/import-batch.d.ts +2 -1
- package/dist/tools/import-batch.d.ts.map +1 -1
- package/dist/tools/import-batch.js +1 -1
- package/dist/tools/import-batch.js.map +1 -1
- package/dist/tools/import-from.d.ts +2 -2
- package/dist/tools/import-from.d.ts.map +1 -1
- package/dist/tools/import-from.js +2 -1
- package/dist/tools/import-from.js.map +1 -1
- package/dist/tools/import.d.ts +2 -2
- package/dist/tools/import.d.ts.map +1 -1
- package/dist/tools/import.js +4 -3
- package/dist/tools/import.js.map +1 -1
- package/dist/tools/index.d.ts +2 -2
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +7 -9
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/pair.d.ts +2 -1
- package/dist/tools/pair.d.ts.map +1 -1
- package/dist/tools/pair.js +67 -4
- package/dist/tools/pair.js.map +1 -1
- package/dist/tools/pin.d.ts +10 -7
- package/dist/tools/pin.d.ts.map +1 -1
- package/dist/tools/pin.js +43 -49
- package/dist/tools/pin.js.map +1 -1
- package/dist/tools/recall.d.ts +2 -2
- package/dist/tools/recall.d.ts.map +1 -1
- package/dist/tools/recall.js +22 -47
- package/dist/tools/recall.js.map +1 -1
- package/dist/tools/remember.d.ts +2 -2
- package/dist/tools/remember.d.ts.map +1 -1
- package/dist/tools/remember.js +30 -48
- package/dist/tools/remember.js.map +1 -1
- package/dist/tools/retype.d.ts +6 -1
- package/dist/tools/retype.d.ts.map +1 -1
- package/dist/tools/retype.js +37 -33
- package/dist/tools/retype.js.map +1 -1
- package/dist/tools/set-scope.d.ts +6 -1
- package/dist/tools/set-scope.d.ts.map +1 -1
- package/dist/tools/set-scope.js +14 -10
- package/dist/tools/set-scope.js.map +1 -1
- package/dist/tools/status.d.ts +2 -1
- package/dist/tools/status.d.ts.map +1 -1
- package/dist/tools/status.js +14 -12
- package/dist/tools/status.js.map +1 -1
- package/dist/tools/support.d.ts +5 -3
- package/dist/tools/support.d.ts.map +1 -1
- package/dist/tools/support.js +9 -8
- package/dist/tools/support.js.map +1 -1
- package/dist/tools/types.d.ts +38 -0
- package/dist/tools/types.d.ts.map +1 -0
- package/dist/tools/types.js +17 -0
- package/dist/tools/types.js.map +1 -0
- package/dist/tools/upgrade.d.ts +2 -1
- package/dist/tools/upgrade.d.ts.map +1 -1
- package/dist/tools/upgrade.js +6 -4
- package/dist/tools/upgrade.js.map +1 -1
- package/package.json +3 -4
- package/dist/subgraph/index.d.ts +0 -7
- package/dist/subgraph/index.d.ts.map +0 -1
- package/dist/subgraph/index.js +0 -23
- package/dist/subgraph/index.js.map +0 -1
- package/dist/tools/migrate.d.ts +0 -88
- package/dist/tools/migrate.d.ts.map +0 -1
- package/dist/tools/migrate.js +0 -273
- package/dist/tools/migrate.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pair-remote-client.js","sourceRoot":"","sources":["../src/pair-remote-client.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;;;;;;AA8GH,sDAoFC;AAMD,8CAmGC;AAED,oCAkBC;AA7TD,6CAAqD;AAErD,4CAA2B;AAE3B,qDAI0B;AAE1B,8EAA8E;AAC9E,YAAY;AACZ,8EAA8E;AAEjE,QAAA,iBAAiB,GAAG,2BAA2B,CAAC;AAE7D,MAAM,eAAe,GAAG,MAAM,CAAC;AAE/B,MAAM,wBAAwB,GAAG,CAAC,GAAG,MAAM,CAAC;AA+B5C,SAAS,0BAA0B,CAAC,MAAc;IAChD,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAChC,IAAI,KAAK,CAAC,MAAM,KAAK,EAAE,IAAI,KAAK,CAAC,MAAM,KAAK,EAAE;QAAE,OAAO,KAAK,CAAC;IAC7D,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AAChD,CAAC;AAED,SAAS,UAAU;IACjB,MAAM,CAAC,GAAG,IAAA,uBAAS,EAAC,CAAC,EAAE,SAAS,CAAC,C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EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACxB,EAAE,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC1B,CAAC,CAAC,CAAC;AACL,CAAC;AAED,SAAS,QAAQ,CAAC,EAAa,EAAE,GAAY;IAC3C,IAAI,CAAC;QACH,IAAI,EAAE,CAAC,UAAU,KAAK,YAAS,CAAC,IAAI,EAAE,CAAC;YACrC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QAC/B,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,aAAa;IACf,CAAC;AACH,CAAC;AAED,SAAS,SAAS,CAAC,EAAa;IAC9B,IAAI,CAAC;QACH,IACE,EAAE,CAAC,UAAU,KAAK,YAAS,CAAC,IAAI;YAChC,EAAE,CAAC,UAAU,KAAK,YAAS,CAAC,UAAU,EACtC,CAAC;YACD,EAAE,CAAC,KAAK,EAAE,CAAC;QACb,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,aAAa;IACf,CAAC;AACH,CAAC"}
|
package/dist/prompts.d.ts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
export declare const SERVER_INSTRUCTIONS = "\nYou 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.\"\n\n## CRITICAL SAFETY: Recovery Phrase\nTotalReclaw uses a 12-word BIP-39 recovery phrase as the user's identity. The recovery phrase MUST NEVER cross your context window. NEVER ask the user to paste their phrase into chat. NEVER echo, print, or summarize a phrase. NEVER invoke a phrase-touching CLI (e.g. \"npx @totalreclaw/mcp-server setup\", \"npx @totalreclaw/mcp-server show-phrase\") via a shell tool \u2014 its stdout enters your context. If the user pastes a phrase in chat anyway, tell them it is compromised and they need to generate a fresh wallet via the OpenClaw or Hermes browser pair flow.\n\n## Setup Flow\nIf any TotalReclaw tool returns a \"not_configured\" or \"tool_removed\" error, the user has not yet wired their recovery phrase into the MCP host config. Direct them to the URL-driven install guide at https://github.com/p-diogo/totalreclaw/blob/main/docs/guides/claude-code-setup.md. The user sources their phrase out-of-band \u2014 from the OpenClaw or Hermes browser pair flow (relay only ever sees ciphertext), from a prior ~/.totalreclaw/credentials.json cache, or from an offline BIP-39 generator \u2014 and pastes it directly into TOTALRECLAW_RECOVERY_PHRASE in the MCP host config (Claude Desktop / Cursor / Windsurf / Claude Code). After they save the config and restart the host, the MCP server picks up the phrase and all TotalReclaw tools become available. There is no in-chat setup tool: the totalreclaw_setup MCP tool was removed in 3.2.1 because returning the phrase through tool output crossed your context, violating phrase-safety.\n\n## CRITICAL: Automatic Memory Behaviors\n\n### At Conversation Start\nALWAYS 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.\n\n### Proactive Memory Storage (IMPORTANT)\nYou should call totalreclaw_remember WITHOUT being asked whenever the user shares:\n- Personal preferences (\"I prefer...\", \"I like...\", \"I hate...\")\n- Personal information (name, location, occupation, family details)\n- Decisions or goals (\"I decided to...\", \"I want to...\", \"I chose X because Y\")\n- Corrections to previous information (\"Actually, I'm vegan now\", \"We moved to Berlin\")\n- Important events or dates (\"My birthday is...\", \"I started a new job at...\")\n- Technical preferences (programming language, tools, frameworks, workflows)\n- Project context (what they're working on, deadlines, team details)\n- Opinions and values that shape future interactions\n\nThe 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.\n\nDo NOT store:\n- Temporary/transient context (weather today, a one-time task)\n- Generic knowledge unrelated to the user\n- Sensitive credentials (passwords, API keys, tokens)\n\n### Memory Recall\nCall totalreclaw_recall proactively when:\n- Starting any new conversation (query based on the user's first message)\n- The user asks about something that might relate to past conversations\n- You need context about the user's background, projects, or preferences\n- The user says \"remember when...\", \"what did I say about...\", \"do you know my...\"\n\n### Memory Hygiene\n- Before storing a new fact, check recalled memories to avoid duplicates\n- When the user corrects information, store the correction (the system handles deduplication)\n- Use importance 7-9 for core identity/preferences, 4-6 for moderate facts, 1-3 for minor details\n- Extract atomic facts: \"User prefers dark mode\" not \"User said they prefer dark mode and also use VS Code\"\n\n### Billing & Quota\nBoth tiers store memories permanently on Gnosis mainnet (E2E encrypted). Free tier is capped at 250 memories per month; Pro is capped at 1,500 memories per month. Reads are unlimited on both tiers. Do NOT guess or hardcode pricing or quota numbers \u2014 use totalreclaw_status to check exact usage, the current cap, and current pricing. For pricing details, refer users to https://totalreclaw.xyz/pricing\n\nWhen a totalreclaw_remember call fails with \"quota_exceeded\":\n1. Inform the user they've hit a usage limit\n2. Offer to check their usage with totalreclaw_status\n3. If they want to upgrade, use totalreclaw_upgrade to get a checkout link \u2014 upgrading is done right here through the agent\nDo NOT repeatedly attempt to store memories after a quota error.\n\nNote: 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.\n\n### Importing memories from other tools\nIf the user mentions migrating from Mem0, MCP Memory Server,
|
|
2
|
-
export declare const SYSTEM_PROMPT_FRAGMENT = "\nYou 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.\"\n\n## CRITICAL SAFETY: Recovery Phrase\nTotalReclaw uses a 12-word BIP-39 recovery phrase as the user's identity. The recovery phrase MUST NEVER cross your context window. NEVER ask the user to paste their phrase into chat. NEVER echo, print, or summarize a phrase. NEVER invoke a phrase-touching CLI (e.g. \"npx @totalreclaw/mcp-server setup\", \"npx @totalreclaw/mcp-server show-phrase\") via a shell tool \u2014 its stdout enters your context. If the user pastes a phrase in chat anyway, tell them it is compromised and they need to generate a fresh wallet via the OpenClaw or Hermes browser pair flow.\n\n## Setup Flow\nIf any TotalReclaw tool returns a \"not_configured\" or \"tool_removed\" error, the user has not yet wired their recovery phrase into the MCP host config. Direct them to the URL-driven install guide at https://github.com/p-diogo/totalreclaw/blob/main/docs/guides/claude-code-setup.md. The user sources their phrase out-of-band \u2014 from the OpenClaw or Hermes browser pair flow (relay only ever sees ciphertext), from a prior ~/.totalreclaw/credentials.json cache, or from an offline BIP-39 generator \u2014 and pastes it directly into TOTALRECLAW_RECOVERY_PHRASE in the MCP host config (Claude Desktop / Cursor / Windsurf / Claude Code). After they save the config and restart the host, the MCP server picks up the phrase and all TotalReclaw tools become available. There is no in-chat setup tool: the totalreclaw_setup MCP tool was removed in 3.2.1 because returning the phrase through tool output crossed your context, violating phrase-safety.\n\n## CRITICAL: Automatic Memory Behaviors\n\n### At Conversation Start\nALWAYS 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.\n\n### Proactive Memory Storage (IMPORTANT)\nYou should call totalreclaw_remember WITHOUT being asked whenever the user shares:\n- Personal preferences (\"I prefer...\", \"I like...\", \"I hate...\")\n- Personal information (name, location, occupation, family details)\n- Decisions or goals (\"I decided to...\", \"I want to...\", \"I chose X because Y\")\n- Corrections to previous information (\"Actually, I'm vegan now\", \"We moved to Berlin\")\n- Important events or dates (\"My birthday is...\", \"I started a new job at...\")\n- Technical preferences (programming language, tools, frameworks, workflows)\n- Project context (what they're working on, deadlines, team details)\n- Opinions and values that shape future interactions\n\nThe 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.\n\nDo NOT store:\n- Temporary/transient context (weather today, a one-time task)\n- Generic knowledge unrelated to the user\n- Sensitive credentials (passwords, API keys, tokens)\n\n### Memory Recall\nCall totalreclaw_recall proactively when:\n- Starting any new conversation (query based on the user's first message)\n- The user asks about something that might relate to past conversations\n- You need context about the user's background, projects, or preferences\n- The user says \"remember when...\", \"what did I say about...\", \"do you know my...\"\n\n### Memory Hygiene\n- Before storing a new fact, check recalled memories to avoid duplicates\n- When the user corrects information, store the correction (the system handles deduplication)\n- Use importance 7-9 for core identity/preferences, 4-6 for moderate facts, 1-3 for minor details\n- Extract atomic facts: \"User prefers dark mode\" not \"User said they prefer dark mode and also use VS Code\"\n\n### Billing & Quota\nBoth tiers store memories permanently on Gnosis mainnet (E2E encrypted). Free tier is capped at 250 memories per month; Pro is capped at 1,500 memories per month. Reads are unlimited on both tiers. Do NOT guess or hardcode pricing or quota numbers \u2014 use totalreclaw_status to check exact usage, the current cap, and current pricing. For pricing details, refer users to https://totalreclaw.xyz/pricing\n\nWhen a totalreclaw_remember call fails with \"quota_exceeded\":\n1. Inform the user they've hit a usage limit\n2. Offer to check their usage with totalreclaw_status\n3. If they want to upgrade, use totalreclaw_upgrade to get a checkout link \u2014 upgrading is done right here through the agent\nDo NOT repeatedly attempt to store memories after a quota error.\n\nNote: 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.\n\n### Importing memories from other tools\nIf the user mentions migrating from Mem0, MCP Memory Server,
|
|
1
|
+
export declare const SERVER_INSTRUCTIONS = "\nYou 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.\"\n\n## CRITICAL SAFETY: Recovery Phrase\nTotalReclaw uses a 12-word BIP-39 recovery phrase as the user's identity. The recovery phrase MUST NEVER cross your context window. NEVER ask the user to paste their phrase into chat. NEVER echo, print, or summarize a phrase. NEVER invoke a phrase-touching CLI (e.g. \"npx @totalreclaw/mcp-server setup\", \"npx @totalreclaw/mcp-server show-phrase\") via a shell tool \u2014 its stdout enters your context. If the user pastes a phrase in chat anyway, tell them it is compromised and they need to generate a fresh wallet via the OpenClaw or Hermes browser pair flow.\n\n## Setup Flow\nIf any TotalReclaw tool returns a \"not_configured\" or \"tool_removed\" error, the user has not yet wired their recovery phrase into the MCP host config. Direct them to the URL-driven install guide at https://github.com/p-diogo/totalreclaw/blob/main/docs/guides/claude-code-setup.md. The user sources their phrase out-of-band \u2014 from the OpenClaw or Hermes browser pair flow (relay only ever sees ciphertext), from a prior ~/.totalreclaw/credentials.json cache, or from an offline BIP-39 generator \u2014 and pastes it directly into TOTALRECLAW_RECOVERY_PHRASE in the MCP host config (Claude Desktop / Cursor / Windsurf / Claude Code). After they save the config and restart the host, the MCP server picks up the phrase and all TotalReclaw tools become available. There is no in-chat setup tool: the totalreclaw_setup MCP tool was removed in 3.2.1 because returning the phrase through tool output crossed your context, violating phrase-safety.\n\n## CRITICAL: Automatic Memory Behaviors\n\n### At Conversation Start\nALWAYS 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.\n\n### Proactive Memory Storage (IMPORTANT)\nYou should call totalreclaw_remember WITHOUT being asked whenever the user shares:\n- Personal preferences (\"I prefer...\", \"I like...\", \"I hate...\")\n- Personal information (name, location, occupation, family details)\n- Decisions or goals (\"I decided to...\", \"I want to...\", \"I chose X because Y\")\n- Corrections to previous information (\"Actually, I'm vegan now\", \"We moved to Berlin\")\n- Important events or dates (\"My birthday is...\", \"I started a new job at...\")\n- Technical preferences (programming language, tools, frameworks, workflows)\n- Project context (what they're working on, deadlines, team details)\n- Opinions and values that shape future interactions\n\nThe 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.\n\nDo NOT store:\n- Temporary/transient context (weather today, a one-time task)\n- Generic knowledge unrelated to the user\n- Sensitive credentials (passwords, API keys, tokens)\n\n### Memory Recall\nCall totalreclaw_recall proactively when:\n- Starting any new conversation (query based on the user's first message)\n- The user asks about something that might relate to past conversations\n- You need context about the user's background, projects, or preferences\n- The user says \"remember when...\", \"what did I say about...\", \"do you know my...\"\n\n### Memory Hygiene\n- Before storing a new fact, check recalled memories to avoid duplicates\n- When the user corrects information, store the correction (the system handles deduplication)\n- Use importance 7-9 for core identity/preferences, 4-6 for moderate facts, 1-3 for minor details\n- Extract atomic facts: \"User prefers dark mode\" not \"User said they prefer dark mode and also use VS Code\"\n\n### Billing & Quota\nBoth tiers store memories permanently on Gnosis mainnet (E2E encrypted). Free tier is capped at 250 memories per month; Pro is capped at 1,500 memories per month. Reads are unlimited on both tiers. Do NOT guess or hardcode pricing or quota numbers \u2014 use totalreclaw_status to check exact usage, the current cap, and current pricing. For pricing details, refer users to https://totalreclaw.xyz/pricing\n\nWhen a totalreclaw_remember call fails with \"quota_exceeded\":\n1. Inform the user they've hit a usage limit\n2. Offer to check their usage with totalreclaw_status\n3. If they want to upgrade, use totalreclaw_upgrade to get a checkout link \u2014 upgrading is done right here through the agent\nDo NOT repeatedly attempt to store memories after a quota error.\n\nNote: 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.\n\n### Importing memories from other tools\nIf the user mentions migrating from Mem0, MCP Memory Server, or any other AI memory tool, offer to use totalreclaw_import_from. Start with dry_run=true to preview, then confirm before importing.\nAPI keys provided by the user are used only for the import and are never stored.\n\n### Agent-specific tips\n- If your agent supports background routines or scheduled tasks, set up a routine to call totalreclaw_remember after conversations to ensure nothing is missed.\n- If your agent supports a credential vault or secret store, the user's TOTALRECLAW_RECOVERY_PHRASE should be stored there instead of as a plaintext environment variable.\n- TotalReclaw memories are fully portable -- they work across OpenClaw, IronClaw, Claude Desktop, Cursor, NanoClaw, and any MCP-compatible agent.\n\n### User-controlled memory edits (v1)\nIn addition to remember + forget, three tools let the user correct stored memories without\nwiping the vault. Use these when the user says something like:\n- \"pin that\" / \"never forget this\" \u2192 totalreclaw_pin (preserves a fact across auto-resolution)\n- \"that was actually a directive, not a preference\" \u2192 totalreclaw_retype\n- \"that was work context\" / \"file that under personal\" \u2192 totalreclaw_set_scope\n\nAll three operate by supersession: they create a new claim with the override and link it\nback to the original via superseded_by. The original stays in the vault as a tombstone so\nhistory is inspectable. All three are idempotent (no-op if the target already matches).\n\n### End of Conversation\nWhen a substantive conversation is ending (the user says goodbye, the topic is resolved,\nor the conversation naturally concludes), call totalreclaw_debrief with the key takeaways.\n\nFocus on what individual memory storage missed:\n- What was the conversation about overall?\n- What was decided or resolved?\n- What approaches were tried and what was the outcome?\n- What's left unfinished?\n\nDo NOT debrief casual conversations (greetings, simple Q&A, small talk).\nMax 5 items, each 1-3 sentences, type \"summary\" or \"context\", importance 7-8.\n";
|
|
2
|
+
export declare const SYSTEM_PROMPT_FRAGMENT = "\nYou 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.\"\n\n## CRITICAL SAFETY: Recovery Phrase\nTotalReclaw uses a 12-word BIP-39 recovery phrase as the user's identity. The recovery phrase MUST NEVER cross your context window. NEVER ask the user to paste their phrase into chat. NEVER echo, print, or summarize a phrase. NEVER invoke a phrase-touching CLI (e.g. \"npx @totalreclaw/mcp-server setup\", \"npx @totalreclaw/mcp-server show-phrase\") via a shell tool \u2014 its stdout enters your context. If the user pastes a phrase in chat anyway, tell them it is compromised and they need to generate a fresh wallet via the OpenClaw or Hermes browser pair flow.\n\n## Setup Flow\nIf any TotalReclaw tool returns a \"not_configured\" or \"tool_removed\" error, the user has not yet wired their recovery phrase into the MCP host config. Direct them to the URL-driven install guide at https://github.com/p-diogo/totalreclaw/blob/main/docs/guides/claude-code-setup.md. The user sources their phrase out-of-band \u2014 from the OpenClaw or Hermes browser pair flow (relay only ever sees ciphertext), from a prior ~/.totalreclaw/credentials.json cache, or from an offline BIP-39 generator \u2014 and pastes it directly into TOTALRECLAW_RECOVERY_PHRASE in the MCP host config (Claude Desktop / Cursor / Windsurf / Claude Code). After they save the config and restart the host, the MCP server picks up the phrase and all TotalReclaw tools become available. There is no in-chat setup tool: the totalreclaw_setup MCP tool was removed in 3.2.1 because returning the phrase through tool output crossed your context, violating phrase-safety.\n\n## CRITICAL: Automatic Memory Behaviors\n\n### At Conversation Start\nALWAYS 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.\n\n### Proactive Memory Storage (IMPORTANT)\nYou should call totalreclaw_remember WITHOUT being asked whenever the user shares:\n- Personal preferences (\"I prefer...\", \"I like...\", \"I hate...\")\n- Personal information (name, location, occupation, family details)\n- Decisions or goals (\"I decided to...\", \"I want to...\", \"I chose X because Y\")\n- Corrections to previous information (\"Actually, I'm vegan now\", \"We moved to Berlin\")\n- Important events or dates (\"My birthday is...\", \"I started a new job at...\")\n- Technical preferences (programming language, tools, frameworks, workflows)\n- Project context (what they're working on, deadlines, team details)\n- Opinions and values that shape future interactions\n\nThe 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.\n\nDo NOT store:\n- Temporary/transient context (weather today, a one-time task)\n- Generic knowledge unrelated to the user\n- Sensitive credentials (passwords, API keys, tokens)\n\n### Memory Recall\nCall totalreclaw_recall proactively when:\n- Starting any new conversation (query based on the user's first message)\n- The user asks about something that might relate to past conversations\n- You need context about the user's background, projects, or preferences\n- The user says \"remember when...\", \"what did I say about...\", \"do you know my...\"\n\n### Memory Hygiene\n- Before storing a new fact, check recalled memories to avoid duplicates\n- When the user corrects information, store the correction (the system handles deduplication)\n- Use importance 7-9 for core identity/preferences, 4-6 for moderate facts, 1-3 for minor details\n- Extract atomic facts: \"User prefers dark mode\" not \"User said they prefer dark mode and also use VS Code\"\n\n### Billing & Quota\nBoth tiers store memories permanently on Gnosis mainnet (E2E encrypted). Free tier is capped at 250 memories per month; Pro is capped at 1,500 memories per month. Reads are unlimited on both tiers. Do NOT guess or hardcode pricing or quota numbers \u2014 use totalreclaw_status to check exact usage, the current cap, and current pricing. For pricing details, refer users to https://totalreclaw.xyz/pricing\n\nWhen a totalreclaw_remember call fails with \"quota_exceeded\":\n1. Inform the user they've hit a usage limit\n2. Offer to check their usage with totalreclaw_status\n3. If they want to upgrade, use totalreclaw_upgrade to get a checkout link \u2014 upgrading is done right here through the agent\nDo NOT repeatedly attempt to store memories after a quota error.\n\nNote: 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.\n\n### Importing memories from other tools\nIf the user mentions migrating from Mem0, MCP Memory Server, or any other AI memory tool, offer to use totalreclaw_import_from. Start with dry_run=true to preview, then confirm before importing.\nAPI keys provided by the user are used only for the import and are never stored.\n\n### Agent-specific tips\n- If your agent supports background routines or scheduled tasks, set up a routine to call totalreclaw_remember after conversations to ensure nothing is missed.\n- If your agent supports a credential vault or secret store, the user's TOTALRECLAW_RECOVERY_PHRASE should be stored there instead of as a plaintext environment variable.\n- TotalReclaw memories are fully portable -- they work across OpenClaw, IronClaw, Claude Desktop, Cursor, NanoClaw, and any MCP-compatible agent.\n\n### User-controlled memory edits (v1)\nIn addition to remember + forget, three tools let the user correct stored memories without\nwiping the vault. Use these when the user says something like:\n- \"pin that\" / \"never forget this\" \u2192 totalreclaw_pin (preserves a fact across auto-resolution)\n- \"that was actually a directive, not a preference\" \u2192 totalreclaw_retype\n- \"that was work context\" / \"file that under personal\" \u2192 totalreclaw_set_scope\n\nAll three operate by supersession: they create a new claim with the override and link it\nback to the original via superseded_by. The original stays in the vault as a tombstone so\nhistory is inspectable. All three are idempotent (no-op if the target already matches).\n\n### End of Conversation\nWhen a substantive conversation is ending (the user says goodbye, the topic is resolved,\nor the conversation naturally concludes), call totalreclaw_debrief with the key takeaways.\n\nFocus on what individual memory storage missed:\n- What was the conversation about overall?\n- What was decided or resolved?\n- What approaches were tried and what was the outcome?\n- What's left unfinished?\n\nDo NOT debrief casual conversations (greetings, simple Q&A, small talk).\nMax 5 items, each 1-3 sentences, type \"summary\" or \"context\", importance 7-8.\n";
|
|
3
3
|
export declare const REMEMBER_TOOL_DESCRIPTION = "Store user info PROACTIVELY \u2014 don't wait for \"remember this\".\nINVOKE WHEN USER SAYS \"I prefer X\", \"I'm X\", \"I chose X because Y\"; reveals identity/location/job/family.\nNOT FOR: chitchat, passwords, generic knowledge.\nExtract ATOMIC. Good: \"User is vegan\". Bad: \"User said they became vegan, prefer organic\".\nPARAMS facts[]: text; importance 1-10 def 5; type claim|preference|directive|commitment|episode|summary; scope work|personal|health|family|creative|finance|misc|unspecified. Dedup auto.";
|
|
4
4
|
export declare const RECALL_TOOL_DESCRIPTION = "Search encrypted vault. Top 8 reranked by provenance+semantic+recency.\nINVOKE WHEN USER SAYS:\n- \"what's my [phone/address/doctor]\"\n- \"remember when I...\" / \"what did I say about...\"\n- \"do you know my...\" / \"my preferences for...\"\n- opens convo on a topic (auto-recall first msg)\nWHEN NOT TO USE: world knowledge, small talk.\nDOES: trapdoor search, decrypt, rerank BM25+cosine+source-provenance.\nPARAMS: query (5-15 words), k (def 8, max 50).\nDon't announce \"I found these memories\" \u2014 just use them.";
|
|
5
5
|
export declare const FORGET_TOOL_DESCRIPTION = "Permanently remove memory.\nINVOKE WHEN USER SAYS:\n- \"forget what I said about X\" / \"delete that fact\"\n- \"that's wrong/outdated \u2014 remove it\"\n- \"I don't want you remembering X\"\n- \"erase that password I pasted\"\nWHEN NOT TO USE:\n- CORRECTING \u2192 totalreclaw_remember (dedup auto)\n- changing mind (\"I prefer tea now\") \u2192 remember new pref\n- no explicit request \u2014 never forget proactively\nDOES: fact_id \u2192 tombstone. query \u2192 recall \u226450, tombstone all.\nPARAMS: fact_id (pref), query (max 50), scope (hint).";
|
|
6
6
|
export declare const EXPORT_TOOL_DESCRIPTION = "Export decrypted vault \u2014 one-click backup.\nINVOKE WHEN USER SAYS:\n- \"show everything you know about me\" / \"what do you have on me?\"\n- \"export / back up / download my memories\"\n- \"take my memory elsewhere\" / \"portable copy\"\n- \"audit what's stored\" / \"what's in my vault?\"\nWHEN NOT TO USE:\n- one thing \u2192 totalreclaw_recall\n- cleanup \u2192 totalreclaw_consolidate/forget\nDOES: decrypt all \u2192 Markdown or JSON. Surfaces v1 type/source/scope/reasoning.\nPARAMS: format, include_metadata.";
|
|
7
7
|
export declare const STATUS_TOOL_DESCRIPTION = "Check tier + usage + quota.\nINVOKE WHEN USER SAYS:\n- \"what tier am I on?\" / \"am I on free or pro?\"\n- \"how many memories have I stored?\" / \"what's my usage?\"\n- \"is my subscription active?\" / \"when does it expire?\"\n- \"am I close to the limit?\"\nDOES: query relay billing endpoint. Returns tier, writes_used/limit, expiry. Refreshes local billing cache. Call before bulk ops.\nWHEN NOT TO USE:\n- billing history/invoices \u2192 dashboard/support\n- wants to upgrade \u2192 totalreclaw_upgrade";
|
|
8
8
|
export declare const UPGRADE_TOOL_DESCRIPTION = "Stripe checkout URL for Pro (1,500 memories/month on Gnosis mainnet, permanent on-chain, LLM-guided dedup).\nINVOKE WHEN USER SAYS:\n- \"how do I upgrade?\" / \"I want to go pro\"\n- \"how much does it cost?\" (share pricing from checkout, don't hardcode)\n- after `quota_exceeded` \u2014 offer inline\n- \"raise my limit\" / \"I keep hitting the cap\"\nDOES: calls relay checkout, returns one-time Stripe URL.\nWHEN NOT TO USE:\n- user already Pro (check totalreclaw_status)\n- unrelated \u2014 don't volunteer upgrades";
|
|
9
|
-
export declare const
|
|
10
|
-
export declare const IMPORT_FROM_TOOL_DESCRIPTION = "Import from Mem0, MCP Memory, ChatGPT, Claude, Gemini, MemoClaw, JSON/CSV.\nINVOKE WHEN USER SAYS:\n- \"migrate memory from [Mem0/ChatGPT/Claude]\"\n- \"import my ChatGPT memories\" / \"here's my Mem0 export\"\n- \"I pasted my Claude memory \u2014 store it\"\nWHEN NOT TO USE: TotalReclaw backup \u2192 totalreclaw_import. Single fact \u2192 totalreclaw_remember.\nDOES: adapter parses+stores (unless dry_run). Fingerprint dedup. Convo sources return chunks for host LLM.\nALWAYS dry_run=true first \u2192 preview \u2192 confirm.";
|
|
9
|
+
export declare const IMPORT_FROM_TOOL_DESCRIPTION = "Import from Mem0, MCP Memory, ChatGPT, Claude, Gemini, JSON/CSV.\nINVOKE WHEN USER SAYS:\n- \"migrate memory from [Mem0/ChatGPT/Claude]\"\n- \"import my ChatGPT memories\" / \"here's my Mem0 export\"\n- \"I pasted my Claude memory \u2014 store it\"\nWHEN NOT TO USE: TotalReclaw backup \u2192 totalreclaw_import. Single fact \u2192 totalreclaw_remember.\nDOES: adapter parses+stores (unless dry_run). Fingerprint dedup. Convo sources return chunks for host LLM.\nALWAYS dry_run=true first \u2192 preview \u2192 confirm.";
|
|
11
10
|
export declare const IMPORT_TOOL_DESCRIPTION = "Restore from totalreclaw_export backup (JSON/Markdown).\nINVOKE WHEN USER SAYS:\n- \"restore memories from this backup\" / \"import this JSON\"\n- \"I exported from another TotalReclaw account\"\n- \"here's the Markdown export \u2014 put it back\"\nWHEN NOT TO USE:\n- Mem0/ChatGPT/Claude \u2192 totalreclaw_import_from\n- single fact \u2192 totalreclaw_remember\nDOES: parse JSON/Markdown (auto), store via totalreclaw_remember + fingerprint dedup.\nPARAMS: content (req), format, merge_strategy, validate_only.";
|
|
12
11
|
export declare const SUPPORT_TOOL_DESCRIPTION = "Support contact, docs, troubleshooting.\nINVOKE WHEN USER SAYS:\n- \"how do I get help?\" / \"who do I contact?\"\n- \"memories aren't loading\" / \"getting errors\"\n- \"lost my recovery phrase\" / \"where's the docs?\"\n- \"how do I report a bug?\"\n- asks: slow recall, quota errors, failed imports, missing post-upgrade memories\nDOES: static bundle (pre-filled email, docs URL, issues URL, troubleshooting table). Works unconfigured.\nWHEN NOT TO USE: billing info \u2192 totalreclaw_status. Skip unrelated questions.";
|
|
13
12
|
export declare const ACCOUNT_TOOL_DESCRIPTION = "Account overview: wallet, tier, usage, memories, features, safe recovery hint.\nINVOKE WHEN USER SAYS:\n- \"show my account\" / \"what's my profile?\"\n- \"how many memories?\" / \"my wallet?\"\n- \"right recovery phrase? hint\"\n- \"summary of my setup\"\nDOES: billing+fact count parallel. Returns wallet, tier, writes_used/limit, total_facts, features, FIRST+LAST recovery words (never full).\nWHEN NOT TO USE:\n- only billing \u2192 totalreclaw_status (lighter)\n- FULL recovery phrase \u2192 NEVER; password manager.";
|
package/dist/prompts.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../src/prompts.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,mBAAmB,
|
|
1
|
+
{"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../src/prompts.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,mBAAmB,8oOAwF/B,CAAC;AAGF,eAAO,MAAM,sBAAsB,8oOAAsB,CAAC;AAI1D,eAAO,MAAM,yBAAyB,ugBAIoJ,CAAC;AAE3L,eAAO,MAAM,uBAAuB,ihBASqB,CAAC;AAE1D,eAAO,MAAM,uBAAuB,8iBAWkB,CAAC;AAEvD,eAAO,MAAM,uBAAuB,6gBAUF,CAAC;AAEnC,eAAO,MAAM,uBAAuB,kgBASK,CAAC;AAE1C,eAAO,MAAM,wBAAwB,6gBASE,CAAC;AAExC,eAAO,MAAM,4BAA4B,4gBAOM,CAAC;AAEhD,eAAO,MAAM,uBAAuB,qgBAS0B,CAAC;AAE/D,eAAO,MAAM,wBAAwB,+gBAQyC,CAAC;AAE/E,eAAO,MAAM,wBAAwB,8gBASa,CAAC;AAEnD,eAAO,MAAM,qBAAqB,2xCAUgE,CAAC;AAInG,eAAO,MAAM,kBAAkB;;;;;;;;;GAqB9B,CAAC;AAEF,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,MAAM,EAClB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC5B,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,CAAC,CAqClE"}
|
package/dist/prompts.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
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.PAIR_TOOL_DESCRIPTION = exports.ACCOUNT_TOOL_DESCRIPTION = exports.SUPPORT_TOOL_DESCRIPTION = exports.IMPORT_TOOL_DESCRIPTION = exports.IMPORT_FROM_TOOL_DESCRIPTION = exports.
|
|
6
|
+
exports.PROMPT_DEFINITIONS = exports.PAIR_TOOL_DESCRIPTION = exports.ACCOUNT_TOOL_DESCRIPTION = exports.SUPPORT_TOOL_DESCRIPTION = 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;
|
|
7
7
|
exports.getPromptMessages = getPromptMessages;
|
|
8
8
|
exports.SERVER_INSTRUCTIONS = `
|
|
9
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."
|
|
@@ -62,7 +62,7 @@ Do NOT repeatedly attempt to store memories after a quota error.
|
|
|
62
62
|
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.
|
|
63
63
|
|
|
64
64
|
### Importing memories from other tools
|
|
65
|
-
If the user mentions migrating from Mem0, MCP Memory Server,
|
|
65
|
+
If the user mentions migrating from Mem0, MCP Memory Server, or any other AI memory tool, offer to use totalreclaw_import_from. Start with dry_run=true to preview, then confirm before importing.
|
|
66
66
|
API keys provided by the user are used only for the import and are never stored.
|
|
67
67
|
|
|
68
68
|
### Agent-specific tips
|
|
@@ -155,13 +155,7 @@ DOES: calls relay checkout, returns one-time Stripe URL.
|
|
|
155
155
|
WHEN NOT TO USE:
|
|
156
156
|
- user already Pro (check totalreclaw_status)
|
|
157
157
|
- unrelated — don't volunteer upgrades`;
|
|
158
|
-
|
|
159
|
-
// Kept temporarily so existing migrate.ts tool registration doesn't break the
|
|
160
|
-
// TypeScript build. To be removed when ops-3 lands (deprecates totalreclaw_migrate).
|
|
161
|
-
exports.MIGRATE_TOOL_DESCRIPTION = `[DEPRECATED] Cross-chain migration is no longer needed — all tiers store on Gnosis mainnet. This tool will be removed in the next release (see ops-3 / PR #240).
|
|
162
|
-
INVOKE WHEN: never. Single-chain Gnosis means there is nothing to migrate from.
|
|
163
|
-
WHEN NOT TO USE: always. Tell the user this is a legacy tool kept temporarily for build stability; their memories are already on Gnosis.`;
|
|
164
|
-
exports.IMPORT_FROM_TOOL_DESCRIPTION = `Import from Mem0, MCP Memory, ChatGPT, Claude, Gemini, MemoClaw, JSON/CSV.
|
|
158
|
+
exports.IMPORT_FROM_TOOL_DESCRIPTION = `Import from Mem0, MCP Memory, ChatGPT, Claude, Gemini, JSON/CSV.
|
|
165
159
|
INVOKE WHEN USER SAYS:
|
|
166
160
|
- "migrate memory from [Mem0/ChatGPT/Claude]"
|
|
167
161
|
- "import my ChatGPT memories" / "here's my Mem0 export"
|
package/dist/prompts.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompts.js","sourceRoot":"","sources":["../src/prompts.ts"],"names":[],"mappings":";AAAA,iFAAiF;AACjF,iFAAiF;AACjF,gFAAgF;;;
|
|
1
|
+
{"version":3,"file":"prompts.js","sourceRoot":"","sources":["../src/prompts.ts"],"names":[],"mappings":";AAAA,iFA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A6B;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"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP server construction + request-handler wiring for TotalReclaw.
|
|
3
|
+
*
|
|
4
|
+
* `index.ts` owns the storage-mode state (subgraph keys / self-hosted client)
|
|
5
|
+
* and the concrete tool handlers; this module owns the plumbing that connects
|
|
6
|
+
* an `@modelcontextprotocol/sdk` `Server` to that logic:
|
|
7
|
+
* - ListTools → the single `TOOL_MANIFEST`.
|
|
8
|
+
* - CallTool → the injected dispatch router (see `dispatch.ts`).
|
|
9
|
+
* - Resources → the memory-context resource (self-hosted only).
|
|
10
|
+
* - Prompts → the instruction + auto-memory prompt fallbacks.
|
|
11
|
+
* - Cache wiring → invalidate the memory-context cache on remember/mutate.
|
|
12
|
+
*
|
|
13
|
+
* Keeping this out of `index.ts` lets the entry point read as composition:
|
|
14
|
+
* resolve config → build handlers → wire the server → connect the transport.
|
|
15
|
+
*/
|
|
16
|
+
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
17
|
+
import type { TotalReclaw } from '@totalreclaw/client';
|
|
18
|
+
import type { ToolResponse } from './tools/types.js';
|
|
19
|
+
/** Dependencies the server wiring needs from the entry point. */
|
|
20
|
+
export interface ServerSetupDeps {
|
|
21
|
+
/** CallTool router built by `createCallToolHandler` in `index.ts`. */
|
|
22
|
+
callTool: (name: string, args: unknown) => Promise<ToolResponse>;
|
|
23
|
+
/** True when running against the managed service (subgraph) — no resource reads. */
|
|
24
|
+
isManagedMode: () => boolean;
|
|
25
|
+
/** Lazily build/return the self-hosted client (resource reads only). */
|
|
26
|
+
getClient: () => Promise<TotalReclaw>;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Construct the MCP `Server` and register every request handler + the
|
|
30
|
+
* remember-triggered cache invalidation. Returns the server so the caller can
|
|
31
|
+
* `connect()` a transport and read `getClientVersion()` for client-id
|
|
32
|
+
* resolution.
|
|
33
|
+
*/
|
|
34
|
+
export declare function createTotalReclawServer(deps: ServerSetupDeps): Server;
|
|
35
|
+
//# sourceMappingURL=server-setup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server-setup.d.ts","sourceRoot":"","sources":["../src/server-setup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AAWnE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAUrD,iEAAiE;AACjE,MAAM,WAAW,eAAe;IAC9B,sEAAsE;IACtE,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,KAAK,OAAO,CAAC,YAAY,CAAC,CAAC;IACjE,oFAAoF;IACpF,aAAa,EAAE,MAAM,OAAO,CAAC;IAC7B,wEAAwE;IACxE,SAAS,EAAE,MAAM,OAAO,CAAC,WAAW,CAAC,CAAC;CACvC;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,eAAe,GAAG,MAAM,CAoFrE"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* MCP server construction + request-handler wiring for TotalReclaw.
|
|
4
|
+
*
|
|
5
|
+
* `index.ts` owns the storage-mode state (subgraph keys / self-hosted client)
|
|
6
|
+
* and the concrete tool handlers; this module owns the plumbing that connects
|
|
7
|
+
* an `@modelcontextprotocol/sdk` `Server` to that logic:
|
|
8
|
+
* - ListTools → the single `TOOL_MANIFEST`.
|
|
9
|
+
* - CallTool → the injected dispatch router (see `dispatch.ts`).
|
|
10
|
+
* - Resources → the memory-context resource (self-hosted only).
|
|
11
|
+
* - Prompts → the instruction + auto-memory prompt fallbacks.
|
|
12
|
+
* - Cache wiring → invalidate the memory-context cache on remember/mutate.
|
|
13
|
+
*
|
|
14
|
+
* Keeping this out of `index.ts` lets the entry point read as composition:
|
|
15
|
+
* resolve config → build handlers → wire the server → connect the transport.
|
|
16
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.createTotalReclawServer = createTotalReclawServer;
|
|
19
|
+
const index_js_1 = require("@modelcontextprotocol/sdk/server/index.js");
|
|
20
|
+
const types_js_1 = require("@modelcontextprotocol/sdk/types.js");
|
|
21
|
+
const dispatch_js_1 = require("./dispatch.js");
|
|
22
|
+
const prompts_js_1 = require("./prompts.js");
|
|
23
|
+
const index_js_2 = require("./resources/index.js");
|
|
24
|
+
const remember_js_1 = require("./tools/remember.js");
|
|
25
|
+
/**
|
|
26
|
+
* Construct the MCP `Server` and register every request handler + the
|
|
27
|
+
* remember-triggered cache invalidation. Returns the server so the caller can
|
|
28
|
+
* `connect()` a transport and read `getClientVersion()` for client-id
|
|
29
|
+
* resolution.
|
|
30
|
+
*/
|
|
31
|
+
function createTotalReclawServer(deps) {
|
|
32
|
+
const server = new index_js_1.Server({ name: 'totalreclaw', version: '1.0.0' }, {
|
|
33
|
+
capabilities: {
|
|
34
|
+
tools: {},
|
|
35
|
+
prompts: {},
|
|
36
|
+
resources: { subscribe: true, listChanged: true },
|
|
37
|
+
},
|
|
38
|
+
instructions: prompts_js_1.SERVER_INSTRUCTIONS,
|
|
39
|
+
});
|
|
40
|
+
// When facts are stored, invalidate the memory-context resource cache and
|
|
41
|
+
// notify subscribed clients that the resource has changed.
|
|
42
|
+
(0, remember_js_1.setOnRememberCallback)(() => {
|
|
43
|
+
(0, index_js_2.invalidateMemoryContextCache)();
|
|
44
|
+
server
|
|
45
|
+
.sendResourceUpdated({ uri: index_js_2.memoryContextResource.uri })
|
|
46
|
+
.catch((err) => console.error('Failed to send resource update:', err));
|
|
47
|
+
});
|
|
48
|
+
// ── Tools ──────────────────────────────────────────────────────────────
|
|
49
|
+
server.setRequestHandler(types_js_1.ListToolsRequestSchema, async () => ({ tools: dispatch_js_1.TOOL_MANIFEST }));
|
|
50
|
+
server.setRequestHandler(types_js_1.CallToolRequestSchema, async (request) => {
|
|
51
|
+
const { name, arguments: args } = request.params;
|
|
52
|
+
// Handlers type `content[].type` as `string`; at runtime it is always a
|
|
53
|
+
// valid content-block type (`"text"`). The cast reconciles that widening
|
|
54
|
+
// with the SDK's stricter `CallToolResult` without changing behaviour.
|
|
55
|
+
return (await deps.callTool(name, args));
|
|
56
|
+
});
|
|
57
|
+
// ── Resources ──────────────────────────────────────────────────────────
|
|
58
|
+
server.setRequestHandler(types_js_1.ListResourcesRequestSchema, async () => ({
|
|
59
|
+
resources: [index_js_2.memoryContextResource],
|
|
60
|
+
}));
|
|
61
|
+
server.setRequestHandler(types_js_1.ReadResourceRequestSchema, async (request) => {
|
|
62
|
+
const { uri } = request.params;
|
|
63
|
+
if (uri === index_js_2.memoryContextResource.uri) {
|
|
64
|
+
// The managed service does not support resource reads yet.
|
|
65
|
+
if (deps.isManagedMode()) {
|
|
66
|
+
return {
|
|
67
|
+
contents: [
|
|
68
|
+
{
|
|
69
|
+
uri: index_js_2.memoryContextResource.uri,
|
|
70
|
+
mimeType: 'text/markdown',
|
|
71
|
+
text: '*Memory context resource is not available with the managed service. Use totalreclaw_recall to search memories.*',
|
|
72
|
+
},
|
|
73
|
+
],
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
const client = await deps.getClient();
|
|
77
|
+
const content = await (0, index_js_2.readMemoryContext)(client);
|
|
78
|
+
return {
|
|
79
|
+
contents: [
|
|
80
|
+
{ uri: index_js_2.memoryContextResource.uri, mimeType: 'text/markdown', text: content },
|
|
81
|
+
],
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
throw new Error(`Unknown resource: ${uri}`);
|
|
85
|
+
});
|
|
86
|
+
// ── Prompts ────────────────────────────────────────────────────────────
|
|
87
|
+
server.setRequestHandler(types_js_1.ListPromptsRequestSchema, async () => ({
|
|
88
|
+
prompts: [
|
|
89
|
+
// Legacy instructions prompt (backward compat)
|
|
90
|
+
{ name: 'totalreclaw_instructions', description: 'Instructions for using TotalReclaw tools' },
|
|
91
|
+
// Auto-memory prompt fallbacks
|
|
92
|
+
...prompts_js_1.PROMPT_DEFINITIONS,
|
|
93
|
+
],
|
|
94
|
+
}));
|
|
95
|
+
server.setRequestHandler(types_js_1.GetPromptRequestSchema, async (request) => {
|
|
96
|
+
const { name, arguments: args } = request.params;
|
|
97
|
+
const messages = (0, prompts_js_1.getPromptMessages)(name, args);
|
|
98
|
+
return { messages };
|
|
99
|
+
});
|
|
100
|
+
return server;
|
|
101
|
+
}
|
|
102
|
+
//# sourceMappingURL=server-setup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server-setup.js","sourceRoot":"","sources":["../src/server-setup.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;AAwCH,0D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B,CAAC,iCAAsB,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;QACjE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC;QACjD,MAAM,QAAQ,GAAG,IAAA,8BAAiB,EAAC,IAAI,EAAE,IAA0C,CAAC,CAAC;QACrF,OAAO,EAAE,QAAQ,EAAE,CAAC;IACtB,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TotalReclaw MCP — `derived-bundle-v1` credential bundle (Option E Phase 2 /
|
|
3
|
+
* #581, P2-13 — the MCP adapter).
|
|
4
|
+
*
|
|
5
|
+
* A bundle is what an agent host holds *instead of* the BIP-39 recovery
|
|
6
|
+
* phrase: the four HKDF-derived vault-global working keys plus a signing
|
|
7
|
+
* key, but never the phrase or the 64-byte seed that reproduces it. See
|
|
8
|
+
* `docs/specs/totalreclaw/client-consistency.md` ("Credential Material") for
|
|
9
|
+
* the full cross-client contract this file implements.
|
|
10
|
+
*
|
|
11
|
+
* Shared-core-first (CLAUDE.md): every byte of derivation, parsing, and
|
|
12
|
+
* validation lives in `rust/totalreclaw-core/src/bundle.rs` and crosses into
|
|
13
|
+
* TS only via the `@totalreclaw/core` WASM bindings (`parseBundleV1`,
|
|
14
|
+
* `validateBundleV1`, `deriveBundleFromMnemonic`). This module is a THIN
|
|
15
|
+
* adapter: it types the wire shape, calls the WASM binding, and converts hex
|
|
16
|
+
* fields to `Buffer` where the rest of the MCP codebase expects buffers. It
|
|
17
|
+
* does not reimplement HKDF, hex validation, or any §4.7 invariant — the
|
|
18
|
+
* mnemonic-mode `deriveKeys`/`deriveLshSeed` in `subgraph/crypto.ts` are the
|
|
19
|
+
* pattern followed here: WASM-backed wrappers, no local crypto.
|
|
20
|
+
*
|
|
21
|
+
* Mirrors `python/src/totalreclaw/bundle.py`'s shape (frozen dataclasses,
|
|
22
|
+
* zero logic) as closely as TS allows.
|
|
23
|
+
*
|
|
24
|
+
* **Dependency note / feature detection (release gate).** As of this
|
|
25
|
+
* writing, no published `@totalreclaw/core` npm release exposes
|
|
26
|
+
* `parseBundleV1` / `validateBundleV1` / `deriveBundleFromMnemonic` (checked:
|
|
27
|
+
* latest dist-tag 2.6.0-rc.1 does not carry them). Because this package's
|
|
28
|
+
* `package.json` dependency range (`^2.5.3`) is satisfied by versions that
|
|
29
|
+
* lack the bindings, this module CANNOT assume `require('@totalreclaw/core')`
|
|
30
|
+
* exposes them — doing so (e.g. `as typeof import('@totalreclaw/core')`)
|
|
31
|
+
* would type-check locally against a hand-built WASM copy but fail `tsc`
|
|
32
|
+
* against the real, published dependency in CI, which is exactly what
|
|
33
|
+
* happened on the first revision of this file (see PR #618 review history).
|
|
34
|
+
*
|
|
35
|
+
* So every bundle-touching WASM call routes through `ensureBundleBindings()`,
|
|
36
|
+
* which feature-detects the three functions at runtime and throws a single,
|
|
37
|
+
* actionable error if they're absent — never a TS compile-time assumption
|
|
38
|
+
* about what the installed package exports. **Mnemonic-mode code paths never
|
|
39
|
+
* call anything in this file that touches `wasm.*`** (`bundleVaultToBuffers`
|
|
40
|
+
* and `redactedBundleSummary` are pure functions over an already-parsed
|
|
41
|
+
* bundle and need no core binding), so a host running the published
|
|
42
|
+
* dependency with no bundle bindings is completely unaffected until it
|
|
43
|
+
* actually encounters a `version: 2` credentials.json — at which point it
|
|
44
|
+
* gets the actionable upgrade error instead of a silent misconfiguration.
|
|
45
|
+
*/
|
|
46
|
+
/** The four HKDF-derived vault-global working keys, hex-encoded (64 chars, no `0x`). */
|
|
47
|
+
export interface BundleVaultHex {
|
|
48
|
+
encryption_key: string;
|
|
49
|
+
dedup_key: string;
|
|
50
|
+
auth_key: string;
|
|
51
|
+
lsh_seed: string;
|
|
52
|
+
}
|
|
53
|
+
export interface BundleSigningOwnerEoa {
|
|
54
|
+
kind: 'owner-eoa';
|
|
55
|
+
private_key: string;
|
|
56
|
+
address: string;
|
|
57
|
+
}
|
|
58
|
+
export interface BundleSigningSessionKey {
|
|
59
|
+
kind: 'session-key';
|
|
60
|
+
private_key: string;
|
|
61
|
+
address: string;
|
|
62
|
+
grant: unknown;
|
|
63
|
+
}
|
|
64
|
+
export type BundleSigning = BundleSigningOwnerEoa | BundleSigningSessionKey;
|
|
65
|
+
export interface BundleAccountRef {
|
|
66
|
+
smart_account: string;
|
|
67
|
+
chain_id: number;
|
|
68
|
+
}
|
|
69
|
+
/** A fully parsed + `parse_bundle_v1`-validated `derived-bundle-v1` bundle. */
|
|
70
|
+
export interface DerivedBundleV1 {
|
|
71
|
+
vault: BundleVaultHex;
|
|
72
|
+
signing: BundleSigning;
|
|
73
|
+
account: BundleAccountRef;
|
|
74
|
+
provisioned_at: string;
|
|
75
|
+
provisioned_by: string;
|
|
76
|
+
}
|
|
77
|
+
/** True iff the installed `@totalreclaw/core` exposes all three bundle
|
|
78
|
+
* bindings. Never throws. */
|
|
79
|
+
export declare function hasBundleBindings(): boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Parse and fully validate a `derived-bundle-v1` JSON string.
|
|
82
|
+
*
|
|
83
|
+
* Runs every §4.7 invariant inside `totalreclaw-core::bundle::parse_bundle_v1`
|
|
84
|
+
* (wrong version/schema, malformed hex, unknown `signing.kind`, an
|
|
85
|
+
* `owner-eoa` bundle carrying a `grant`, a `session-key` bundle with an
|
|
86
|
+
* inconsistent `grant`, `signing.address` not matching `address(private_key)`,
|
|
87
|
+
* …). Throws a plain `Error` — never a silent downgrade — on any violation.
|
|
88
|
+
*
|
|
89
|
+
* The thrown error's message is core's own message, which never contains
|
|
90
|
+
* hex key material (core's validation errors describe *shape* violations,
|
|
91
|
+
* not values).
|
|
92
|
+
*
|
|
93
|
+
* Throws `ensureBundleBindings()`'s actionable upgrade error if the
|
|
94
|
+
* installed `@totalreclaw/core` lacks the bundle bindings — checked BEFORE
|
|
95
|
+
* any attempt to call into the WASM module.
|
|
96
|
+
*/
|
|
97
|
+
export declare function parseBundleV1(json: string): DerivedBundleV1;
|
|
98
|
+
/**
|
|
99
|
+
* Validate a `derived-bundle-v1` JSON string without returning the parsed
|
|
100
|
+
* object. Throws on any violation; no-op on success.
|
|
101
|
+
*/
|
|
102
|
+
export declare function validateBundleV1(json: string): void;
|
|
103
|
+
/**
|
|
104
|
+
* Derive a `derived-bundle-v1` bundle from a BIP-39 mnemonic.
|
|
105
|
+
*
|
|
106
|
+
* NOT part of MCP's read-side credential-loading scope (P2-13) — MCP never
|
|
107
|
+
* derives a bundle from a mnemonic on its own initiative; that is Hermes's
|
|
108
|
+
* `local-migration` job (P2-9) or the SPA's `provisioned_by: "spa"` job.
|
|
109
|
+
* Exported anyway because the test fixtures (parity + pair-bundle tests)
|
|
110
|
+
* need a way to mint a bundle for `parseBundleV1` round-trip coverage
|
|
111
|
+
* without hand-rolling JSON, and because a future MCP-side migration tool
|
|
112
|
+
* (tracked as a known gap — see mcp/README.md) will need exactly this call.
|
|
113
|
+
*/
|
|
114
|
+
export declare function deriveBundleFromMnemonic(mnemonic: string, chainId: number, provisionedBy: string, smartAccount: string): string;
|
|
115
|
+
export interface BundleVaultBuffers {
|
|
116
|
+
encryptionKey: Buffer;
|
|
117
|
+
dedupKey: Buffer;
|
|
118
|
+
authKey: Buffer;
|
|
119
|
+
lshSeed: Buffer;
|
|
120
|
+
}
|
|
121
|
+
/** Convert a parsed bundle's hex vault keys to `Buffer`s. */
|
|
122
|
+
export declare function bundleVaultToBuffers(bundle: DerivedBundleV1): BundleVaultBuffers;
|
|
123
|
+
/**
|
|
124
|
+
* A safe-to-log summary of a bundle: everything EXCEPT `vault.*` and
|
|
125
|
+
* `signing.private_key`. Use this (never the raw bundle object) in any
|
|
126
|
+
* `console.error` / log line that touches a bundle.
|
|
127
|
+
*/
|
|
128
|
+
export declare function redactedBundleSummary(bundle: DerivedBundleV1): Record<string, unknown>;
|
|
129
|
+
//# sourceMappingURL=bundle.d.ts.map
|
|
@@ -0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