agent-afk 5.308.11 → 5.308.13

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/paths.d.ts CHANGED
@@ -34,6 +34,7 @@ export { getBashCapturesDir, getInboundAttachmentsDir, getReceiptsDir, getTraceD
34
34
  export { getSessionBlobsDir, getSessionJournalPath, getSubagentJournalPath, getSubagentJournalsDir, } from './paths.journal.js';
35
35
  export { getPluginsDir, getProjectPluginsDir, getPluginsIndexPath, getPluginDataDir, getMarketplaceCacheDir, getMarketplaceDir, getBundledPluginsDir, } from './paths.plugins.js';
36
36
  export declare function getDaemonStateDir(instanceId?: string): string;
37
+ export declare function getServiceStartupSidecarPath(name: 'telegram' | 'daemon'): string;
37
38
  export declare function getWorktreeSweepLockPath(): string;
38
39
  export declare function getWorktreeRootsRegistryPath(): string;
39
40
  export declare function getEnvConfigPath(): string;
@@ -0,0 +1,20 @@
1
+ import type { ServiceName } from './types.js';
2
+ export interface ServiceStartupSidecar {
3
+ version: string;
4
+ pid: number;
5
+ startedAt: string;
6
+ }
7
+ export declare function writeServiceStartupSidecar(name: ServiceName, version: string, pid?: number, now?: () => string): void;
8
+ export declare function readServiceStartupSidecar(name: ServiceName, isRunning?: (pid: number) => boolean): ServiceStartupSidecar | undefined;
9
+ export type VersionSkewResult = {
10
+ kind: 'match';
11
+ version: string;
12
+ } | {
13
+ kind: 'skew';
14
+ runningVersion: string;
15
+ installedVersion: string;
16
+ } | {
17
+ kind: 'unknown';
18
+ };
19
+ export declare function compareVersions(runningVersion: string | undefined, installedVersion: string): VersionSkewResult;
20
+ export declare function formatVersionLine(result: VersionSkewResult, name: ServiceName): string;
@@ -0,0 +1,22 @@
1
+ export type DownloadResult = {
2
+ status: 'ok';
3
+ bytes: Buffer;
4
+ } | {
5
+ status: 'ssrf-rejected';
6
+ protocol: string;
7
+ hostname: string;
8
+ } | {
9
+ status: 'fetch-failed';
10
+ httpStatus: number;
11
+ } | {
12
+ status: 'too-large';
13
+ bytesRead: number;
14
+ } | {
15
+ status: 'missing-body';
16
+ } | {
17
+ status: 'network-error';
18
+ safeMessage: string;
19
+ };
20
+ export declare function downloadTelegramFile(fileUrlRaw: URL | string, options: {
21
+ maxBytes: number;
22
+ }): Promise<DownloadResult>;