@nextclaw/channel-plugin-slack 0.1.0 → 0.1.1

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 (2) hide show
  1. package/index.js +4 -11
  2. package/package.json +2 -2
package/index.js CHANGED
@@ -1,12 +1,6 @@
1
- import { listBuiltinChannelPlugins } from "@nextclaw/core";
1
+ import { resolveBuiltinChannelRuntime } from "@nextclaw/channel-runtime";
2
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
- }
3
+ const runtime = resolveBuiltinChannelRuntime("slack");
10
4
 
11
5
  const plugin = {
12
6
  id: "builtin-channel-slack",
@@ -18,13 +12,12 @@ const plugin = {
18
12
  properties: {}
19
13
  },
20
14
  register(api) {
21
- const builtin = resolveBuiltin("slack");
22
15
  api.registerChannel({
23
16
  plugin: {
24
17
  id: "slack",
25
18
  nextclaw: {
26
- isEnabled: builtin.isEnabled,
27
- createChannel: builtin.create
19
+ isEnabled: runtime.isEnabled,
20
+ createChannel: runtime.createChannel
28
21
  }
29
22
  }
30
23
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nextclaw/channel-plugin-slack",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "private": false,
5
5
  "description": "NextClaw Slack channel plugin (OpenClaw-compatible)",
6
6
  "type": "module",
@@ -20,6 +20,6 @@
20
20
  ]
21
21
  },
22
22
  "dependencies": {
23
- "@nextclaw/core": "^0.6.16"
23
+ "@nextclaw/channel-runtime": "^0.1.1"
24
24
  }
25
25
  }