agent-afk 5.95.1 → 5.95.3
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/pricing.d.ts +13 -0
- package/dist/agent/providers/anthropic-direct/types.d.ts +4 -8
- package/dist/agent/providers/shared/auto-compact.d.ts +1 -0
- package/dist/agent/tools/subagent/optional-input.d.ts +5 -0
- package/dist/agent/types/sdk-types.d.ts +1 -0
- package/dist/cli/commands/trace-usage-format.d.ts +7 -0
- package/dist/cli/context-sampler.d.ts +1 -0
- package/dist/cli.mjs +517 -517
- package/dist/index.mjs +148 -148
- package/dist/telegram.mjs +242 -242
- package/package.json +1 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface ModelPricing {
|
|
2
|
+
inputPerMTok: number;
|
|
3
|
+
outputPerMTok: number;
|
|
4
|
+
cacheWrite5mPerMTok?: number;
|
|
5
|
+
cacheWrite1hPerMTok?: number;
|
|
6
|
+
cacheReadPerMTok?: number;
|
|
7
|
+
}
|
|
8
|
+
export declare const MODEL_PRICING: ReadonlyMap<string, ModelPricing>;
|
|
9
|
+
export interface CacheWriteSplit {
|
|
10
|
+
ephemeral5m: number;
|
|
11
|
+
ephemeral1h: number;
|
|
12
|
+
}
|
|
13
|
+
export declare function deriveCallCostUsd(model: string, inputTokens: number, outputTokens: number, cachedInputTokens: number, cacheCreationTokens: number, cacheWriteSplit?: CacheWriteSplit): number | undefined;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ContentBlockParam, MessageParam, RawMessageStreamEvent, ThinkingConfigParam, ToolUseBlock, Usage } from '@anthropic-ai/sdk/resources';
|
|
2
2
|
import type { ProviderEvent, ProviderUsage } from '../../provider.js';
|
|
3
3
|
import type { ToolFailureClass } from '../../trace/types.js';
|
|
4
|
+
import { deriveCallCostUsd } from './pricing.js';
|
|
4
5
|
export type AuthMode = 'oauth' | 'api-key';
|
|
5
6
|
export interface ToolCall {
|
|
6
7
|
id: string;
|
|
@@ -116,13 +117,8 @@ export interface ToolDispatcherLike {
|
|
|
116
117
|
setResolveBase?(cwd: string): void;
|
|
117
118
|
setAllowAll?(allow: boolean): void;
|
|
118
119
|
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
cacheWritePerMTok?: number;
|
|
123
|
-
cacheReadPerMTok?: number;
|
|
124
|
-
}
|
|
125
|
-
export declare const MODEL_PRICING: ReadonlyMap<string, ModelPricing>;
|
|
126
|
-
export declare function deriveCallCostUsd(model: string, inputTokens: number, outputTokens: number, cachedInputTokens: number, cacheCreationTokens: number): number | undefined;
|
|
120
|
+
export { MODEL_PRICING } from './pricing.js';
|
|
121
|
+
export { deriveCallCostUsd };
|
|
122
|
+
export type { ModelPricing, CacheWriteSplit } from './pricing.js';
|
|
127
123
|
export declare function toProviderUsage(usage: Usage | null, stopReason: string | null, model?: string): ProviderUsage;
|
|
128
124
|
export { sumProviderUsage } from '../../usage.js';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare function isBlankInput(value: unknown): boolean;
|
|
2
|
+
export declare function readOptional(input: Record<string, unknown>, ...keys: readonly string[]): unknown;
|
|
3
|
+
export declare function readOptionalString(input: Record<string, unknown>, key: string, label?: string): string | undefined;
|
|
4
|
+
export declare function readOptionalAliasString(input: Record<string, unknown>, keys: readonly string[], label: string): string | undefined;
|
|
5
|
+
export declare function readOptionalNumber(input: Record<string, unknown>, key: string, label?: string): number | undefined;
|