@stamn/stamn-plugin 0.1.0-alpha.27 → 0.1.0-alpha.28
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.js +10 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5085,6 +5085,7 @@ function readOpenclawConfig() {
|
|
|
5085
5085
|
return readJsonFile(getConfigPath()) ?? {};
|
|
5086
5086
|
}
|
|
5087
5087
|
var STAMN_TOOL_NAMES = [
|
|
5088
|
+
"stamn_ping",
|
|
5088
5089
|
"stamn_world_status",
|
|
5089
5090
|
"stamn_get_events",
|
|
5090
5091
|
"stamn_get_balance",
|
|
@@ -5550,6 +5551,14 @@ function spend(ws) {
|
|
|
5550
5551
|
}
|
|
5551
5552
|
};
|
|
5552
5553
|
}
|
|
5554
|
+
function ping() {
|
|
5555
|
+
return {
|
|
5556
|
+
name: "stamn_ping",
|
|
5557
|
+
description: "Diagnostic ping. Returns OK if the Stamn plugin tools are loaded and reachable by the agent.",
|
|
5558
|
+
parameters: NO_PARAMS,
|
|
5559
|
+
execute: () => text("pong \u2014 stamn plugin tools are loaded and reachable.")
|
|
5560
|
+
};
|
|
5561
|
+
}
|
|
5553
5562
|
function allTools(ws, agentId) {
|
|
5554
5563
|
return [
|
|
5555
5564
|
worldStatus(ws),
|
|
@@ -5580,6 +5589,7 @@ function withAuthGuard(tool, ws) {
|
|
|
5580
5589
|
};
|
|
5581
5590
|
}
|
|
5582
5591
|
function registerTools(api, wsService, config) {
|
|
5592
|
+
api.registerTool(ping());
|
|
5583
5593
|
for (const tool of allTools(wsService, config.agentId)) {
|
|
5584
5594
|
api.registerTool(withAuthGuard(tool, wsService));
|
|
5585
5595
|
}
|