@oobe-protocol-labs/sap-mcp-server 0.9.13 → 0.9.16

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 (87) hide show
  1. package/CHANGELOG.md +62 -0
  2. package/README.md +2 -2
  3. package/USER_DOCS/00_START_HERE.md +24 -2
  4. package/USER_DOCS/03_PAYMENTS_X402_PAYSH.md +6 -1
  5. package/USER_DOCS/04_CLIENT_CONFIGS.md +4 -3
  6. package/USER_DOCS/05_SKILLS_AND_TOOLS.md +9 -4
  7. package/USER_DOCS/06_DESKTOP_GUI_WIZARD.md +6 -6
  8. package/dist/config/mcp-client-injection.d.ts.map +1 -1
  9. package/dist/config/mcp-client-injection.js +4 -3
  10. package/dist/config/mcp-client-injection.js.map +1 -1
  11. package/dist/core/constants.d.ts +9 -1
  12. package/dist/core/constants.d.ts.map +1 -1
  13. package/dist/core/constants.js +13 -3
  14. package/dist/core/constants.js.map +1 -1
  15. package/dist/payments/hosted-tool-eligibility.d.ts.map +1 -1
  16. package/dist/payments/hosted-tool-eligibility.js +3 -0
  17. package/dist/payments/hosted-tool-eligibility.js.map +1 -1
  18. package/dist/payments/index.d.ts +2 -2
  19. package/dist/payments/index.d.ts.map +1 -1
  20. package/dist/payments/index.js +1 -1
  21. package/dist/payments/index.js.map +1 -1
  22. package/dist/payments/pricing.d.ts +30 -0
  23. package/dist/payments/pricing.d.ts.map +1 -1
  24. package/dist/payments/pricing.js +142 -1
  25. package/dist/payments/pricing.js.map +1 -1
  26. package/dist/prompts/context/sap-agent-context.prompt.js +2 -0
  27. package/dist/prompts/context/sap-agent-context.prompt.js.map +1 -1
  28. package/dist/prompts/context/sap-agent-start.prompt.js +2 -0
  29. package/dist/prompts/context/sap-agent-start.prompt.js.map +1 -1
  30. package/dist/prompts/registry/register-sap-agent.prompt.js +18 -18
  31. package/dist/prompts/registry/register-sap-agent.prompt.js.map +1 -1
  32. package/dist/remote/public-home/sections.d.ts.map +1 -1
  33. package/dist/remote/public-home/sections.js +4 -0
  34. package/dist/remote/public-home/sections.js.map +1 -1
  35. package/dist/remote/public-home/types.d.ts +1 -0
  36. package/dist/remote/public-home/types.d.ts.map +1 -1
  37. package/dist/remote/server.d.ts +1 -0
  38. package/dist/remote/server.d.ts.map +1 -1
  39. package/dist/remote/server.js +10 -2
  40. package/dist/remote/server.js.map +1 -1
  41. package/dist/security/tool-permissions.d.ts.map +1 -1
  42. package/dist/security/tool-permissions.js +9 -0
  43. package/dist/security/tool-permissions.js.map +1 -1
  44. package/dist/tools/agent-start-tool.d.ts.map +1 -1
  45. package/dist/tools/agent-start-tool.js +411 -1
  46. package/dist/tools/agent-start-tool.js.map +1 -1
  47. package/dist/tools/client-sdk-tools.js +3 -3
  48. package/dist/tools/client-sdk-tools.js.map +1 -1
  49. package/dist/tools/magicblock-tools.d.ts.map +1 -1
  50. package/dist/tools/magicblock-tools.js +43 -26
  51. package/dist/tools/magicblock-tools.js.map +1 -1
  52. package/dist/tools/sap-sdk-tools.d.ts +412 -1
  53. package/dist/tools/sap-sdk-tools.d.ts.map +1 -1
  54. package/dist/tools/sap-sdk-tools.js +1222 -40
  55. package/dist/tools/sap-sdk-tools.js.map +1 -1
  56. package/dist/tools/sap-sns-tools.d.ts.map +1 -1
  57. package/dist/tools/sap-sns-tools.js +6 -2
  58. package/dist/tools/sap-sns-tools.js.map +1 -1
  59. package/dist/tools/skills-tools.d.ts.map +1 -1
  60. package/dist/tools/skills-tools.js +2 -0
  61. package/dist/tools/skills-tools.js.map +1 -1
  62. package/dist/tools/tool-aliases.d.ts.map +1 -1
  63. package/dist/tools/tool-aliases.js +7 -0
  64. package/dist/tools/tool-aliases.js.map +1 -1
  65. package/dist/tools/x402-paid-call-tool.d.ts.map +1 -1
  66. package/dist/tools/x402-paid-call-tool.js +315 -15
  67. package/dist/tools/x402-paid-call-tool.js.map +1 -1
  68. package/docs/03_CONFIGURATION_AND_WIZARD.md +1 -0
  69. package/docs/06_PAYMENTS_X402_AND_PAYSH.md +56 -3
  70. package/docs/07_ENDPOINTS_AND_CLIENTS.md +2 -1
  71. package/docs/09_TOOLS_SKILLS_AND_AGENT_GUIDE.md +16 -5
  72. package/docs/14_DESKTOP_WIZARD_RELEASE.md +5 -4
  73. package/docs/16_SAP_AGENT_IDENTITY_PIPELINE.md +298 -0
  74. package/docs/README.md +2 -0
  75. package/docs/magicblock-tools.md +26 -0
  76. package/package.json +4 -1
  77. package/server.json +3 -3
  78. package/skills/README.md +10 -2
  79. package/skills/sap-agent-registry/SKILL.md +81 -8
  80. package/skills/sap-discovery-indexing/SKILL.md +11 -0
  81. package/skills/sap-escrow-settlement/SKILL.md +22 -4
  82. package/skills/sap-mcp/SKILL.md +84 -23
  83. package/skills/sap-mcp/TOOL_REFERENCE.md +38 -7
  84. package/skills/sap-nft-metaplex/SKILL.md +22 -0
  85. package/skills/sap-operations/SKILL.md +28 -0
  86. package/skills/sap-payments-x402/SKILL.md +38 -3
  87. package/skills/sap-sns/SKILL.md +17 -0
