@honor-claw/yoyo 1.0.1 → 1.0.2

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.1",
3
+ "version": "1.0.2",
4
4
  "description": "OpenClaw Honor Yoyo connection plugin",
5
5
  "keywords": [
6
6
  "ai",
@@ -121,10 +121,10 @@ export class ConfigManager {
121
121
  | "test"
122
122
  | "production"
123
123
  | undefined;
124
- return env || "test";
124
+ return env || "production";
125
125
  } catch (error) {
126
126
  console.error(`[claw-configs] Failed to read env config: ${error}`);
127
- return "test";
127
+ return "production";
128
128
  }
129
129
  }
130
130
 
@@ -224,6 +224,8 @@ export class ConfigManager {
224
224
  async updateUserConfig(userConfig: UserConfig): Promise<void> {
225
225
  try {
226
226
  const currentConfig = this.loadConfig();
227
+ const currentEnv = currentConfig.plugins?.entries?.[PLUGIN_YOYO_ID]?.config?.env;
228
+ const currentGrayTag = currentConfig.plugins?.entries?.[PLUGIN_YOYO_ID]?.config?.gray;
227
229
 
228
230
  const updatedConfig: OpenClawConfig = {
229
231
  ...currentConfig,
@@ -236,6 +238,8 @@ export class ConfigManager {
236
238
  enabled: true,
237
239
  config: {
238
240
  user: userConfig,
241
+ env: currentEnv,
242
+ ...(currentGrayTag && { gray: currentGrayTag }),
239
243
  },
240
244
  },
241
245
  },
@@ -257,6 +261,8 @@ export class ConfigManager {
257
261
  async clearUserConfig(): Promise<void> {
258
262
  try {
259
263
  const currentConfig = this.loadConfig();
264
+ const currentEnv = currentConfig.plugins?.entries?.[PLUGIN_YOYO_ID]?.config?.env;
265
+ const currentGrayTag = currentConfig.plugins?.entries?.[PLUGIN_YOYO_ID]?.config?.gray;
260
266
 
261
267
  const updatedConfig: OpenClawConfig = {
262
268
  ...currentConfig,
@@ -268,6 +274,8 @@ export class ConfigManager {
268
274
  ...currentConfig.plugins?.entries?.[PLUGIN_YOYO_ID],
269
275
  config: {
270
276
  user: undefined,
277
+ env: currentEnv,
278
+ ...(currentGrayTag && { gray: currentGrayTag }),
271
279
  },
272
280
  },
273
281
  },