@yamo/mcp-server 1.3.4 → 1.3.9

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 (2) hide show
  1. package/dist/index.js +6 -6
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -301,12 +301,12 @@ class YamoMcpServer {
301
301
  console.error(`[INFO] Using cached latest block's contentHash: ${resolvedPreviousBlock}`);
302
302
  }
303
303
  else {
304
- // Fallback to chain query (for first run or if cache was cleared)
305
- const latestBlock = await this.chain.getLatestBlock();
306
- if (latestBlock) {
307
- resolvedPreviousBlock = latestBlock.contentHash;
308
- this.latestContentHash = latestBlock.contentHash; // Update cache
309
- console.error(`[INFO] Using latest block's contentHash from chain: ${resolvedPreviousBlock}`);
304
+ // Fallback to direct contract state read (reliable)
305
+ const latestHash = await this.chain.getLatestBlockHash();
306
+ if (latestHash && latestHash !== "0x0000000000000000000000000000000000000000000000000000000000000000") {
307
+ resolvedPreviousBlock = latestHash;
308
+ this.latestContentHash = latestHash; // Update cache
309
+ console.error(`[INFO] Using latest block's contentHash from contract: ${resolvedPreviousBlock}`);
310
310
  }
311
311
  else {
312
312
  // No blocks exist yet, use genesis
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yamo/mcp-server",
3
- "version": "1.3.4",
3
+ "version": "1.3.9",
4
4
  "description": "YAMO Protocol v0.4 - Model Context Protocol server for AI agents",
5
5
  "main": "dist/index.js",
6
6
  "type": "commonjs",
@@ -45,7 +45,7 @@
45
45
  },
46
46
  "dependencies": {
47
47
  "@modelcontextprotocol/sdk": "^1.25.1",
48
- "@yamo/core": "^1.2.7",
48
+ "@yamo/core": "^1.2.12",
49
49
  "axios": "^1.13.2",
50
50
  "dotenv": "^17.2.3",
51
51
  "form-data": "^4.0.5"