@alfe.ai/openclaw-metrics 0.0.20 → 0.0.22

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.cjs CHANGED
@@ -1,10 +1,15 @@
1
1
  //#region src/plugin.ts
2
+ const ACTIVATED_KEY = "__alfeMetricsPluginActivated";
3
+ const g = globalThis;
2
4
  const plugin = {
3
5
  id: "@alfe.ai/openclaw-metrics",
4
6
  activate(api) {
7
+ if (g[ACTIVATED_KEY] === true) return;
8
+ g[ACTIVATED_KEY] = true;
5
9
  api.logger.info("Alfe Metrics plugin activated (no-op — tracking moved to chat service events)");
6
10
  },
7
11
  deactivate(api) {
12
+ g[ACTIVATED_KEY] = false;
8
13
  api.logger.info("Alfe Metrics plugin deactivated");
9
14
  }
10
15
  };
package/dist/plugin.js CHANGED
@@ -1,10 +1,15 @@
1
1
  //#region src/plugin.ts
2
+ const ACTIVATED_KEY = "__alfeMetricsPluginActivated";
3
+ const g = globalThis;
2
4
  const plugin = {
3
5
  id: "@alfe.ai/openclaw-metrics",
4
6
  activate(api) {
7
+ if (g[ACTIVATED_KEY] === true) return;
8
+ g[ACTIVATED_KEY] = true;
5
9
  api.logger.info("Alfe Metrics plugin activated (no-op — tracking moved to chat service events)");
6
10
  },
7
11
  deactivate(api) {
12
+ g[ACTIVATED_KEY] = false;
8
13
  api.logger.info("Alfe Metrics plugin deactivated");
9
14
  }
10
15
  };
@@ -3,6 +3,7 @@
3
3
  "name": "Alfe Metrics",
4
4
  "description": "Per-user activity tracking across all channels",
5
5
  "entry": "./dist/plugin.js",
6
+ "activation": { "onStartup": true },
6
7
  "configSchema": {
7
8
  "type": "object",
8
9
  "additionalProperties": false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfe.ai/openclaw-metrics",
3
- "version": "0.0.20",
3
+ "version": "0.0.22",
4
4
  "description": "OpenClaw metrics plugin for Alfe — per-user activity tracking",
5
5
  "type": "module",
6
6
  "main": "./dist/plugin.js",