agent-afk 5.82.3 → 5.82.5
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/providers/anthropic-direct/auth.d.ts +2 -1
- package/dist/agent/providers/anthropic-direct/cache-policy.d.ts +3 -0
- package/dist/agent/providers/anthropic-direct/query/retry-layer.d.ts +3 -0
- package/dist/cli/terminal-compositor.frame-preserve-archive.d.ts +2 -0
- package/dist/cli.mjs +445 -445
- package/dist/index.mjs +159 -159
- package/dist/telegram.mjs +204 -204
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ContentBlockParam } from '@anthropic-ai/sdk/resources';
|
|
2
2
|
import type { AuthMode } from './types.js';
|
|
3
|
+
export declare const EXTENDED_CACHE_TTL_BETA = "extended-cache-ttl-2025-04-11";
|
|
3
4
|
export declare const OAUTH_BETA_HEADER = "claude-code-20250219,oauth-2025-04-20,interleaved-thinking-2025-05-14,extended-cache-ttl-2025-04-11";
|
|
4
5
|
export declare const EFFORT_BETA_HEADER = "effort-2025-11-24";
|
|
5
6
|
export declare const CLI_USER_AGENT = "claude-cli/1.0.0 (external, cli)";
|
|
@@ -13,5 +14,5 @@ export declare function buildClientOptions(token: string, mode: AuthMode, baseUr
|
|
|
13
14
|
baseURL?: string;
|
|
14
15
|
fetch?: typeof fetch;
|
|
15
16
|
};
|
|
16
|
-
export declare function buildRequestHeaders(mode: AuthMode, sessionId: string, requestId: string, withEffort?: boolean): Record<string, string>;
|
|
17
|
+
export declare function buildRequestHeaders(mode: AuthMode, sessionId: string, requestId: string, withEffort?: boolean, extendedCacheTtl?: boolean): Record<string, string>;
|
|
17
18
|
export declare function buildSystemPrefix(mode: AuthMode): ContentBlockParam[] | null;
|
|
@@ -3,5 +3,8 @@ export declare function isCacheEnabled(opts?: {
|
|
|
3
3
|
baseUrl?: string;
|
|
4
4
|
}): boolean;
|
|
5
5
|
export declare function getCacheTtl(): '5m' | '1h';
|
|
6
|
+
export declare function isExtendedCacheTtlActive(opts?: {
|
|
7
|
+
baseUrl?: string;
|
|
8
|
+
}): boolean;
|
|
6
9
|
export declare function withSystemBreakpoint(blocks: ContentBlockParam[], ttl: '5m' | '1h'): ContentBlockParam[];
|
|
7
10
|
export declare function withMessagesBreakpoint(messages: MessageParam[], ttl: '5m' | '1h'): MessageParam[];
|
|
@@ -7,6 +7,7 @@ export interface RetryLayerOptions {
|
|
|
7
7
|
client: Anthropic;
|
|
8
8
|
authMode: AuthMode;
|
|
9
9
|
initSessionId: string;
|
|
10
|
+
baseUrl?: string;
|
|
10
11
|
tokenRefresher?: () => Promise<Anthropic | null>;
|
|
11
12
|
autoResumeOnUsageLimit: boolean;
|
|
12
13
|
}
|
|
@@ -14,12 +15,14 @@ export declare class RetryLayer {
|
|
|
14
15
|
private _client;
|
|
15
16
|
private readonly _authMode;
|
|
16
17
|
private readonly initSessionId;
|
|
18
|
+
private readonly baseUrl?;
|
|
17
19
|
private readonly tokenRefresher?;
|
|
18
20
|
private readonly autoResumeOnUsageLimit;
|
|
19
21
|
private refreshPromise;
|
|
20
22
|
private usageLimitWaitPromise;
|
|
21
23
|
constructor(opts: RetryLayerOptions);
|
|
22
24
|
get client(): Anthropic;
|
|
25
|
+
private rotateHeaders;
|
|
23
26
|
get authMode(): AuthMode;
|
|
24
27
|
forceClientRefresh(): Promise<{
|
|
25
28
|
accountId: string;
|