agent-afk 5.29.1 → 5.29.2
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/cli/terminal-compositor.test-helpers.d.ts +20 -0
- package/dist/cli/update-checker.d.ts +3 -0
- package/dist/cli.mjs +388 -388
- package/dist/index.mjs +1 -1
- package/dist/telegram.mjs +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { vi } from 'vitest';
|
|
2
|
+
export type MockStdout = NodeJS.WriteStream & {
|
|
3
|
+
isTTY: boolean;
|
|
4
|
+
columns: number;
|
|
5
|
+
rows: number;
|
|
6
|
+
emit(event: string, ...args: unknown[]): boolean;
|
|
7
|
+
on(event: string, listener: (...args: unknown[]) => void): MockStdout;
|
|
8
|
+
};
|
|
9
|
+
export type MockStdin = NodeJS.ReadStream & {
|
|
10
|
+
isTTY: boolean;
|
|
11
|
+
isRaw: boolean;
|
|
12
|
+
setRawMode: ReturnType<typeof vi.fn>;
|
|
13
|
+
emit(event: string, ...args: unknown[]): boolean;
|
|
14
|
+
};
|
|
15
|
+
export declare function makeMockStdout(isTTY?: boolean): MockStdout;
|
|
16
|
+
export declare function makeMockStdin(isTTY?: boolean): MockStdin;
|
|
17
|
+
export declare function collectWrites(stream: MockStdout): {
|
|
18
|
+
all: () => string;
|
|
19
|
+
clear: () => void;
|
|
20
|
+
};
|
|
@@ -3,8 +3,11 @@ export interface UpdateInfo {
|
|
|
3
3
|
latestVersion: string;
|
|
4
4
|
}
|
|
5
5
|
export declare function checkForUpdates(updatePolicy: 'notify' | 'auto' | 'off'): UpdateInfo | null;
|
|
6
|
+
export declare function hasUpdateCache(): boolean;
|
|
7
|
+
export declare function coldStartUpdateCheck(updatePolicy: 'notify' | 'auto' | 'off'): Promise<UpdateInfo | null>;
|
|
6
8
|
export declare function printUpdateBanner(info: UpdateInfo): void;
|
|
7
9
|
export declare function writePendingUpdateMarker(targetVersion: string): void;
|
|
10
|
+
export declare function writeUpdateCache(latestVersion: string): void;
|
|
8
11
|
export declare function fetchLatestVersion(timeoutMs?: number, url?: string): Promise<string | undefined>;
|
|
9
12
|
export declare function triggerAutoUpdate(latestVersion: string): void;
|
|
10
13
|
export declare function checkPendingUpdate(): void;
|