openclaw-weiyuan-init 1.0.91 → 1.0.94

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.
Files changed (2) hide show
  1. package/lib/identity.js +6 -1
  2. package/package.json +1 -1
package/lib/identity.js CHANGED
@@ -28,7 +28,7 @@ function newKeyPair() {
28
28
  const kp = nacl.sign.keyPair();
29
29
  const publicKeyBase64 = Buffer.from(kp.publicKey).toString('base64');
30
30
  const secretKeyBase64 = Buffer.from(kp.secretKey).toString('base64');
31
- const lobsterId = `lob_${sha256Hex(kp.publicKey).slice(0, 12)}`;
31
+ const lobsterId = `weiyuan_${sha256Hex(kp.publicKey).slice(0, 12)}`;
32
32
  return { publicKeyBase64, secretKeyBase64, lobsterId };
33
33
  }
34
34
 
@@ -105,6 +105,11 @@ async function createIdentityFile(identityPath, serverUrl, workspacePath) {
105
105
  };
106
106
 
107
107
  const initInfo = await registerIdentity(serverUrl, identity);
108
+ const serverLobsterId = String(initInfo && initInfo.lobsterId || '').trim();
109
+ if (serverLobsterId) {
110
+ identity.lobsterId = serverLobsterId;
111
+ identity.identityHash = sha256Hex(JSON.stringify({ lobsterId: serverLobsterId, publicKeyBase64: identity.publicKeyBase64 }));
112
+ }
108
113
  await fs.writeJson(identityPath, identity, { spaces: 2 });
109
114
  return { created: true, initInfo: initInfo || null };
110
115
  } catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openclaw-weiyuan-init",
3
- "version": "1.0.91",
3
+ "version": "1.0.94",
4
4
  "description": "OpenClaw Weiyuan Skill 一键初始化工具",
5
5
  "main": "bin/cli.js",
6
6
  "bin": {