@oobe-protocol-labs/sap-mcp-server 0.9.21 → 0.9.35

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.
Files changed (190) hide show
  1. package/.env.example +11 -1
  2. package/CHANGELOG.md +233 -6
  3. package/README.md +3 -3
  4. package/USER_DOCS/00_START_HERE.md +9 -1
  5. package/USER_DOCS/01_HOSTED_REMOTE_MCP.md +1 -1
  6. package/USER_DOCS/04_CLIENT_CONFIGS.md +3 -3
  7. package/USER_DOCS/06_DESKTOP_GUI_WIZARD.md +5 -5
  8. package/config.example.json +1 -1
  9. package/config.secure-example.json +1 -1
  10. package/dist/config/env.d.ts +18 -0
  11. package/dist/config/env.d.ts.map +1 -1
  12. package/dist/config/env.js +14 -2
  13. package/dist/config/env.js.map +1 -1
  14. package/dist/config/mcp-client-injection.js +3 -3
  15. package/dist/config/paths.d.ts +9 -1
  16. package/dist/config/paths.d.ts.map +1 -1
  17. package/dist/config/paths.js +15 -1
  18. package/dist/config/paths.js.map +1 -1
  19. package/dist/config/wizard.d.ts.map +1 -1
  20. package/dist/config/wizard.js +3 -1
  21. package/dist/config/wizard.js.map +1 -1
  22. package/dist/core/constants.d.ts +1 -1
  23. package/dist/core/constants.js +1 -1
  24. package/dist/core/logger.js +1 -1
  25. package/dist/memory/async-processor.d.ts +107 -0
  26. package/dist/memory/async-processor.d.ts.map +1 -0
  27. package/dist/memory/async-processor.js +204 -0
  28. package/dist/memory/async-processor.js.map +1 -0
  29. package/dist/memory/auto-record.d.ts +47 -0
  30. package/dist/memory/auto-record.d.ts.map +1 -0
  31. package/dist/memory/auto-record.js +133 -0
  32. package/dist/memory/auto-record.js.map +1 -0
  33. package/dist/memory/database.d.ts +103 -0
  34. package/dist/memory/database.d.ts.map +1 -0
  35. package/dist/memory/database.js +337 -0
  36. package/dist/memory/database.js.map +1 -0
  37. package/dist/memory/hermes-bridge.d.ts +70 -0
  38. package/dist/memory/hermes-bridge.d.ts.map +1 -0
  39. package/dist/memory/hermes-bridge.js +155 -0
  40. package/dist/memory/hermes-bridge.js.map +1 -0
  41. package/dist/memory/index.d.ts +23 -0
  42. package/dist/memory/index.d.ts.map +1 -0
  43. package/dist/memory/index.js +22 -0
  44. package/dist/memory/index.js.map +1 -0
  45. package/dist/memory/memory-store.d.ts +76 -0
  46. package/dist/memory/memory-store.d.ts.map +1 -0
  47. package/dist/memory/memory-store.js +231 -0
  48. package/dist/memory/memory-store.js.map +1 -0
  49. package/dist/memory/stream-buffer-store.d.ts +69 -0
  50. package/dist/memory/stream-buffer-store.d.ts.map +1 -0
  51. package/dist/memory/stream-buffer-store.js +182 -0
  52. package/dist/memory/stream-buffer-store.js.map +1 -0
  53. package/dist/memory/tool-call-store.d.ts +68 -0
  54. package/dist/memory/tool-call-store.d.ts.map +1 -0
  55. package/dist/memory/tool-call-store.js +189 -0
  56. package/dist/memory/tool-call-store.js.map +1 -0
  57. package/dist/memory/types.d.ts +197 -0
  58. package/dist/memory/types.d.ts.map +1 -0
  59. package/dist/memory/types.js +15 -0
  60. package/dist/memory/types.js.map +1 -0
  61. package/dist/memory/utils.d.ts +30 -0
  62. package/dist/memory/utils.d.ts.map +1 -0
  63. package/dist/memory/utils.js +47 -0
  64. package/dist/memory/utils.js.map +1 -0
  65. package/dist/payments/hosted-tool-eligibility.d.ts.map +1 -1
  66. package/dist/payments/hosted-tool-eligibility.js +4 -6
  67. package/dist/payments/hosted-tool-eligibility.js.map +1 -1
  68. package/dist/payments/monetization-gate.d.ts +39 -0
  69. package/dist/payments/monetization-gate.d.ts.map +1 -1
  70. package/dist/payments/monetization-gate.js +165 -11
  71. package/dist/payments/monetization-gate.js.map +1 -1
  72. package/dist/payments/pricing.d.ts.map +1 -1
  73. package/dist/payments/pricing.js +69 -0
  74. package/dist/payments/pricing.js.map +1 -1
  75. package/dist/payments/x402-paid-call.js +1 -1
  76. package/dist/premium/builtin-plugins.d.ts +42 -0
  77. package/dist/premium/builtin-plugins.d.ts.map +1 -1
  78. package/dist/premium/builtin-plugins.js +91 -10
  79. package/dist/premium/builtin-plugins.js.map +1 -1
  80. package/dist/premium/manifest-builder.d.ts.map +1 -1
  81. package/dist/premium/manifest-builder.js +43 -7
  82. package/dist/premium/manifest-builder.js.map +1 -1
  83. package/dist/premium/meme-radar-capabilities.js +9 -9
  84. package/dist/premium/meme-radar-capabilities.js.map +1 -1
  85. package/dist/premium/plugin-validator.d.ts.map +1 -1
  86. package/dist/premium/plugin-validator.js +62 -1
  87. package/dist/premium/plugin-validator.js.map +1 -1
  88. package/dist/premium/provider-bridge.d.ts +25 -1
  89. package/dist/premium/provider-bridge.d.ts.map +1 -1
  90. package/dist/premium/provider-bridge.js +130 -20
  91. package/dist/premium/provider-bridge.js.map +1 -1
  92. package/dist/premium/session-manager.d.ts.map +1 -1
  93. package/dist/premium/session-manager.js +12 -3
  94. package/dist/premium/session-manager.js.map +1 -1
  95. package/dist/premium/tech-fundamentals-capabilities.js +5 -5
  96. package/dist/premium/tech-fundamentals-capabilities.js.map +1 -1
  97. package/dist/premium/trading-capabilities.js +5 -5
  98. package/dist/premium/trading-capabilities.js.map +1 -1
  99. package/dist/premium/webhook-engine.d.ts.map +1 -1
  100. package/dist/premium/webhook-engine.js +7 -1
  101. package/dist/premium/webhook-engine.js.map +1 -1
  102. package/dist/prompts/context/sap-agent-context.prompt.js +1 -1
  103. package/dist/prompts/payments/explain-x402-settlement.prompt.js +1 -1
  104. package/dist/remote/premium-routes.d.ts.map +1 -1
  105. package/dist/remote/premium-routes.js +3 -2
  106. package/dist/remote/premium-routes.js.map +1 -1
  107. package/dist/remote/public-home/sections.d.ts.map +1 -1
  108. package/dist/remote/public-home/sections.js +2 -3
  109. package/dist/remote/public-home/sections.js.map +1 -1
  110. package/dist/remote/public-home/styles.d.ts +1 -1
  111. package/dist/remote/public-home/styles.js +2 -2
  112. package/dist/remote/server.d.ts.map +1 -1
  113. package/dist/remote/server.js +19 -4
  114. package/dist/remote/server.js.map +1 -1
  115. package/dist/server/server-metadata.js +1 -1
  116. package/dist/strategies/strategy-store.d.ts +82 -0
  117. package/dist/strategies/strategy-store.d.ts.map +1 -0
  118. package/dist/strategies/strategy-store.js +165 -0
  119. package/dist/strategies/strategy-store.js.map +1 -0
  120. package/dist/tools/agent-start-tool.d.ts.map +1 -1
  121. package/dist/tools/agent-start-tool.js +97 -10
  122. package/dist/tools/agent-start-tool.js.map +1 -1
  123. package/dist/tools/client-sdk-tools.d.ts.map +1 -1
  124. package/dist/tools/client-sdk-tools.js +152 -9
  125. package/dist/tools/client-sdk-tools.js.map +1 -1
  126. package/dist/tools/estimate-tool-cost.js +1 -1
  127. package/dist/tools/estimate-tool-cost.js.map +1 -1
  128. package/dist/tools/index.d.ts +1 -0
  129. package/dist/tools/index.d.ts.map +1 -1
  130. package/dist/tools/index.js +2 -0
  131. package/dist/tools/index.js.map +1 -1
  132. package/dist/tools/magicblock-tools.js +5 -5
  133. package/dist/tools/magicblock-tools.js.map +1 -1
  134. package/dist/tools/memory-tools.d.ts +26 -0
  135. package/dist/tools/memory-tools.d.ts.map +1 -0
  136. package/dist/tools/memory-tools.js +533 -0
  137. package/dist/tools/memory-tools.js.map +1 -0
  138. package/dist/tools/perp-tools.d.ts +7 -9
  139. package/dist/tools/perp-tools.d.ts.map +1 -1
  140. package/dist/tools/perp-tools.js +386 -367
  141. package/dist/tools/perp-tools.js.map +1 -1
  142. package/dist/tools/premium-tools.d.ts.map +1 -1
  143. package/dist/tools/premium-tools.js +8 -2
  144. package/dist/tools/premium-tools.js.map +1 -1
  145. package/dist/tools/profile-tools.d.ts.map +1 -1
  146. package/dist/tools/profile-tools.js +18 -1
  147. package/dist/tools/profile-tools.js.map +1 -1
  148. package/dist/tools/quick-context-tool.d.ts.map +1 -1
  149. package/dist/tools/quick-context-tool.js +100 -9
  150. package/dist/tools/quick-context-tool.js.map +1 -1
  151. package/dist/tools/register-tools.d.ts.map +1 -1
  152. package/dist/tools/register-tools.js +3 -0
  153. package/dist/tools/register-tools.js.map +1 -1
  154. package/dist/tools/sap-sdk-tools.js +3 -3
  155. package/dist/tools/sap-sdk-tools.js.map +1 -1
  156. package/dist/tools/session-context-packet.d.ts +19 -0
  157. package/dist/tools/session-context-packet.d.ts.map +1 -0
  158. package/dist/tools/session-context-packet.js +256 -0
  159. package/dist/tools/session-context-packet.js.map +1 -0
  160. package/dist/tools/skills-tools.d.ts +10 -0
  161. package/dist/tools/skills-tools.d.ts.map +1 -1
  162. package/dist/tools/skills-tools.js +19 -0
  163. package/dist/tools/skills-tools.js.map +1 -1
  164. package/dist/tools/transaction-tools.d.ts +1 -0
  165. package/dist/tools/transaction-tools.d.ts.map +1 -1
  166. package/dist/tools/transaction-tools.js +248 -9
  167. package/dist/tools/transaction-tools.js.map +1 -1
  168. package/dist/tools/x402-paid-call-tool.d.ts.map +1 -1
  169. package/dist/tools/x402-paid-call-tool.js +55 -21
  170. package/dist/tools/x402-paid-call-tool.js.map +1 -1
  171. package/dist/wizard-core/desktop-flow.d.ts.map +1 -1
  172. package/dist/wizard-core/desktop-flow.js +4 -2
  173. package/dist/wizard-core/desktop-flow.js.map +1 -1
  174. package/docs/06_PAYMENTS_X402_AND_PAYSH.md +14 -5
  175. package/docs/07_ENDPOINTS_AND_CLIENTS.md +1 -1
  176. package/docs/09_TOOLS_SKILLS_AND_AGENT_GUIDE.md +13 -5
  177. package/docs/13_BOUNTY_PROGRAM_PROPOSAL.md +1 -1
  178. package/docs/14_DESKTOP_WIZARD_RELEASE.md +3 -3
  179. package/docs/15_DASHBOARD_SCREENSHARE_SCRIPT.md +1 -1
  180. package/docs/BRANCH_AND_CI.md +2 -2
  181. package/docs/README.md +1 -1
  182. package/package.json +3 -1
  183. package/server.json +3 -3
  184. package/skills/README.md +1 -1
  185. package/skills/sap-agentkit/SKILL.md +1 -2
  186. package/skills/sap-defi/SKILL.md +31 -2
  187. package/skills/sap-mcp/SKILL.md +24 -13
  188. package/skills/sap-mcp/TOOL_REFERENCE.md +2 -4
  189. package/skills/sap-payments-x402/SKILL.md +15 -3
  190. package/assets/logos/drift.svg +0 -12
