@unicitylabs/openclaw-unicity 0.5.9 → 0.5.11

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 +2 -2
  2. package/src/channel.ts +7 -9
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unicitylabs/openclaw-unicity",
3
- "version": "0.5.9",
3
+ "version": "0.5.11",
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,7 +44,7 @@
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.3"
47
+ "@unicitylabs/sphere-sdk": "^0.6.9"
48
48
  },
49
49
  "peerDependencies": {
50
50
  "openclaw": "*"
package/src/channel.ts CHANGED
@@ -721,19 +721,17 @@ export const unicityChannelPlugin = {
721
721
  // Store cleanup so auto-restart can tear down stale handlers
722
722
  previousGatewayCleanup = cleanupSubscriptions;
723
723
 
724
- ctx.abortSignal.addEventListener("abort", () => {
725
- cleanupSubscriptions();
726
- previousGatewayCleanup = null;
727
- }, { once: true });
728
-
729
- return {
730
- stop: () => {
724
+ // The gateway expects startAccount to return a Promise that stays pending
725
+ // while the channel is running. Resolving immediately triggers a restart loop.
726
+ return new Promise<void>((resolve) => {
727
+ ctx.abortSignal.addEventListener("abort", () => {
731
728
  cleanupSubscriptions();
732
729
  previousGatewayCleanup = null;
733
730
  ctx.setStatus({ connected: false, running: false });
734
731
  ctx.log?.info(`[${ctx.account.accountId}] Unicity channel stopped`);
735
- },
736
- };
732
+ resolve();
733
+ }, { once: true });
734
+ });
737
735
  },
738
736
  },
739
737