@nextclaw/channel-plugin-slack 0.1.0
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 +3 -0
- package/index.js +34 -0
- package/openclaw.plugin.json +14 -0
- package/package.json +25 -0
package/README.md
ADDED
package/index.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { listBuiltinChannelPlugins } from "@nextclaw/core";
|
|
2
|
+
|
|
3
|
+
function resolveBuiltin(channelId) {
|
|
4
|
+
const plugin = listBuiltinChannelPlugins().find((entry) => entry.id === channelId);
|
|
5
|
+
if (!plugin) {
|
|
6
|
+
throw new Error(`builtin channel plugin not found: ${channelId}`);
|
|
7
|
+
}
|
|
8
|
+
return plugin;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const plugin = {
|
|
12
|
+
id: "builtin-channel-slack",
|
|
13
|
+
name: "Builtin Slack Channel",
|
|
14
|
+
description: "Builtin NextClaw channel plugin for slack",
|
|
15
|
+
configSchema: {
|
|
16
|
+
type: "object",
|
|
17
|
+
additionalProperties: false,
|
|
18
|
+
properties: {}
|
|
19
|
+
},
|
|
20
|
+
register(api) {
|
|
21
|
+
const builtin = resolveBuiltin("slack");
|
|
22
|
+
api.registerChannel({
|
|
23
|
+
plugin: {
|
|
24
|
+
id: "slack",
|
|
25
|
+
nextclaw: {
|
|
26
|
+
isEnabled: builtin.isEnabled,
|
|
27
|
+
createChannel: builtin.create
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export default plugin;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "builtin-channel-slack",
|
|
3
|
+
"name": "Builtin Slack Channel",
|
|
4
|
+
"description": "Builtin NextClaw channel plugin for slack",
|
|
5
|
+
"version": "0.1.0",
|
|
6
|
+
"channels": [
|
|
7
|
+
"slack"
|
|
8
|
+
],
|
|
9
|
+
"configSchema": {
|
|
10
|
+
"type": "object",
|
|
11
|
+
"additionalProperties": false,
|
|
12
|
+
"properties": {}
|
|
13
|
+
}
|
|
14
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@nextclaw/channel-plugin-slack",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "NextClaw Slack channel plugin (OpenClaw-compatible)",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"default": "./index.js"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"files": [
|
|
13
|
+
"index.js",
|
|
14
|
+
"openclaw.plugin.json",
|
|
15
|
+
"README.md"
|
|
16
|
+
],
|
|
17
|
+
"openclaw": {
|
|
18
|
+
"extensions": [
|
|
19
|
+
"index.js"
|
|
20
|
+
]
|
|
21
|
+
},
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"@nextclaw/core": "^0.6.16"
|
|
24
|
+
}
|
|
25
|
+
}
|