@@ -11,6 +11,7 @@ workflows, and hosted SAP MCP x402/pay.sh monetization.
11
11
  - `sap_payments_call_paid_tool`
12
12
  - `sap_payments_call_external_x402`
13
13
  - `sap_payments_register_agent`
14
+ - `sap_payments_update_agent`
14
15
  - `sap_payments_finalize_transaction`
15
16
  - `sap_payments_prepare_challenge`
16
17
  - `sap_payments_sign_challenge`
@@ -44,9 +45,12 @@ hosted calls still proceed through x402/pay.sh plus the user's local SAP profile
44
45
  or external signer.
45
46
 
46
47
  - Free: `tools/list`, `prompts/list`, `resources/list`, `sap_profile_current`,
47
- `sap_get_network_overview`, `sol_get_balance`, `spl-token_getBalance`, and
48
- `spl-token_getTokenAccounts`.
49
- - Read premium: `sap_list_all_agents`, indexed discovery, network stats,
48
+ `sap_agent_start`, `sap_agent_runtime_status`, `sap_agent_context`,
49
+ `sap_agent_next_action`, exact SAP agent/profile reads, compact
50
+ `sap_list_agents` pages with `limit <= 20`, `sap_get_network_overview`, `sol_get_balance`,
51
+ `spl-token_getBalance`, and `spl-token_getTokenAccounts`.
52
+ - Read premium: `sap_discover_agents`, `sap_list_all_agents`, full/enriched or
53
+ large `sap_list_agents` pages, indexed discovery, network stats,
50
54
  protocol/capability indexes.
51
55
  - Builder: batch SNS/domain checks, analytics, transaction builders.
52
56
  - Value action: fixed fee plus configured basis-points fee when public USD
@@ -57,6 +61,11 @@ instructions, create a payment, retry with `PAYMENT-SIGNATURE`, and capture
57
61
  `PAYMENT-RESPONSE` after settlement. If a `payShCheckoutUrl` is present, surface
58
62
  it for browser/manual checkout flows.
59
63
 
64
+ Before retrying `payment_required`, `hosted_local_signer_required`,
65
+ `BlockhashNotFound`, timeout, missing `sap_payments`, or an unconfirmed
66
+ signature, call `sap_agent_next_action`. Use its `safeToRetryNow`, `nextTool`,
67
+ and `paymentCharged` fields as the retry guard.
68
+
60
69
  For fast x402 execution:
61
70
 
62
71
  1. Reuse the MCP session returned by `initialize`.
@@ -98,6 +107,22 @@ accountless by design and cannot sign user-owned registry writes. Call local
98
107
  `sap_payments_register_agent` with the same registration fields and
99
108
  `confirm: true`; it uses the active local SAP MCP profile signer, submits the
