@xmoxmo/bncr 0.7.0 → 0.7.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xmoxmo/bncr",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -240,7 +240,6 @@ const readNpmLatestVersion = (packageName) => {
240
240
  const requiredOpenClawSdkSubpaths = [
241
241
  'openclaw/plugin-sdk/channel-outbound',
242
242
  'openclaw/plugin-sdk/channel-ingress-runtime',
243
- 'openclaw/plugin-sdk/channel-message',
244
243
  'openclaw/plugin-sdk/routing',
245
244
  'openclaw/plugin-sdk/conversation-runtime',
246
245
  'openclaw/plugin-sdk/session-store-runtime',
@@ -251,7 +250,7 @@ const requiredOpenClawSdkSubpaths = [
251
250
  'openclaw/plugin-sdk/security-runtime',
252
251
  'openclaw/plugin-sdk/status-helpers',
253
252
  'openclaw/plugin-sdk/tool-send',
254
- 'openclaw/plugin-sdk/command-auth',
253
+ 'openclaw/plugin-sdk/command-detection',
255
254
  'openclaw/plugin-sdk/reply-history',
256
255
  ];
257
256
 
@@ -1,4 +1,4 @@
1
- import { hasControlCommand } from 'openclaw/plugin-sdk/command-auth';
1
+ import { hasControlCommand } from 'openclaw/plugin-sdk/command-detection';
2
2
  import { emitBncrLogLine } from '../../core/logging.ts';
3
3
  import { resolveBncrChannelPolicy } from '../../core/policy.ts';
4
4
  import { formatDisplayScope } from '../../core/targets.ts';
@@ -1,5 +1,5 @@
1
1
  import fs from 'node:fs';
2
- import { hasControlCommand } from 'openclaw/plugin-sdk/command-auth';
2
+ import { hasControlCommand } from 'openclaw/plugin-sdk/command-detection';
3
3
  import {
4
4
  formatDisplayScope,
5
5
  normalizeInboundSessionKey,
@@ -271,7 +271,11 @@ export async function dispatchBncrInbound(params: {
271
271
  mediaContentType: mediaContentType || mimeType,
272
272
  historyLimit: resolvedHistoryLimit,
273
273
  });
274
- if (historyKey) {
274
+ // A silent history flush repurposes the current turn as a context carrier
275
+ // and suppresses its outbound. Only a turn we would not reply to anyway
276
+ // may carry the flush; a reply-expected turn must reach the channel, and
277
+ // its backlog is flushed by the outbound path after the reply instead.
278
+ if (historyKey && !initialShouldDispatch && !forceSilentHistoryFlush) {
275
279
  const entries = conversationHistories.get(historyKey);
276
280
  if (entries && resolvedHistoryLimit > 0 && entries.length >= resolvedHistoryLimit) {
277
281
  const sceneForHistory = sceneRegistry.get(buildSceneKey(parsed));
@@ -279,6 +283,10 @@ export async function dispatchBncrInbound(params: {
279
283
  if (historyForce) {
280
284
  silentHistoryFlush = true;
281
285
  shouldDispatch = true;
286
+ emitBncrLogLine(
287
+ 'info',
288
+ `history silent flush|key=${historyKey}|limit=${resolvedHistoryLimit}|entries=${entries.length}|carrier=${msgId ?? '-'}`,
289
+ );
282
290
  }
283
291
  }
284
292
  }
@@ -1,4 +1,4 @@
1
- import type { ChannelMessageSendResult } from 'openclaw/plugin-sdk/channel-message';
1
+ import type { ChannelMessageSendResult } from 'openclaw/plugin-sdk/channel-outbound';
2
2
  import type { GatewayRequestHandlerOptions } from 'openclaw/plugin-sdk/core';
3
3
  import type { BncrRecentOutboundEntry, BncrRoute } from '../core/types.ts';
4
4
  import type { ReplyPayloadInput } from '../messaging/outbound/reply-enqueue.ts';
@@ -1,4 +1,4 @@
1
- import type { ChannelMessageSendResult } from 'openclaw/plugin-sdk/channel-message';
1
+ import type { ChannelMessageSendResult } from 'openclaw/plugin-sdk/channel-outbound';
2
2
  import { Type } from 'typebox';
3
3
  import { listAccountIds, normalizeAccountId, resolveAccount } from '../core/accounts.ts';
4
4
  import { BncrConfigSchema } from '../core/config-schema.ts';
@@ -1,4 +1,4 @@
1
- import { hasControlCommand } from 'openclaw/plugin-sdk/command-auth';
1
+ import { hasControlCommand } from 'openclaw/plugin-sdk/command-detection';
2
2
  import { resolveAccount } from '../core/accounts.ts';
3
3
  import { checkBncrMessageGate } from '../messaging/inbound/gate.ts';
4
4
  import {
@@ -1,4 +1,4 @@
1
- import type { ChannelMessageSendResult } from 'openclaw/plugin-sdk/channel-message';
1
+ import type { ChannelMessageSendResult } from 'openclaw/plugin-sdk/channel-outbound';
2
2
  import type { BncrChannelSendContext } from './channel-runtime-types.ts';
3
3
 
4
4
  export type BncrMessageSendBridge = {