@agentwonderland/mcp 0.1.30 → 0.1.31

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,23 @@ 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 report = process.report;
93
+ const glibc = report?.getReport?.()?.header?.glibcVersionRuntime;
94
+ if (!glibc)
95
+ return false;
96
+ }
97
+ catch {
98
+ return false;
99
+ }
100
+ }
101
+ return true;
86
102
  }
87
103
  /**
88
104
  * Attempt to install @open-wallet-standard/core into the MCP package's own
@@ -94,9 +110,12 @@ export async function installOws() {
94
110
  return { ok: true, message: "OWS is already installed." };
95
111
  }
96
112
  if (!platformSupportsOws()) {
113
+ const label = process.platform === "linux"
114
+ ? `${process.platform}-${process.arch} (likely musl/Alpine)`
115
+ : `${process.platform}-${process.arch}`;
97
116
  return {
98
117
  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`,
118
+ 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
119
  };
101
120
  }
102
121
  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.31",
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,22 @@ 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 report = (process as NodeJS.Process & { report?: { getReport?: () => { header?: { glibcVersionRuntime?: string } } } }).report;
191
+ const glibc = report?.getReport?.()?.header?.glibcVersionRuntime;
192
+ if (!glibc) return false;
193
+ } catch {
194
+ return false;
195
+ }
196
+ }
197
+
198
+ return true;
184
199
  }
185
200
 
186
201
  export interface OwsInstallResult {
@@ -200,9 +215,12 @@ export async function installOws(): Promise<OwsInstallResult> {
200
215
  }
201
216
 
202
217
  if (!platformSupportsOws()) {
218
+ const label = process.platform === "linux"
219
+ ? `${process.platform}-${process.arch} (likely musl/Alpine)`
220
+ : `${process.platform}-${process.arch}`;
203
221
  return {
204
222
  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`,
223
+ 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
224
  };
207
225
  }
208
226