beeos-claw 0.5.93 → 0.5.94

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.
@@ -1 +1 @@
1
- const DEFAULT_ORIGINATING_CHANNEL="beeos-claw",DEFAULT_ORIGINATING_TARGET="main",DEFAULT_ORIGINATING_ACCOUNT_ID="main",isRecord=o=>"object"==typeof o&&null!==o&&!Array.isArray(o),assertKnownReplyProtocol=o=>{if("acp"!==o&&"im"!==o)throw new Error(`unsupported reply route protocol=${o}`)};export const hasRuntimeReplyApi=o=>"function"==typeof o?.channel?.reply?.dispatchReplyFromConfig;export const buildFinalizedMsgContext=(o,e)=>{assertKnownReplyProtocol(e.protocol);const r=e.originatingChannel??"beeos-claw",t=e.originatingTo??"main",n=e.accountId??"main";return{Body:o.message,BodyForAgent:o.agentMessage,From:`${r}:${t}`,To:t,SessionKey:e.sessionId,Surface:r,Provider:r,OriginatingChannel:r,OriginatingTo:t,AccountId:n,CommandAuthorized:!0}};export const resolveReplySinkForRoute=(o,e)=>{assertKnownReplyProtocol(o.protocol);const r=e[o.protocol];if(!r)throw new Error(`runtime reply sink unavailable protocol=${o.protocol} requestId=${o.requestId}`);return r};const resolveRuntimeDispatchConfig=(o,e)=>{try{const e=o.config?.loadConfig?.();if(isRecord(e))return e}catch{}return e};export const dispatchRuntimeReplyWithRoute=async o=>{const e=o.runtime.channel?.reply?.dispatchReplyFromConfig;if("function"!=typeof e)throw new Error(`runtime reply API unavailable protocol=${o.replyRoute.protocol} requestId=${o.replyRoute.requestId}`);const r=resolveReplySinkForRoute(o.replyRoute,o.replySinks),t=e({ctx:buildFinalizedMsgContext(o.preparedPrompt,o.replyRoute),cfg:resolveRuntimeDispatchConfig(o.runtime,o.pluginConfig),dispatcher:r.dispatcher,replyOptions:r.replyOptions});return o.onDispatchInvoked?.(),t};
1
+ const DEFAULT_ORIGINATING_CHANNEL="beeos-claw",DEFAULT_ORIGINATING_TARGET="main",DEFAULT_ORIGINATING_ACCOUNT_ID="main",isRecord=o=>"object"==typeof o&&null!==o&&!Array.isArray(o),assertKnownReplyProtocol=o=>{if("acp"!==o&&"im"!==o)throw new Error(`unsupported reply route protocol=${o}`)},normalizeMediaUrls=o=>{if(!Array.isArray(o))return;const e=o.filter(o=>"string"==typeof o&&o.length>0);return e.length>0?e:void 0};export const hasRuntimeReplyApi=o=>"function"==typeof o?.channel?.reply?.dispatchReplyFromConfig;export const buildFinalizedMsgContext=(o,e)=>{assertKnownReplyProtocol(e.protocol);const r=e.originatingChannel??"beeos-claw",t=e.originatingTo??"main",n=e.accountId??"main",i=normalizeMediaUrls(o.attachments);return{Body:o.message,BodyForAgent:o.agentMessage,From:`${r}:${t}`,To:t,SessionKey:e.sessionId,Surface:r,Provider:r,OriginatingChannel:r,OriginatingTo:t,AccountId:n,CommandAuthorized:!0,...i?{MediaUrls:i}:{}}};export const resolveReplySinkForRoute=(o,e)=>{assertKnownReplyProtocol(o.protocol);const r=e[o.protocol];if(!r)throw new Error(`runtime reply sink unavailable protocol=${o.protocol} requestId=${o.requestId}`);return r};const resolveRuntimeDispatchConfig=(o,e)=>{try{const e=o.config?.loadConfig?.();if(isRecord(e))return e}catch{}return e};export const dispatchRuntimeReplyWithRoute=async o=>{const e=o.runtime.channel?.reply?.dispatchReplyFromConfig;if("function"!=typeof e)throw new Error(`runtime reply API unavailable protocol=${o.replyRoute.protocol} requestId=${o.replyRoute.requestId}`);const r=resolveReplySinkForRoute(o.replyRoute,o.replySinks),t=e({ctx:buildFinalizedMsgContext(o.preparedPrompt,o.replyRoute),cfg:resolveRuntimeDispatchConfig(o.runtime,o.pluginConfig),dispatcher:r.dispatcher,replyOptions:r.replyOptions});return o.onDispatchInvoked?.(),t};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "beeos-claw",
3
- "version": "0.5.93",
3
+ "version": "0.5.94",
4
4
  "description": "OpenClaw plugin that bridges the BeeOS platform with the local OpenClaw Gateway, providing file transfer, ACP bridge, and observability.",
5
5
  "license": "MIT",
6
6
  "author": "BeeOS <dev@beeos.ai>",