agent-afk 5.240.0 → 5.240.2

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,5 @@
1
+ import type { DelegationBudget, SpawnReceipt } from '../tools/delegation-budget.js';
2
+ export { SpawnReceipt };
3
+ export type { DelegationBudget };
4
+ export declare function admitFork(budget: DelegationBudget | undefined, parentId: string): SpawnReceipt | undefined;
5
+ export declare function wrapTerminalWithRelease(base: () => void, receipt: SpawnReceipt | undefined): () => void;
@@ -20,3 +20,11 @@ export interface AppendForkTelemetryArgs {
20
20
  effectiveResolvedAgentType: string | undefined;
21
21
  }
22
22
  export declare function appendForkTelemetry(args: AppendForkTelemetryArgs): Promise<void>;
23
+ export interface EmitSubagentStartedEventArgs {
24
+ subagentId: string;
25
+ effectiveChildModel: AgentModelInput;
26
+ effectiveAgentType: string | undefined;
27
+ promptHead: string | undefined;
28
+ parentId: string | undefined;
29
+ }
30
+ export declare function emitSubagentStartedEvent(sink: ((event: import('../types/session-types.js').OutputEvent) => void) | undefined, args: EmitSubagentStartedEventArgs): void;
@@ -40,4 +40,5 @@ export interface SubagentManagerOptions {
40
40
  workspaceStore?: WorkspaceStore;
41
41
  sessionLabel?: string;
42
42
  outputEventSink?: (event: OutputEvent) => void;
43
+ delegationBudget?: import('../tools/delegation-budget.js').DelegationBudget;
43
44
  }
@@ -29,6 +29,7 @@ export declare class SubagentManager {
29
29
  private readonly parentAbortSignal;
30
30
  private readonly workspaceStore;
31
31
  private readonly sessionLabel;
32
+ private readonly delegationBudget;
32
33
  private readonly abortGraph;
33
34
  private readonly rootId;
34
35
  private rootController;
@@ -10,6 +10,7 @@ export interface SubagentsLite {
10
10
  status: 'running' | 'completed' | 'failed' | 'cancelled';
11
11
  startedAt: string;
12
12
  label: string | null;
13
+ recentActivity?: string;
13
14
  }>;
14
15
  }
15
- export declare function buildSubagentsLite(subagentManager: SubagentManager, backgroundRegistry: BackgroundAgentRegistry | undefined): SubagentsLite;
16
+ export declare function buildSubagentsLite(subagentManager: SubagentManager, backgroundRegistry: BackgroundAgentRegistry | undefined, callerSessionId?: string): SubagentsLite;
@@ -15,5 +15,6 @@ export declare class BgResultNotifier {
15
15
  drainInjections(): string;
16
16
  drainNotifications(): readonly PendingBgAgentNotification[];
17
17
  reset(): void;
18
+ hasPendingInjections(): boolean;
18
19
  dispose(): void;
19
20
  }
@@ -0,0 +1,11 @@
1
+ import type { Writable } from 'node:stream';
2
+ export declare class CupWriteBatcher {
3
+ private readonly stream;
4
+ private buffer;
5
+ constructor(stream: NodeJS.WriteStream & Writable);
6
+ get isTTY(): boolean;
7
+ append(seq: string): void;
8
+ beginFrame(): void;
9
+ flush(): void;
10
+ writeAtomic(seq: string): void;
11
+ }
@@ -0,0 +1,12 @@
1
+ export declare class CupCursorTracker {
2
+ private _previousTopRow;
3
+ private _previousLineCount;
4
+ private _previousRawLineCount;
5
+ eraseBottomOverride: number | undefined;
6
+ get previousTopRow(): number;
7
+ get previousLineCount(): number;
8
+ get previousRawLineCount(): number;
9
+ commit(topRow: number, lineCount: number, rawLineCount: number): void;
10
+ consumeEraseBottomOverride(): number | undefined;
11
+ reset(): void;
12
+ }
@@ -1,10 +1,8 @@
1
1
  import type { Writable } from 'node:stream';
2
2
  export declare class CupFrameRenderer {
3
3
  private readonly stream;
4
- private previousTopRow;
5
- private previousLineCount;
6
- private previousRawLineCount;
7
- private eraseBottomOverride;
4
+ private readonly cursor;
5
+ private readonly batcher;
8
6
  constructor(stream: NodeJS.WriteStream & Writable);
9
7
  setEraseBottomOverride(row: number): void;
10
8
  get topRow(): number;
@@ -0,0 +1,6 @@
1
+ export declare const SYNC_START = "\u001B[?2026h";
2
+ export declare const SYNC_END = "\u001B[?2026l";
3
+ export declare const cup: (row: number, col: number) => string;
4
+ export declare const ERASE_LINE = "\u001B[2K";
5
+ export declare const CURSOR_HIDE = "\u001B[?25l";
6
+ export declare const CURSOR_SHOW = "\u001B[?25h";
@@ -51,6 +51,7 @@ export declare class InputSurface {
51
51
  private softStopHandler;
52
52
  private taskViewHandler;
53
53
  private pauseInterruptHandler;
54
+ onAwaitingInput: (() => void) | null;
54
55
  private pendingReadReject;
55
56
  private pendingReadResolve;
56
57
  private readonly slashRegistryView;