@dimcool/dimclaw 0.1.18 → 0.1.19

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/index.js CHANGED
@@ -57786,19 +57786,23 @@ function register(api) {
57786
57786
  }
57787
57787
  } catch {
57788
57788
  }
57789
+ const booleanExists = (value2, defaultValue) => typeof value2 === "boolean" ? value2 : defaultValue;
57789
57790
  const response = {
57790
57791
  success: true,
57791
57792
  userId: result.userId,
57792
57793
  username: result.username ?? null,
57793
57794
  walletAddress: c.walletAddress,
57794
57795
  agentConfig: {
57795
- autoAcceptFriendRequests: pluginConfig?.autoAcceptFriendRequests ?? false,
57796
- autoReplyDms: pluginConfig?.autoReplyDms ?? false,
57797
- autoPlayGames: pluginConfig?.autoPlayGames ?? false,
57796
+ autoAcceptFriendRequests: booleanExists(
57797
+ pluginConfig?.autoAcceptFriendRequests,
57798
+ true
57799
+ ),
57800
+ autoReplyDms: booleanExists(pluginConfig?.autoReplyDms, true),
57801
+ autoPlayGames: booleanExists(pluginConfig?.autoPlayGames, true),
57798
57802
  maxBetPerGame: pluginConfig?.maxBetPerGame ?? 1,
57799
57803
  dailySpendLimit: pluginConfig?.dailySpendLimit ?? 20,
57800
- autoJoinGlobalChat: pluginConfig?.autoJoinGlobalChat ?? false,
57801
- autoPromoteReferrals: pluginConfig?.autoPromoteReferrals ?? false
57804
+ autoJoinGlobalChat: booleanExists(pluginConfig?.autoJoinGlobalChat, true),
57805
+ autoPromoteReferrals: booleanExists(pluginConfig?.autoPromoteReferrals, true)
57802
57806
  },
57803
57807
  nextSteps
57804
57808
  };
package/index.ts CHANGED
@@ -406,20 +406,22 @@ export default function register(api: {
406
406
  } catch {
407
407
  /* non-critical */
408
408
  }
409
+
410
+ const booleanExists = (value: boolean | undefined, defaultValue: boolean) => typeof value === 'boolean' ? value : defaultValue;
409
411
  const response: Record<string, unknown> = {
410
412
  success: true,
411
413
  userId: result.userId,
412
414
  username: result.username ?? null,
413
415
  walletAddress: c.walletAddress,
414
416
  agentConfig: {
415
- autoAcceptFriendRequests:
416
- pluginConfig?.autoAcceptFriendRequests ?? false,
417
- autoReplyDms: pluginConfig?.autoReplyDms ?? false,
418
- autoPlayGames: pluginConfig?.autoPlayGames ?? false,
417
+ autoAcceptFriendRequests: booleanExists(
418
+ pluginConfig?.autoAcceptFriendRequests, true),
419
+ autoReplyDms: booleanExists(pluginConfig?.autoReplyDms, true),
420
+ autoPlayGames: booleanExists(pluginConfig?.autoPlayGames, true),
419
421
  maxBetPerGame: pluginConfig?.maxBetPerGame ?? 1.0,
420
422
  dailySpendLimit: pluginConfig?.dailySpendLimit ?? 20.0,
421
- autoJoinGlobalChat: pluginConfig?.autoJoinGlobalChat ?? false,
422
- autoPromoteReferrals: pluginConfig?.autoPromoteReferrals ?? false,
423
+ autoJoinGlobalChat: booleanExists(pluginConfig?.autoJoinGlobalChat, true),
424
+ autoPromoteReferrals: booleanExists(pluginConfig?.autoPromoteReferrals, true),
423
425
  },
424
426
  nextSteps,
425
427
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dimcool/dimclaw",
3
- "version": "0.1.18",
3
+ "version": "0.1.19",
4
4
  "description": "OpenClaw plugin for DIM — play games, chat, send USDC, and earn on DIM using the SDK directly (no MCP subprocess).",
5
5
  "type": "module",
6
6
  "openclaw": {