agent-afk 5.149.5 → 5.149.7
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/agent/session/model-slots.d.ts +1 -0
- package/dist/cli.mjs +387 -387
- package/dist/index.mjs +147 -147
- package/dist/telegram/elicitation-handler.d.ts +1 -1
- package/dist/telegram/elicitation-telegram.d.ts +2 -1
- package/dist/telegram/watch.d.ts +2 -1
- package/dist/telegram.mjs +217 -217
- package/package.json +1 -1
|
@@ -2,6 +2,6 @@ import { Telegraf } from 'telegraf';
|
|
|
2
2
|
import type { ElicitationHandler } from '../agent/elicitation-router.js';
|
|
3
3
|
import type { MessageHandler } from './handlers/message.js';
|
|
4
4
|
import { type TelegramRoute } from './route.js';
|
|
5
|
-
export declare function makeTelegramElicitationHandler(messageHandler: MessageHandler, bot: Telegraf, target: TelegramRoute | number, opts?: {
|
|
5
|
+
export declare function makeTelegramElicitationHandler(messageHandler: MessageHandler, bot: Telegraf, target: TelegramRoute | number | (() => TelegramRoute), opts?: {
|
|
6
6
|
ledgerOriginated?: boolean;
|
|
7
7
|
}): ElicitationHandler;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Telegraf } from 'telegraf';
|
|
2
2
|
import type { ElicitationHandler } from '../agent/elicitation-router.js';
|
|
3
|
+
import { type TelegramRoute } from './route.js';
|
|
3
4
|
export declare const ELICITATION_CALLBACK_PREFIX = "afk:pa:";
|
|
4
|
-
export declare function createTelegramElicitationHandler(bot: Telegraf, chatIds: Set<number>, log?: (...args: unknown[]) => void): ElicitationHandler;
|
|
5
|
+
export declare function createTelegramElicitationHandler(bot: Telegraf, chatIds: Set<number>, log?: (...args: unknown[]) => void, fallbackRoute?: (chatId: number) => TelegramRoute): ElicitationHandler;
|
|
5
6
|
export declare function composeTelegramElicitation(askHandler: ElicitationHandler, formHandler: ElicitationHandler): ElicitationHandler;
|
|
6
7
|
export declare function _resetPendingForTests(): void;
|
package/dist/telegram/watch.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type LedgerRecord } from '../agent/session-ledger.js';
|
|
2
2
|
import type { MessageHandler } from './handlers/message.js';
|
|
3
3
|
import type { Telegraf } from 'telegraf';
|
|
4
|
+
import type { TelegramRoute } from './route.js';
|
|
4
5
|
type SendFn = (text: string) => Promise<void>;
|
|
5
6
|
type LogFn = (...args: unknown[]) => void;
|
|
6
7
|
export declare function renderLedgerRecord(rec: LedgerRecord): string | null;
|
|
@@ -15,7 +16,7 @@ export declare class SessionWatchManager {
|
|
|
15
16
|
constructor(log?: LogFn, bot?: Telegraf, messageHandler?: MessageHandler, elicitHeartbeatMs?: number);
|
|
16
17
|
watching(chatId: number): string | undefined;
|
|
17
18
|
getWatched(chatId: number): string | undefined;
|
|
18
|
-
start(chatId: number, sessionId: string, send: SendFn): void;
|
|
19
|
+
start(chatId: number, sessionId: string, send: SendFn, route?: () => TelegramRoute): void;
|
|
19
20
|
stop(chatId: number): string | undefined;
|
|
20
21
|
stopAll(): Promise<void>;
|
|
21
22
|
private _run;
|