@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 +9 -0
- package/channel-api.ts +3 -0
- package/index.ts +11 -12
- package/package.json +1 -1
- package/runtime-api.ts +3 -0
- package/src/__sdk-stub__.ts +26 -8
- package/src/channel.ts +391 -336
- package/src/inbound.test.ts +405 -583
- package/src/inbound.ts +175 -407
- package/src/mqtt-client.ts +66 -50
- package/src/outbound.test.ts +36 -26
- package/src/outbound.ts +37 -75
- package/src/runtime-api.ts +28 -0
- package/src/runtime.ts +8 -12
- package/tsconfig.json +1 -1
- package/vitest.config.ts +13 -7
package/vitest.config.ts
CHANGED
|
@@ -4,17 +4,23 @@ import { defineConfig } from "vitest/config";
|
|
|
4
4
|
|
|
5
5
|
const dir = path.dirname(fileURLToPath(import.meta.url));
|
|
6
6
|
const openclawSrc = path.join(dir, "..", "openclaw", "src");
|
|
7
|
+
const sdkSrc = path.join(openclawSrc, "plugin-sdk");
|
|
7
8
|
|
|
8
9
|
export default defineConfig({
|
|
9
10
|
resolve: {
|
|
10
11
|
alias: [
|
|
11
|
-
//
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
{
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
},
|
|
12
|
+
// Per-subpath aliases must come BEFORE the broad "openclaw/plugin-sdk" fallback.
|
|
13
|
+
{ find: "openclaw/plugin-sdk/runtime-store", replacement: path.join(sdkSrc, "runtime-store.ts") },
|
|
14
|
+
{ find: "openclaw/plugin-sdk/channel-pairing", replacement: path.join(sdkSrc, "channel-pairing.ts") },
|
|
15
|
+
{ find: "openclaw/plugin-sdk/channel-lifecycle", replacement: path.join(sdkSrc, "channel-lifecycle.ts") },
|
|
16
|
+
{ find: "openclaw/plugin-sdk/inbound-reply-dispatch", replacement: path.join(sdkSrc, "inbound-reply-dispatch.ts") },
|
|
17
|
+
{ find: "openclaw/plugin-sdk/reply-payload", replacement: path.join(sdkSrc, "reply-payload.ts") },
|
|
18
|
+
{ find: "openclaw/plugin-sdk/media-runtime", replacement: path.join(sdkSrc, "media-runtime.ts") },
|
|
19
|
+
{ find: "openclaw/plugin-sdk/allow-from", replacement: path.join(sdkSrc, "allow-from.ts") },
|
|
20
|
+
{ find: "openclaw/plugin-sdk/status-helpers", replacement: path.join(sdkSrc, "status-helpers.ts") },
|
|
21
|
+
{ find: "openclaw/plugin-sdk/channel-core", replacement: path.join(sdkSrc, "channel-core.ts") },
|
|
22
|
+
// Broad fallback for any remaining "openclaw/plugin-sdk" (main barrel) imports.
|
|
23
|
+
{ find: "openclaw/plugin-sdk", replacement: path.join(dir, "src", "__sdk-stub__.ts") },
|
|
18
24
|
],
|
|
19
25
|
},
|
|
20
26
|
test: {
|