openclaw.plugin.json 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. {
  2. "id": "wechat-agent",
  3. "channels": ["wechat-agent"],
  4. "configSchema": {
  5. "type": "object",
  6. "additionalProperties": false,
  7. "properties": {
  8. "channels": {
  9. "type": "object",
  10. "properties": {
  11. "wechat-agent": {
  12. "type": "object",
  13. "additionalProperties": true,
  14. "properties": {
  15. "enabled": {
  16. "type": "boolean",
  17. "default": true,
  18. "description": "Master switch for this channel."
  19. },
  20. "apiBase": {
  21. "type": "string",
  22. "description": "Root URL of the wechat-agent HTTP bot, e.g. http://8.138.37.248/api/wechat-agent",
  23. "examples": [
  24. "http://127.0.0.1:8138",
  25. "http://8.138.37.248/api/wechat-agent"
  26. ]
  27. },
  28. "pollIntervalMs": {
  29. "type": "integer",
  30. "minimum": 3000,
  31. "maximum": 120000,
  32. "default": 10000,
  33. "description": "How often to pull new messages (ms)."
  34. },
  35. "batchWindowMs": {
  36. "type": "integer",
  37. "minimum": 0,
  38. "maximum": 30000,
  39. "default": 3000,
  40. "description": "Wait this long after a message before dispatching to the agent, so rapid-fire messages from one sender get merged into a single agent turn. 0 = dispatch immediately."
  41. },
  42. "replyCooldownSecPerWxid": {
  43. "type": "integer",
  44. "minimum": 0,
  45. "maximum": 3600,
  46. "default": 5,
  47. "description": "Minimum seconds between two replies to the same wxid. Prevents the bot from spamming if the agent errors repeatedly."
  48. },
  49. "dmPolicy": {
  50. "type": "string",
  51. "enum": ["open", "allowlist", "pairing"],
  52. "default": "open",
  53. "description": "Who can initiate DMs. 'open' = anyone, 'allowlist' = only wxids in allowFrom, 'pairing' = require pairing code."
  54. },
  55. "allowFrom": {
  56. "type": "array",
  57. "items": { "type": "string" },
  58. "default": [],
  59. "description": "Wxid whitelist (used when dmPolicy=allowlist)."
  60. },
  61. "ignoreWxidPrefixes": {
  62. "type": "array",
  63. "items": { "type": "string" },
  64. "default": ["gh_"],
  65. "description": "Skip messages from wxids starting with these prefixes (e.g. gh_ for official accounts)."
  66. },
  67. "ignoreWxidExact": {
  68. "type": "array",
  69. "items": { "type": "string" },
  70. "default": [
  71. "weixin",
  72. "fmessage",
  73. "medianote",
  74. "filehelper",
  75. "floatbottle",
  76. "qmessage",
  77. "qqmail",
  78. "tmessage",
  79. "newsapp"
  80. ],
  81. "description": "Skip messages from these exact wxids (system contacts)."
  82. },
  83. "ignoreMessageTypes": {
  84. "type": "array",
  85. "items": { "type": "string" },
  86. "default": ["system", "emoji", "voice", "image", "video", "location", "file"],
  87. "description": "Message types to skip. MVP only handles text; others are ignored until v0.2."
  88. },
  89. "faq": {
  90. "type": "array",
  91. "description": "Plugin-layer FAQ fast-path. If a message matches (any keyword in keywords is a substring of content), reply immediately without calling the agent. Saves tokens and latency for canned answers.",
  92. "default": [],
  93. "items": {
  94. "type": "object",
  95. "required": ["keywords", "reply"],
  96. "properties": {
  97. "id": { "type": "string" },
  98. "keywords": {
  99. "type": "array",
  100. "items": { "type": "string" },
  101. "minItems": 1
  102. },
  103. "reply": { "type": "string" },
  104. "stop": {
  105. "type": "boolean",
  106. "default": true,
  107. "description": "If true (default), skip the agent after matching. If false, also forward to agent."
  108. }
  109. }
  110. }
  111. },
  112. "defaultTo": {
  113. "type": "string",
  114. "description": "Default wxid to send to when agent replies without an explicit target (e.g. scheduled broadcasts)."
  115. },
  116. "selfWxid": {
  117. "type": "string",
  118. "description": "The bot's own wxid, used to filter self-sent echoes. If unset, the plugin will try to detect via checkOnline."
  119. }
  120. }
  121. }
  122. }
  123. }
  124. }
  125. }
  126. }