@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 +4 -8
- package/index.ts +57 -19
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
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.
|
|
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
|
-
#
|
|
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
|
|
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
|
-
//
|
|
260
|
+
// Setup command - initializes (memory + mcporter) then runs interactive config
|
|
225
261
|
algorand
|
|
226
|
-
.command("
|
|
227
|
-
.description("Initialize Algorand plugin
|
|
262
|
+
.command("setup")
|
|
263
|
+
.description("Initialize and configure Algorand plugin")
|
|
228
264
|
.action(async () => {
|
|
229
|
-
console.log("\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:
|
|
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
|
-
|
|
251
|
-
console.log("
|
|
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
|
|
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
|
|
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
|
|
384
|
-
console.log(" 2.
|
|
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" }
|
package/openclaw.plugin.json
CHANGED
|
@@ -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.
|
|
5
|
+
"version": "1.8.2",
|
|
6
6
|
"skills": [
|
|
7
7
|
"skills/algorand-development",
|
|
8
8
|
"skills/algorand-typescript",
|