agent-afk 5.332.0 → 5.333.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.
@@ -0,0 +1 @@
1
+ export declare function estimateTokens(text: string): number;
@@ -1,6 +1,7 @@
1
+ import { estimateTokens } from './estimate-tokens.js';
1
2
  import type { AccessStats, Fact, NewFact, SearchOpts, MemorySearchResult, SessionRecord, NewSession, Procedure, SessionOutcome } from './types.js';
2
3
  export declare const HOT_SOFT_WARN_RATIO = 0.8;
3
- export declare function estimateTokens(text: string): number;
4
+ export { estimateTokens };
4
5
  export interface HotUsage {
5
6
  chars: number;
6
7
  tokens: number;
@@ -13,5 +13,6 @@ export interface CombinerV2Result {
13
13
  basis?: 'proven' | 'no_bad_signals';
14
14
  }
15
15
  export declare function effectiveSeverity(vote: Vote): VoteSeverity;
16
+ export declare function collapseSingleCountVotes(votes: Vote[]): Vote[];
16
17
  export declare function computeConfidenceV2(label: OutcomeLabel, votes: Vote[]): number;
17
18
  export declare function combineV2(input: CombinerV2Input): CombinerV2Result;
@@ -40,5 +40,6 @@ export interface RescoreOptions {
40
40
  limit?: number;
41
41
  dryRun?: boolean;
42
42
  outcomesDir?: string;
43
+ includeFailed?: boolean;
43
44
  }
44
45
  export declare function rescoreSettledUnknown(opts?: RescoreOptions): Promise<RescoreResult>;
@@ -2,4 +2,5 @@ import type { ProviderEvent } from '../../../provider.js';
2
2
  import type { RunTurnInput } from '../types.js';
3
3
  import type { RetryTierContext } from './retry-context.js';
4
4
  export declare function isRetryableAuth(ctx: RetryTierContext, error: Error): boolean;
5
+ export declare function isRefreshablePermissionDenied(ctx: RetryTierContext, error: Error): boolean;
5
6
  export declare function turnWithAuthRetry(ctx: RetryTierContext, runInput: RunTurnInput, isClosed: () => boolean): AsyncGenerator<ProviderEvent, void, void>;
@@ -11,5 +11,4 @@ export interface CompleteWireClientOptions {
11
11
  fetch: typeof globalThis.fetch;
12
12
  }
13
13
  export type CompleteWireClientFactory = (opts: CompleteWireClientOptions) => OpenAI;
14
- export declare function completeWithWire(input: OpenAIOneShotInput, clientFactory?: CompleteWireClientFactory, authDeps?: AuthResolverDeps): Promise<string>;
15
14
  export declare function completeWithWireWithStop(input: OpenAIOneShotInput, clientFactory?: CompleteWireClientFactory, authDeps?: AuthResolverDeps): Promise<ProviderCompleteResult>;
@@ -13,6 +13,8 @@ export interface AccountingSnapshot {
13
13
  subagentCompletedCount: number;
14
14
  subagentRunningTokens: Readonly<TokenCounters>;
15
15
  subagentRunningCostUsd: number;
16
+ lifetimeSessionCostUsd: number;
17
+ lifetimeSubagentCostUsd: number;
16
18
  sessionBilling?: BillingRollupSnapshot;
17
19
  subagentBilling?: BillingRollupSnapshot;
18
20
  }
@@ -27,6 +29,8 @@ export declare class AccountingAccumulator {
27
29
  private subagentCompletedCount;
28
30
  private subagentRunningTokens;
29
31
  private subagentRunningCostUsd;
32
+ private lifetimeSessionCostUsd;
33
+ private lifetimeSubagentCostUsd;
30
34
  private readonly sessionBilling;
31
35
  private readonly subagentBilling;
32
36
  reset(): void;
@@ -1,6 +1,12 @@
1
+ export declare const OVERLAY_TOKEN_WARN_THRESHOLD = 10000;
1
2
  export interface AfkMdResult {
2
3
  content: string;
3
4
  paths: string[];
5
+ estimatedTokens: number;
4
6
  }
7
+ export declare function _resetAfkMdSizeWarnCache(): void;
8
+ export declare function deferAfkMdSizeWarnings(): void;
9
+ export declare function flushDeferredAfkMdSizeWarnings(): void;
5
10
  export declare function resetAfkMdCache(): void;
11
+ export declare function warnIfAfkMdOversize(result: AfkMdResult): void;
6
12
  export declare function loadAfkMd(cwd?: string): AfkMdResult | null;