clawchef 0.1.13 → 0.1.14

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/README.md CHANGED
@@ -442,7 +442,7 @@ Supported common fields:
442
442
  `channels[].agent` currently supports `channel: "telegram"` only.
443
443
  If `agent` is set and `account` is omitted, clawchef defaults `account` to the same value as `agent`.
444
444
  `channels[].group_policy` currently supports `channel: "telegram"` only and is applied after `channels add` via `openclaw config set` so it is not overwritten by add-flow writes.
445
- If `channel: "telegram"` has `token: ""` or `bot_token: ""`, clawchef auto-disables that telegram account (`enabled=false`) and skips channel add/bind.
445
+ If `channel: "telegram"` has `token: ""` or `bot_token: ""`, clawchef skips that telegram account and does not run channel add/bind.
446
446
 
447
447
  ## OpenClaw config patch
448
448
 
@@ -165,13 +165,6 @@ function telegramGroupPolicyPath(account) {
165
165
  }
166
166
  return `channels.telegram.accounts[${trimmed}].groupPolicy`;
167
167
  }
168
- function telegramEnabledPath(account) {
169
- const trimmed = account?.trim();
170
- if (!trimmed) {
171
- return "channels.telegram.enabled";
172
- }
173
- return `channels.telegram.accounts[${trimmed}].enabled`;
174
- }
175
168
  function shouldAutoDisableTelegramChannel(channel) {
176
169
  if (channel.channel !== "telegram") {
177
170
  return false;
@@ -598,9 +591,7 @@ export class CommandOpenClawProvider {
598
591
  const bin = config.bin ?? "openclaw";
599
592
  const cfgPath = configPath();
600
593
  if (shouldAutoDisableTelegramChannel(channel)) {
601
- const openclawConfig = await loadConfigJson(cfgPath);
602
- setConfigValue(openclawConfig, telegramEnabledPath(channel.account), false);
603
- await saveConfigJson(cfgPath, openclawConfig, dryRun);
594
+ traceDebug(`Skip telegram channel with empty token: ${channel.channel}${channel.account ? `/${channel.account}` : ""}`);
604
595
  return;
605
596
  }
606
597
  const enablePluginTemplate = config.commands?.enable_plugin;
@@ -379,7 +379,7 @@ export async function runRecipe(recipe, recipeOrigin, options, logger) {
379
379
  const autoDisabledTelegram = shouldAutoDisableTelegramChannel(effectiveChannel);
380
380
  await provider.configureChannel(recipe.openclaw, effectiveChannel, options.dryRun);
381
381
  if (autoDisabledTelegram) {
382
- logger.info(`Telegram channel disabled due to empty bot token: ${effectiveChannel.channel}${effectiveChannel.account ? `/${effectiveChannel.account}` : ""}`);
382
+ logger.info(`Telegram channel skipped due to empty bot token: ${effectiveChannel.channel}${effectiveChannel.account ? `/${effectiveChannel.account}` : ""}`);
383
383
  continue;
384
384
  }
385
385
  logger.info(`Channel configured: ${effectiveChannel.channel}${effectiveChannel.account ? `/${effectiveChannel.account}` : ""}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clawchef",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
4
4
  "description": "Recipe-driven OpenClaw environment orchestrator",
5
5
  "homepage": "https://renorzr.github.io/clawchef",
6
6
  "repository": {
@@ -220,14 +220,6 @@ function telegramGroupPolicyPath(account: string | undefined): string {
220
220
  return `channels.telegram.accounts[${trimmed}].groupPolicy`;
221
221
  }
222
222
 
223
- function telegramEnabledPath(account: string | undefined): string {
224
- const trimmed = account?.trim();
225
- if (!trimmed) {
226
- return "channels.telegram.enabled";
227
- }
228
- return `channels.telegram.accounts[${trimmed}].enabled`;
229
- }
230
-
231
223
  function shouldAutoDisableTelegramChannel(channel: ChannelDef): boolean {
232
224
  if (channel.channel !== "telegram") {
233
225
  return false;
@@ -734,9 +726,9 @@ export class CommandOpenClawProvider implements OpenClawProvider {
734
726
  const cfgPath = configPath();
735
727
 
736
728
  if (shouldAutoDisableTelegramChannel(channel)) {
737
- const openclawConfig = await loadConfigJson(cfgPath);
738
- setConfigValue(openclawConfig, telegramEnabledPath(channel.account), false);
739
- await saveConfigJson(cfgPath, openclawConfig, dryRun);
729
+ traceDebug(
730
+ `Skip telegram channel with empty token: ${channel.channel}${channel.account ? `/${channel.account}` : ""}`,
731
+ );
740
732
  return;
741
733
  }
742
734
 
@@ -434,7 +434,7 @@ export async function runRecipe(
434
434
  await provider.configureChannel(recipe.openclaw, effectiveChannel, options.dryRun);
435
435
  if (autoDisabledTelegram) {
436
436
  logger.info(
437
- `Telegram channel disabled due to empty bot token: ${effectiveChannel.channel}${effectiveChannel.account ? `/${effectiveChannel.account}` : ""}`,
437
+ `Telegram channel skipped due to empty bot token: ${effectiveChannel.channel}${effectiveChannel.account ? `/${effectiveChannel.account}` : ""}`,
438
438
  );
439
439
  continue;
440
440
  }