@goplausible/openclaw-algorand-plugin 1.8.1 → 1.8.2

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/README.md CHANGED
@@ -26,7 +26,7 @@
26
26
  openclaw plugins install @goplausible/openclaw-algorand-plugin
27
27
  ```
28
28
 
29
- Or install from local path:
29
+ Or install from local path if you are running from source code:
30
30
 
31
31
  ```bash
32
32
  openclaw plugins install ./path/to/openclaw-algorand-plugin
@@ -37,21 +37,17 @@ openclaw plugins install ./path/to/openclaw-algorand-plugin
37
37
  After installing, run these commands:
38
38
 
39
39
  ```bash
40
- # 1. Initialize plugin (write memory file + configure mcporter)
41
- openclaw algorand-plugin init
42
-
43
- # 2. Run interactive setup (keyring persistence + x402 toggle)
40
+ # 1. Setup plugin (memory file + mcporter + interactive config)
44
41
  openclaw algorand-plugin setup
45
42
 
46
- # 3. Restart the gateway
43
+ # 2. Restart the gateway
47
44
  openclaw gateway restart
48
45
  ```
49
46
 
50
47
  ## Commands
51
48
 
52
49
  ```bash
53
- openclaw algorand-plugin init # Write plugin memory + configure mcporter
54
- openclaw algorand-plugin setup # Run interactive setup wizard
50
+ openclaw algorand-plugin setup # Initialize + configure plugin (memory, mcporter, options)
55
51
  openclaw algorand-plugin status # Show plugin status (binary, mcporter, config)
56
52
  openclaw algorand-plugin mcp-config # Show MCP config snippet for external coding agents
57
53
  ```
package/index.ts CHANGED
@@ -92,6 +92,42 @@ function updatePluginConfig(newConfig: AlgorandPluginConfig): { success: boolean
92
92
  }
93
93
  }
94
94
 
