agent-afk 5.33.2 → 5.34.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.
- package/dist/cli/render/config-menu.d.ts +34 -0
- package/dist/cli.mjs +448 -448
- package/dist/index.mjs +1 -1
- package/dist/telegram.mjs +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { TerminalCompositor } from '../terminal-compositor.js';
|
|
2
|
+
import { type ConfigKeySpec } from '../../config/settable-keys.js';
|
|
3
|
+
export declare const CATEGORY_ORDER: readonly ["Model & routing", "Interactive", "Session", "Telegram", "Advanced"];
|
|
4
|
+
export declare function categoryOf(path: string): (typeof CATEGORY_ORDER)[number];
|
|
5
|
+
interface MenuCategory {
|
|
6
|
+
name: (typeof CATEGORY_ORDER)[number];
|
|
7
|
+
keys: readonly ConfigKeySpec[];
|
|
8
|
+
}
|
|
9
|
+
export declare function buildCategories(specs: readonly ConfigKeySpec[]): MenuCategory[];
|
|
10
|
+
export declare function formatValue(v: unknown): string;
|
|
11
|
+
export declare function keyRowLabel(spec: ConfigKeySpec, current: unknown, pad: number): string;
|
|
12
|
+
type EditorPlan = {
|
|
13
|
+
kind: 'pick';
|
|
14
|
+
options: string[];
|
|
15
|
+
} | {
|
|
16
|
+
kind: 'text';
|
|
17
|
+
help: string;
|
|
18
|
+
};
|
|
19
|
+
export declare function editorFor(spec: ConfigKeySpec): EditorPlan;
|
|
20
|
+
export declare function makeValidator(spec: ConfigKeySpec): (raw: string) => string | null;
|
|
21
|
+
export interface MenuOverlays {
|
|
22
|
+
pick(header: readonly string[], options: readonly string[]): Promise<number | null>;
|
|
23
|
+
editText(header: readonly string[], initial: string, help: string, validate: (v: string) => string | null): Promise<string | null>;
|
|
24
|
+
emit(line: string): void;
|
|
25
|
+
}
|
|
26
|
+
export interface MenuIo {
|
|
27
|
+
specs(): readonly ConfigKeySpec[];
|
|
28
|
+
current(path: string): unknown;
|
|
29
|
+
write(path: string, rawValue: string, allowHuman: boolean): string;
|
|
30
|
+
}
|
|
31
|
+
export declare function runConfigMenu(ov: MenuOverlays, io: MenuIo): Promise<void>;
|
|
32
|
+
export declare function overlaysFromCompositor(c: TerminalCompositor): MenuOverlays;
|
|
33
|
+
export declare function defaultIo(): MenuIo;
|
|
34
|
+
export {};
|