Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ package-lock.json
node_modules
dist
*.txt
*.mjs
200 changes: 134 additions & 66 deletions openclaw.plugin.json
Original file line number Diff line number Diff line change
@@ -1,72 +1,140 @@
{
"id": "rocketchat",
"name": "RocketChat Webhook",
"version": "0.1.0",
"description": "Rocket.Chat integration for OpenClaw",
"type": "channel",
"channels": [
"rocketchat"
],
"configSchema": {
"RC_URL": {
"type": "string",
"description": "Rocket.Chat server URL",
"default": "http://localhost:3000"
},
"RC_AUTH_TOKEN": {
"type": "string",
"description": "Rocket.Chat bot auth token",
"secret": true
},
"RC_USER_ID": {
"type": "string",
"description": "Rocket.Chat bot user ID"
},
"DEFAULT_ROOM": {
"type": "string",
"description": "Default room ID to send messages to",
"default": "GENERAL"
},
"RC_WEBHOOK_SECRET": {
"type": "string",
"description": "Secret token to validate incoming webhooks",
"secret": true
}
},
"channelConfigs": {
"rocketchat": {
"schema": {
"RC_URL": {
"type": "string",
"description": "Rocket.Chat server URL",
"default": "http://localhost:3000"
},
"RC_AUTH_TOKEN": {
"type": "string",
"description": "Rocket.Chat bot auth token",
"secret": true
"id": "rocketchat",
"name": "Rocket.Chat",
"description": "Rocket.Chat channel plugin with REST polling outbound/inbound",
"version": "1.0.0",
"kind": "channel",
"channels": ["rocketchat"],
"channelConfigs": {
"rocketchat": {
"schema": {
"type": "object",
"additionalProperties": false,
"properties": {
"accounts": {
"type": "object",
"additionalProperties": {
"type": "object",
"additionalProperties": false,
"properties": {
"enabled": { "type": "boolean" },
"serverUrl": { "type": "string", "minLength": 1 },
"auth": {
"type": "object",
"oneOf": [
{
"type": "object",
"additionalProperties": false,
"properties": {
"mode": { "const": "token" },
"userId": { "type": "string", "minLength": 1 },
"accessToken": { "type": "string", "minLength": 1 }
},
"required": ["mode", "userId", "accessToken"]
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"mode": { "const": "password" },
"username": { "type": "string", "minLength": 1 },
"password": { "type": "string", "minLength": 1 }
},
"required": ["mode", "username", "password"]
}
]
},
"RC_USER_ID": {
"type": "string",
"description": "Rocket.Chat bot user ID"
"transport": {
"type": "object",
"oneOf": [
{
"type": "object",
"additionalProperties": false,
"properties": {
"mode": { "const": "polling" },
"pollIntervalMs": { "type": "integer", "minimum": 1000 }
},
"required": ["mode"]
}
]
},
"DEFAULT_ROOM": {
"type": "string",
"description": "Default room ID to send messages to",
"default": "GENERAL"
"mentionNames": { "type": "array", "items": { "type": "string", "minLength": 1 } },
"forceThread": { "type": "boolean", "default": true },
"agent": { "type": "string", "minLength": 1 }
},
"required": ["enabled", "serverUrl", "auth"]
}
}
}
},
"uiHints": {
"accounts.*.serverUrl": { "label": "Server URL", "placeholder": "https://chat.example.com" },
"accounts.*.auth.userId": { "label": "User ID" },
"accounts.*.auth.accessToken": { "label": "Access Token", "sensitive": true },
"accounts.*.auth.username": { "label": "Username" },
"accounts.*.auth.password": { "label": "Password", "sensitive": true },
"accounts.*.transport.pollIntervalMs": { "label": "Polling Interval (ms)", "placeholder": "3000" }
}
}
},
"configSchema": {
"type": "object",
"additionalProperties": false,
"properties": {
"accounts": {
"type": "object",
"additionalProperties": {
"type": "object",
"additionalProperties": false,
"properties": {
"enabled": { "type": "boolean" },
"serverUrl": { "type": "string", "minLength": 1 },
"auth": {
"type": "object",
"oneOf": [
{
"type": "object",
"additionalProperties": false,
"properties": {
"mode": { "const": "token" },
"userId": { "type": "string", "minLength": 1 },
"accessToken": { "type": "string", "minLength": 1 }
},
"required": ["mode", "userId", "accessToken"]
},
"RC_WEBHOOK_SECRET": {
"type": "string",
"description": "Secret token to validate incoming webhooks",
"secret": true
{
"type": "object",
"additionalProperties": false,
"properties": {
"mode": { "const": "password" },
"username": { "type": "string", "minLength": 1 },
"password": { "type": "string", "minLength": 1 }
},
"required": ["mode", "username", "password"]
}
}
]
},
"transport": {
"type": "object",
"oneOf": [
{
"type": "object",
"additionalProperties": false,
"properties": {
"mode": { "const": "polling" },
"pollIntervalMs": { "type": "integer", "minimum": 1000 }
},
"required": ["mode"]
}
]
},
"mentionNames": { "type": "array", "items": { "type": "string", "minLength": 1 } },
"forceThread": { "type": "boolean", "default": true },
"agent": { "type": "string", "minLength": 1 }
},
"required": ["enabled", "serverUrl", "auth"]
}
},
"configuration": {
"channels": [
"rocketchat"
]
},
"entry": "dist/index.js"
}
}
}
}
}
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "dist/index.js",
"openclaw": {
"extensions": [
"./dist/index.js"
"./src/index.ts"
]
},
"type": "module",
Expand All @@ -31,6 +31,7 @@
"typescript": "^6.0.3"
},
"dependencies": {
"dotenv": "^17.4.2"
"dotenv": "^17.4.2",
"zod": "^4.4.3"
}
}
}
Loading