@@ -0,0 +1,533 @@
1
+ /**
2
+ * @module memory-tools
3
+ * @description MCP tools for the local agent memory subsystem.
4
+ *
5
+ * All 17 tools are FREE (no x402 charge) and operate entirely on the local
6
+ * SQLite database at ~/.config/mcp-sap/memory/agent-memory.db. No data
7
+ * leaves the user's machine.
8
+ *
9
+ * Categories:
10
+ * - Memory recording & search (5 tools): sap_memory_record, sap_memory_search,
11
+ * sap_memory_summarize, sap_memory_recall, sap_memory_prune
12
+ * - Strategy management (4 tools): sap_strategy_save, sap_strategy_load,
13
+ * sap_strategy_list, sap_strategy_activate
14
+ * - Stream buffering (3 tools): sap_stream_buffer, sap_stream_consume,
15
+ * sap_stream_replay
16
+ * - Audit trail (3 tools): sap_audit_query, sap_audit_record, sap_audit_stats
17
+ */
18
+ import { registerTool } from '../adapters/mcp/sdk-compat.js';
19
+ import { createTextResponse } from '../adapters/mcp/tool-response.js';
20
+ import { toolCallStore, memoryStore, streamBufferStore, memoryDatabase, hermesBridge } from '../memory/index.js';
21
+ /**
22
+ * @name registerMemoryTools
23
+ * @description Registers all 17 local memory/strategy/stream/audit MCP tools.
24
+ * All tools are free, local-only, and require no x402 payment.
25
+ */
26
+ export function registerMemoryTools(server, _context) {
27
+ registerMemoryRecordTool(server);
28
+ registerMemorySearchTool(server);
29
+ registerMemorySummarizeTool(server);
30
+ registerMemoryRecallTool(server);
31
+ registerMemoryPruneTool(server);
32
+ registerStrategySaveTool(server);
33
+ registerStrategyLoadTool(server);
34
+ registerStrategyListTool(server);
35
+ registerStrategyActivateTool(server);
36
+ registerStreamBufferTool(server);
37
+ registerStreamConsumeTool(server);
38
+ registerStreamReplayTool(server);
39
+ registerAuditQueryTool(server);
40
+ registerAuditRecordTool(server);
41
+ registerAuditStatsTool(server);
42
+ registerHermesSearchTool(server);
43
+ registerHermesRecentTool(server);
44
+ }
45
+ // ── Memory Recording & Search ──────────────────────────────────────────────
46
+ function registerMemoryRecordTool(server) {
47
+ registerTool(server, 'sap_memory_record', {
48
+ title: 'Record Tool Call',
49
+ description: 'Free local tool. Records a tool call execution in the agent memory database (SQLite FTS5). Auto-call after any paid or significant tool call to build searchable history. No x402 charge.',
50
+ inputSchema: {
51
+ type: 'object',
52
+ properties: {
53
+ toolName: { type: 'string', description: 'MCP tool name that was called.' },
54
+ sessionId: { type: 'string', description: 'Optional session identifier.' },
55
+ callerProfile: { type: 'string', description: 'Optional signer profile used.' },
56
+ input: { type: 'string', description: 'JSON-serialized tool input.' },
57
+ output: { type: 'string', description: 'JSON-serialized tool output (truncated to 8KB).' },
58
+ outcome: { type: 'string', enum: ['success', 'error', 'partial'], description: 'Execution outcome.' },
59
+ costUsd: { type: 'number', description: 'x402 cost in USD if the tool was paid.' },
60
+ txSignature: { type: 'string', description: 'Solana transaction signature if applicable.' },
61
+ latencyMs: { type: 'number', description: 'Execution latency in milliseconds.' },
62
+ },
63
+ required: ['toolName', 'outcome'],
64
+ },
65
+ annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },
66
+ }, async (input) => {
67
+ try {
68
+ const raw = input;
69
+ const id = toolCallStore.record({
70
+ toolName: String(raw['toolName'] ?? ''),
71
+ sessionId: typeof raw['sessionId'] === 'string' ? raw['sessionId'] : null,
72
+ callerProfile: typeof raw['callerProfile'] === 'string' ? raw['callerProfile'] : null,
73
+ input: typeof raw['input'] === 'string' ? raw['input'] : '',
74
+ output: typeof raw['output'] === 'string' ? raw['output'] : '',
75
+ outcome: String(raw['outcome'] ?? 'success'),
76
+ costUsd: typeof raw['costUsd'] === 'number' ? raw['costUsd'] : null,
77
+ txSignature: typeof raw['txSignature'] === 'string' ? raw['txSignature'] : null,
78
+ latencyMs: typeof raw['latencyMs'] === 'number' ? raw['latencyMs'] : null,
79
+ });
80
+ return createTextResponse(JSON.stringify({ success: true, id, degraded: memoryDatabase.isDegraded() }));
81
+ }
82
+ catch (error) {
83
+ return createTextResponse(`Error: ${error instanceof Error ? error.message : 'Unknown error'}`, { isError: true });
84
+ }
85
+ });
86
+ }
87
+ function registerMemorySearchTool(server) {
88
+ registerTool(server, 'sap_memory_search', {
89
+ title: 'Search Tool Call History',
90
+ description: 'Free local tool. Full-text search (FTS5) across tool call history. Find patterns, failures, and successes by natural language query. No x402 charge.',
91
+ inputSchema: {
92
+ type: 'object',
93
+ properties: {
94
+ query: { type: 'string', description: 'FTS5 search query (e.g. "swap failure slippage").' },
95
+ toolName: { type: 'string', description: 'Filter by tool name.' },
96
+ outcome: { type: 'string', enum: ['success', 'error', 'partial'], description: 'Filter by outcome.' },
97
+ limit: { type: 'number', description: 'Max results. Default 20, max 100.' },
98
+ offset: { type: 'number', description: 'Pagination offset.' },
99
+ sort: { type: 'string', enum: ['relevance', 'newest', 'oldest'], description: 'Sort order. Default relevance.' },
100
+ },
101
+ required: ['query'],
102
+ },
103
+ annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
104
+ }, async (input) => {
105
+ try {
106
+ const raw = input;
107
+ const result = toolCallStore.search({
108
+ query: String(raw['query'] ?? ''),
109
+ toolName: typeof raw['toolName'] === 'string' ? raw['toolName'] : undefined,
110
+ outcome: typeof raw['outcome'] === 'string' ? raw['outcome'] : undefined,
111
+ limit: typeof raw['limit'] === 'number' ? raw['limit'] : 20,
112
+ offset: typeof raw['offset'] === 'number' ? raw['offset'] : 0,
113
+ sort: typeof raw['sort'] === 'string' ? raw['sort'] : 'relevance',
114
+ });
115
+ return createTextResponse(JSON.stringify(result, null, 2));
116
+ }
117
+ catch (error) {
118
+ return createTextResponse(`Error: ${error instanceof Error ? error.message : 'Unknown error'}`, { isError: true });
119
+ }
120
+ });
121
+ }
122
+ function registerMemorySummarizeTool(server) {
123
+ registerTool(server, 'sap_memory_summarize', {
124
+ title: 'Create Agent Memory',
125
+ description: 'Free local tool. Creates an LLM-compressed summary memory from tool call patterns. The agent calls this after analyzing search results to persist lessons, patterns, failures, or successes. No x402 charge.',
126
+ inputSchema: {
127
+ type: 'object',
128
+ properties: {
129
+ memoryType: { type: 'string', enum: ['lesson', 'pattern', 'failure', 'success'], description: 'Type of memory.' },
130
+ category: { type: 'string', description: 'Tool category (e.g. "jupiter", "adrena", "premium").' },
131
+ summary: { type: 'string', description: 'LLM-compressed summary text. Max 4KB.' },
132
+ sourceToolCalls: { type: 'string', description: 'JSON array of tool_call IDs that were the source.' },
133
+ relevance: { type: 'number', description: 'Initial relevance score 0-1. Default 0.8.' },
134
+ expiresAt: { type: 'string', description: 'ISO 8601 expiry. Null = never expires.' },
135
+ },
136
+ required: ['memoryType', 'category', 'summary'],
137
+ },
138
+ annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },
139
+ }, async (input) => {
140
+ try {
141
+ const raw = input;
142
+ const id = memoryStore.record({
143
+ memoryType: String(raw['memoryType']),
144
+ category: String(raw['category']),
145
+ summary: String(raw['summary']),
146
+ sourceToolCalls: typeof raw['sourceToolCalls'] === 'string' ? raw['sourceToolCalls'] : null,
147
+ expiresAt: typeof raw['expiresAt'] === 'string' ? raw['expiresAt'] : null,
148
+ }, typeof raw['relevance'] === 'number' ? raw['relevance'] : 0.8);
149
+ return createTextResponse(JSON.stringify({ success: true, id }));
150
+ }
151
+ catch (error) {
152
+ return createTextResponse(`Error: ${error instanceof Error ? error.message : 'Unknown error'}`, { isError: true });
153
+ }
154
+ });
155
+ }
156
+ function registerMemoryRecallTool(server) {
157
+ registerTool(server, 'sap_memory_recall', {
158
+ title: 'Recall Agent Memories',
159
+ description: 'Free local tool. Returns the most relevant memories for a category, ordered by decayed relevance. Use this for prompt injection — the agent gets top N memories for the task at hand. No x402 charge.',
160
+ inputSchema: {
161
+ type: 'object',
162
+ properties: {
163
+ category: { type: 'string', description: 'Tool category to recall memories for.' },
164
+ limit: { type: 'number', description: 'Max memories. Default 5.' },
165
+ },
166
+ required: ['category'],
167
+ },
168
+ annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
169
+ }, async (input) => {
170
+ try {
171
+ const raw = input;
172
+ const memories = memoryStore.recall(String(raw['category']), typeof raw['limit'] === 'number' ? raw['limit'] : 5);
173
+ return createTextResponse(JSON.stringify({ memories, count: memories.length }, null, 2));
174
+ }
175
+ catch (error) {
176
+ return createTextResponse(`Error: ${error instanceof Error ? error.message : 'Unknown error'}`, { isError: true });
177
+ }
178
+ });
179
+ }
180
+ function registerMemoryPruneTool(server) {
181
+ registerTool(server, 'sap_memory_prune', {
182
+ title: 'Prune Old Memories',
183
+ description: 'Free local tool. Removes expired memories and memories with relevance below threshold after decay. Also archives tool call records older than retention period. No x402 charge.',
184
+ inputSchema: {
185
+ type: 'object',
186
+ properties: {
187
+ minRelevance: { type: 'number', description: 'Minimum decayed relevance to keep. Default 0.05.' },
188
+ archiveDays: { type: 'number', description: 'Archive tool calls older than N days. Default 90.' },
189
+ },
190
+ },
191
+ annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
192
+ }, async (input) => {
193
+ try {
194
+ const raw = input;
195
+ const pruned = memoryStore.prune(typeof raw['minRelevance'] === 'number' ? raw['minRelevance'] : 0.05);
196
+ const archived = toolCallStore.archive(typeof raw['archiveDays'] === 'number' ? raw['archiveDays'] : 90);
197
+ return createTextResponse(JSON.stringify({ success: true, pruned, archived }));
198
+ }
199
+ catch (error) {
200
+ return createTextResponse(`Error: ${error instanceof Error ? error.message : 'Unknown error'}`, { isError: true });
201
+ }
202
+ });
203
+ }
204
+ // ── Strategy Management ─────────────────────────────────────────────────────
205
+ function registerStrategySaveTool(server) {
206
+ registerTool(server, 'sap_strategy_save', {
207
+ title: 'Save Strategy',
208
+ description: 'Free local tool. Saves or updates a strategy JSON in ~/.config/mcp-sap/strategies/. Strategies persist agent learnings (e.g. buyback rules, slippage thresholds, risk limits) across sessions. No x402 charge.',
209
+ inputSchema: {
210
+ type: 'object',
211
+ properties: {
212
+ category: { type: 'string', description: 'Strategy category (defi, trading, meme, payments, premium).' },
213
+ name: { type: 'string', description: 'Strategy name (e.g. "volatility-breakout").' },
214
+ config: { type: 'string', description: 'JSON strategy configuration.' },
215
+ activate: { type: 'boolean', description: 'Whether to activate the strategy immediately. Default true.' },
216
+ },
217
+ required: ['category', 'name', 'config'],
218
+ },
219
+ annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
220
+ }, async (input) => {
221
+ try {
222
+ const raw = input;
223
+ const { saveStrategy } = await import('../strategies/strategy-store.js');
224
+ const result = saveStrategy({
225
+ category: String(raw['category']),
226
+ name: String(raw['name']),
227
+ config: String(raw['config']),
228
+ active: raw['activate'] !== false,
229
+ });
230
+ return createTextResponse(JSON.stringify(result));
231
+ }
232
+ catch (error) {
233
+ return createTextResponse(`Error: ${error instanceof Error ? error.message : 'Unknown error'}`, { isError: true });
234
+ }
235
+ });
236
+ }
237
+ function registerStrategyLoadTool(server) {
238
+ registerTool(server, 'sap_strategy_load', {
239
+ title: 'Load Strategy',
240
+ description: 'Free local tool. Loads a strategy JSON by category and name. Returns the full strategy config including version and active status. No x402 charge.',
241
+ inputSchema: {
242
+ type: 'object',
243
+ properties: {
244
+ category: { type: 'string', description: 'Strategy category.' },
245
+ name: { type: 'string', description: 'Strategy name.' },
246
+ },
247
+ required: ['category', 'name'],
248
+ },
249
+ annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
250
+ }, async (input) => {
251
+ try {
252
+ const raw = input;
253
+ const { loadStrategy } = await import('../strategies/strategy-store.js');
254
+ const strategy = loadStrategy(String(raw['category']), String(raw['name']));
255
+ return createTextResponse(JSON.stringify(strategy));
256
+ }
257
+ catch (error) {
258
+ return createTextResponse(`Error: ${error instanceof Error ? error.message : 'Unknown error'}`, { isError: true });
259
+ }
260
+ });
261
+ }
262
+ function registerStrategyListTool(server) {
263
+ registerTool(server, 'sap_strategy_list', {
264
+ title: 'List Strategies',
265
+ description: 'Free local tool. Lists all strategies, optionally filtered by category and active status. No x402 charge.',
266
+ inputSchema: {
267
+ type: 'object',
268
+ properties: {
269
+ category: { type: 'string', description: 'Optional category filter.' },
270
+ activeOnly: { type: 'boolean', description: 'Only return active strategies. Default false.' },
271
+ },
272
+ },
273
+ annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
274
+ }, async (input) => {
275
+ try {
276
+ const raw = input;
277
+ const { listStrategies } = await import('../strategies/strategy-store.js');
278
+ const strategies = listStrategies(typeof raw['category'] === 'string' ? raw['category'] : undefined, raw['activeOnly'] === true);
279
+ return createTextResponse(JSON.stringify({ strategies, count: strategies.length }, null, 2));
280
+ }
281
+ catch (error) {
282
+ return createTextResponse(`Error: ${error instanceof Error ? error.message : 'Unknown error'}`, { isError: true });
283
+ }
284
+ });
285
+ }
286
+ function registerStrategyActivateTool(server) {
287
+ registerTool(server, 'sap_strategy_activate', {
288
+ title: 'Activate/Deactivate Strategy',
289
+ description: 'Free local tool. Activates or deactivates a strategy by category and name. Inactive strategies are skipped during agent execution. No x402 charge.',
290
+ inputSchema: {
291
+ type: 'object',
292
+ properties: {
293
+ category: { type: 'string', description: 'Strategy category.' },
294
+ name: { type: 'string', description: 'Strategy name.' },
295
+ active: { type: 'boolean', description: 'True to activate, false to deactivate.' },
296
+ },
297
+ required: ['category', 'name', 'active'],
298
+ },
299
+ annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
300
+ }, async (input) => {
301
+ try {
302
+ const raw = input;
303
+ const { activateStrategy } = await import('../strategies/strategy-store.js');
304
+ const result = activateStrategy(String(raw['category']), String(raw['name']), raw['active'] === true);
305
+ return createTextResponse(JSON.stringify(result));
306
+ }
307
+ catch (error) {
308
+ return createTextResponse(`Error: ${error instanceof Error ? error.message : 'Unknown error'}`, { isError: true });
309
+ }
310
+ });
311
+ }
312
+ // ── Stream Buffering ────────────────────────────────────────────────────────
313
+ function registerStreamBufferTool(server) {
314
+ registerTool(server, 'sap_stream_buffer', {
315
+ title: 'Buffer Stream Event',
316
+ description: 'Free local tool. Buffers a premium stream event in the local SQLite database for offline consumption. Deduplicates by (streamType, eventId). No x402 charge.',
317
+ inputSchema: {
318
+ type: 'object',
319
+ properties: {
320
+ streamType: { type: 'string', description: 'Stream type (e.g. "pyth-price", "meme-alerts", "volatility").' },
321
+ eventId: { type: 'string', description: 'Unique event ID from the provider.' },
322
+ eventType: { type: 'string', description: 'Event type (e.g. "price.tick", "volatility.breakout").' },
323
+ payload: { type: 'string', description: 'JSON-serialized event payload.' },
324
+ },
325
+ required: ['streamType', 'eventId', 'eventType', 'payload'],
326
+ },
327
+ annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
328
+ }, async (input) => {
329
+ try {
330
+ const raw = input;
331
+ const id = streamBufferStore.buffer({
332
+ streamType: String(raw['streamType']),
333
+ eventId: String(raw['eventId']),
334
+ eventType: String(raw['eventType']),
335
+ payload: String(raw['payload']),
336
+ });
337
+ return createTextResponse(JSON.stringify({ success: true, id, dedup: id === -1 }));
338
+ }
339
+ catch (error) {
340
+ return createTextResponse(`Error: ${error instanceof Error ? error.message : 'Unknown error'}`, { isError: true });
341
+ }
342
+ });
343
+ }
344
+ function registerStreamConsumeTool(server) {
345
+ registerTool(server, 'sap_stream_consume', {
346
+ title: 'Consume Stream Events',
347
+ description: 'Free local tool. Returns unconsumed stream events for a stream type (FIFO order) and marks them consumed. Use this instead of sap_premium_stream_poll for local offline access. No x402 charge.',
348
+ inputSchema: {
349
+ type: 'object',
350
+ properties: {
351
+ streamType: { type: 'string', description: 'Stream type to consume.' },
352
+ limit: { type: 'number', description: 'Max events to consume. Default 20.' },
353
+ },
354
+ required: ['streamType'],
355
+ },
356
+ annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },
357
+ }, async (input) => {
358
+ try {
359
+ const raw = input;
360
+ const events = streamBufferStore.consume(String(raw['streamType']), typeof raw['limit'] === 'number' ? raw['limit'] : 20);
361
+ return createTextResponse(JSON.stringify({ events, count: events.length }, null, 2));
362
+ }
363
+ catch (error) {
364
+ return createTextResponse(`Error: ${error instanceof Error ? error.message : 'Unknown error'}`, { isError: true });
365
+ }
366
+ });
367
+ }
368
+ function registerStreamReplayTool(server) {
369
+ registerTool(server, 'sap_stream_replay', {
370
+ title: 'Replay Stream Events',
371
+ description: 'Free local tool. Returns all events (consumed + unconsumed) for a stream type within a time range. Used for backtest and analysis. No x402 charge.',
372
+ inputSchema: {
373
+ type: 'object',
374
+ properties: {
375
+ streamType: { type: 'string', description: 'Stream type to replay.' },
376
+ since: { type: 'string', description: 'ISO 8601 timestamp. Events created after this time.' },
377
+ limit: { type: 'number', description: 'Max events. Default 100.' },
378
+ },
379
+ required: ['streamType'],
380
+ },
381
+ annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
382
+ }, async (input) => {
383
+ try {
384
+ const raw = input;
385
+ const events = streamBufferStore.replay(String(raw['streamType']), typeof raw['since'] === 'string' ? raw['since'] : undefined, typeof raw['limit'] === 'number' ? raw['limit'] : 100);
386
+ return createTextResponse(JSON.stringify({ events, count: events.length }, null, 2));
387
+ }
388
+ catch (error) {
389
+ return createTextResponse(`Error: ${error instanceof Error ? error.message : 'Unknown error'}`, { isError: true });
390
+ }
391
+ });
392
+ }
393
+ // ── Audit Trail ─────────────────────────────────────────────────────────────
394
+ function registerAuditQueryTool(server) {
395
+ registerTool(server, 'sap_audit_query', {
396
+ title: 'Query Audit Trail',
397
+ description: 'Free local tool. Queries the immutable audit trail for x402 settlements and transaction signatures. Search by tool name, outcome, or time range. No x402 charge.',
398
+ inputSchema: {
399
+ type: 'object',
400
+ properties: {
401
+ query: { type: 'string', description: 'FTS5 search query.' },
402
+ outcome: { type: 'string', enum: ['success', 'error', 'partial'], description: 'Filter by outcome.' },
403
+ limit: { type: 'number', description: 'Max results. Default 20.' },
404
+ },
405
+ },
406
+ annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
407
+ }, async (input) => {
408
+ try {
409
+ const raw = input;
410
+ const result = toolCallStore.search({
411
+ query: String(raw['query'] ?? ''),
412
+ outcome: typeof raw['outcome'] === 'string' ? raw['outcome'] : undefined,
413
+ limit: typeof raw['limit'] === 'number' ? raw['limit'] : 20,
414
+ });
415
+ return createTextResponse(JSON.stringify(result, null, 2));
416
+ }
417
+ catch (error) {
418
+ return createTextResponse(`Error: ${error instanceof Error ? error.message : 'Unknown error'}`, { isError: true });
419
+ }
420
+ });
421
+ }
422
+ function registerAuditRecordTool(server) {
423
+ registerTool(server, 'sap_audit_record', {
424
+ title: 'Record Audit Entry',
425
+ description: 'Free local tool. Records a manual audit entry in the tool call history. Use this to log custom events (e.g. manual interventions, external transactions, policy decisions). No x402 charge.',
426
+ inputSchema: {
427
+ type: 'object',
428
+ properties: {
429
+ toolName: { type: 'string', description: 'Label for the audit entry.' },
430
+ input: { type: 'string', description: 'JSON details.' },
431
+ output: { type: 'string', description: 'JSON result.' },
432
+ outcome: { type: 'string', enum: ['success', 'error', 'partial'], description: 'Outcome.' },
433
+ txSignature: { type: 'string', description: 'Transaction signature if applicable.' },
434
+ },
435
+ required: ['toolName', 'outcome'],
436
+ },
437
+ annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },
438
+ }, async (input) => {
439
+ try {
440
+ const raw = input;
441
+ const id = toolCallStore.record({
442
+ toolName: String(raw['toolName']),
443
+ sessionId: null,
444
+ callerProfile: null,
445
+ input: typeof raw['input'] === 'string' ? raw['input'] : '',
446
+ output: typeof raw['output'] === 'string' ? raw['output'] : '',
447
+ outcome: String(raw['outcome']),
448
+ costUsd: null,
449
+ txSignature: typeof raw['txSignature'] === 'string' ? raw['txSignature'] : null,
450
+ latencyMs: null,
451
+ });
452
+ return createTextResponse(JSON.stringify({ success: true, id }));
453
+ }
454
+ catch (error) {
455
+ return createTextResponse(`Error: ${error instanceof Error ? error.message : 'Unknown error'}`, { isError: true });
456
+ }
457
+ });
458
+ }
459
+ function registerAuditStatsTool(server) {
460
+ registerTool(server, 'sap_audit_stats', {
461
+ title: 'Memory & Audit Stats',
462
+ description: 'Free local tool. Returns aggregate statistics about the memory database: tool call counts, memory counts, stream buffer counts, outcome breakdown, DB size. No x402 charge.',
463
+ inputSchema: {},
464
+ annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
465
+ }, async () => {
466
+ try {
467
+ const stats = {
468
+ toolCallCount: toolCallStore.count(),
469
+ memoryCount: memoryStore.count(),
470
+ pendingStreamEvents: streamBufferStore.pendingCount(),
471
+ dbSizeBytes: memoryDatabase.getDbSize(),
472
+ outcomeBreakdown: toolCallStore.outcomeBreakdown(),
473
+ memoryTypeBreakdown: memoryStore.memoryTypeBreakdown(),
474
+ lastToolCallAt: toolCallStore.lastToolCallAt(),
475
+ lastMemoryAt: memoryStore.lastMemoryAt(),
476
+ degraded: memoryDatabase.isDegraded(),
477
+ hermesAvailable: hermesBridge.isAvailable(),
478
+ };
479
+ return createTextResponse(JSON.stringify(stats, null, 2));
480
+ }
481
+ catch (error) {
482
+ return createTextResponse(`Error: ${error instanceof Error ? error.message : 'Unknown error'}`, { isError: true });
483
+ }
484
+ });
485
+ }
486
+ // ── Hermes Cross-Session Integration ─────────────────────────────────────────
487
+ function registerHermesSearchTool(server) {
488
+ registerTool(server, 'sap_hermes_search', {
489
+ title: 'Search Hermes Sessions',
490
+ description: 'Free local tool. Searches Hermes Agent session history for relevant past conversations. Enables cross-session context recall. If Hermes is not installed, returns empty results. No x402 charge.',
491
+ inputSchema: {
492
+ type: 'object',
493
+ properties: {
494
+ query: { type: 'string', description: 'Natural language search query.' },
495
+ limit: { type: 'number', description: 'Max results. Default 5.' },
496
+ },
497
+ required: ['query'],
498
+ },
499
+ annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
500
+ }, async (input) => {
501
+ try {
502
+ const raw = input;
503
+ const results = hermesBridge.searchSessions(String(raw['query'] ?? ''), typeof raw['limit'] === 'number' ? raw['limit'] : 5);
504
+ return createTextResponse(JSON.stringify({ results, count: results.length, hermesAvailable: hermesBridge.isAvailable() }, null, 2));
505
+ }
506
+ catch (error) {
507
+ return createTextResponse(`Error: ${error instanceof Error ? error.message : 'Unknown error'}`, { isError: true });
508
+ }
509
+ });
510
+ }
511
+ function registerHermesRecentTool(server) {
512
+ registerTool(server, 'sap_hermes_recent', {
513
+ title: 'Recent Hermes Sessions',
514
+ description: 'Free local tool. Returns recent Hermes Agent sessions for context injection. Use this at session start to recall what the agent worked on recently. If Hermes is not installed, returns empty results. No x402 charge.',
515
+ inputSchema: {
516
+ type: 'object',
517
+ properties: {
518
+ limit: { type: 'number', description: 'Max sessions. Default 3.' },
519
+ },
520
+ },
521
+ annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
522
+ }, async (input) => {
523
+ try {
524
+ const raw = input;
525
+ const sessions = hermesBridge.getRecentSessions(typeof raw['limit'] === 'number' ? raw['limit'] : 3);
526
+ return createTextResponse(JSON.stringify({ sessions, count: sessions.length, hermesAvailable: hermesBridge.isAvailable() }, null, 2));
527
+ }
528
+ catch (error) {
529
+ return createTextResponse(`Error: ${error instanceof Error ? error.message : 'Unknown error'}`, { isError: true });
530
+ }
531
+ });
532
+ }
533
+ //# sourceMappingURL=memory-tools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"memory-tools.js","sourceRoot":"","sources":["../../src/tools/memory-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAEtE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,iBAAiB,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGjH;;;;GAIG;AACH,MAAM,UAAU,mBAAmB,CAAC,MAAc,EAAE,QAAuB;IACzE,wBAAwB,CAAC,MAAM,CAAC,CAA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AAC;YACH,MAAM,GAAG,GAAG,KAAgC,CAAC;YAC7C,MAAM,QAAQ,GAAG,YAAY,CAAC,iBAAiB,CAC7C,OAAO,GAAG,CAAC,OAAO,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CACpD,CAAC;YACF,OAAO,kBAAkB,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,CAAC,MAAM,EAAE,eAAe,EAAE,YAAY,CAAC,WAAW,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;QACxI,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,kBAAkB,CAAC,UAAU,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;QACrH,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -2,25 +2,23 @@
2
2
  * @name tools/perp-tools
