agent-afk 6.3.0 → 6.4.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.
@@ -2017,6 +2017,25 @@ export declare const ENV_REGISTRY: readonly [{
2017
2017
  readonly required: false;
2018
2018
  readonly example: "~/afk-tty.cast";
2019
2019
  readonly category: "debug";
2020
+ }, {
2021
+ readonly name: "AFK_DESKTOP_ENABLED";
2022
+ readonly description: string;
2023
+ readonly type: "boolean";
2024
+ readonly required: false;
2025
+ readonly example: "1";
2026
+ readonly category: "misc";
2027
+ }, {
2028
+ readonly name: "WSL_DISTRO_NAME";
2029
+ readonly description: string;
2030
+ readonly type: "string";
2031
+ readonly required: false;
2032
+ readonly category: "misc";
2033
+ }, {
2034
+ readonly name: "WSL_INTEROP";
2035
+ readonly description: string;
2036
+ readonly type: "string";
2037
+ readonly required: false;
2038
+ readonly category: "misc";
2020
2039
  }, {
2021
2040
  readonly name: "AFK_GLOBAL_CHAT_URL";
2022
2041
  readonly description: string;
@@ -0,0 +1,20 @@
1
+ export declare const DESKTOP_ENV_REGISTRY: readonly [{
2
+ readonly name: "AFK_DESKTOP_ENABLED";
3
+ readonly description: string;
4
+ readonly type: "boolean";
5
+ readonly required: false;
6
+ readonly example: "1";
7
+ readonly category: "misc";
8
+ }, {
9
+ readonly name: "WSL_DISTRO_NAME";
10
+ readonly description: string;
11
+ readonly type: "string";
12
+ readonly required: false;
13
+ readonly category: "misc";
14
+ }, {
15
+ readonly name: "WSL_INTEROP";
16
+ readonly description: string;
17
+ readonly type: "string";
18
+ readonly required: false;
19
+ readonly category: "misc";
20
+ }];
@@ -0,0 +1,2 @@
1
+ import type { DesktopBackend } from './types.js';
2
+ export declare function createMacOsBackend(): DesktopBackend;
@@ -0,0 +1,2 @@
1
+ import type { DesktopBackend } from './types.js';
2
+ export declare function createWindowsBackend(): DesktopBackend;
@@ -0,0 +1,3 @@
1
+ import type { DesktopBackend } from './types.js';
2
+ export declare function isWsl2(): boolean;
3
+ export declare function resolveNativeBackend(): Promise<DesktopBackend>;
@@ -0,0 +1,14 @@
1
+ export type PrivateDirectoryExecFile = (file: string, args: string[], options: {
2
+ timeout: number;
3
+ windowsHide: boolean;
4
+ signal?: AbortSignal;
5
+ }) => Promise<{
6
+ stdout: string;
7
+ stderr: string;
8
+ }>;
9
+ export interface PrivateScreenshotDirectoryOptions {
10
+ platform?: NodeJS.Platform;
11
+ execFile?: PrivateDirectoryExecFile;
12
+ signal?: AbortSignal;
13
+ }
14
+ export declare function ensurePrivateScreenshotDirectory(dir: string, options?: PrivateScreenshotDirectoryOptions): Promise<void>;
@@ -0,0 +1,34 @@
1
+ export interface DesktopRegion {
2
+ x: number;
3
+ y: number;
4
+ width: number;
5
+ height: number;
6
+ }
7
+ export interface DesktopScreenshotInput {
8
+ displayIndex?: number;
9
+ region?: DesktopRegion;
10
+ signal?: AbortSignal;
11
+ }
12
+ export interface DesktopScreenshotResult {
13
+ path: string;
14
+ bytes: number;
15
+ width: number;
16
+ height: number;
17
+ scaleFactor: number | null;
18
+ displayIndex: number;
19
+ logicalWidth: number;
20
+ logicalHeight: number;
21
+ dataBase64: string;
22
+ mediaType: 'image/png';
23
+ }
24
+ export interface DesktopScreenshotAborted {
25
+ aborted: true;
26
+ reason: string;
27
+ }
28
+ export interface DesktopBackend {
29
+ screenshot(input: DesktopScreenshotInput, sidecarPath: string): Promise<DesktopScreenshotResult | DesktopScreenshotAborted>;
30
+ }
31
+ export declare class DesktopBackendError extends Error {
32
+ readonly code: 'UNSUPPORTED_PLATFORM' | 'PERMISSION_DENIED' | 'DISPLAY_NOT_FOUND' | 'CAPTURE_FAILED' | 'PROCESS_ERROR';
33
+ constructor(message: string, code: 'UNSUPPORTED_PLATFORM' | 'PERMISSION_DENIED' | 'DISPLAY_NOT_FOUND' | 'CAPTURE_FAILED' | 'PROCESS_ERROR');
34
+ }