@cloakely/mcp 0.7.0 → 0.7.1

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/server.d.ts CHANGED
@@ -3,7 +3,7 @@ import { type Prover } from "@cloakely/sdk";
3
3
  import type { Settings } from "./config.js";
4
4
  export { loadSettings, type Settings, type Limits } from "./config.js";
5
5
  export { Spending } from "./limits.js";
6
- export declare const VERSION = "0.7.0";
6
+ export declare const VERSION = "0.7.1";
7
7
  export declare const HOSTED_URL = "https://cloak.boblabs.tech/mcp";
8
8
  /** Turn an SDK or chain error into one plain sentence an agent can act on. */
9
9
  export declare function explain(e: unknown): string;
package/dist/server.js CHANGED
@@ -8,7 +8,7 @@ import { Cloak, CloakPrivate, cloakAuctionAbi, cloakPairAbi, cloakVaultsAbi, leg
8
8
  import { Spending } from "./limits.js";
9
9
  export { loadSettings } from "./config.js";
10
10
  export { Spending } from "./limits.js";
11
- export const VERSION = "0.7.0";
11
+ export const VERSION = "0.7.1";
12
12
  export const HOSTED_URL = "https://cloak.boblabs.tech/mcp";
13
13
  const INSTRUCTIONS = `Cloak: sealed-bid token launches and private trading on Kinetiq's Elysium (HYPE is the gas and base currency).
14
14
 
@@ -105,7 +105,7 @@ export function createCloakServer(settings, opts = {}) {
105
105
  throw new Error("This deployment has no shared launch-token vault.");
106
106
  const p = await priv();
107
107
  if (!sharedC || sharedC.priv !== p)
108
- sharedC = new SharedVaultClient(p, d.shared, d.sharedRouter, sharedProver, sharedRelayerSubmitter(d.relayerUrl), d.sharedBlock ?? 0n);
108
+ sharedC = new SharedVaultClient(p, d.shared, d.sharedRouter, sharedProver, sharedRelayerSubmitter(d.relayerUrl), d.sharedBlock ?? 0n, d.sharedBatcher);
109
109
  return sharedC;
110
110
  }
111
111
  /** Private balance of one asset, wherever its vault is. */
@@ -691,19 +691,19 @@ export function createCloakServer(settings, opts = {}) {
691
691
  const t = await resolve(token);
692
692
  if (t.kind !== "token")
693
693
  throw new Error(`${t.symbol} isn't a launch token: batch orders trade launch tokens against HYPE.`);
694
- if (t.shared)
695
- throw new Error(`${t.symbol} is in the shared launch-token vault, which has no batch rounds yet. Use private_swap.`);
696
694
  const x = amountOf(amount, 18);
697
695
  if (x === null)
698
696
  throw new Error('Give an exact amount for a batch order ("max" works for private_swap).');
699
697
  const c = await cost(side === "buy" ? (await vaults())[0] : t, x);
700
698
  spending.check(c.budget, c.value);
701
699
  const p = await priv();
702
- const round = await p.roundInfo();
700
+ if (t.shared && !d.sharedBatcher)
701
+ throw new Error(`${t.symbol} is in the shared launch-token vault, which has no batch rounds on this deployment. Use private_swap.`);
702
+ const round = t.shared ? await (await shared()).roundInfo() : await p.roundInfo();
703
703
  if (isDry(dry_run))
704
704
  return { dryRun: true, wouldPlace: `${formatEther(x)} ${side === "buy" ? "HYPE" : t.symbol} as standard-size ${side} orders`, roundEndsAt: iso(round.endsAt) };
705
705
  return exclusive(async () => {
706
- const r = await p.batch(t.token, side, x);
706
+ const r = t.shared ? await (await shared()).batch(t.token, side, x) : await p.batch(t.token, side, x);
707
707
  const placed = r.orders.reduce((a, o) => a + o.size, 0n);
708
708
  const pc = await cost(side === "buy" ? (await vaults())[0] : t, placed);
709
709
  spending.record(pc.budget, pc.value);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloakely/mcp",
3
3
  "mcpName": "io.github.NECOKIZZ/cloak",
4
- "version": "0.7.0",
4
+ "version": "0.7.1",
5
5
  "description": "Cloak's MCP server: let an AI agent launch tokens with sealed bids and trade them privately on Elysium, with spending limits, testnet by default and a local signer.",
6
6
  "keywords": [
7
7
  "mcp",
@@ -47,7 +47,7 @@
47
47
  "@modelcontextprotocol/sdk": "1.32.1",
48
48
  "viem": "2.21.54",
49
49
  "zod": "4.6.7",
50
- "@cloakely/sdk": "^0.7.0"
50
+ "@cloakely/sdk": "^0.7.1"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@types/node": "22.10.2",