3
3
  * @description MCP tools for perpetual futures trading and chart analysis on Solana.
4
4
  *
5
- * Provides 10 tools across two categories:
5
+ * Provides 8 tools across two categories:
6
6
  *
7
7
  * Read-only tools (7):
8
8
  * - sap_perp_markets — List Adrena perp markets with mark price, funding, OI.
9
9
  * - sap_perp_position_info — Read on-chain perp positions for a wallet.
10
- * - sap_perp_funding_history — Fetch funding rate history from Adrena API.
10
+ * - sap_perp_funding_history — Compute funding rate from on-chain custody account.
11
11
  * - sap_chart_ohlc — OHLC candlestick data for any Solana token.
12
12
  * - sap_chart_long_term — Long-term price history + protocol TVL.
13
13
  * - sap_chart_volume_profile — Volume profile analysis (POC, VAH, VAL).
14
14
  * - sap_perp_liquidation_zones — Compute liquidation zones for open positions.
15
15
  *
16
- * Inscribed tools (3 — build unsigned transactions for local signing):
17
- * - sap_perp_build_open — Build tx to open a leveraged perp position.
18
- * - sap_perp_build_close — Build tx to close a perp position.
19
- * - sap_perp_build_modify — Build tx to add/remove collateral.
16
+ * Professional planning tools (1):
17
+ * - sap_perp_trade_plan — Build a trader-grade risk, route, and execution checklist.
20
18
  *
