openclaw-rocketchat 0.4.3 → 0.4.4

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 (3) hide show
  1. package/README.en.md +40 -28
  2. package/README.md +40 -28
  3. package/package.json +1 -1
package/README.en.md CHANGED
@@ -909,26 +909,34 @@ If you know the admin username/password, re-run setup and choose "Use existing a
909
909
  <summary><b>How to reinstall the plugin / start over?</b></summary>
910
910
 
911
911
  ```bash
912
- # 1. Remove old plugin
912
+ # 1. Stop Gateway
913
+ openclaw gateway stop
914
+
915
+ # 2. Remove old plugin and credentials
913
916
  rm -rf ~/.openclaw/extensions/openclaw-rocketchat
917
+ rm -rf ~/.openclaw/credentials/rocketchat*
914
918
 
915
- # 2. Clean residual config entries
919
+ # 3. Clean all Rocket.Chat related config entries
916
920
  python3 -c "
917
921
  import json
918
- with open('$HOME/.openclaw/openclaw.json') as f:
919
- cfg = json.load(f)
920
- for key in ['entries', 'installs']:
921
- if 'plugins' in cfg and key in cfg['plugins'] and 'openclaw-rocketchat' in cfg['plugins'][key]:
922
- del cfg['plugins'][key]['openclaw-rocketchat']
923
- with open('$HOME/.openclaw/openclaw.json', 'w') as f:
924
- json.dump(cfg, f, indent=2, ensure_ascii=False)
925
- f.write('\n')
922
+ p = '$HOME/.openclaw/openclaw.json'
923
+ with open(p) as f:
924
+ c = json.load(f)
925
+ c.get('channels', {}).pop('rocketchat', None)
926
+ c['bindings'] = [b for b in c.get('bindings', []) if b.get('match', {}).get('channel') != 'rocketchat']
927
+ c.get('plugins', {}).get('entries', {}).pop('openclaw-rocketchat', None)
928
+ c.get('plugins', {}).get('entries', {}).pop('rocketchat', None)
929
+ c.get('plugins', {}).get('installs', {}).pop('openclaw-rocketchat', None)
930
+ with open(p, 'w') as f:
931
+ json.dump(c, f, indent=2, ensure_ascii=False)
932
+ print('Done')
926
933
  "
927
934
 
928
- # 3. Reinstall
929
- npm cache clean --force
935
+ # 4. Reinstall and reconfigure
930
936
  openclaw plugins install openclaw-rocketchat
931
937
  openclaw rocketchat setup
938
+ openclaw rocketchat add-bot
939
+ openclaw gateway start
932
940
  ```
933
941
 
934
942
  </details>
@@ -937,34 +945,38 @@ openclaw rocketchat setup
937
945
  <summary><b>How to completely start fresh (including Rocket.Chat reset)?</b></summary>
938
946
 
939
947
  ```bash
940
- # 1. Stop and remove Rocket.Chat containers and data
948
+ # 1. Stop Gateway
949
+ openclaw gateway stop
950
+
951
+ # 2. Stop and remove Rocket.Chat containers and data
941
952
  cd ~/rocketchat && docker compose down -v
942
953
 
943
- # 2. Remove plugin and credentials
954
+ # 3. Remove plugin and credentials
944
955
  rm -rf ~/.openclaw/extensions/openclaw-rocketchat
945
- rm -rf ~/.openclaw/credentials/rocketchat
956
+ rm -rf ~/.openclaw/credentials/rocketchat*
946
957
 
947
- # 3. Clean config file
958
+ # 4. Clean all Rocket.Chat related config entries
948
959
  python3 -c "
949
960
  import json
950
- with open('$HOME/.openclaw/openclaw.json') as f:
951
- cfg = json.load(f)
952
- for key in ['entries', 'installs']:
953
- if 'plugins' in cfg and key in cfg['plugins'] and 'openclaw-rocketchat' in cfg['plugins'][key]:
954
- del cfg['plugins'][key]['openclaw-rocketchat']
955
- if 'channels' in cfg and 'rocketchat' in cfg['channels']:
956
- del cfg['channels']['rocketchat']
957
- cfg['bindings'] = [b for b in cfg.get('bindings', []) if b.get('match', {}).get('channel') != 'rocketchat']
958
- with open('$HOME/.openclaw/openclaw.json', 'w') as f:
959
- json.dump(cfg, f, indent=2, ensure_ascii=False)
960
- f.write('\n')
961
+ p = '$HOME/.openclaw/openclaw.json'
962
+ with open(p) as f:
963
+ c = json.load(f)
964
+ c.get('channels', {}).pop('rocketchat', None)
965
+ c['bindings'] = [b for b in c.get('bindings', []) if b.get('match', {}).get('channel') != 'rocketchat']
966
+ c.get('plugins', {}).get('entries', {}).pop('openclaw-rocketchat', None)
967
+ c.get('plugins', {}).get('entries', {}).pop('rocketchat', None)
968
+ c.get('plugins', {}).get('installs', {}).pop('openclaw-rocketchat', None)
969
+ with open(p, 'w') as f:
970
+ json.dump(c, f, indent=2, ensure_ascii=False)
971
+ print('Done')
961
972
  "
962
973
 
963
- # 4. Start fresh
974
+ # 5. Start fresh
964
975
  curl -fsSL https://raw.githubusercontent.com/Kxiandaoyan/openclaw-rocketchat/master/install-rc.sh | bash
965
976
  openclaw plugins install openclaw-rocketchat
966
977
  openclaw rocketchat setup
967
978
  openclaw rocketchat add-bot
979
+ openclaw gateway start
968
980
  ```
969
981
 
970
982
  </details>
