agent-afk 5.20.2 → 5.20.4
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/model-limits.d.ts +1 -0
- package/dist/agent/providers/openai-compatible/query/client.d.ts +8 -0
- package/dist/agent/providers/openai-compatible/query/model-params.d.ts +7 -0
- package/dist/agent/providers/openai-compatible/query/retry.d.ts +6 -0
- package/dist/agent/providers/openai-compatible/query.d.ts +6 -12
- package/dist/cli/commands/interactive/progress-banner.d.ts +2 -0
- package/dist/cli/commands/interactive/shared.d.ts +1 -0
- package/dist/cli/terminal-compositor.d.ts +1 -0
- package/dist/cli/terminal-compositor.input-dispatch.d.ts +1 -0
- package/dist/cli/terminal-compositor.input-mode.d.ts +1 -0
- package/dist/cli/terminal-compositor.reset.d.ts +1 -0
- package/dist/cli.mjs +452 -452
- package/dist/index.mjs +144 -144
- package/dist/telegram.mjs +191 -191
- package/package.json +1 -1
|
@@ -3,3 +3,4 @@ export declare const MODEL_MAX_OUTPUT_TOKENS: Record<string, number>;
|
|
|
3
3
|
export declare function maxOutputTokensFor(model: ClaudeModel | string): number;
|
|
4
4
|
export declare const MODEL_CONTEXT_LIMITS: Record<string, number>;
|
|
5
5
|
export declare function contextLimitFor(model: ClaudeModel | string): number;
|
|
6
|
+
export declare function autoCompactLimitFor(model: ClaudeModel | string): number;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import OpenAI from 'openai';
|
|
2
|
+
export type OpenAIClientFactory = (opts: {
|
|
3
|
+
apiKey: string;
|
|
4
|
+
baseURL?: string;
|
|
5
|
+
defaultHeaders?: Record<string, string>;
|
|
6
|
+
}) => OpenAI;
|
|
7
|
+
export declare function __setOpenAIClientFactory(factory: OpenAIClientFactory | null): void;
|
|
8
|
+
export declare function resolveClientFactory(): OpenAIClientFactory;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { EffortLevel } from '../../../types/sdk-types.js';
|
|
2
|
+
export declare function resolveEffectiveMaxOutputTokens(model: string, configMaxOutput: number | undefined): number;
|
|
3
|
+
export declare function resolveStreamingMaxTokens(model: string, configMaxOutput: number | undefined): Record<string, number>;
|
|
4
|
+
export declare function normalizePermissionMode(mode: string | undefined): string;
|
|
5
|
+
export declare function isOSeriesModel(model: string): boolean;
|
|
6
|
+
export declare function mapEffortForOpenAI(effort: EffortLevel): 'low' | 'medium' | 'high';
|
|
7
|
+
export declare function resolveReasoningEffort(effort: EffortLevel | undefined, model: string): 'low' | 'medium' | 'high' | undefined;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const MAX_CONNECTION_RETRIES = 3;
|
|
2
|
+
export declare const MAX_STREAM_RETRIES = 3;
|
|
3
|
+
export declare function __setRetryBaseDelay(ms: number | null): void;
|
|
4
|
+
export declare function computeBackoffDelay(attempt: number): number;
|
|
5
|
+
export declare function isRetryableConnectionError(err: unknown): boolean;
|
|
6
|
+
export declare function isRetryableStreamError(err: unknown): boolean;
|
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
import OpenAI from 'openai';
|
|
2
1
|
import type { AgentConfig } from '../../types/config-types.js';
|
|
3
|
-
import type { EffortLevel } from '../../types/sdk-types.js';
|
|
4
2
|
import type { TraceWriter } from '../../trace/index.js';
|
|
5
3
|
import type { ProviderQuery, ProviderEvent, ProviderUserTurn, ProviderContextUsage, ProviderRewindResult, ProviderModelInfo, ProviderCommandInfo, ProviderAgentInfo, ProviderMcpServerStatus, ProviderAccountInfo } from '../../provider.js';
|
|
6
4
|
import { type OpenAIAuthResolution, type AuthResolverDeps } from './auth.js';
|
|
7
5
|
import type { ToolDispatcher } from '../anthropic-direct/tool-dispatcher.js';
|
|
8
|
-
|
|
9
|
-
export
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
export declare function __setOpenAIClientFactory(factory: OpenAIClientFactory | null): void;
|
|
6
|
+
import { resolveReasoningEffort } from './query/model-params.js';
|
|
7
|
+
export { __setRetryBaseDelay } from './query/retry.js';
|
|
8
|
+
export { __setOpenAIClientFactory } from './query/client.js';
|
|
9
|
+
export type { OpenAIClientFactory } from './query/client.js';
|
|
10
|
+
export { isOSeriesModel, mapEffortForOpenAI } from './query/model-params.js';
|
|
11
|
+
export { resolveReasoningEffort };
|
|
15
12
|
export interface OpenAICompatibleQueryOptions {
|
|
16
13
|
auth: OpenAIAuthResolution;
|
|
17
14
|
baseURL?: string;
|
|
@@ -25,9 +22,6 @@ export interface OpenAICompatibleQueryOptions {
|
|
|
25
22
|
useResponsesApi?: boolean;
|
|
26
23
|
traceWriter?: TraceWriter;
|
|
27
24
|
}
|
|
28
|
-
export declare function isOSeriesModel(model: string): boolean;
|
|
29
|
-
export declare function mapEffortForOpenAI(effort: EffortLevel): 'low' | 'medium' | 'high';
|
|
30
|
-
export declare function resolveReasoningEffort(effort: EffortLevel | undefined, model: string): 'low' | 'medium' | 'high' | undefined;
|
|
31
25
|
export declare class OpenAICompatibleQuery implements ProviderQuery {
|
|
32
26
|
private readonly client;
|
|
33
27
|
private readonly opts;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { SubagentCompleteInfo } from '../../../agent/default-hook-registry.js';
|
|
2
2
|
import type { ProgressEvent } from '../../../agent/types.js';
|
|
3
|
+
import type { CompletionWriter } from './shared.js';
|
|
3
4
|
export declare function deriveProgressActivity(thinkingBuffer: string, columns?: number): string | undefined;
|
|
4
5
|
export declare function formatProgressBanner(event: ProgressEvent, columns?: number, activity?: string): string[];
|
|
5
6
|
export declare function formatProgressSummary(event: ProgressEvent, columns?: number): string;
|
|
6
7
|
export declare function formatSubagentCompletion(info: SubagentCompleteInfo, columns?: number): string;
|
|
8
|
+
export declare function emitSubagentCompletion(writer: CompletionWriter, info: SubagentCompleteInfo): void;
|