@alfe.ai/openclaw-identity 0.0.5 → 0.0.7

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
@@ -16,6 +16,7 @@ let _sinclair_typebox = require("@sinclair/typebox");
16
16
  * All data access via AgentApiClient (/agent/identity/* routes).
17
17
  * Uses the agent's own API key (from ~/.alfe/config.toml) for authentication.
18
18
  */
19
+ const pkg = (0, require("node:module").createRequire)(require("url").pathToFileURL(__filename).href)("../package.json");
19
20
  const CACHE_TTL_MS = 6e4;
20
21
  const sessionCache = /* @__PURE__ */ new Map();
21
22
  function getCached(key) {
@@ -70,7 +71,7 @@ const plugin = {
70
71
  id: "@alfe.ai/openclaw-identity",
71
72
  name: "Alfe Identity",
72
73
  description: "Identity resolution, access gating, and permission enforcement",
73
- version: "0.0.1",
74
+ version: pkg.version,
74
75
  activate(api) {
75
76
  const log = api.logger;
76
77
  if (api.registrationMode && api.registrationMode !== "full") return;
@@ -264,6 +265,36 @@ const plugin = {
264
265
  senderId: params.senderId,
265
266
  toolName: params.toolName
266
267
  })
268
+ }),
269
+ defineTool({
270
+ name: "request_identity_verification",
271
+ description: "Send a verification phrase to the claimed identity's phone (SMS) or email. The person must relay the phrase back to confirm they own that identity.",
272
+ parameters: _sinclair_typebox.Type.Object({
273
+ claimedIdentityId: _sinclair_typebox.Type.String({ description: "Identity being claimed" }),
274
+ requestingIdentityId: _sinclair_typebox.Type.String({ description: "Identity of the person making the claim" }),
275
+ requestingPlatform: _sinclair_typebox.Type.String({ description: "Platform the requester is on (discord, slack, chat, etc.)" }),
276
+ requestingPlatformId: _sinclair_typebox.Type.String({ description: "Requester's platform-specific user ID" }),
277
+ preferredChannel: _sinclair_typebox.Type.Optional(_sinclair_typebox.Type.String({ description: "'sms' or 'email'" }))
278
+ }),
279
+ handler: (params) => client.requestIdentityVerification({
280
+ claimedIdentityId: params.claimedIdentityId,
281
+ requestingIdentityId: params.requestingIdentityId,
282
+ requestingPlatform: params.requestingPlatform,
283
+ requestingPlatformId: params.requestingPlatformId,
284
+ preferredChannel: params.preferredChannel
285
+ })
286
+ }),
287
+ defineTool({
288
+ name: "confirm_identity_verification",
289
+ description: "Confirm a verification by providing the three-word phrase. On success, the requesting identity is merged into the claimed identity.",
290
+ parameters: _sinclair_typebox.Type.Object({
291
+ verificationId: _sinclair_typebox.Type.String({ description: "Verification ID returned from request_identity_verification" }),
292
+ phrase: _sinclair_typebox.Type.String({ description: "Three-word phrase the person received via SMS or email" })
293
+ }),
294
+ handler: (params) => client.confirmIdentityVerification({
295
+ verificationId: params.verificationId,
296
+ phrase: params.phrase
297
+ })
267
298
  })
268
299
  ];
269
300
  for (const tool of tools) {
package/dist/plugin.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { createRequire } from "node:module";
1
2
  import { resolveConfig } from "@alfe.ai/config";
2
3
  import { AgentApiClient } from "@alfe.ai/agent-api-client";
3
4
  import { Type } from "@sinclair/typebox";
@@ -16,6 +17,7 @@ import { Type } from "@sinclair/typebox";
16
17
  * All data access via AgentApiClient (/agent/identity/* routes).
17
18
  * Uses the agent's own API key (from ~/.alfe/config.toml) for authentication.
18
19
  */
20
+ const pkg = createRequire(import.meta.url)("../package.json");
19
21
  const CACHE_TTL_MS = 6e4;
20
22
  const sessionCache = /* @__PURE__ */ new Map();
21
23
  function getCached(key) {
@@ -70,7 +72,7 @@ const plugin = {
70
72
  id: "@alfe.ai/openclaw-identity",
71
73
  name: "Alfe Identity",
72
74
  description: "Identity resolution, access gating, and permission enforcement",
73
- version: "0.0.1",
75
+ version: pkg.version,
74
76
  activate(api) {
75
77
  const log = api.logger;
76
78
  if (api.registrationMode && api.registrationMode !== "full") return;
@@ -264,6 +266,36 @@ const plugin = {
264
266
  senderId: params.senderId,
265
267
  toolName: params.toolName
266
268
  })
269
+ }),
270
+ defineTool({
271
+ name: "request_identity_verification",
272
+ description: "Send a verification phrase to the claimed identity's phone (SMS) or email. The person must relay the phrase back to confirm they own that identity.",
273
+ parameters: Type.Object({
274
+ claimedIdentityId: Type.String({ description: "Identity being claimed" }),
275
+ requestingIdentityId: Type.String({ description: "Identity of the person making the claim" }),
276
+ requestingPlatform: Type.String({ description: "Platform the requester is on (discord, slack, chat, etc.)" }),
277
+ requestingPlatformId: Type.String({ description: "Requester's platform-specific user ID" }),
278
+ preferredChannel: Type.Optional(Type.String({ description: "'sms' or 'email'" }))
279
+ }),
280
+ handler: (params) => client.requestIdentityVerification({
281
+ claimedIdentityId: params.claimedIdentityId,
282
+ requestingIdentityId: params.requestingIdentityId,
283
+ requestingPlatform: params.requestingPlatform,
284
+ requestingPlatformId: params.requestingPlatformId,
285
+ preferredChannel: params.preferredChannel
286
+ })
287
+ }),
288
+ defineTool({
289
+ name: "confirm_identity_verification",
290
+ description: "Confirm a verification by providing the three-word phrase. On success, the requesting identity is merged into the claimed identity.",
291
+ parameters: Type.Object({
292
+ verificationId: Type.String({ description: "Verification ID returned from request_identity_verification" }),
293
+ phrase: Type.String({ description: "Three-word phrase the person received via SMS or email" })
294
+ }),
295
+ handler: (params) => client.confirmIdentityVerification({
296
+ verificationId: params.verificationId,
297
+ phrase: params.phrase
298
+ })
267
299
  })
268
300
  ];
269
301
  for (const tool of tools) {
@@ -1,7 +1,6 @@
1
1
  {
2
2
  "id": "@alfe.ai/openclaw-identity",
3
3
  "name": "Alfe Identity",
4
- "version": "0.0.1",
5
4
  "description": "Identity resolution, access gating, and permission enforcement",
6
5
  "entry": "./dist/plugin.js",
7
6
  "configSchema": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfe.ai/openclaw-identity",
3
- "version": "0.0.5",
3
+ "version": "0.0.7",
4
4
  "description": "OpenClaw identity plugin — identity resolution, access gating, permission enforcement",
5
5
  "type": "module",
6
6
  "main": "./dist/plugin.js",
@@ -28,7 +28,7 @@
28
28
  ],
29
29
  "dependencies": {
30
30
  "@sinclair/typebox": "^0.34.48",
31
- "@alfe.ai/agent-api-client": "0.0.9",
31
+ "@alfe.ai/agent-api-client": "0.0.10",
32
32
  "@alfe.ai/config": "0.0.8"
33
33
  },
34
34
  "license": "UNLICENSED",