@agentwonderland/mcp 0.1.30 → 0.1.32

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.
@@ -15,8 +15,8 @@ import type { Keypair } from "@solana/web3.js";
15
15
  export declare function isOwsAvailable(): Promise<boolean>;
16
16
  /**
17
17
  * Heuristic: is this platform likely to have a prebuilt OWS binary?
18
- * OWS ships prebuilds for {darwin, linux, win32} x {x64, arm64}.
19
- * Musl-libc environments (Alpine) often lack prebuilds.
18
+ * OWS ships glibc prebuilds for {darwin, linux, win32} x {x64, arm64}.
19
+ * Musl-libc (Alpine) and other libcs have no prebuilds.
20
20
  */
21
21
  export declare function platformSupportsOws(): boolean;
22
22
  export interface OwsInstallResult {
@@ -73,8 +73,8 @@ export async function isOwsAvailable() {
73
73
  }
74
74
  /**
75
75
  * Heuristic: is this platform likely to have a prebuilt OWS binary?
76
- * OWS ships prebuilds for {darwin, linux, win32} x {x64, arm64}.
77
- * Musl-libc environments (Alpine) often lack prebuilds.
76
+ * OWS ships glibc prebuilds for {darwin, linux, win32} x {x64, arm64}.
77
+ * Musl-libc (Alpine) and other libcs have no prebuilds.
78
78
  */
79
79
  export function platformSupportsOws() {
80
80
  const ok = new Set([
@@ -82,7 +82,22 @@ export function platformSupportsOws() {
82
82
  "linux-x64", "linux-arm64",
83
83
  "win32-x64", "win32-arm64",
84
84
  ]);
85
- return ok.has(`${process.platform}-${process.arch}`);
85
+ if (!ok.has(`${process.platform}-${process.arch}`))
86
+ return false;
87
+ // On Linux, distinguish glibc from musl. musl systems have no prebuilt binary.
88
+ if (process.platform === "linux") {
89
+ try {
90
+ // Node exposes the runtime glibc version when linked against glibc;
91
+ // on musl this field is empty.
92
+ const header = process.report?.getReport?.()?.header;
93
+ if (!header?.glibcVersionRuntime)
94
+ return false;
95
+ }
96
+ catch {
97
+ return false;
98
+ }
99
+ }
100
+ return true;
86
101
  }
87
102
  /**
88
103
  * Attempt to install @open-wallet-standard/core into the MCP package's own
@@ -94,9 +109,12 @@ export async function installOws() {
94
109
  return { ok: true, message: "OWS is already installed." };
95
110
  }
96
111
  if (!platformSupportsOws()) {
112
+ const label = process.platform === "linux"
113
+ ? `${process.platform}-${process.arch} (likely musl/Alpine)`
114
+ : `${process.platform}-${process.arch}`;
97
115
  return {
98
116
  ok: false,
99
- message: `OWS does not ship a prebuilt binary for ${process.platform}-${process.arch}. Continue with plaintext storage, or install a Node build toolchain (python3, make, node-gyp) and run: npm install -g @open-wallet-standard/core`,
117
+ message: `OWS does not ship a prebuilt binary for ${label}. Plaintext storage is the only option on this system. To build from source you'd need glibc + Node build tools (python3, make, node-gyp).`,
100
118
  };
101
119
  }
102
120
  const { execFileSync } = await import("node:child_process");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentwonderland/mcp",
3
- "version": "0.1.30",
3
+ "version": "0.1.32",
4
4
  "type": "module",
5
5
  "description": "MCP server for the Agent Wonderland AI agent marketplace",
6
6
  "bin": {
@@ -171,8 +171,8 @@ export async function isOwsAvailable(): Promise<boolean> {
171
171
 
172
172
  /**
173
173
  * Heuristic: is this platform likely to have a prebuilt OWS binary?
174
- * OWS ships prebuilds for {darwin, linux, win32} x {x64, arm64}.
175
- * Musl-libc environments (Alpine) often lack prebuilds.
174
+ * OWS ships glibc prebuilds for {darwin, linux, win32} x {x64, arm64}.
175
+ * Musl-libc (Alpine) and other libcs have no prebuilds.
176
176
  */
177
177
  export function platformSupportsOws(): boolean {
178
178
  const ok = new Set([
@@ -180,7 +180,21 @@ export function platformSupportsOws(): boolean {
180
180
  "linux-x64", "linux-arm64",
181
181
  "win32-x64", "win32-arm64",
182
182
  ]);
183
- return ok.has(`${process.platform}-${process.arch}`);
183
+ if (!ok.has(`${process.platform}-${process.arch}`)) return false;
184
+
185
+ // On Linux, distinguish glibc from musl. musl systems have no prebuilt binary.
186
+ if (process.platform === "linux") {
187
+ try {
188
+ // Node exposes the runtime glibc version when linked against glibc;
189
+ // on musl this field is empty.
190
+ const header = (process.report?.getReport?.() as { header?: { glibcVersionRuntime?: string } } | undefined)?.header;
191
+ if (!header?.glibcVersionRuntime) return false;
192
+ } catch {
193
+ return false;
194
+ }
195
+ }
196
+
197
+ return true;
184
198
  }
185
199
 
186
200
  export interface OwsInstallResult {
@@ -200,9 +214,12 @@ export async function installOws(): Promise<OwsInstallResult> {
200
214
  }
201
215
 
202
216
  if (!platformSupportsOws()) {
217
+ const label = process.platform === "linux"
218
+ ? `${process.platform}-${process.arch} (likely musl/Alpine)`
219
+ : `${process.platform}-${process.arch}`;
203
220
  return {
204
221
  ok: false,
205
- message: `OWS does not ship a prebuilt binary for ${process.platform}-${process.arch}. Continue with plaintext storage, or install a Node build toolchain (python3, make, node-gyp) and run: npm install -g @open-wallet-standard/core`,
222
+ message: `OWS does not ship a prebuilt binary for ${label}. Plaintext storage is the only option on this system. To build from source you'd need glibc + Node build tools (python3, make, node-gyp).`,
206
223
  };
207
224
  }
208
225