paralith-mcp 0.3.1 → 0.4.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/dist/graph.json CHANGED
@@ -1,34 +1,34 @@
1
1
  {
2
2
  "node": "https://hyperbeam.tylerw.ai",
3
3
  "owner": "DA9qhP25ZPz6MHIhO-7aNHDN3LsTAL7yCKYIkqr13Z8",
4
- "deployedAt": "2026-10-10T15:51:09.959Z",
4
+ "deployedAt": "2026-10-12T02:01:10.919Z",
5
5
  "processes": {
6
- "game": "bqkZT1qY8Qpea7QsKZEk8q7m0yUE8-G3Miq8EFXnRJg",
7
- "rune": "0j4rkkEqUO25aXI8LoDuou2Ibr0GSMGsXrFRxwrSfY8",
8
- "pusd": "xhYkQ8qm7zssDC2nrOfzkk2Xy8rPVvlEMWestfrAvK8",
9
- "dao": "YAPgWNxRQksjYn_zfUw-h-JkwpmJDtPL1K9yifR5S_Q",
6
+ "game": "AUitn972WGLDj0pMCVbXXacTtOk2PNchgP2qaP_kNoI",
7
+ "rune": "rYfYbQu9vIin_FKcpkxLtcF21pIQbdY-pOkkM5igyVg",
8
+ "pusd": "N4VZxxFb4qArB4SJawvqnLZSRPX9GFs7iGnRQ3Kr-4M",
9
+ "dao": "YAPCQK-3STKc-XND5-O4v-wEQBv7M4S-i__rkQKvQdk",
10
10
  "elements": {
11
- "earth": "3CS-LPEfD4YJwpuh1kuPGOv3lGwIlOAWOT15ATGIbPg",
12
- "air": "y51gmVYD1GoJWtMxAtePMnvMCR0aT-jSfnsMKjFeU70",
13
- "fire": "os6EKVQGuukvgTFmaZbGj23Xt3frHB3cb8ljquCdJ18",
14
- "water": "P9OPPoVw9MxpIz8QghA6TcYUhXrYG3Ro09KM8shX5QM"
11
+ "earth": "wCtjJMScFI6jjioNQdRDUdyFWiqYubaRYyUeeMYYOjI",
12
+ "air": "1he9rnfufmEoPFeDYV_LzkA7e3AM98MXARal2Oq-4lc",
13
+ "fire": "4lffB0KjBEix1I7g1nBmeIdllhqhyHH75NiUQs5De2o",
14
+ "water": "EwiZp-92W7k8xZntMs2u3HAJ-RdDqTdAzvia_6KxlI0"
15
15
  },
16
- "internalVenue": "pxw-Y9Hl8CNQlPGLr-2Ez_9BVjjEP6wisxrZhe-AyxU",
17
- "externalVenue": "D3SUysjoweBXtoGFm4zoq1dKSt7Dc5b_V9x_weLJV7Y",
18
- "hunt": "4iABQxFjL3LtMGgfZQuwsH5WHKKjjSu7b7XfxEN_j40",
16
+ "internalVenue": "H0KOjdtL_IT57KZgHlTd2yK6xcsQVy3AqxTcLS-TRCk",
17
+ "externalVenue": "nrRF3SiPWoeLU0lUCFUXSzowNlEKli7z8Wtu050l2Uk",
18
+ "hunt": "kKpOdP--5hA3fy-i5q6-agoHFNKuYW4c_9Qg8NvAIew",
19
19
  "huntWorkers": [
20
- "4iABQxFjL3LtMGgfZQuwsH5WHKKjjSu7b7XfxEN_j40",
21
- "2RBkmldqPdij2PopnEPuStLl6Pb6OcIrpilfK64Q1m8",
22
- "EATa5vTV53J1c711CEjiuks2Kllq3Gi-kVSXFqe7O7M",
23
- "SHXyU87725eI8i6qSET70Pwovf744DJqEfajTZI4N4M",
24
- "iesbJSITvqtDXMHxhGeOOXUXofnD-nh1qro9PH5IHNQ"
20
+ "kKpOdP--5hA3fy-i5q6-agoHFNKuYW4c_9Qg8NvAIew",
21
+ "NsIK9D0VScuNdf7-avycKxPSTEiHXPBlbFuCEv5ZEuw",
22
+ "JYtYuPA5weAbXykDnmDUhlU3LacxkY15qWppEDtTP4s",
23
+ "lJgsZ3GadofVafa8FI3C6fGTf6Aq0yfZFi44P6vRti0",
24
+ "GUMGAcSdCmKhb75M3NHUkLsdyoAHu7ixyuEldDsXA3c"
25
25
  ],
26
26
  "battleWorkers": [
27
- "Xk8XXWY2QY-UCd1Y_yqx6SHlVt5bNUbQnwzngMgxbzc",
28
- "IPjes-iFyMZH_JCx1z-4c-7JEdJgd3RGgbglgl3_u2s",
29
- "-m-6qgUsU6ybjOpMMlPHvG1bIlHypFMORKw4blCpRnU",
30
- "mSzalVGuEgxAG_tCEhVivSPMhSvmp5ePMHRIW0-gASM",
31
- "PkPEU-yZpgn9LwXWYPahUKOPe-Hw2sHB0DPBNPoxQeA"
27
+ "MgxNZ60Ejc01E5MeuZ1s_8PeLNhExjOz9wUGo3utE1w",
28
+ "Ww_GXme0Sn3-jIcji0dPxV0nXLYqBesChXqqXQTC0Hc",
29
+ "4YYgYXTzS_PjbQMthDwf93zik-kvoXYTzrNHA30ijAY",
30
+ "EWlpRzX-waNNKj0bvT9pzj_N4_bv2ndYPMOJaiVkWlw",
31
+ "v5_n4eOw24s1wGjI8-fjoGTfQHwjcO-tcHFxIiO5Qrk"
32
32
  ]
33
33
  },
34
34
  "huntNode": "https://hyperbeam.tylerw.ai",
package/dist/http.mjs CHANGED
@@ -304,6 +304,34 @@ import { z as z9 } from "zod";
304
304
 
305
305
  // src/tool.mjs
306
306
  import { z } from "zod";
307
+
308
+ // src/update.mjs
309
+ var VERSION = "0.3.2";
310
+ var CHECK_MS = 6 * 36e5;
311
+ var NOTE_MS = 36e5;
312
+ var latest = null;
313
+ var checkedAt = 0;
314
+ var notedAt = 0;
315
+ var newer = (a, b) => {
316
+ const [x, y] = [a, b].map((v) => v.split(".").map(Number));
317
+ for (let i = 0; i < 3; i++) if (x[i] !== y[i]) return x[i] > y[i];
318
+ return false;
319
+ };
320
+ function check(now) {
321
+ checkedAt = now;
322
+ fetch("https://registry.npmjs.org/paralith-mcp/latest", { signal: AbortSignal.timeout(1e4) }).then((r) => r.ok ? r.json() : null).then((j) => {
323
+ if (j?.version) latest = j.version;
324
+ }, () => {
325
+ });
326
+ }
327
+ function updateNote(now = Date.now()) {
328
+ if (now - checkedAt > CHECK_MS) check(now);
329
+ if (!latest || !newer(latest, VERSION) || now - notedAt < NOTE_MS) return null;
330
+ notedAt = now;
331
+ return `paralith-mcp ${latest} is out (this is ${VERSION}). Tell the user to restart this app to get it.`;
332
+ }
333
+
334
+ // src/tool.mjs
307
335
  var migrationSeen = null;
308
336
  async function migrationRefusal(read = readKey, now = Date.now()) {
309
337
  if (!migrationSeen || now - migrationSeen.at > 15e3) {
@@ -328,7 +356,8 @@ function tool(server, name, description, inputSchema, run, annotations = {}, vie
328
356
  const raw = await run(args ?? {});
329
357
  const value = view && !args?.full ? await view(raw) : raw;
330
358
  const text = typeof value === "string" ? value : JSON.stringify(value, bigints, 2);
331
- return { content: [{ type: "text", text: text ?? "null" }] };
359
+ const note = READ_ONLY ? null : updateNote();
360
+ return { content: [{ type: "text", text: text ?? "null" }, ...note ? [{ type: "text", text: note }] : []] };
332
361
  } catch (error) {
333
362
  return { isError: true, content: [{ type: "text", text: explain(error) }] };
334
363
  }
@@ -725,9 +754,9 @@ function registerGame(server) {
725
754
  tool(
726
755
  server,
727
756
  "hunt_act",
728
- "Act in your live hunt. search: find a wild creature (3 s cooldown). attack: one round with a move. capture: one try with 1-3 Rune (+1 Scroll), ends the run. decline: leave a defeated creature. end: finish the run and get unspent supplies back. retry_settlement: re-send a stuck final.",
757
+ "Act in your live hunt. A hunt is one encounter. search: find the wild creature (once per hunt). attack: one round with a move; losing ends the run. After a win: capture (one try with 1-3 Rune + 1 Scroll, consumed either way, ends the run) or end. end: finish the run and get unspent supplies back. retry_settlement: re-send a stuck final.",
729
758
  {
730
- action: z2.enum(["search", "attack", "capture", "decline", "end", "retry_settlement"]),
759
+ action: z2.enum(["search", "attack", "capture", "end", "retry_settlement"]),
731
760
  move: z2.string().optional(),
732
761
  round: z2.number().int().optional(),
733
762
  runes: z2.number().int().min(1).max(3).optional()
@@ -745,8 +774,6 @@ function registerGame(server) {
745
774
  }
746
775
  case "capture":
747
776
  return api.huntCapture(route, runes ?? 1);
748
- case "decline":
749
- return api.huntDeclineCapture(route);
750
777
  case "end":
751
778
  return api.huntEnd(route);
752
779
  case "retry_settlement":
@@ -1873,7 +1900,7 @@ Core loop: game_daily once a day; game_companion feed/play/quest/claim to keep e
1873
1900
  game_level_up when exp allows; game_learn_move when an offer is pending.
1874
1901
  Arena: arena_enter (25 energy + 25 happiness, 4 fights), arena_fight mode=bot, then arena_attack each round
1875
1902
  (read arena_battle for moves and uses left; Rally and Mend are free once each), arena_end leave when done.
1876
- Hunt: hunt_begin -> hunt_act search -> attack until defeated -> capture (1-3 Rune + a Scroll) or decline -> end.
1903
+ Hunt: hunt_begin -> hunt_act search -> attack until defeated -> capture (1-3 Rune + a Scroll) or end. One encounter per hunt.
1877
1904
  Markets: exchange_markets / exchange_book / exchange_order on venue "game" (items vs Gold) or "token" (elements vs TEST-RUNE).
1878
1905
  Vaults (pooled liquidity, one amm/active/grid per market): vault_list, vault_position, vault_deposit, vault_shares (withdraw/lock/burn), vault_fund, vault_crank.
1879
1906
  Rune: rune_move withdraw (game -> token) / deposit (token -> game). Bridge: bridge_balances, bridge_faucet, bridge_deposit, bridge_redeem.
@@ -1906,7 +1933,7 @@ var READ_ONLY_NOTE = `This endpoint is READ-ONLY: it explains the protocol and r
1906
1933
  To play, trade or bridge, run the local server with a wallet phrase: ${DOCS}/ai/mcp`;
1907
1934
  function buildServer() {
1908
1935
  const server = new McpServer(
1909
- { name: "paralith", version: "0.3.1" },
1936
+ { name: "paralith", version: VERSION },
1910
1937
  { instructions: READ_ONLY ? `${READ_ONLY_NOTE}
1911
1938
 
1912
1939
  ${INSTRUCTIONS}` : INSTRUCTIONS }
package/dist/server.mjs CHANGED
@@ -511,6 +511,38 @@ var init_runtime = __esm({
511
511
  }
512
512
  });
513
513
 
514
+ // src/update.mjs
515
+ function check(now) {
516
+ checkedAt = now;
517
+ fetch("https://registry.npmjs.org/paralith-mcp/latest", { signal: AbortSignal.timeout(1e4) }).then((r) => r.ok ? r.json() : null).then((j) => {
518
+ if (j?.version) latest = j.version;
519
+ }, () => {
520
+ });
521
+ }
522
+ function updateNote(now = Date.now()) {
523
+ if (now - checkedAt > CHECK_MS) check(now);
524
+ if (!latest || !newer(latest, VERSION) || now - notedAt < NOTE_MS) return null;
525
+ notedAt = now;
526
+ return `paralith-mcp ${latest} is out (this is ${VERSION}). Tell the user to restart this app to get it.`;
527
+ }
528
+ var VERSION, CHECK_MS, NOTE_MS, latest, checkedAt, notedAt, newer;
529
+ var init_update = __esm({
530
+ "src/update.mjs"() {
531
+ "use strict";
532
+ VERSION = "0.3.2";
533
+ CHECK_MS = 6 * 36e5;
534
+ NOTE_MS = 36e5;
535
+ latest = null;
536
+ checkedAt = 0;
537
+ notedAt = 0;
538
+ newer = (a, b) => {
539
+ const [x, y] = [a, b].map((v) => v.split(".").map(Number));
540
+ for (let i = 0; i < 3; i++) if (x[i] !== y[i]) return x[i] > y[i];
541
+ return false;
542
+ };
543
+ }
544
+ });
545
+
514
546
  // src/tool.mjs
515
547
  import { z } from "zod";
516
548
  async function migrationRefusal(read = readKey, now = Date.now()) {
@@ -536,7 +568,8 @@ function tool(server, name, description, inputSchema, run2, annotations = {}, vi
536
568
  const raw = await run2(args ?? {});
537
569
  const value = view && !args?.full ? await view(raw) : raw;
538
570
  const text = typeof value === "string" ? value : JSON.stringify(value, bigints, 2);
539
- return { content: [{ type: "text", text: text ?? "null" }] };
571
+ const note = READ_ONLY ? null : updateNote();
572
+ return { content: [{ type: "text", text: text ?? "null" }, ...note ? [{ type: "text", text: note }] : []] };
540
573
  } catch (error) {
541
574
  return { isError: true, content: [{ type: "text", text: explain(error) }] };
542
575
  }
@@ -557,6 +590,7 @@ var init_tool = __esm({
557
590
  "src/tool.mjs"() {
558
591
  "use strict";
559
592
  init_runtime();
593
+ init_update();
560
594
  migrationSeen = null;
561
595
  bigints = (_k, v) => typeof v === "bigint" ? v.toString() : v;
562
596
  READ = { readOnlyHint: true, openWorldHint: true };
@@ -943,9 +977,9 @@ function registerGame(server) {
943
977
  tool(
944
978
  server,
945
979
  "hunt_act",
946
- "Act in your live hunt. search: find a wild creature (3 s cooldown). attack: one round with a move. capture: one try with 1-3 Rune (+1 Scroll), ends the run. decline: leave a defeated creature. end: finish the run and get unspent supplies back. retry_settlement: re-send a stuck final.",
980
+ "Act in your live hunt. A hunt is one encounter. search: find the wild creature (once per hunt). attack: one round with a move; losing ends the run. After a win: capture (one try with 1-3 Rune + 1 Scroll, consumed either way, ends the run) or end. end: finish the run and get unspent supplies back. retry_settlement: re-send a stuck final.",
947
981
  {
948
- action: z2.enum(["search", "attack", "capture", "decline", "end", "retry_settlement"]),
982
+ action: z2.enum(["search", "attack", "capture", "end", "retry_settlement"]),
949
983
  move: z2.string().optional(),
950
984
  round: z2.number().int().optional(),
951
985
  runes: z2.number().int().min(1).max(3).optional()
@@ -963,8 +997,6 @@ function registerGame(server) {
963
997
  }
964
998
  case "capture":
965
999
  return api.huntCapture(route, runes ?? 1);
966
- case "decline":
967
- return api.huntDeclineCapture(route);
968
1000
  case "end":
969
1001
  return api.huntEnd(route);
970
1002
  case "retry_settlement":
@@ -2152,7 +2184,7 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2152
2184
  import { z as z9 } from "zod";
2153
2185
  function buildServer() {
2154
2186
  const server = new McpServer(
2155
- { name: "paralith", version: "0.3.1" },
2187
+ { name: "paralith", version: VERSION },
2156
2188
  { instructions: READ_ONLY ? `${READ_ONLY_NOTE}
2157
2189
 
2158
2190
  ${INSTRUCTIONS}` : INSTRUCTIONS }
@@ -2242,6 +2274,7 @@ var init_build = __esm({
2242
2274
  init_vaults();
2243
2275
  init_show();
2244
2276
  init_progress();
2277
+ init_update();
2245
2278
  DOCS = process.env.PARALITH_DOCS_URL || "https://docs.paralithmarkets.com";
2246
2279
  INSTRUCTIONS = `Paralith on AO (HyperBEAM): Rune Realm (a companion game), two order books, and the PUSD bridge.
2247
2280
  Everything is TEST-prefixed while unreleased. Reads are free; every write is a signed message (a few seconds round trip, longer under load).
@@ -2251,7 +2284,7 @@ Core loop: game_daily once a day; game_companion feed/play/quest/claim to keep e
2251
2284
  game_level_up when exp allows; game_learn_move when an offer is pending.
2252
2285
  Arena: arena_enter (25 energy + 25 happiness, 4 fights), arena_fight mode=bot, then arena_attack each round
2253
2286
  (read arena_battle for moves and uses left; Rally and Mend are free once each), arena_end leave when done.
2254
- Hunt: hunt_begin -> hunt_act search -> attack until defeated -> capture (1-3 Rune + a Scroll) or decline -> end.
2287
+ Hunt: hunt_begin -> hunt_act search -> attack until defeated -> capture (1-3 Rune + a Scroll) or end. One encounter per hunt.
2255
2288
  Markets: exchange_markets / exchange_book / exchange_order on venue "game" (items vs Gold) or "token" (elements vs TEST-RUNE).
2256
2289
  Vaults (pooled liquidity, one amm/active/grid per market): vault_list, vault_position, vault_deposit, vault_shares (withdraw/lock/burn), vault_fund, vault_crank.
2257
2290
  Rune: rune_move withdraw (game -> token) / deposit (token -> game). Bridge: bridge_balances, bridge_faucet, bridge_deposit, bridge_redeem.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "paralith-mcp",
3
- "version": "0.3.1",
4
- "description": "MCP server for Paralith on AO: an AI with one 24-word phrase plays Rune Realm, trades and bridges PUSD (TEST deployment).",
3
+ "version": "0.4.0",
4
+ "description": "MCP server for Paralith on AO: an AI with one 24-word phrase plays Rune Realm, trades and bridges PUSD; plus paralith-bridge, the bridge operator CLI (TEST deployment).",
5
5
  "license": "UNLICENSED",
6
6
  "homepage": "https://docs.paralithmarkets.com/ai/mcp",
7
7
  "keywords": [
@@ -15,7 +15,8 @@
15
15
  ],
16
16
  "type": "module",
17
17
  "bin": {
18
- "paralith-mcp": "dist/server.mjs"
18
+ "paralith-mcp": "dist/server.mjs",
19
+ "paralith-bridge": "dist/bridge.mjs"
19
20
  },
20
21
  "files": [
21
22
  "dist",