agent-afk 5.331.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.
- package/dist/agent/memory/estimate-tokens.d.ts +1 -0
- package/dist/agent/memory/memory-store.d.ts +2 -1
- package/dist/agent/outcomes/combine-v2.d.ts +1 -0
- package/dist/agent/outcomes/relabel-job.d.ts +1 -0
- package/dist/agent/providers/anthropic-direct/query/auth-retry-tier.d.ts +1 -0
- package/dist/agent/providers/openai-compatible/complete-wire.d.ts +0 -1
- package/dist/agent/session/accounting-accumulator.d.ts +4 -0
- package/dist/agent/session/model-slots.d.ts +4 -0
- package/dist/cli/config/afk-md-tier.d.ts +6 -0
- package/dist/cli/render/picker.d.ts +1 -1
- package/dist/cli/session-store.d.ts +2 -0
- package/dist/cli/slash/plugin-skills/state.d.ts +3 -0
- package/dist/cli/slash/plugin-skills.d.ts +1 -0
- package/dist/cli/slash/types.d.ts +1 -0
- package/dist/cli.mjs +429 -425
- package/dist/improve/eval-run/contracts.d.ts +1 -0
- package/dist/index.mjs +368 -364
- package/dist/telegram.mjs +382 -378
- package/package.json +1 -1
|
@@ -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
|
|
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;
|
|
@@ -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;
|
|
@@ -18,6 +18,10 @@ export declare const CLAUDE_OPUS_55_ID = "claude-opus-5-5";
|
|
|
18
18
|
export declare const CLAUDE_FABLE_5_ID = "claude-fable-5";
|
|
19
19
|
export declare const CLAUDE_FABLE_5_1_ID = "claude-fable-5-1";
|
|
20
20
|
export declare const GROK_FLAGSHIP_ID = "grok-4.5";
|
|
21
|
+
export declare const GPT_SOL_ID = "gpt-6.1-sol";
|
|
22
|
+
export declare const GPT_LUNA_ID = "gpt-6-luna";
|
|
23
|
+
export declare const GPT_ASTRA_ID = "gpt-6-astra";
|
|
24
|
+
export declare const GPT_TERRA_ID = "gpt-5.6-terra";
|
|
21
25
|
export declare const DEFAULT_SLOT_BINDINGS: ModelSlots;
|
|
22
26
|
export declare const AUTO_SENTINEL = "auto";
|
|
23
27
|
export declare const DIRECT_MODEL_ALIASES: Readonly<Record<string, string>>;
|
|
@@ -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;
|
|
@@ -23,7 +23,7 @@ export interface PickerState {
|
|
|
23
23
|
filteredResults: ReturnType<typeof filterOptions>;
|
|
24
24
|
selected: Set<number>;
|
|
25
25
|
}
|
|
26
|
-
export declare function renderPickerRows(state: PickerState, header: readonly string[], options: readonly string[], multi: boolean, searchable: boolean, terminalRowsFn: (() => number | undefined) | undefined): readonly string[];
|
|
26
|
+
export declare function renderPickerRows(state: PickerState, header: readonly string[], options: readonly string[], multi: boolean, searchable: boolean, terminalRowsFn: (() => number | undefined) | undefined, bandWidth?: number): readonly string[];
|
|
27
27
|
export type PickerKeyAction = {
|
|
28
28
|
kind: 'repaint';
|
|
29
29
|
} | {
|
|
@@ -22,6 +22,7 @@ export interface StoredSession {
|
|
|
22
22
|
forkedAt?: number;
|
|
23
23
|
actor?: TraceActor;
|
|
24
24
|
cwd?: string;
|
|
25
|
+
repoRoot?: string;
|
|
25
26
|
handleId?: string;
|
|
26
27
|
bindings?: SessionBinding[];
|
|
27
28
|
}
|
|
@@ -39,6 +40,7 @@ export interface SessionListEntry {
|
|
|
39
40
|
totalTurns: number;
|
|
40
41
|
totalCostUsd: number;
|
|
41
42
|
cwd?: string;
|
|
43
|
+
repoRoot?: string;
|
|
42
44
|
}
|
|
43
45
|
export interface FoundSession {
|
|
44
46
|
path: string;
|
|
@@ -20,4 +20,7 @@ export interface PluginSkillsState {
|
|
|
20
20
|
}
|
|
21
21
|
export declare let state: PluginSkillsState;
|
|
22
22
|
export declare function setState(next: PluginSkillsState): void;
|
|
23
|
+
export declare function setInitBarrier(promise: Promise<void>): void;
|
|
24
|
+
export declare function isPluginInitPending(): boolean;
|
|
25
|
+
export declare function awaitPluginInit(timeoutMs: number): Promise<void>;
|
|
23
26
|
export declare function bareName(name: string): string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { harvestPluginSkillFlags, harvestPluginSkillMetadata, extractHintFromDescription, type PluginSkillHarvest, } from './plugin-skills/flags.js';
|
|
2
|
+
export { isPluginInitPending, awaitPluginInit, setInitBarrier, } from './plugin-skills/state.js';
|
|
2
3
|
export { initialSkillsCmd } from './plugin-skills/listing.js';
|
|
3
4
|
export { makeForwardHandler, registerPluginSkills, getPluginShadowingNoticeLines, autoRegisterPluginPassthroughs, } from './plugin-skills/dispatch.js';
|
|
4
5
|
export { buildSourceBreakdown, computeSkillDelta, formatSkillDelta, buildPluginRows, reloadPluginsCmd, } from './plugin-skills/reload.js';
|