@honor-claw/yoyo 1.0.7-beta.2 → 1.0.7-beta.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@honor-claw/yoyo",
3
- "version": "1.0.7-beta.2",
3
+ "version": "1.0.7-beta.3",
4
4
  "description": "OpenClaw Honor Yoyo connection plugin",
5
5
  "keywords": [
6
6
  "ai",
@@ -189,11 +189,6 @@ export class ClawCloudSocketClient {
189
189
  try {
190
190
  const msgText = JSON.stringify(message);
191
191
 
192
- useClawLogger().debug?.(
193
- `[yoyoclaw-cloud] send message to cloud session ${message.targetDeviceId},
194
- device: ${toDeviceId}:, ${msgText.slice(0, 1000)}`
195
- );
196
-
197
192
  this.ws.send(msgText);
198
193
  return true;
199
194
  } catch (error) {
@@ -9,6 +9,7 @@ import { MacOSDeviceInfoProvider } from './providers/macos.js';
9
9
  import type { DeviceInfoProvider } from './providers/base.js';
10
10
  import { useClawLogger } from '../../utils/logger.js';
11
11
  import { getConfigManager } from '../claw-configs/config-manager.js';
12
+ import fs from "node:fs";
12
13
 
13
14
  /**
14
15
  * 检测当前设备类型
@@ -23,7 +24,6 @@ function detectDeviceType(): 'windows' | 'pad' | 'linux' | 'macos' {
23
24
  if (platform === 'linux') {
24
25
  // 检查是否为 pad 环境
25
26
  try {
26
- const fs = require('fs');
27
27
  if (fs.existsSync('/system/bin/getprop')) {
28
28
  return 'pad';
29
29
  }
package/src/utils/jwt.ts CHANGED
@@ -2,6 +2,8 @@
2
2
  * JWT Token 生成工具
3
3
  */
4
4
 
5
+ import jwt from 'jsonwebtoken';
6
+
5
7
  const SECRET = 'EIAMTDO~_IFR@XKKA+OKSK%ZUHPIF%Z!';
6
8
  const EXPIRATION_MS = 604800; // 7天
7
9
 
@@ -16,7 +18,6 @@ interface JwtClaims {
16
18
  */
17
19
  export function generateAuthorization(userId: string): string {
18
20
  try {
19
- const jwt = require('jsonwebtoken');
20
21
 
21
22
  const claims: JwtClaims = {
22
23
  rt: 'rtValue',