100
109
  SAP registry transaction locally, and does not charge a hosted x402 access fee.
110
+ After it returns, verify `success`, `agentRegistered`, `confirmationStatus`,
111
+ `agentPda`, `protocolComplete`, and `protocolFee.status`. The expected protocol
112
+ fee is `100000000` lamports to treasury
113
+ `J7PyZAGKvprCz4SQ5DKBLAHstJxgVqZcz6kguUoWpP7P`. `success: true` means the agent
114
+ account and protocol fee invariant were both verified. If `success` is false
115
+ while `agentRegistered` is true, the account may exist but registration is not
116
+ SAP protocol-complete; report that state and do not retry automatically.
117
+
118
+ For hosted-user SAP agent profile updates, do not retry hosted
119
+ `sap_update_agent` after `hosted_local_signer_required`. Call local
120
+ `sap_payments_update_agent` with the intended replacement fields and
121
+ `confirm: true`; it signs locally and does not charge a hosted x402 access fee.
122
+ Use this for agent picture/profile metadata by first uploading the image or
123
+ metadata JSON to a public URI such as IPFS, Arweave, Kommodo, or HTTPS, then
124
+ setting `agentUri` or `metadataUri`. Do not use desktop file paths.
125
+ After update, fetch the agent profile again and verify the changed fields.
101
126
 
102
127
  If the hosted paid tool returns `transactionBase64`, `transaction`, or an
103
128
  unsigned transaction object, call `sap_payments_finalize_transaction` with
@@ -109,6 +134,16 @@ default and returns `confirmationStatus` plus `retrySafe`. Treat
109
134
  signing scripts, read keypair JSON, or call hosted `sap_sign_transaction` for
110
135
  user-owned signatures.
111
136
 
137
+ For Escrow V2 hosted workflows, use the unsigned builder family first:
138
+ `sap_escrow_build_create_transaction`,
139
+ `sap_escrow_build_deposit_transaction`,
140
+ `sap_escrow_build_settle_transaction`,
141
+ `sap_escrow_build_finalize_transaction`,
142
+ `sap_escrow_build_withdraw_transaction`, or
143
+ `sap_escrow_build_close_transaction`, then finalize locally with
144
+ `sap_payments_finalize_transaction`. Use direct escrow write tools only when a
145
+ local SAP MCP profile with signer is the selected runtime.
146
+
112
147
  Use low-level helpers only for custom clients:
113
148
 
114
149
  - `sap_payments_prepare_challenge` returns the parsed hosted x402 challenge
@@ -17,6 +17,8 @@ This skill is adapted from upstream `sns-skill` plus SAP MCP's
17
17
  `sap_payments_finalize_transaction`.
18
18
  6. Register domains directly only from a local SAP MCP profile using
19
19
  `sap_sns_register_agent_domain` after explicit user confirmation.
20
+ 7. After SNS ownership or records are ready, update the SAP agent metadata with
21
+ `sap_payments_update_agent` so `metadataUri` references the `.sol` identity.
20
22
 
21
23
  Hosted accountless SAP MCP cannot register a .sol domain directly because the
22
24
  purchase requires the user wallet signature. If a hosted direct registration is
@@ -48,9 +50,24 @@ to the local profile flow instead of retrying the hosted write.
48
50
 
49
51
  - Never assume mainnet/devnet; read the profile RPC first.
50
52
  - Never read the local wallet file.
53
+ - `sap_sns_check_ownership` canonical field is `owner`; `wallet` is accepted as
54
+ an alias for agent ergonomics.
51
55
  - Prefer build/preview/sign flows over direct register flows when the user
52
56
  needs to review transaction details.
53
57
  - Do not claim `sap_sns_build_register_domain_transaction` exists unless it is
54
58
  returned by `tools/list`.
55
59
  - Do not route hosted direct registration through x402; hosted accountless
56
60
  servers reject local-signer writes before payment.
61
+
62
+ ## SAP Agent Identity Link
63
+
64
+ For “use my .sol as my SAP identity”:
65
+
66
+ 1. Resolve or check ownership with `sap_sns_resolve_wallet` and
67
+ `sap_sns_check_ownership`.
68
+ 2. If a record must change from hosted mode, build the unsigned record
69
+ transaction and finalize with `sap_payments_finalize_transaction`.
70
+ 3. Update the agent metadata JSON to include:
71
+ `{ "sns": { "domain": "name.sol" } }`.
72
+ 4. Call local `sap_payments_update_agent` with the public `metadataUri` and
73
+ `confirm: true`.