agent-afk 5.81.4 → 5.81.6
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/session/agent-session.d.ts +2 -0
- package/dist/agent/types/config-types.d.ts +1 -0
- package/dist/cli/terminal-compositor.band-reflow.d.ts +4 -1
- package/dist/cli/terminal-compositor.committed-band-commit.d.ts +2 -1
- package/dist/cli/terminal-compositor.d.ts +2 -1
- package/dist/cli/terminal-compositor.frame.d.ts +2 -1
- package/dist/cli/terminal-compositor.lifecycle.d.ts +2 -1
- package/dist/cli/terminal-compositor.types.d.ts +8 -0
- package/dist/cli.mjs +528 -526
- package/dist/index.mjs +59 -59
- package/dist/telegram.mjs +4 -4
- package/package.json +1 -1
|
@@ -5,6 +5,7 @@ import { type ZodType } from 'zod';
|
|
|
5
5
|
import type { AccountInfo, AgentConfig, AgentInfo, AgentModelInput, IAgentSession, InputStreamRef, McpServerStatus, Message, ModelInfo, OutputEvent, PermissionMode, ResponseMetadata, RewindFilesResult, SDKControlGetContextUsageResponse, SendMessageOptions, SessionIdentity, SessionMetadata, SessionState, SlashCommand, StructuredMessageOptions } from '../types.js';
|
|
6
6
|
import type { ElicitationRequest } from '../types/sdk-types.js';
|
|
7
7
|
export declare class AgentSession implements IAgentSession {
|
|
8
|
+
private static readonly claimedTraceWriters;
|
|
8
9
|
private config;
|
|
9
10
|
private readonly planExit;
|
|
10
11
|
private currentState;
|
|
@@ -19,6 +20,7 @@ export declare class AgentSession implements IAgentSession {
|
|
|
19
20
|
private readonly abortController;
|
|
20
21
|
private readonly _hookRegistry;
|
|
21
22
|
private sessionEndDispatched;
|
|
23
|
+
private readonly ownsTraceSeal;
|
|
22
24
|
private stateManager;
|
|
23
25
|
private sessionRunningCostUsd;
|
|
24
26
|
private sessionRunningTokens;
|
|
@@ -68,6 +68,7 @@ export interface AgentConfig {
|
|
|
68
68
|
hookRegistry?: HookRegistry;
|
|
69
69
|
planExitControls?: PlanExitControls;
|
|
70
70
|
traceWriter?: TraceWriter;
|
|
71
|
+
isSubagentFork?: true;
|
|
71
72
|
provider?: ModelProvider;
|
|
72
73
|
providerFactory?: (model: string | undefined) => ModelProvider;
|
|
73
74
|
maxBudgetUsd?: number;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import type { BandRowMeta } from './terminal-compositor.types.js';
|
|
1
2
|
export interface BandReflowResult {
|
|
2
3
|
rows: string[];
|
|
3
4
|
paintedRows: number;
|
|
5
|
+
meta: BandRowMeta[];
|
|
4
6
|
}
|
|
5
|
-
export declare function reflowBandSplit(band: readonly string[], paintedRows: number, width: number): BandReflowResult;
|
|
7
|
+
export declare function reflowBandSplit(band: readonly string[], paintedRows: number, width: number, meta?: readonly BandRowMeta[]): BandReflowResult;
|
|
6
8
|
export interface BandReflowCache {
|
|
7
9
|
readonly band: readonly string[];
|
|
8
10
|
readonly paintedRows: number;
|
|
@@ -10,6 +12,7 @@ export interface BandReflowCache {
|
|
|
10
12
|
}
|
|
11
13
|
export interface BandReflowHost {
|
|
12
14
|
committedBand: string[];
|
|
15
|
+
committedBandMeta: BandRowMeta[];
|
|
13
16
|
committedBandPaintedRows: number;
|
|
14
17
|
bandReflowCache: BandReflowCache | null;
|
|
15
18
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import type { LogUpdateFn, CompositorScrollRegionGuard } from './terminal-compositor.types.js';
|
|
1
|
+
import type { LogUpdateFn, CompositorScrollRegionGuard, BandRowMeta } from './terminal-compositor.types.js';
|
|
2
2
|
import { type BandReflowCache } from './terminal-compositor.band-reflow.js';
|
|
3
3
|
export interface CommittedBandHost {
|
|
4
4
|
repaint(): void;
|
|
5
5
|
debugLog(stage: string, extra?: Record<string, unknown>): void;
|
|
6
6
|
committedBand: string[];
|
|
7
|
+
committedBandMeta: BandRowMeta[];
|
|
7
8
|
committedBandTopRow: number;
|
|
8
9
|
committedBandBottomRow: number;
|
|
9
10
|
lastMeasuredFrameTop: number;
|
|
@@ -5,7 +5,7 @@ import type { ImageAttachment } from './input/attachments.js';
|
|
|
5
5
|
import { SpinnerController } from './input/spinner.js';
|
|
6
6
|
import { CaretBlinkController } from './input/caret-blink.js';
|
|
7
7
|
import type { StdinClaimHandle } from './input/stdin-claim.js';
|
|
8
|
-
import { type CompositorInputMode, type CompositorScrollRegionGuard, type KeyInfo, type LogUpdateFn, type PickerController, type SubmissionPayload, type TerminalCompositorOptions, type SuggestEngine, type SuggestContext } from './terminal-compositor.types.js';
|
|
8
|
+
import { type BandRowMeta, type CompositorInputMode, type CompositorScrollRegionGuard, type KeyInfo, type LogUpdateFn, type PickerController, type SubmissionPayload, type TerminalCompositorOptions, type SuggestEngine, type SuggestContext } from './terminal-compositor.types.js';
|
|
9
9
|
import type { BandReflowCache } from './terminal-compositor.band-reflow.js';
|
|
10
10
|
export type { CompositorInputMode, CompositorScrollRegionGuard, PickerController, SubmissionPayload, SuggestContext, SuggestEngine, TerminalCompositorOptions, };
|
|
11
11
|
export declare class TerminalCompositor {
|
|
@@ -63,6 +63,7 @@ export declare class TerminalCompositor {
|
|
|
63
63
|
committing: boolean;
|
|
64
64
|
hasCommitted: boolean;
|
|
65
65
|
committedBand: string[];
|
|
66
|
+
committedBandMeta: BandRowMeta[];
|
|
66
67
|
committedBandTopRow: number;
|
|
67
68
|
committedBandBottomRow: number;
|
|
68
69
|
lastMeasuredFrameTop: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ImageAttachment } from './input/attachments.js';
|
|
2
2
|
import type { SpinnerController } from './input/spinner.js';
|
|
3
|
-
import type { CompositorInputMode, CompositorScrollRegionGuard, LogUpdateFn, PickerController } from './terminal-compositor.types.js';
|
|
3
|
+
import type { BandRowMeta, CompositorInputMode, CompositorScrollRegionGuard, LogUpdateFn, PickerController } from './terminal-compositor.types.js';
|
|
4
4
|
import { type BandReflowCache } from './terminal-compositor.band-reflow.js';
|
|
5
5
|
export interface FrameHost {
|
|
6
6
|
flushResizeGhostErase(): void;
|
|
@@ -21,6 +21,7 @@ export interface FrameHost {
|
|
|
21
21
|
attachments: ImageAttachment[];
|
|
22
22
|
clipboardFailureMsg: string | null;
|
|
23
23
|
committedBand: string[];
|
|
24
|
+
committedBandMeta: BandRowMeta[];
|
|
24
25
|
committedBandTopRow: number;
|
|
25
26
|
committedBandBottomRow: number;
|
|
26
27
|
lastMeasuredFrameTop: number;
|
|
@@ -2,7 +2,7 @@ import { type StdinClaimHandle } from './input/stdin-claim.js';
|
|
|
2
2
|
import type { SpinnerController } from './input/spinner.js';
|
|
3
3
|
import type { CaretBlinkController } from './input/caret-blink.js';
|
|
4
4
|
import type { SuggestEngine } from './terminal-compositor.types.js';
|
|
5
|
-
import type { CompositorScrollRegionGuard, KeyInfo, LogUpdateFn } from './terminal-compositor.types.js';
|
|
5
|
+
import type { BandRowMeta, CompositorScrollRegionGuard, KeyInfo, LogUpdateFn } from './terminal-compositor.types.js';
|
|
6
6
|
import type { KeyDispatchHost } from './terminal-compositor.input-dispatch.js';
|
|
7
7
|
export interface LifecycleHost {
|
|
8
8
|
repaint(): void;
|
|
@@ -31,6 +31,7 @@ export interface LifecycleHost {
|
|
|
31
31
|
bottom: number;
|
|
32
32
|
} | null;
|
|
33
33
|
readonly committedBand: string[];
|
|
34
|
+
readonly committedBandMeta: BandRowMeta[];
|
|
34
35
|
readonly committedBandTopRow: number;
|
|
35
36
|
readonly committedBandPaintedRows: number;
|
|
36
37
|
bandGeometryStale: boolean;
|
|
@@ -26,6 +26,14 @@ export declare const SPINNER_FRAMES: readonly ["⠋", "⠙", "⠹", "⠸", "⠼"
|
|
|
26
26
|
export declare const ELAPSED_GRACE_MS = 2000;
|
|
27
27
|
export declare function formatElapsed(startedAt: number): string;
|
|
28
28
|
export declare function eraseAndPaintRow(row: number, line?: string): string;
|
|
29
|
+
export interface BandRowMeta {
|
|
30
|
+
logicalText: string;
|
|
31
|
+
isHead: boolean;
|
|
32
|
+
}
|
|
33
|
+
export declare function buildBandMeta(logicalLines: readonly string[], width: number): BandRowMeta[];
|
|
34
|
+
export declare function scrollbackFlushLines(rows: readonly string[], meta: readonly BandRowMeta[] | undefined, count: number): string[];
|
|
35
|
+
export declare function snapFlushCountToLogicalBoundary(meta: readonly BandRowMeta[] | undefined, count: number, total: number): number;
|
|
36
|
+
export declare function buildScrollbackArchiveEscape(lines: readonly string[], anchorFloor: number, bottomRow: number, width: number): string;
|
|
29
37
|
export declare function formatTipRow(text: string, cols: number): string;
|
|
30
38
|
export interface SpinnerState {
|
|
31
39
|
frameIndex: number;
|