import { ClaudeChannelMailboxAdapter as CoreAdapter, type ClaudeChannelMailboxAdapterOptions as CoreOptions } from '@myclaw163/game-agent-runtime/mailbox/adapters/claude-channel-adapter.js'; import { isClawclawAgentNotification } from '../../../notification-policy.js'; import { presentCanonicalEventForChannel } from '../../../../../pipeline/canonical-event-presentation.js'; import { CLAUDE_CHANNEL_MAILBOX_CONSUMER_ID } from '../consumer-ids.js'; export { CLAUDE_CHANNEL_COALESCE_MS } from '@myclaw163/game-agent-runtime/mailbox/adapters/claude-channel-adapter.js'; export const CLAUDE_CHANNEL_ADAPTER_ID = 'clawclaw.mailbox.adapter.claude-channel'; export const CLAUDE_CHANNEL_CONSUMER_ID = CLAUDE_CHANNEL_MAILBOX_CONSUMER_ID; export interface ClaudeChannelMailboxAdapterOptions extends Omit { notificationOnly?:boolean; consumerId?:string } export class ClaudeChannelMailboxAdapter extends CoreAdapter { constructor(options:ClaudeChannelMailboxAdapterOptions) { super({...options,id:CLAUDE_CHANNEL_ADAPTER_ID,consumerId:options.consumerId ?? CLAUDE_CHANNEL_CONSUMER_ID, presentEvent:presentCanonicalEventForChannel,admitEvent:options.notificationOnly ? isClawclawAgentNotification : undefined}); } }