@toon-protocol/client-mcp 0.5.3 → 0.7.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/index.d.ts CHANGED
@@ -656,8 +656,26 @@ interface DaemonConfigFile {
656
656
  faucetUrl?: string;
657
657
  /** Town relay WS URL for FREE reads. */
658
658
  relayUrl?: string;
659
- /** Default ILP publish destination. Default `g.townhouse.town`. */
659
+ /**
660
+ * Apex CHANNEL ANCHOR (settlement peer). Defaults to the genesis seed apex's
661
+ * ILP anchor (core's `genesis-peers.json`); its last segment becomes the apex
662
+ * `peerId` the channel keys under. This is NOT a write route — see
663
+ * `publishDestination`/`storeDestination`.
664
+ */
660
665
  destination?: string;
666
+ /**
667
+ * ILP route for PUBLISHES (relay writes → `POST /write`). When unset it is
668
+ * DERIVED from the `…​.relay.store` anchor (`g.proxy.relay.store` →
669
+ * `g.proxy.relay`) — never the bare anchor, which the apex forwards to the
670
+ * store and which 404s a `/write`. Env: `TOON_CLIENT_PUBLISH_DESTINATION`.
671
+ */
672
+ publishDestination?: string;
673
+ /**
674
+ * ILP route for UPLOADS (kind:5094 blob → `POST /store` → Arweave). When unset
675
+ * it is DERIVED from the `…​.relay.store` anchor (`g.proxy.relay.store` →
676
+ * `g.proxy.store`). Env: `TOON_CLIENT_STORE_DESTINATION`.
677
+ */
678
+ storeDestination?: string;
661
679
  /** Default fee per paid write, base units. Default `1`. */
662
680
  feePerEvent?: string;
663
681
  /** Channel nonce-watermark persistence file. Default `<dir>/channels.json`. */
@@ -697,6 +715,13 @@ interface DaemonConfigFile {
697
715
  solanaChannel?: ToonClientConfig['solanaChannel'];
698
716
  /** Mina on-chain payment-channel params (required when `chain` is mina). */
699
717
  minaChannel?: ToonClientConfig['minaChannel'];
718
+ /**
719
+ * Ordered Arweave gateways (primary first) used to stamp uploaded-media URLs:
720
+ * the primary becomes the `imeta` `url`, the rest become `fallback` mirrors.
721
+ * Default: the shared `ARWEAVE_GATEWAYS` (ar.io → arweave.net → permagate.io).
722
+ * Env override: `TOON_CLIENT_ARWEAVE_GATEWAYS` (comma-separated).
723
+ */
724
+ arweaveGateways?: string[];
700
725
  }
701
726
  interface ResolvedDaemonConfig {
702
727
  httpPort: number;
@@ -713,6 +738,10 @@ interface ResolvedDaemonConfig {
713
738
  /** Devnet faucet base URL, when configured. */
714
739
  faucetUrl?: string;
715
740
  destination: string;
741
+ /** Resolved default destination for relay-write publishes (falls back to `destination`). */
742
+ publishDestination: string;
743
+ /** Resolved default destination for store/Arweave uploads (falls back to `destination`). */
744
+ storeDestination: string;
716
745
  feePerEvent: bigint;
717
746
  apex?: ApexNegotiationConfig;
718
747
  /** Apex child peers reached via the same apex channel (e.g. dvm, mill). */
@@ -724,6 +753,13 @@ interface ResolvedDaemonConfig {
724
753
  /** Fully-built config for the `ToonClient` constructor. */
725
754
  toonClientConfig: ToonClientConfig;
726
755
  network?: string;
756
+ /**
757
+ * Ordered Arweave gateways for stamping uploaded-media URLs (primary first).
758
+ * Always populated by `resolveConfig` (default = shared `ARWEAVE_GATEWAYS`);
759
+ * optional only so manually-built configs (tests) may omit it — consumers
760
+ * fall back to the shared default when it is absent.
761
+ */
762
+ arweaveGateways?: string[];
727
763
  }
728
764
  /**
729
765
  * Password used to encrypt an auto-generated keystore (#251 first-run
@@ -741,13 +777,6 @@ declare function defaultConfigPath(): string;
741
777
  declare function readConfigFile(path: string): DaemonConfigFile;
742
778
  /** Resolve the mnemonic from env / keystore / config (in precedence order). */
743
779
  declare function resolveMnemonic(file: DaemonConfigFile): string;
744
- /**
745
- * Build the full resolved daemon config (file overlaid with env, mnemonic
746
- * resolved, ToonClientConfig assembled). Env overrides supported:
747
- * TOON_CLIENT_BTP_URL, TOON_CLIENT_PROXY_URL, TOON_CLIENT_FAUCET_URL,
748
- * TOON_CLIENT_RELAY_URL, TOON_CLIENT_HTTP_PORT, TOON_CLIENT_NETWORK,
749
- * TOON_CLIENT_DESTINATION.
750
- */
751
780
  declare function resolveConfig(file: DaemonConfigFile): ResolvedDaemonConfig;
752
781
 
753
782
  /**
@@ -1012,7 +1041,11 @@ declare class ClientRunner {
1012
1041
  private buildTemplate;
1013
1042
  /** Latest self-authored event of `kind` currently in the merged read buffer. */
1014
1043
  private latestSelfReplaceable;
1015
- /** Tags for a published media event referencing an Arweave URL. */
1044
+ /**
1045
+ * Tags for a published media event referencing an Arweave URL. `url` is the
1046
+ * primary gateway; `fallbacks` are mirror URLs for the same tx id on other
1047
+ * gateways, emitted so readers can fail over if the primary is unreachable.
1048
+ */
1016
1049
  private buildMediaTags;
1017
1050
  /** Open (or return) a payment channel on the selected (or default) apex. */
1018
1051
  openChannel(destination?: string, btpUrl?: string): Promise<{
package/dist/index.js CHANGED
@@ -8,7 +8,7 @@ import {
8
8
  hasConfiguredIdentity,
9
9
  registerRoutes,
10
10
  scaffoldFirstRun
11
- } from "./chunk-CAGUIHZV.js";
11
+ } from "./chunk-EY5GFEDH.js";
12
12
  import {
13
13
  PUBLISH_TOOL,
14
14
  TOOL_DEFINITIONS,
@@ -18,7 +18,7 @@ import {
18
18
  buildFollowListFilter,
19
19
  buildProfileFilter,
20
20
  dispatchTool
21
- } from "./chunk-DZ4NGYFA.js";
21
+ } from "./chunk-PX3DOSEG.js";
22
22
  import {
23
23
  ControlApiError,
24
24
  ControlClient,
@@ -36,7 +36,7 @@ import {
36
36
  resolveMnemonic,
37
37
  spawnDaemonDetached,
38
38
  waitForReady
39
- } from "./chunk-3UECPDBJ.js";
39
+ } from "./chunk-76CTU2A5.js";
40
40
  import "./chunk-32QD72IL.js";
41
41
  import "./chunk-DLYE6U2Z.js";
42
42
  import "./chunk-LR7W2ISE.js";
package/dist/mcp.js CHANGED
@@ -4,7 +4,7 @@ import {
4
4
  APP_RESOURCE_URI,
5
5
  TOOL_DEFINITIONS,
6
6
  dispatchTool
7
- } from "./chunk-DZ4NGYFA.js";
7
+ } from "./chunk-PX3DOSEG.js";
8
8
  import {
9
9
  ControlClient,
10
10
  defaultConfigPath,
@@ -12,7 +12,7 @@ import {
12
12
  readConfigFile,
13
13
  spawnDaemonDetached,
14
14
  waitForReady
15
- } from "./chunk-3UECPDBJ.js";
15
+ } from "./chunk-76CTU2A5.js";
16
16
  import "./chunk-32QD72IL.js";
17
17
  import "./chunk-DLYE6U2Z.js";
18
18
  import "./chunk-LR7W2ISE.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toon-protocol/client-mcp",
3
- "version": "0.5.3",
3
+ "version": "0.7.0",
4
4
  "description": "Always-on local daemon + MCP server letting a Claude agent (Desktop or Code) act as a TOON Protocol client: pay-to-write publishing, free reads, channel/balance management, and swaps.",
5
5
  "license": "MIT",
6
6
  "author": "Jonathan Green",
@@ -48,8 +48,9 @@
48
48
  "tsx": "^4.19.2",
49
49
  "typescript": "^5.3.0",
50
50
  "vitest": "^1.0.0",
51
- "@toon-protocol/client": "0.14.1",
52
- "@toon-protocol/views": "0.6.1"
51
+ "@toon-protocol/arweave": "0.1.1",
52
+ "@toon-protocol/views": "0.7.0",
53
+ "@toon-protocol/client": "0.14.2"
53
54
  },
54
55
  "engines": {
55
56
  "node": ">=20"