@unicitylabs/openclaw-unicity 0.5.8 → 0.5.9

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/package.json +3 -3
  2. package/src/channel.ts +6 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unicitylabs/openclaw-unicity",
3
- "version": "0.5.8",
3
+ "version": "0.5.9",
4
4
  "description": "Unicity wallet identity and encrypted DMs for OpenClaw agents — powered by Sphere SDK",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
@@ -44,13 +44,13 @@
44
44
  "dependencies": {
45
45
  "@clack/prompts": "^0.10.0",
46
46
  "@sinclair/typebox": "^0.34.48",
47
- "@unicitylabs/sphere-sdk": "0.6.8-dev.2"
47
+ "@unicitylabs/sphere-sdk": "0.6.8-dev.3"
48
48
  },
49
49
  "peerDependencies": {
50
50
  "openclaw": "*"
51
51
  },
52
52
  "devDependencies": {
53
- "openclaw": "^2026.3.2",
53
+ "openclaw": "^2026.3.13",
54
54
  "oxlint": "^1.43.0",
55
55
  "vitest": "^4.0.18"
56
56
  },
package/src/channel.ts CHANGED
@@ -243,6 +243,7 @@ export const unicityChannelPlugin = {
243
243
  publicKey: sphere.identity?.chainPubkey,
244
244
  nametag: sphere.identity?.nametag,
245
245
  running: true,
246
+ connected: true,
246
247
  lastStartAt: Date.now(),
247
248
  });
248
249
 
@@ -287,6 +288,7 @@ export const unicityChannelPlugin = {
287
288
 
288
289
  function dispatchDm(msg: DmMsg): void {
289
290
  sendersInFlight.add(msg.senderPubkey);
291
+ ctx.setStatus({ lastEventAt: Date.now() });
290
292
 
291
293
  // Immediately signal that we're composing a reply
292
294
  sphere.communications.sendComposingIndicator(msg.senderPubkey)
@@ -412,6 +414,7 @@ export const unicityChannelPlugin = {
412
414
 
413
415
  // Subscribe to incoming token transfers
414
416
  const unsubTransfer = sphere.on("transfer:incoming", (transfer) => {
417
+ ctx.setStatus({ lastEventAt: Date.now() });
415
418
  // Full address for DM replies; short form for display/logging only
416
419
  const replyTo = transfer.senderNametag ? `@${transfer.senderNametag}` : transfer.senderPubkey;
417
420
  const displayName = transfer.senderNametag ? `@${transfer.senderNametag}` : transfer.senderPubkey.slice(0, 12) + "…";
@@ -474,6 +477,7 @@ export const unicityChannelPlugin = {
474
477
 
475
478
  // Subscribe to incoming payment requests
476
479
  const unsubPaymentRequest = sphere.on("payment_request:incoming", (request) => {
480
+ ctx.setStatus({ lastEventAt: Date.now() });
477
481
  const replyTo = request.senderNametag ? `@${request.senderNametag}` : request.senderPubkey;
478
482
  const displayName = request.senderNametag ? `@${request.senderNametag}` : request.senderPubkey.slice(0, 12) + "…";
479
483
  const decimals = getCoinDecimals(request.coinId) ?? 0;
@@ -628,6 +632,7 @@ export const unicityChannelPlugin = {
628
632
 
629
633
  // Subscribe to incoming group messages
630
634
  const unsubGroupMessage = sphere.groupChat?.onMessage?.((msg: GroupMsg) => {
635
+ ctx.setStatus({ lastEventAt: Date.now() });
631
636
  // Skip messages from self (echoed back by the relay).
632
637
  // Compare against the Nostr x-only pubkey, not chainPubkey.
633
638
  if (myNostrPubkey && msg.senderPubkey === myNostrPubkey) return;
@@ -725,6 +730,7 @@ export const unicityChannelPlugin = {
725
730
  stop: () => {
726
731
  cleanupSubscriptions();
727
732
  previousGatewayCleanup = null;
733
+ ctx.setStatus({ connected: false, running: false });
728
734
  ctx.log?.info(`[${ctx.account.accountId}] Unicity channel stopped`);
729
735
  },
730
736
  };