@alfe.ai/openclaw-identity 0.0.16 → 0.0.17

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.d.cts CHANGED
@@ -35,6 +35,7 @@ declare const plugin: {
35
35
  description: string;
36
36
  version: string;
37
37
  activate(api: PluginApi): void;
38
+ deactivate(api: PluginApi): void;
38
39
  };
39
40
  //#endregion
40
41
  export { plugin as default };
package/dist/plugin.d.ts CHANGED
@@ -35,6 +35,7 @@ declare const plugin: {
35
35
  description: string;
36
36
  version: string;
37
37
  activate(api: PluginApi): void;
38
+ deactivate(api: PluginApi): void;
38
39
  };
39
40
  //#endregion
40
41
  export { plugin as default };
package/dist/plugin2.cjs CHANGED
@@ -180,6 +180,8 @@ function defineTool(def) {
180
180
  }
181
181
  };
182
182
  }
183
+ const ACTIVATED_KEY = "__alfeIdentityPluginActivated";
184
+ const g = globalThis;
183
185
  const plugin = {
184
186
  id: "@alfe.ai/openclaw-identity",
185
187
  name: "Alfe Identity",
@@ -187,6 +189,11 @@ const plugin = {
187
189
  version: pkg.version,
188
190
  activate(api) {
189
191
  const log = api.logger;
192
+ if (g[ACTIVATED_KEY] === true) {
193
+ log.debug("Alfe Identity plugin already activated — skipping duplicate");
194
+ return;
195
+ }
196
+ g[ACTIVATED_KEY] = true;
190
197
  log.info("Alfe Identity plugin activating...");
191
198
  let client;
192
199
  try {
@@ -196,6 +203,7 @@ const plugin = {
196
203
  apiUrl: config.apiUrl
197
204
  });
198
205
  } catch (err) {
206
+ g[ACTIVATED_KEY] = false;
199
207
  log.error(`Identity plugin: failed to resolve config — ${err instanceof Error ? err.message : String(err)}`);
200
208
  return;
201
209
  }
@@ -465,6 +473,10 @@ const plugin = {
465
473
  };
466
474
  api.on("before_tool_call", (...args) => beforeToolCallStub(args[0], args[1]), { priority: 100 });
467
475
  log.info("Alfe Identity plugin activated");
476
+ },
477
+ deactivate(api) {
478
+ g[ACTIVATED_KEY] = false;
479
+ api.logger.info("Alfe Identity plugin deactivated");
468
480
  }
469
481
  };
470
482
  //#endregion
package/dist/plugin2.js CHANGED
@@ -180,6 +180,8 @@ function defineTool(def) {
180
180
  }
181
181
  };
182
182
  }
183
+ const ACTIVATED_KEY = "__alfeIdentityPluginActivated";
184
+ const g = globalThis;
183
185
  const plugin = {
184
186
  id: "@alfe.ai/openclaw-identity",
185
187
  name: "Alfe Identity",
@@ -187,6 +189,11 @@ const plugin = {
187
189
  version: pkg.version,
188
190
  activate(api) {
189
191
  const log = api.logger;
192
+ if (g[ACTIVATED_KEY] === true) {
193
+ log.debug("Alfe Identity plugin already activated — skipping duplicate");
194
+ return;
195
+ }
196
+ g[ACTIVATED_KEY] = true;
190
197
  log.info("Alfe Identity plugin activating...");
191
198
  let client;
192
199
  try {
@@ -196,6 +203,7 @@ const plugin = {
196
203
  apiUrl: config.apiUrl
197
204
  });
198
205
  } catch (err) {
206
+ g[ACTIVATED_KEY] = false;
199
207
  log.error(`Identity plugin: failed to resolve config — ${err instanceof Error ? err.message : String(err)}`);
200
208
  return;
201
209
  }
@@ -465,6 +473,10 @@ const plugin = {
465
473
  };
466
474
  api.on("before_tool_call", (...args) => beforeToolCallStub(args[0], args[1]), { priority: 100 });
467
475
  log.info("Alfe Identity plugin activated");
476
+ },
477
+ deactivate(api) {
478
+ g[ACTIVATED_KEY] = false;
479
+ api.logger.info("Alfe Identity plugin deactivated");
468
480
  }
469
481
  };
470
482
  //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfe.ai/openclaw-identity",
3
- "version": "0.0.16",
3
+ "version": "0.0.17",
4
4
  "description": "OpenClaw identity plugin — identity resolution, access gating, permission enforcement",
5
5
  "type": "module",
6
6
  "main": "./dist/plugin.js",