agent-afk 5.230.8 → 5.230.10

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.
@@ -76,7 +76,7 @@ export declare class AgentSession implements IAgentSession {
76
76
  compact(): Promise<ProviderCompactResult>;
77
77
  listRewindTargets(): RewindTarget[];
78
78
  rewindConversation(turnIndex: number): Promise<ProviderRewindConversationResult>;
79
- private makePassthroughDeps;
79
+ private makeCompactDeps;
80
80
  getLastResponseMetadata(): ResponseMetadata | null;
81
81
  getOutputStream(): AsyncIterable<OutputEvent>;
82
82
  queueFrameworkContext(text: string): void;
@@ -13,4 +13,13 @@ export interface ProviderLifecycleResult {
13
13
  providerIterator: AsyncIterator<ProviderEvent>;
14
14
  }
15
15
  export declare function buildProviderLifecycle(config: AgentConfig): ProviderLifecycleResult;
16
- export declare function runInitialization(config: AgentConfig, getProviderIterator: () => AsyncIterator<ProviderEvent>, abortSignal: AbortSignal, stateManager: SessionStateManager, accounting: AccountingAccumulator, shutdown: SessionShutdown, hookRegistry: HookRegistry | undefined, queueFrameworkContext: (text: string) => void, buildTransformDeps: () => TransformDeps): Promise<void>;
16
+ export declare class ProviderInitializer {
17
+ private readonly config;
18
+ private readonly abortSignal;
19
+ private readonly accounting;
20
+ private readonly shutdown;
21
+ private readonly hookRegistry;
22
+ private readonly queueFrameworkContext;
23
+ constructor(config: AgentConfig, abortSignal: AbortSignal, accounting: AccountingAccumulator, shutdown: SessionShutdown, hookRegistry: HookRegistry | undefined, queueFrameworkContext: (text: string) => void);
24
+ run(getProviderIterator: () => AsyncIterator<ProviderEvent>, buildTransformDeps: () => TransformDeps, stateManager: SessionStateManager): Promise<void>;
25
+ }
@@ -0,0 +1,10 @@
1
+ import type { ProviderCompactResult, ProviderQuery, ProviderRewindConversationResult, RewindTarget } from '../provider.js';
2
+ import type { SessionState } from '../types.js';
3
+ export interface CompactDeps {
4
+ getState: () => SessionState;
5
+ setState: (s: SessionState) => void;
6
+ getProviderQuery: () => ProviderQuery;
7
+ }
8
+ export declare function compactSession(deps: CompactDeps): Promise<ProviderCompactResult>;
9
+ export declare function listRewindTargets(deps: CompactDeps): RewindTarget[];
10
+ export declare function rewindConversation(turnIndex: number, deps: CompactDeps): Promise<ProviderRewindConversationResult>;
@@ -0,0 +1,21 @@
1
+ import type { InteractiveCtx } from './shared.js';
2
+ import type { TurnState } from './repl-loop.js';
3
+ import type { WorktreeHandle } from './worktree.js';
4
+ export interface SignalHandlerDeps {
5
+ ctx: InteractiveCtx;
6
+ turnState: TurnState;
7
+ pickerAbort: AbortController;
8
+ }
9
+ export interface SignalHandlerDisposers {
10
+ removeListeners: () => void;
11
+ }
12
+ export declare function installSignalHandlers(deps: SignalHandlerDeps): {
13
+ handleSigint: () => void;
14
+ removeListeners: () => void;
15
+ };
16
+ export declare function printExitSummary(ctx: InteractiveCtx, worktreeHandle: WorktreeHandle | undefined, saveCurrentSession: () => string | undefined): void;
17
+ export declare function snapshotGitStateForCancelAll(cwd: string): void;
18
+ export declare function makeSessionSaver(ctx: InteractiveCtx): {
19
+ saveCurrentSession: () => string | undefined;
20
+ isSaved: () => boolean;
21
+ };
@@ -0,0 +1,4 @@
1
+ export interface AnchorRowResult {
2
+ anchorRow: number;
3
+ }
4
+ export declare function measurePreArmAnchorRow(block: () => Promise<void> | void): Promise<AnchorRowResult>;
@@ -0,0 +1,16 @@
1
+ import type { CliConfig } from '../../config.js';
2
+ import type { CliOptions, ThinkingUiMode } from './shared.js';
3
+ import type { UpdateInfo } from '../../update-checker.js';
4
+ import type { SkipReason } from './worktree-autoname.js';
5
+ interface UpdateNotices {
6
+ updateInfo: UpdateInfo | null;
7
+ pendingMessage: string | null;
8
+ }
9
+ export declare function setInteractiveUpdateNotices(updateInfo: UpdateInfo | null, pendingMessage: string | null): void;
10
+ export declare function getAndClearUpdateNotices(): UpdateNotices | null;
11
+ export declare function parseThinkingUiMode(raw: string): ThinkingUiMode;
12
+ export declare function resolveThinkingUi(options: CliOptions, config: CliConfig): ThinkingUiMode;
13
+ export declare function isAutonameEnabled(options: CliOptions, config: CliConfig): boolean;
14
+ export declare function startupHintLine(): string;
15
+ export declare function formatAutonameSkipReason(reason: SkipReason | 'create-failed' | 'unknown', detail: string | undefined): string | undefined;
16
+ export {};
@@ -1,12 +1,7 @@
1
1
  import { Command } from 'commander';
2
- import { type SkipReason } from './interactive/worktree-autoname.js';
3
- import { type CliConfig } from '../config.js';
4
- import type { CliOptions, ThinkingUiMode } from './interactive/shared.js';
5
2
  import { type UpdateInfo } from '../update-checker.js';
3
+ import { resolveThinkingUi, isAutonameEnabled, startupHintLine, formatAutonameSkipReason } from './interactive/interactive.session-init.js';
6
4
  export { formatToolResultLine } from './interactive/tool-lane.js';
5
+ export { formatAutonameSkipReason, isAutonameEnabled, resolveThinkingUi, startupHintLine };
7
6
  export declare function setInteractiveUpdateNotices(updateInfo: UpdateInfo | null, pendingMessage: string | null): void;
8
- export declare function formatAutonameSkipReason(reason: SkipReason | 'create-failed' | 'unknown', detail: string | undefined): string | undefined;
9
- export declare function isAutonameEnabled(options: CliOptions, config: CliConfig): boolean;
10
- export declare function resolveThinkingUi(options: CliOptions, config: CliConfig): ThinkingUiMode;
11
- export declare function startupHintLine(): string;
12
7
  export declare function registerInteractiveCommand(program: Command): void;