95
+ function stopExistingMcpProcesses(): { stopped: number; message: string } {
96
+ try {
97
+ // Find all running algorand-mcp processes
98
+ const psOutput = execSync("ps aux 2>/dev/null || tasklist 2>/dev/null || echo ''", { encoding: "utf-8" });
99
+ const lines = psOutput.split("\n").filter((line: string) => line.includes("algorand-mcp") && !line.includes("grep"));
100
+
101
+ if (lines.length === 0) {
102
+ return { stopped: 0, message: "No existing algorand-mcp processes found" };
103
+ }
104
+
105
+ // Extract PIDs and kill them
106
+ let stopped = 0;
107
+ for (const line of lines) {
108
+ const parts = line.trim().split(/\s+/);
109
+ const pid = parts[1]; // PID is second column in ps aux
110
+ if (pid && /^\d+$/.test(pid)) {
111
+ try {
112
+ execSync(`kill ${pid} 2>/dev/null`, { encoding: "utf-8" });
113
+ stopped++;
114
+ } catch {
115
+ // Process may have already exited
116
+ }
117
+ }
118
+ }
119
+
120
+ // Brief wait for processes to terminate
121
+ if (stopped > 0) {
122
+ execSync("sleep 1");
123
+ }
124
+
125
+ return { stopped, message: `Stopped ${stopped} existing algorand-mcp process${stopped !== 1 ? "es" : ""}` };
126
+ } catch {
127
+ return { stopped: 0, message: "Could not check for existing processes" };
128
+ }
129
+ }
130
+
95
131
  function configureMcporter(): { success: boolean; message: string } {
96
132
  const mcpCommand = getMcpBinaryPath();
97
133
 
@@ -221,12 +257,12 @@ export default function register(api: PluginApi) {
221
257
  .command("algorand-plugin")
222
258
  .description("Algorand blockchain integration (GoPlausible)");
223
259
 
224
- // Init command - writes plugin memory file AND configures mcporter
260
+ // Setup command - initializes (memory + mcporter) then runs interactive config
225
261
  algorand
226
- .command("init")
227
- .description("Initialize Algorand plugin (memory file + mcporter config)")
262
+ .command("setup")
263
+ .description("Initialize and configure Algorand plugin")
228
264
  .action(async () => {
229
- console.log("\nšŸ”· Initializing Algorand plugin...\n");
265
+ console.log("\nšŸ”· Setting up Algorand plugin...\n");
230
266
 
231
267
  const workspacePath = getWorkspacePath(api);
232
268
 
@@ -238,7 +274,15 @@ export default function register(api: PluginApi) {
238
274
  console.error(` āŒ ${memResult.message}`);
239
275
  }
240
276
 
241
- // Step 2: Configure mcporter
277
+ // Step 2: Stop any existing algorand-mcp processes
278
+ const stopResult = stopExistingMcpProcesses();
279
+ if (stopResult.stopped > 0) {
280
+ console.log(` āœ… ${stopResult.message}`);
281
+ } else {
282
+ console.log(` ā„¹ļø ${stopResult.message}`);
283
+ }
284
+
285
+ // Step 3: Configure mcporter
242
286
  console.log("");
243
287
  const mcpResult = configureMcporter();
244
288
  if (mcpResult.success) {
@@ -247,15 +291,8 @@ export default function register(api: PluginApi) {
247
291
  console.log(` āš ļø ${mcpResult.message}`);
248
292
  }
249
293
 
250
- console.log("\n Run `openclaw algorand-plugin setup` to configure options.");
251
- console.log(" Run `mcporter list algorand-mcp --schema` to verify MCP tools.\n");
252
- });
253
-
254
- // Setup wizard
255
- algorand
256
- .command("setup")
257
- .description("Run interactive Algorand plugin setup")
258
- .action(async () => {
294
+ // Step 4: Interactive config
295
+ console.log("");
259
296
  const newConfig = await runSetup(pluginConfig);
260
297
  if (newConfig) {
261
298
  const result = updatePluginConfig(newConfig);
@@ -269,6 +306,8 @@ export default function register(api: PluginApi) {
269
306
  console.log(` "plugins": { "allow": ["${PLUGIN_ID}"], "entries": { "${PLUGIN_ID}": { "config": ${JSON.stringify(newConfig)} } } }\n`);
270
307
  }
271
308
  }
309
+
310
+ console.log(" Run `mcporter list algorand-mcp --schema` to verify MCP tools.\n");
272
311
  });
273
312
 
274
313
  // Status command
@@ -296,7 +335,7 @@ export default function register(api: PluginApi) {
296
335
  console.log("");
297
336
  console.log(" MCP Server:");
298
337
  console.log(` Binary: ${mcp.available ? `āœ… ${mcp.path}` : "āš ļø Not found"}`);
299
- console.log(` mcporter: ${mcporterConfigured ? "āœ… Configured" : "āš ļø Not configured (run init)"}`);
338
+ console.log(` mcporter: ${mcporterConfigured ? "āœ… Configured" : "āš ļø Not configured (run setup)"}`);
300
339
  console.log("");
301
340
  console.log(" Config:");
302
341
  console.log(` x402: ${pluginConfig.enableX402 !== false ? "Enabled" : "Disabled"}`);
@@ -353,7 +392,7 @@ export default function register(api: PluginApi) {
353
392
  console.log(` }`);
354
393
  console.log(` }\n`);
355
394
  console.log(" Cursor (.cursor/mcp.json) — same format\n");
356
- console.log(" Note: OpenClaw uses mcporter. Run `openclaw algorand-plugin init` to configure.\n");
395
+ console.log(" Note: OpenClaw uses mcporter. Run `openclaw algorand-plugin setup` to configure.\n");
357
396
  });
358
397
  },
359
398
  { commands: ["algorand-plugin"] }
@@ -380,9 +419,8 @@ export default function register(api: PluginApi) {
380
419
  } catch { /* ignore on install */ }
381
420
 
382
421
  console.log(" Next steps:");
383
- console.log(" 1. Run `openclaw algorand-plugin init` — configure mcporter + add plugin memory");
384
- console.log(" 2. Run `openclaw algorand-plugin setup` — configure options & add to allow list");
385
- console.log(" 3. Restart OpenClaw gateway\n");
422
+ console.log(" 1. Run `openclaw algorand-plugin setup` — initialize + configure plugin");
423
+ console.log(" 2. Restart OpenClaw gateway\n");
386
424
  console.log(` Docs: ${GOPLAUSIBLE_SERVICES.website}\n`);
387
425
  },
388
426
  { name: "algorand.post-install", description: "Show setup instructions on install" }
@@ -2,7 +2,7 @@
2
2
  "id": "openclaw-algorand-plugin",
3
3
  "name": "Algorand Integration",
4
4
  "description": "Algorand blockchain integration with MCP and skills — by GoPlausible",
5
- "version": "1.8.1",
5
+ "version": "1.8.2",
6
6
  "skills": [
7
7
  "skills/algorand-development",
8
8
  "skills/algorand-typescript",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@goplausible/openclaw-algorand-plugin",
3
- "version": "1.8.1",
3
+ "version": "1.8.2",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },