@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.
- package/.env.example +11 -1
- package/CHANGELOG.md +233 -6
- package/README.md +3 -3
- package/USER_DOCS/00_START_HERE.md +9 -1
- package/USER_DOCS/01_HOSTED_REMOTE_MCP.md +1 -1
- package/USER_DOCS/04_CLIENT_CONFIGS.md +3 -3
- package/USER_DOCS/06_DESKTOP_GUI_WIZARD.md +5 -5
- package/config.example.json +1 -1
- package/config.secure-example.json +1 -1
- package/dist/config/env.d.ts +18 -0
- package/dist/config/env.d.ts.map +1 -1
- package/dist/config/env.js +14 -2
- package/dist/config/env.js.map +1 -1
- package/dist/config/mcp-client-injection.js +3 -3
- package/dist/config/paths.d.ts +9 -1
- package/dist/config/paths.d.ts.map +1 -1
- package/dist/config/paths.js +15 -1
- package/dist/config/paths.js.map +1 -1
- package/dist/config/wizard.d.ts.map +1 -1
- package/dist/config/wizard.js +3 -1
- package/dist/config/wizard.js.map +1 -1
- package/dist/core/constants.d.ts +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/logger.js +1 -1
- package/dist/memory/async-processor.d.ts +107 -0
- package/dist/memory/async-processor.d.ts.map +1 -0
- package/dist/memory/async-processor.js +204 -0
- package/dist/memory/async-processor.js.map +1 -0
- package/dist/memory/auto-record.d.ts +47 -0
- package/dist/memory/auto-record.d.ts.map +1 -0
- package/dist/memory/auto-record.js +133 -0
- package/dist/memory/auto-record.js.map +1 -0
- package/dist/memory/database.d.ts +103 -0
- package/dist/memory/database.d.ts.map +1 -0
- package/dist/memory/database.js +337 -0
- package/dist/memory/database.js.map +1 -0
- package/dist/memory/hermes-bridge.d.ts +70 -0
- package/dist/memory/hermes-bridge.d.ts.map +1 -0
- package/dist/memory/hermes-bridge.js +155 -0
- package/dist/memory/hermes-bridge.js.map +1 -0
- package/dist/memory/index.d.ts +23 -0
- package/dist/memory/index.d.ts.map +1 -0
- package/dist/memory/index.js +22 -0
- package/dist/memory/index.js.map +1 -0
- package/dist/memory/memory-store.d.ts +76 -0
- package/dist/memory/memory-store.d.ts.map +1 -0
- package/dist/memory/memory-store.js +231 -0
- package/dist/memory/memory-store.js.map +1 -0
- package/dist/memory/stream-buffer-store.d.ts +69 -0
- package/dist/memory/stream-buffer-store.d.ts.map +1 -0
- package/dist/memory/stream-buffer-store.js +182 -0
- package/dist/memory/stream-buffer-store.js.map +1 -0
- package/dist/memory/tool-call-store.d.ts +68 -0
- package/dist/memory/tool-call-store.d.ts.map +1 -0
- package/dist/memory/tool-call-store.js +189 -0
- package/dist/memory/tool-call-store.js.map +1 -0
- package/dist/memory/types.d.ts +197 -0
- package/dist/memory/types.d.ts.map +1 -0
- package/dist/memory/types.js +15 -0
- package/dist/memory/types.js.map +1 -0
- package/dist/memory/utils.d.ts +30 -0
- package/dist/memory/utils.d.ts.map +1 -0
- package/dist/memory/utils.js +47 -0
- package/dist/memory/utils.js.map +1 -0
- package/dist/payments/hosted-tool-eligibility.d.ts.map +1 -1
- package/dist/payments/hosted-tool-eligibility.js +4 -6
- package/dist/payments/hosted-tool-eligibility.js.map +1 -1
- package/dist/payments/monetization-gate.d.ts +39 -0
- package/dist/payments/monetization-gate.d.ts.map +1 -1
- package/dist/payments/monetization-gate.js +165 -11
- package/dist/payments/monetization-gate.js.map +1 -1
- package/dist/payments/pricing.d.ts.map +1 -1
- package/dist/payments/pricing.js +69 -0
- package/dist/payments/pricing.js.map +1 -1
- package/dist/payments/x402-paid-call.js +1 -1
- package/dist/premium/builtin-plugins.d.ts +42 -0
- package/dist/premium/builtin-plugins.d.ts.map +1 -1
- package/dist/premium/builtin-plugins.js +91 -10
- package/dist/premium/builtin-plugins.js.map +1 -1
- package/dist/premium/manifest-builder.d.ts.map +1 -1
- package/dist/premium/manifest-builder.js +43 -7
- package/dist/premium/manifest-builder.js.map +1 -1
- package/dist/premium/meme-radar-capabilities.js +9 -9
- package/dist/premium/meme-radar-capabilities.js.map +1 -1
- package/dist/premium/plugin-validator.d.ts.map +1 -1
- package/dist/premium/plugin-validator.js +62 -1
- package/dist/premium/plugin-validator.js.map +1 -1
- package/dist/premium/provider-bridge.d.ts +25 -1
- package/dist/premium/provider-bridge.d.ts.map +1 -1
- package/dist/premium/provider-bridge.js +130 -20
- package/dist/premium/provider-bridge.js.map +1 -1
- package/dist/premium/session-manager.d.ts.map +1 -1
- package/dist/premium/session-manager.js +12 -3
- package/dist/premium/session-manager.js.map +1 -1
- package/dist/premium/tech-fundamentals-capabilities.js +5 -5
- package/dist/premium/tech-fundamentals-capabilities.js.map +1 -1
- package/dist/premium/trading-capabilities.js +5 -5
- package/dist/premium/trading-capabilities.js.map +1 -1
- package/dist/premium/webhook-engine.d.ts.map +1 -1
- package/dist/premium/webhook-engine.js +7 -1
- package/dist/premium/webhook-engine.js.map +1 -1
- package/dist/prompts/context/sap-agent-context.prompt.js +1 -1
- package/dist/prompts/payments/explain-x402-settlement.prompt.js +1 -1
- package/dist/remote/premium-routes.d.ts.map +1 -1
- package/dist/remote/premium-routes.js +3 -2
- package/dist/remote/premium-routes.js.map +1 -1
- package/dist/remote/public-home/sections.d.ts.map +1 -1
- package/dist/remote/public-home/sections.js +2 -3
- package/dist/remote/public-home/sections.js.map +1 -1
- package/dist/remote/public-home/styles.d.ts +1 -1
- package/dist/remote/public-home/styles.js +2 -2
- package/dist/remote/server.d.ts.map +1 -1
- package/dist/remote/server.js +19 -4
- package/dist/remote/server.js.map +1 -1
- package/dist/server/server-metadata.js +1 -1
- package/dist/strategies/strategy-store.d.ts +82 -0
- package/dist/strategies/strategy-store.d.ts.map +1 -0
- package/dist/strategies/strategy-store.js +165 -0
- package/dist/strategies/strategy-store.js.map +1 -0
- package/dist/tools/agent-start-tool.d.ts.map +1 -1
- package/dist/tools/agent-start-tool.js +97 -10
- package/dist/tools/agent-start-tool.js.map +1 -1
- package/dist/tools/client-sdk-tools.d.ts.map +1 -1
- package/dist/tools/client-sdk-tools.js +152 -9
- package/dist/tools/client-sdk-tools.js.map +1 -1
- package/dist/tools/estimate-tool-cost.js +1 -1
- package/dist/tools/estimate-tool-cost.js.map +1 -1
- package/dist/tools/index.d.ts +1 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +2 -0
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/magicblock-tools.js +5 -5
- package/dist/tools/magicblock-tools.js.map +1 -1
- package/dist/tools/memory-tools.d.ts +26 -0
- package/dist/tools/memory-tools.d.ts.map +1 -0
- package/dist/tools/memory-tools.js +533 -0
- package/dist/tools/memory-tools.js.map +1 -0
- package/dist/tools/perp-tools.d.ts +7 -9
- package/dist/tools/perp-tools.d.ts.map +1 -1
- package/dist/tools/perp-tools.js +386 -367
- package/dist/tools/perp-tools.js.map +1 -1
- package/dist/tools/premium-tools.d.ts.map +1 -1
- package/dist/tools/premium-tools.js +8 -2
- package/dist/tools/premium-tools.js.map +1 -1
- package/dist/tools/profile-tools.d.ts.map +1 -1
- package/dist/tools/profile-tools.js +18 -1
- package/dist/tools/profile-tools.js.map +1 -1
- package/dist/tools/quick-context-tool.d.ts.map +1 -1
- package/dist/tools/quick-context-tool.js +100 -9
- package/dist/tools/quick-context-tool.js.map +1 -1
- package/dist/tools/register-tools.d.ts.map +1 -1
- package/dist/tools/register-tools.js +3 -0
- package/dist/tools/register-tools.js.map +1 -1
- package/dist/tools/sap-sdk-tools.js +3 -3
- package/dist/tools/sap-sdk-tools.js.map +1 -1
- package/dist/tools/session-context-packet.d.ts +19 -0
- package/dist/tools/session-context-packet.d.ts.map +1 -0
- package/dist/tools/session-context-packet.js +256 -0
- package/dist/tools/session-context-packet.js.map +1 -0
- package/dist/tools/skills-tools.d.ts +10 -0
- package/dist/tools/skills-tools.d.ts.map +1 -1
- package/dist/tools/skills-tools.js +19 -0
- package/dist/tools/skills-tools.js.map +1 -1
- package/dist/tools/transaction-tools.d.ts +1 -0
- package/dist/tools/transaction-tools.d.ts.map +1 -1
- package/dist/tools/transaction-tools.js +248 -9
- package/dist/tools/transaction-tools.js.map +1 -1
- package/dist/tools/x402-paid-call-tool.d.ts.map +1 -1
- package/dist/tools/x402-paid-call-tool.js +55 -21
- package/dist/tools/x402-paid-call-tool.js.map +1 -1
- package/dist/wizard-core/desktop-flow.d.ts.map +1 -1
- package/dist/wizard-core/desktop-flow.js +4 -2
- package/dist/wizard-core/desktop-flow.js.map +1 -1
- package/docs/06_PAYMENTS_X402_AND_PAYSH.md +14 -5
- package/docs/07_ENDPOINTS_AND_CLIENTS.md +1 -1
- package/docs/09_TOOLS_SKILLS_AND_AGENT_GUIDE.md +13 -5
- package/docs/13_BOUNTY_PROGRAM_PROPOSAL.md +1 -1
- package/docs/14_DESKTOP_WIZARD_RELEASE.md +3 -3
- package/docs/15_DASHBOARD_SCREENSHARE_SCRIPT.md +1 -1
- package/docs/BRANCH_AND_CI.md +2 -2
- package/docs/README.md +1 -1
- package/package.json +3 -1
- package/server.json +3 -3
- package/skills/README.md +1 -1
- package/skills/sap-agentkit/SKILL.md +1 -2
- package/skills/sap-defi/SKILL.md +31 -2
- package/skills/sap-mcp/SKILL.md +24 -13
- package/skills/sap-mcp/TOOL_REFERENCE.md +2 -4
- package/skills/sap-payments-x402/SKILL.md +15 -3
- package/assets/logos/drift.svg +0 -12
package/skills/sap-mcp/SKILL.md
CHANGED
|
@@ -9,6 +9,7 @@ safe signing behavior.
|
|
|
9
9
|
If the user says "Start SAP MCP", "Initialize SAP MCP", "Load SAP", or "SAP
|
|
10
10
|
mode", treat it as the activation command. Call `sap_agent_start` when it is
|
|
11
11
|
available, then call `sap_agent_runtime_status` with the closest intent and
|
|
12
|
+
`sap_prepare_action` when the request is more than a status check. Then call
|
|
12
13
|
`sap_skills_bundle` with `includeContents: true`. Load the returned SAP MCP
|
|
13
14
|
skill contents into context before selecting advanced tools.
|
|
14
15
|
|
|
@@ -22,18 +23,19 @@ Always inspect runtime context through MCP tools, not by reading config files:
|
|
|
22
23
|
|
|
23
24
|
1. `sap_agent_start`
|
|
24
25
|
2. `sap_agent_runtime_status` with `intent: "connection"`, `"paid-call"`, `"registry-write"`, `"transaction-finalize"`, `"escrow"`, `"identity"`, or `"general"`
|
|
25
|
-
3. `
|
|
26
|
-
4. `
|
|
27
|
-
5. `
|
|
28
|
-
6. `
|
|
29
|
-
7. `
|
|
30
|
-
8. `
|
|
31
|
-
9. `
|
|
32
|
-
10. `
|
|
33
|
-
11. `
|
|
34
|
-
12. `
|
|
35
|
-
13. `
|
|
36
|
-
14. `
|
|
26
|
+
3. `sap_prepare_action` with the closest intent before paid calls, swaps, registry writes, identity updates, Escrow V2, external x402 agents, premium streams, or transaction finalization
|
|
27
|
+
4. `sap_agent_context` for free compact agent/directory orientation before paid discovery
|
|
28
|
+
5. `sap_skills_bundle` with `includeContents: true`
|
|
29
|
+
6. `sap_pricing_catalog` before estimating hosted paid call tiers
|
|
30
|
+
7. `sap_agent_next_action` before retrying after any SAP MCP error or partial write result
|
|
31
|
+
8. `sap_skills_upgrade_plan` when local skills are missing or stale
|
|
32
|
+
9. `sap_runtime_repair_plan` when hosted tools are connected but `sap_payments` is missing
|
|
33
|
+
10. `sap_protocol_invariants` before SAP registry writes or when treasury, protocol fee, hosted write routing, or local signer routing is unclear
|
|
34
|
+
11. `sap_agent_identity_plan` before agent registration, profile-image updates, Metaplex identity, SNS linking, or full identity setup
|
|
35
|
+
12. `sap_profile_current`
|
|
36
|
+
13. `sap_profile_list`
|
|
37
|
+
14. `sap_profile_public_key`
|
|
38
|
+
15. `sap_network_stats`
|
|
37
39
|
|
|
38
40
|
For simple "are you connected?" checks, do not dump tool counts or inspect
|
|
39
41
|
local files. Use `sap_agent_runtime_status` first and answer with the hosted
|
|
@@ -57,6 +59,12 @@ and error strings unchanged.
|
|
|
57
59
|
agent profile reads as fresh data. Do not rely on old chat memory when the
|
|
58
60
|
user asks for current state; use exact lightweight reads first, then paid
|
|
59
61
|
discovery only when enrichment or broad search is needed.
|
|
62
|
+
- Treat session memory as operational context and proof tape, not cached market
|
|
63
|
+
or on-chain truth. It may store active profile names, public wallet keys,
|
|
64
|
+
runtime namespace availability, receipts, signatures, and error
|
|
65
|
+
classifications. It must not be used as truth for token prices, Jupiter
|
|
66
|
+
quotes/orders, balances, blockhashes, simulations, liquidity, routes, or SAP
|
|
67
|
+
account state.
|
|
60
68
|
- Use free exact/base reads first when the wallet, PDA, or a small orientation
|
|
61
69
|
page is enough: `sap_agent_context`, `sap_get_agent`, `sap_get_agent_profile`,
|
|
62
70
|
`sap_get_agent_stats`, `sap_is_agent_active`, `sap_get_global_state`, and
|
|
@@ -100,7 +108,7 @@ Use the bundled routing map for local MCP tool selection:
|
|
|
100
108
|
|
|
101
109
|
SAP MCP startup and skill bootstrap tools are free context/setup tools. Call
|
|
102
110
|
`sap_agent_start`, `sap_agent_runtime_status`, `sap_agent_context`,
|
|
103
|
-
`sap_agent_next_action`, `sap_pricing_catalog`,
|
|
111
|
+
`sap_prepare_action`, `sap_agent_next_action`, `sap_pricing_catalog`,
|
|
104
112
|
`sap_skills_list`, `sap_skills_bundle`, `sap_skills_upgrade_plan`,
|
|
105
113
|
`sap_runtime_repair_plan`, and local `sap_skills_install` directly. Do not
|
|
106
114
|
route startup, runtime status, pricing catalog, skill listing, bundling,
|
|
@@ -198,6 +206,9 @@ This prevents silent cap aborts and failed x402 attempts on local-signer-only
|
|
|
198
206
|
tools. For local-signer-only tools (e.g. `sap_register_agent`), the estimate
|
|
199
207
|
will say `tier: "local-signer-only"` and tell you to use the local
|
|
200
208
|
`sap_payments_*` equivalent instead of `sap_payments_call_paid_tool`.
|
|
209
|
+
For any intent-level workflow, call `sap_prepare_action` before execution. It
|
|
210
|
+
returns the correct hosted/local route, fresh-data requirements, confirmation
|
|
211
|
+
policy, retry rules, and proof-tape shape without charging x402.
|
|
201
212
|
|
|
202
213
|
If a hosted paid tool returns `BlockhashNotFound`,
|
|
203
214
|
`transaction_simulation_failed`, `smart_wallet_simulation_failed`, `node is
|
|
@@ -178,9 +178,7 @@ Jupiter protocol toolkit:
|
|
|
178
178
|
`adrena_openPosition`, `adrena_removeCollateral`,
|
|
179
179
|
`bridging_bridgeDeBridge`, `bridging_bridgeDeBridgeStatus`,
|
|
180
180
|
`bridging_bridgeWormhole`, `bridging_bridgeWormholeStatus`,
|
|
181
|
-
`
|
|
182
|
-
`drift_getPositions`, `drift_lend`, `drift_openPerpPosition`,
|
|
183
|
-
`drift_withdraw`, `jito_getBundleStatus`, `jito_getTipEstimate`,
|
|
181
|
+
`jito_getBundleStatus`, `jito_getTipEstimate`,
|
|
184
182
|
`jito_sendBundle`, `lulo_deposit`, `lulo_getBestRates`,
|
|
185
183
|
`lulo_getPositions`, `lulo_withdraw`, `manifest_cancelOrder`,
|
|
186
184
|
`manifest_createMarket`, `manifest_getOrderbook`,
|
|
@@ -209,7 +207,7 @@ Protocol routing shortcuts:
|
|
|
209
207
|
| Token launch/mint/burn | `spl-token_deployToken`, `spl-token_mintTo`, `spl-token_burn` |
|
|
210
208
|
| Jupiter quote/swap | `jupiter_getQuote`, `jupiter_smartSwap`, `jupiter_swap`, `jupiter_swapInstructions` |
|
|
211
209
|
| Jupiter limit/DCA | `jupiter_createLimitOrder`, `jupiter_getLimitOrders`, `jupiter_createDCA`, `jupiter_getDCAOrders` |
|
|
212
|
-
| Perps/lending | `
|
|
210
|
+
| Perps/lending | `sap_perp_trade_plan`, `sap_perp_*`, `adrena_*`, `lulo_*` |
|
|
213
211
|
| Liquidity pools | `raydium-pools_*`, `orca_*`, `meteora_*` |
|
|
214
212
|
| Orderbooks | `openbook_*`, `manifest_*` |
|
|
215
213
|
| Price data | `pyth_*`, `coingecko_*` |
|
|
@@ -16,6 +16,7 @@ workflows, and hosted SAP MCP x402/pay.sh monetization.
|
|
|
16
16
|
- `sap_payments_prepare_challenge`
|
|
17
17
|
- `sap_payments_sign_challenge`
|
|
18
18
|
- `sap_payments_verify_receipt`
|
|
19
|
+
- `sap_prepare_action`
|
|
19
20
|
- `sap_x402_paid_call`
|
|
20
21
|
- `sap_create_subscription`
|
|
21
22
|
- `sap_fund_subscription`
|
|
@@ -70,6 +71,15 @@ Before retrying `payment_required`, `hosted_local_signer_required`,
|
|
|
70
71
|
signature, call `sap_agent_next_action`. Use its `safeToRetryNow`, `nextTool`,
|
|
71
72
|
and `paymentCharged` fields as the retry guard.
|
|
72
73
|
|
|
74
|
+
Before starting a paid or value-moving workflow, call the free hosted
|
|
75
|
+
`sap_prepare_action` planner with the closest intent. It returns:
|
|
76
|
+
|
|
77
|
+
- fresh data that must be fetched again before payment/signing;
|
|
78
|
+
- whether to use hosted `sap`, local `sap_payments`, or a hosted unsigned
|
|
79
|
+
builder plus `sap_payments_finalize_transaction`;
|
|
80
|
+
- max-price and confirmation guidance;
|
|
81
|
+
- retry rules and the proof-tape fields to report back to the user.
|
|
82
|
+
|
|
73
83
|
For fast x402 execution:
|
|
74
84
|
|
|
75
85
|
1. Reuse the MCP session returned by `initialize`.
|
|
@@ -78,9 +88,11 @@ For fast x402 execution:
|
|
|
78
88
|
3. Use `PAYMENT-SIGNATURE` first; use `X-PAYMENT` only for clients that require
|
|
79
89
|
the alternate header.
|
|
80
90
|
4. Cache only static MCP surface metadata such as `tools/list`, `prompts/list`,
|
|
81
|
-
and `resources/list` inside the runtime when useful.
|
|
82
|
-
|
|
83
|
-
|
|
91
|
+
and `resources/list` inside the runtime when useful. Session memory can
|
|
92
|
+
store operational context, receipts, signatures, and error classifications.
|
|
93
|
+
Do not cache on-chain balances, SAP agent rows, pricing, SNS ownership,
|
|
94
|
+
quotes, blockhashes, simulations, liquidity, routes, or settlement state
|
|
95
|
+
when the user expects fresh data.
|
|
84
96
|
5. Treat `PAYMENT-RESPONSE` as the receipt bound to the tool output.
|
|
85
97
|
6. If the client runtime cannot sign or attach x402 payment headers itself, use
|
|
86
98
|
the local SAP MCP `sap_payments_call_paid_tool` bridge configured by the SAP
|
package/assets/logos/drift.svg
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
<svg width="256" height="256" viewBox="0 0 256 256" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<path d="M0 64C0 28.6538 28.6538 0 64 0H192C227.346 0 256 28.6538 256 64V192C256 227.346 227.346 256 192 256H64C28.6538 256 0 227.346 0 192V64Z" fill="#08AA18"/>
|
|
3
|
-
<g clip-path="url(#clip0_354_3823)">
|
|
4
|
-
<path d="M32 62.9677C32 45.8647 45.8647 32 62.9677 32H193.032C210.135 32 224 45.8647 224 62.9677V193.032C224 210.135 210.135 224 193.032 224H62.9677C45.8647 224 32 210.135 32 193.032V62.9677Z" fill="#08AA18"/>
|
|
5
|
-
<path d="M105.764 71.4325C105.367 72.4792 106.14 73.599 107.259 73.5993H129.162C130.199 73.5993 130.962 74.5712 130.717 75.5786L116.825 132.535C116.424 134.18 118.518 135.239 119.606 133.941L169.692 74.1724C169.996 73.8097 170.446 73.5993 170.919 73.5993H203.043C204.411 73.5993 205.148 75.2066 204.256 76.2439L77.1854 224H65.261L92.329 110.773C92.5694 109.767 91.8069 108.8 90.7731 108.799H52.9722C51.6232 108.799 50.8805 107.233 51.7338 106.188L112.32 32H120.719L105.764 71.4325Z" fill="white"/>
|
|
6
|
-
</g>
|
|
7
|
-
<defs>
|
|
8
|
-
<clipPath id="clip0_354_3823">
|
|
9
|
-
<rect width="192" height="192" fill="white" transform="translate(32 32)"/>
|
|
10
|
-
</clipPath>
|
|
11
|
-
</defs>
|
|
12
|
-
</svg>
|