agent-afk 5.33.2 → 5.35.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/agent/plugins-scanner.d.ts +2 -0
- package/dist/agent/providers/anthropic-direct/usage-limit.d.ts +2 -2
- package/dist/agent/providers/openai-compatible/query/retry.d.ts +2 -0
- package/dist/agent/providers/shared/retry-after.d.ts +2 -0
- package/dist/cli/render/config-menu.d.ts +34 -0
- package/dist/cli.mjs +448 -448
- package/dist/config/import-sources.d.ts +6 -1
- package/dist/index.mjs +148 -148
- package/dist/telegram.mjs +193 -193
- package/package.json +1 -1
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { SdkPluginConfig } from './types/sdk-types.js';
|
|
2
|
+
import type { SourceEnabledMap } from '../config/import-sources.js';
|
|
2
3
|
export declare function _resetPluginScanCache(): void;
|
|
3
4
|
export declare function scanLocalPlugins(dir?: string, opts?: {
|
|
4
5
|
trustAll?: boolean;
|
|
6
|
+
sourceEnabled?: SourceEnabledMap;
|
|
5
7
|
}): SdkPluginConfig[];
|
|
6
8
|
export declare function indexKeyForPath(root: string, leaf: string): {
|
|
7
9
|
layout: 'flat' | 'cache';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { getHeader, parseRetryAfterMs } from '../shared/retry-after.js';
|
|
1
2
|
export type UsageLimitClassification = {
|
|
2
3
|
kind: 'oauth-limit';
|
|
3
4
|
resetsAt: Date;
|
|
@@ -10,8 +11,7 @@ export type UsageLimitClassification = {
|
|
|
10
11
|
kind: 'credit-exhausted';
|
|
11
12
|
};
|
|
12
13
|
export declare const RATE_LIMIT_TRANSIENT_MAX_RETRY_AFTER_MS: number;
|
|
13
|
-
export
|
|
14
|
-
export declare function parseRetryAfterMs(error: unknown): number | undefined;
|
|
14
|
+
export { getHeader, parseRetryAfterMs };
|
|
15
15
|
export declare function classifyUsageLimitError(error: Error): UsageLimitClassification | null;
|
|
16
16
|
export interface WaitForResetOpts {
|
|
17
17
|
resetsAt: Date;
|
|
@@ -2,5 +2,7 @@ export declare const MAX_CONNECTION_RETRIES = 3;
|
|
|
2
2
|
export declare const MAX_STREAM_RETRIES = 3;
|
|
3
3
|
export declare function __setRetryBaseDelay(ms: number | null): void;
|
|
4
4
|
export declare function computeBackoffDelay(attempt: number): number;
|
|
5
|
+
export declare const RETRY_AFTER_MAX_WAIT_MS = 120000;
|
|
6
|
+
export declare function retryAfterDelayMs(err: unknown): number | undefined;
|
|
5
7
|
export declare function isRetryableConnectionError(err: unknown): boolean;
|
|
6
8
|
export declare function isRetryableStreamError(err: unknown): boolean;
|
|
@@ -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 {};
|