agent-afk 5.124.0 → 5.125.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.
@@ -0,0 +1,5 @@
1
+ import type { ImageAttachment } from './attachments.js';
2
+ export declare function isCommandAvailable(cmd: string, args: string[]): Promise<boolean>;
3
+ export declare function linuxClipboardRead(cmd: string, args: string[]): Promise<Buffer | null>;
4
+ export declare function detectMediaTypeLinux(buffer: Buffer): ImageAttachment['mediaType'] | null;
5
+ export declare function readClipboardImageLinux(): Promise<ImageAttachment | null>;
@@ -0,0 +1,16 @@
1
+ import type { ReaderState } from './reader.state.js';
2
+ import type { RepaintCtx, repaint as _repaint } from './reader.repaint.js';
3
+ import type { KeyInfo } from './types.js';
4
+ export interface ReverseSearchState {
5
+ active: boolean;
6
+ query: string;
7
+ matchIndex: number;
8
+ savedBuffer: string;
9
+ }
10
+ export declare function createReverseSearchState(): ReverseSearchState;
11
+ export declare function enterReverseSearch(rs: ReverseSearchState, st: ReaderState): void;
12
+ export declare function cancelReverseSearch(rs: ReverseSearchState, st: ReaderState): void;
13
+ export declare function acceptReverseSearch(rs: ReverseSearchState, _st: ReaderState): void;
14
+ export declare function findNextMatch(query: string, entries: readonly string[], startAfter: number): number;
15
+ export declare function renderReverseSearchLine(query: string, match: string | null): string;
16
+ export declare function handleReverseSearchKey(char: string | undefined, key: KeyInfo, rs: ReverseSearchState, st: ReaderState, entries: readonly string[], repaintCtx: RepaintCtx, repaintFn: typeof _repaint): boolean;
@@ -1,6 +1,7 @@
1
1
  import type { InputCoreState } from '../input-core.js';
2
2
  import type { AutocompleteState } from './autocomplete-state.js';
3
3
  import type { ImageAttachment } from './attachments.js';
4
+ import type { ReverseSearchState } from './reader.reverse-search.js';
4
5
  export interface ReaderState {
5
6
  input: InputCoreState;
6
7
  ac: AutocompleteState;
@@ -16,4 +17,5 @@ export interface ReaderState {
16
17
  lastKeypressAt: number;
17
18
  repaintPending: boolean;
18
19
  settled: boolean;
20
+ reverseSearch: ReverseSearchState;
19
21
  }