agent-afk 5.261.2 → 5.261.4

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.
@@ -0,0 +1,8 @@
1
+ import type { ContentBlockParam } from '@anthropic-ai/sdk/resources';
2
+ export interface BgInjectionSource {
3
+ drainInjections(): string;
4
+ }
5
+ export declare function registerBgInjectionSource(key: string, source: BgInjectionSource): void;
6
+ export declare function unregisterBgInjectionSource(key: string, source: BgInjectionSource): void;
7
+ export declare function drainBgInjections(key: string): string;
8
+ export declare function prependToContent(prefix: string, content: string | ContentBlockParam[]): string | ContentBlockParam[];
@@ -3,7 +3,10 @@ export declare class TelegramBgResultNotifier {
3
3
  private readonly registry;
4
4
  private readonly chatId?;
5
5
  private readonly threadId?;
6
+ private pendingInjections;
7
+ private readonly routeKey;
6
8
  private readonly onSettled;
7
9
  constructor(registry: BackgroundAgentRegistry, chatId?: number | undefined, threadId?: number | undefined);
10
+ drainInjections(): string;
8
11
  dispose(): void;
9
12
  }
@@ -0,0 +1,2 @@
1
+ import type { MessageEntity } from 'telegraf/types';
2
+ export declare function addressedToBot(text: string | undefined, entities: MessageEntity[] | undefined, replyFromId: number | undefined, botId: number, botUsername: string | undefined): boolean;
@@ -1,10 +1,10 @@
1
1
  import { Context } from 'telegraf';
2
- import type { MessageEntity } from 'telegraf/types';
3
2
  import { Telegraf } from 'telegraf';
4
3
  import { SessionManager } from '../session-manager.js';
5
4
  import { type TelegramRoute } from '../route.js';
5
+ import { addressedToBot } from './message.addressed-to-bot.js';
6
+ export { addressedToBot };
6
7
  type LogFn = (...args: unknown[]) => void;
7
- export declare function addressedToBot(text: string | undefined, entities: MessageEntity[] | undefined, replyFromId: number | undefined, botId: number, botUsername: string | undefined): boolean;
8
8
  export declare class MessageHandler {
9
9
  private static readonly MAX_QUEUE_DEPTH;
10
10
  private sessionManager;
@@ -34,4 +34,3 @@ export declare class MessageHandler {
34
34
  private processOne;
35
35
  drainQueue(route: TelegramRoute): Promise<void>;
36
36
  }
37
- export {};