21
19
  * All read-only tools use free APIs (DexScreener, DeFiLlama) and Solana RPC
22
- * (Triton). Inscribed tools build unsigned transactions with @solana/web3.js
23
- * the agent signs locally, no server-side signing keys.
20
+ * (Triton). Execution builders are intentionally not exposed unless the
21
+ * account graph is IDL-backed and safe for local finalization.
24
22
  *
25
23
  * @module tools/perp-tools
26
24
  */
@@ -28,7 +26,7 @@ import { Server } from '@modelcontextprotocol/sdk/server/index.js';
28
26
  import type { SapMcpContext } from '../core/types.js';
29
27
  /**
30
28
  * @name registerPerpTools
31
- * @description Register all 10 perp trading and chart analysis MCP tools.
29
+ * @description Register all 8 perp trading analytics and planning MCP tools.
32
30
  *
33
31
  * @param server — MCP server instance.
34
32
  * @param context — Shared runtime context with SAP client, connection, and config.
@@ -1 +1 @@
1
- {"version":3,"file":"perp-tools.d.ts","sourceRoot":"","sources":["../../src/tools/perp-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AAEnE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AA6vCtD;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,GAAG,IAAI,CAe9E"}
1
+ {"version":3,"file":"perp-tools.d.ts","sourceRoot":"","sources":["../../src/tools/perp-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AAEnE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAgxCtD;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,GAAG,IAAI,CAa9E"}