libp2p-mesh 2026.6.11 → 2026.6.12
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/dist/src/plugin.js +8 -1
- package/package.json +1 -1
- package/src/plugin.ts +10 -1
package/dist/src/plugin.js
CHANGED
|
@@ -18,7 +18,14 @@ export function registerLibp2pMesh(api) {
|
|
|
18
18
|
const store = createInstancePeerStore({ logger: api.logger });
|
|
19
19
|
const delivery = createOpenClawRuntimeInboundDelivery({
|
|
20
20
|
config: api.config,
|
|
21
|
-
loadAdapter:
|
|
21
|
+
loadAdapter: async (channelId) => {
|
|
22
|
+
const loadAdapter = api.runtime.channel?.outbound?.loadAdapter;
|
|
23
|
+
if (!loadAdapter) {
|
|
24
|
+
api.logger.warn?.("[libp2p-mesh] Runtime channel outbound adapter is unavailable; inbound delivery is disabled in this context.");
|
|
25
|
+
return undefined;
|
|
26
|
+
}
|
|
27
|
+
return loadAdapter(channelId);
|
|
28
|
+
},
|
|
22
29
|
logger: api.logger,
|
|
23
30
|
});
|
|
24
31
|
const router = createInstanceRouter({
|
package/package.json
CHANGED
package/src/plugin.ts
CHANGED
|
@@ -23,7 +23,16 @@ export function registerLibp2pMesh(api: OpenClawPluginApi) {
|
|
|
23
23
|
const store = createInstancePeerStore({ logger: api.logger });
|
|
24
24
|
const delivery = createOpenClawRuntimeInboundDelivery({
|
|
25
25
|
config: api.config,
|
|
26
|
-
loadAdapter:
|
|
26
|
+
loadAdapter: async (channelId) => {
|
|
27
|
+
const loadAdapter = api.runtime.channel?.outbound?.loadAdapter;
|
|
28
|
+
if (!loadAdapter) {
|
|
29
|
+
api.logger.warn?.(
|
|
30
|
+
"[libp2p-mesh] Runtime channel outbound adapter is unavailable; inbound delivery is disabled in this context.",
|
|
31
|
+
);
|
|
32
|
+
return undefined;
|
|
33
|
+
}
|
|
34
|
+
return loadAdapter(channelId);
|
|
35
|
+
},
|
|
27
36
|
logger: api.logger,
|
|
28
37
|
});
|
|
29
38
|
const router = createInstanceRouter({
|