package/README.md CHANGED
@@ -908,26 +908,34 @@ openclaw rocketchat add-bot
908
908
  <summary><b>想重新安装插件/从头配置怎么办?</b></summary>
909
909
 
910
910
  ```bash
911
- # 1. 清除旧插件
911
+ # 1. 停止 Gateway
912
+ openclaw gateway stop
913
+
914
+ # 2. 清除旧插件和凭据
912
915
  rm -rf ~/.openclaw/extensions/openclaw-rocketchat
916
+ rm -rf ~/.openclaw/credentials/rocketchat*
913
917
 
914
- # 2. 清理配置文件中的残留条目
918
+ # 3. 清理配置文件中的所有 Rocket.Chat 相关条目
915
919
  python3 -c "
916
920
  import json
917
- with open('$HOME/.openclaw/openclaw.json') as f:
918
- cfg = json.load(f)
919
- for key in ['entries', 'installs']:
920
- if 'plugins' in cfg and key in cfg['plugins'] and 'openclaw-rocketchat' in cfg['plugins'][key]:
921
- del cfg['plugins'][key]['openclaw-rocketchat']
922
- with open('$HOME/.openclaw/openclaw.json', 'w') as f:
923
- json.dump(cfg, f, indent=2, ensure_ascii=False)
924
- f.write('\n')
921
+ p = '$HOME/.openclaw/openclaw.json'
922
+ with open(p) as f:
923
+ c = json.load(f)
924
+ c.get('channels', {}).pop('rocketchat', None)
925
+ c['bindings'] = [b for b in c.get('bindings', []) if b.get('match', {}).get('channel') != 'rocketchat']
926
+ c.get('plugins', {}).get('entries', {}).pop('openclaw-rocketchat', None)
927
+ c.get('plugins', {}).get('entries', {}).pop('rocketchat', None)
928
+ c.get('plugins', {}).get('installs', {}).pop('openclaw-rocketchat', None)
929
+ with open(p, 'w') as f:
930
+ json.dump(c, f, indent=2, ensure_ascii=False)
931
+ print('Done')
925
932
  "
926
933
 
927
- # 3. 重新安装
928
- npm cache clean --force
934
+ # 4. 重新安装和配置
929
935
  openclaw plugins install openclaw-rocketchat
930
936
  openclaw rocketchat setup
937
+ openclaw rocketchat add-bot
938
+ openclaw gateway start
931
939
  ```
932
940
 
933
941
  </details>
@@ -936,34 +944,38 @@ openclaw rocketchat setup
936
944
  <summary><b>想彻底重来(包括重置 Rocket.Chat)怎么办?</b></summary>
937
945
 
938
946
  ```bash
939
- # 1. 停止并删除 Rocket.Chat 容器和数据
947
+ # 1. 停止 Gateway
948
+ openclaw gateway stop
949
+
950
+ # 2. 停止并删除 Rocket.Chat 容器和数据
940
951
  cd ~/rocketchat && docker compose down -v
941
952
 
942
- # 2. 清除插件和凭据
953
+ # 3. 清除插件和凭据
943
954
  rm -rf ~/.openclaw/extensions/openclaw-rocketchat
944
- rm -rf ~/.openclaw/credentials/rocketchat
955
+ rm -rf ~/.openclaw/credentials/rocketchat*
945
956
 
946
- # 3. 清理配置文件
957
+ # 4. 清理配置文件中的所有 Rocket.Chat 相关条目
947
958
  python3 -c "
948
959
  import json
949
- with open('$HOME/.openclaw/openclaw.json') as f:
950
- cfg = json.load(f)
951
- for key in ['entries', 'installs']:
952
- if 'plugins' in cfg and key in cfg['plugins'] and 'openclaw-rocketchat' in cfg['plugins'][key]:
953
- del cfg['plugins'][key]['openclaw-rocketchat']
954
- if 'channels' in cfg and 'rocketchat' in cfg['channels']:
955
- del cfg['channels']['rocketchat']
956
- cfg['bindings'] = [b for b in cfg.get('bindings', []) if b.get('match', {}).get('channel') != 'rocketchat']
957
- with open('$HOME/.openclaw/openclaw.json', 'w') as f:
958
- json.dump(cfg, f, indent=2, ensure_ascii=False)
959
- f.write('\n')
960
+ p = '$HOME/.openclaw/openclaw.json'
961
+ with open(p) as f:
962
+ c = json.load(f)
963
+ c.get('channels', {}).pop('rocketchat', None)
964
+ c['bindings'] = [b for b in c.get('bindings', []) if b.get('match', {}).get('channel') != 'rocketchat']
965
+ c.get('plugins', {}).get('entries', {}).pop('openclaw-rocketchat', None)
966
+ c.get('plugins', {}).get('entries', {}).pop('rocketchat', None)
967
+ c.get('plugins', {}).get('installs', {}).pop('openclaw-rocketchat', None)
968
+ with open(p, 'w') as f:
969
+ json.dump(c, f, indent=2, ensure_ascii=False)
970
+ print('Done')
960
971
  "
961
972
 
962
- # 4. 重新开始
973
+ # 5. 重新开始
963
974
  curl -fsSL https://raw.githubusercontent.com/Kxiandaoyan/openclaw-rocketchat/master/install-rc.sh | bash
964
975
  openclaw plugins install openclaw-rocketchat
965
976
  openclaw rocketchat setup
966
977
  openclaw rocketchat add-bot
978
+ openclaw gateway start
967
979
  ```
968
980
 
969
981
  </details>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openclaw-rocketchat",
3
- "version": "0.4.3",
3
+ "version": "0.4.4",
4
4
  "description": "Rocket.Chat channel plugin for OpenClaw — connect via mobile app, ideal for China mainland users",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",