agent-afk 5.309.1 → 5.309.3

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.
@@ -4,7 +4,7 @@ export interface ServiceStartupSidecar {
4
4
  pid: number;
5
5
  startedAt: string;
6
6
  }
7
- export declare function writeServiceStartupSidecar(name: ServiceName, version: string, pid?: number, now?: () => string): void;
7
+ export declare function writeServiceStartupSidecar(name: ServiceName, version: string, pid?: number, now?: () => string): boolean;
8
8
  export declare function readServiceStartupSidecar(name: ServiceName, isRunning?: (pid: number) => boolean): ServiceStartupSidecar | undefined;
9
9
  export type VersionSkewResult = {
10
10
  kind: 'match';
@@ -1,15 +1,7 @@
1
1
  import type { Context } from 'telegraf';
2
+ export type { LimitedReadResult } from '../response-body-reader.js';
3
+ export { readResponseBytesWithLimit } from '../response-body-reader.js';
2
4
  export declare function sniffMimeType(bytes: Buffer): 'image/jpeg' | 'image/png' | 'image/gif' | 'image/webp' | null;
3
- export type LimitedReadResult = {
4
- status: 'ok';
5
- bytes: Buffer;
6
- } | {
7
- status: 'too-large';
8
- bytesRead: number;
9
- } | {
10
- status: 'missing-body';
11
- };
12
- export declare function readResponseBytesWithLimit(response: Response, maxBytes: number): Promise<LimitedReadResult>;
13
5
  export declare const ALLOWED_PHOTO_MIME: readonly ["image/jpeg", "image/png", "image/gif", "image/webp"];
14
6
  export type AllowedPhotoMime = typeof ALLOWED_PHOTO_MIME[number];
15
7
  export type FetchPhotoResult = {
@@ -21,4 +13,3 @@ export type FetchPhotoResult = {
21
13
  };
22
14
  type LogFn = (...args: unknown[]) => void;
23
15
  export declare function fetchAndClassifyPhoto(ctx: Context, fileId: string, chatId: number, log: LogFn): Promise<FetchPhotoResult>;
24
- export {};
@@ -1,6 +1,8 @@
1
1
  export type DownloadResult = {
2
2
  status: 'ok';
3
3
  bytes: Buffer;
4
+ } | {
5
+ status: 'malformed-url';
4
6
  } | {
5
7
  status: 'ssrf-rejected';
6
8
  protocol: string;
@@ -0,0 +1,10 @@
1
+ export type LimitedReadResult = {
2
+ status: 'ok';
3
+ bytes: Buffer;
4
+ } | {
5
+ status: 'too-large';
6
+ bytesRead: number;
7
+ } | {
8
+ status: 'missing-body';
9
+ };
10
+ export declare function readResponseBytesWithLimit(response: Response, maxBytes: number): Promise<LimitedReadResult>;