@alfe.ai/openclaw-metrics 0.0.2 → 0.0.4
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/plugin.js +4 -3
- package/package.json +3 -3
package/dist/plugin.js
CHANGED
|
@@ -57,15 +57,16 @@ const plugin = {
|
|
|
57
57
|
activate(api) {
|
|
58
58
|
const log = api.logger;
|
|
59
59
|
log.info("Alfe Metrics plugin activating...");
|
|
60
|
-
|
|
60
|
+
try {
|
|
61
|
+
const cfg = resolveConfig();
|
|
61
62
|
client = new AgentApiClient({
|
|
62
63
|
apiKey: cfg.apiKey,
|
|
63
64
|
apiUrl: cfg.apiUrl
|
|
64
65
|
});
|
|
65
66
|
log.info("Alfe Metrics plugin ready — API client initialized");
|
|
66
|
-
}
|
|
67
|
+
} catch (err) {
|
|
67
68
|
log.warn(`Failed to resolve Alfe config — metrics will not be reported: ${err instanceof Error ? err.message : String(err)}`);
|
|
68
|
-
}
|
|
69
|
+
}
|
|
69
70
|
api.on("message", (...eventArgs) => {
|
|
70
71
|
if (!client) return;
|
|
71
72
|
const { sessionKey, role } = eventArgs[0];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfe.ai/openclaw-metrics",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "OpenClaw metrics plugin for Alfe — per-user activity tracking",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/plugin.js",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"openclaw.plugin.json"
|
|
22
22
|
],
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@alfe.ai/config": "^0.0.
|
|
25
|
-
"@alfe.ai/agent-api-client": "^0.0.
|
|
24
|
+
"@alfe.ai/config": "^0.0.6",
|
|
25
|
+
"@alfe.ai/agent-api-client": "^0.0.4"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"openclaw": ">=2026.3.0"
|