@openclaw-channel/socket-chat 1.0.6 → 1.0.8

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/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.6",
3
+ "version": "1.0.8",
4
4
  "description": "OpenClaw Socket Chat channel plugin — MQTT-based IM bridge",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -11,7 +11,7 @@
11
11
  "test:watch": "vitest"
12
12
  },
13
13
  "dependencies": {
14
- "mqtt": "^4.3.8",
14
+ "mqtt": "^5.10.1",
15
15
  "zod": "^4.3.6"
16
16
  },
17
17
  "devDependencies": {
@@ -36,7 +36,7 @@
36
36
  "order": 90
37
37
  },
38
38
  "install": {
39
- "npmSpec": "@openclaw/socket-chat",
39
+ "npmSpec": "@openclaw-channel/socket-chat",
40
40
  "localPath": ".",
41
41
  "defaultChoice": "local"
42
42
  }
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";