agent-afk 5.70.0 → 5.71.0
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/daemon/schedule-store.d.ts +1 -0
- package/dist/agent/daemon/scheduler.d.ts +1 -0
- package/dist/agent/daemon/triggers.d.ts +1 -0
- package/dist/cli/commands/daemon.d.ts +1 -0
- package/dist/cli/config/types.d.ts +2 -0
- package/dist/cli.mjs +452 -452
- package/dist/index.mjs +151 -151
- package/dist/telegram/allowlist.d.ts +1 -0
- package/dist/telegram/notify-routing.d.ts +10 -0
- package/dist/telegram/push.d.ts +1 -0
- package/dist/telegram.mjs +203 -203
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Context, MiddlewareFn } from 'telegraf';
|
|
2
2
|
export type LogFn = (...args: unknown[]) => void;
|
|
3
3
|
export declare function parseAllowedChatIds(raw: string | undefined, log?: LogFn): Set<number>;
|
|
4
|
+
export declare function isChatAllowed(id: number, allowlist: ReadonlySet<number>): boolean;
|
|
4
5
|
export declare function createAllowlistMiddleware(allowedIds: Set<number>, log?: LogFn): MiddlewareFn<Context>;
|
|
@@ -6,7 +6,17 @@ export interface TelegramNotifyConfig {
|
|
|
6
6
|
}
|
|
7
7
|
export declare function resolvePrimaryChatId(allowed: readonly number[], explicit?: number): number | undefined;
|
|
8
8
|
export declare function resolveNotifyTargets(allowlist: Set<number>, config?: TelegramNotifyConfig): number[];
|
|
9
|
+
export type ChatTargetResolution = {
|
|
10
|
+
ok: true;
|
|
11
|
+
id: number;
|
|
12
|
+
} | {
|
|
13
|
+
ok: false;
|
|
14
|
+
reason: 'invalid' | 'unknown-alias';
|
|
15
|
+
message: string;
|
|
16
|
+
};
|
|
17
|
+
export declare function resolveChatTarget(chat: number | string, aliases?: Readonly<Record<string, number>>): ChatTargetResolution;
|
|
9
18
|
export declare function parseChatId(raw: string | undefined): number | undefined;
|
|
10
19
|
export declare function parseMode(raw: string | undefined): NotifyMode | undefined;
|
|
11
20
|
export declare function loadNotifyConfig(): TelegramNotifyConfig;
|
|
12
21
|
export declare function resolveConfiguredNotifyTargets(): number[];
|
|
22
|
+
export declare function loadChatAliases(): Record<string, number>;
|
package/dist/telegram/push.d.ts
CHANGED