@openclaw-channel/socket-chat 1.0.5 → 1.0.7

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 CHANGED
@@ -30,6 +30,15 @@ openclaw plugins install /path/to/socket-chat
30
30
 
31
31
  ---
32
32
 
33
+ ## 更新
34
+
35
+ ```bash
36
+ # 从 npm 更新
37
+ openclaw plugins update socket-chat
38
+ ```
39
+
40
+ ---
41
+
33
42
  ## 通过 CLI 添加账号
34
43
 
35
44
  apiKey 从微秘书平台[个人中心](https://wechat.aibotk.com/user/info)获取
package/channel-api.ts ADDED
@@ -0,0 +1,3 @@
1
+ // Root-level barrel for socket-chat channel plugin.
2
+ // Referenced by defineBundledChannelEntry in index.ts.
3
+ export { socketChatPlugin } from "./src/channel.js";
package/index.ts CHANGED
@@ -1,17 +1,16 @@
1
- import type { OpenClawPluginApi } from "openclaw/plugin-sdk";
2
- import { emptyPluginConfigSchema } from "openclaw/plugin-sdk";
3
- import { socketChatPlugin } from "./src/channel.js";
4
- import { setSocketChatRuntime } from "./src/runtime.js";
1
+ import { defineBundledChannelEntry } from "openclaw/plugin-sdk/channel-entry-contract";
5
2
 
6
- const plugin = {
3
+ export default defineBundledChannelEntry({
7
4
  id: "socket-chat",
8
5
  name: "Socket Chat",
9
6
  description: "Socket Chat channel plugin — MQTT-based IM bridge",
10
- configSchema: emptyPluginConfigSchema(),
11
- register(api: OpenClawPluginApi) {
12
- setSocketChatRuntime(api.runtime);
13
- api.registerChannel({ plugin: socketChatPlugin });
7
+ importMetaUrl: import.meta.url,
8
+ plugin: {
9
+ specifier: "./channel-api.js",
10
+ exportName: "socketChatPlugin",
14
11
  },
15
- };
16
-
17
- export default plugin;
12
+ runtime: {
13
+ specifier: "./runtime-api.js",
14
+ exportName: "setSocketChatRuntime",
15
+ },
16
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw-channel/socket-chat",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "description": "OpenClaw Socket Chat channel plugin — MQTT-based IM bridge",
5
5
  "type": "module",
6
6
  "publishConfig": {
package/runtime-api.ts ADDED
@@ -0,0 +1,3 @@
1
+ // Root-level barrel for socket-chat runtime injection.
2
+ // Referenced by defineBundledChannelEntry in index.ts.
3
+ export { setSocketChatRuntime } from "./src/runtime.js";
@@ -1,15 +1,33 @@
1
1
  /**
2
2
  * Minimal openclaw/plugin-sdk stub for socket-chat unit tests.
3
3
  *
4
- * Only re-exports the symbols that socket-chat/src actually imports at runtime.
5
- * This avoids pulling in the full SDK dependency tree (which includes modules
6
- * like json5 that require the openclaw monorepo workspace to resolve).
4
+ * Handles the broad "openclaw/plugin-sdk" fallback alias in vitest.config.ts.
5
+ * Per-subpath imports (openclaw/plugin-sdk/*) are resolved directly via
6
+ * individual aliases defined in vitest.config.ts.
7
7
  */
8
- export { resolveAllowlistMatchByCandidates } from "../../openclaw/src/channels/allowlist-match.js";
9
- export { createNormalizedOutboundDeliverer } from "../../openclaw/src/plugin-sdk/reply-payload.js";
10
- export { buildMediaPayload } from "../../openclaw/src/channels/plugins/media-payload.js";
11
- export { resolveChannelMediaMaxBytes } from "../../openclaw/src/channels/plugins/media-limits.js";
12
- export { detectMime } from "../../openclaw/src/media/mime.js";
8
+ export { createPluginRuntimeStore } from "../../openclaw/src/plugin-sdk/runtime-store.js";
9
+ export { createChannelPairingController } from "../../openclaw/src/plugin-sdk/channel-pairing.js";
10
+ export { createAccountStatusSink } from "../../openclaw/src/plugin-sdk/channel-lifecycle.js";
11
+ export { dispatchInboundReplyWithBase } from "../../openclaw/src/plugin-sdk/inbound-reply-dispatch.js";
12
+ export {
13
+ deliverFormattedTextWithAttachments,
14
+ buildMediaPayload,
15
+ } from "../../openclaw/src/plugin-sdk/reply-payload.js";
16
+ export { resolveChannelMediaMaxBytes, detectMime } from "../../openclaw/src/plugin-sdk/media-runtime.js";
17
+ export { resolveAllowlistMatchByCandidates } from "../../openclaw/src/plugin-sdk/allow-from.js";
18
+ export {
19
+ buildBaseChannelStatusSummary,
20
+ buildBaseAccountStatusSnapshot,
21
+ collectStatusIssuesFromLastError,
22
+ } from "../../openclaw/src/plugin-sdk/status-helpers.js";
13
23
 
14
24
  // ---- type-only re-exports (erased at runtime) ----
25
+ export type { PluginRuntime } from "../../openclaw/src/plugin-sdk/runtime-store.js";
26
+ export type { OutboundReplyPayload } from "../../openclaw/src/plugin-sdk/reply-payload.js";
27
+ export type { ChannelPlugin } from "../../openclaw/src/plugin-sdk/channel-core.js";
28
+ export { createChatChannelPlugin } from "../../openclaw/src/plugin-sdk/channel-core.js";
29
+ export type {
30
+ ChannelAccountSnapshot,
31
+ ChannelStatusIssue,
32
+ } from "../../openclaw/src/plugin-sdk/status-helpers.js";
15
33
  export type { ChannelGatewayContext } from "../../openclaw/src/plugin-sdk/index.js";