agent-afk 5.157.1 → 5.158.1

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.
@@ -9,6 +9,7 @@ import type { StreamingMarkdownRenderer } from '../markdown-stream.js';
9
9
  import type { Writer } from '../slash/types.js';
10
10
  import type { ProgressEvent } from '../../agent/types.js';
11
11
  import { type TtfbTickCtx } from './stream-renderer-ttfb.js';
12
+ import { type SubagentStatusBarSpec } from '../render.js';
12
13
  export interface LifecycleContext extends TtfbTickCtx {
13
14
  compositor: TerminalCompositor | null;
14
15
  overlayComposer: OverlayComposer | null;
@@ -32,6 +33,7 @@ export declare function registerOverlaySlots(overlayComposer: OverlayComposer, c
32
33
  getSoftStopping: () => boolean;
33
34
  getTtfbStartedAt?: () => number | undefined;
34
35
  isTtfbDone?: () => boolean;
36
+ getActiveSubagents?: () => ReadonlyMap<string, SubagentStatusBarSpec>;
35
37
  }): void;
36
38
  export declare function formatInterruptAffordance(interrupting: boolean): string;
37
39
  export declare function subscribeToResize(overlayComposer: OverlayComposer, disposed: boolean): () => void;
@@ -11,6 +11,7 @@ import type { ChildActivityTracker } from './child-activity-select.js';
11
11
  import type { InFlightToolTracker } from '../input/work-derived-verb.js';
12
12
  import type { OrchestratorCtx } from './stream-renderer-orchestrator.js';
13
13
  import type { LoopStage, StageSignals } from '../commands/interactive/loop-stage.js';
14
+ import type { SubagentStatusBarSpec } from '../render.js';
14
15
  import { type SourceState } from './stream-renderer-source.js';
15
16
  export interface ProcessCtx {
16
17
  out: Writer;
@@ -33,5 +34,8 @@ export interface ProcessCtx {
33
34
  activeSkillName: string | undefined;
34
35
  onStageChange: ((stage: LoopStage, signals?: StageSignals) => void) | undefined;
35
36
  buildOrchestratorCtx: () => OrchestratorCtx;
37
+ activeSubagents: Map<string, SubagentStatusBarSpec>;
38
+ subagentStartedAt: Map<string, number>;
39
+ overlayComposerForStatus: OverlayComposer | null;
36
40
  }
37
41
  export declare function processEvent(ctx: ProcessCtx, event: OutputEvent, meta?: SubagentProgressMeta): void;
@@ -37,6 +37,9 @@ export declare class StreamRenderer {
37
37
  private disposed;
38
38
  private pauseTickInterval;
39
39
  private resizeUnsub;
40
+ private subagentTickInterval;
41
+ private activeSubagents;
42
+ private subagentStartedAt;
40
43
  private readonly ttfbStartedAt;
41
44
  private ttfbDone;
42
45
  private lastTtfbAnnotation;
@@ -74,6 +74,7 @@ export interface InteractiveCtx {
74
74
  suggestApiKey?: string;
75
75
  suggestBaseUrl?: string;
76
76
  suggestGhostConfig?: boolean;
77
+ viewingTaskId?: string;
77
78
  hookRegistry?: HookRegistry;
78
79
  }
79
80
  export interface CompletionWriter {
@@ -0,0 +1,14 @@
1
+ import type { SubagentManager } from '../../../agent/subagent.js';
2
+ import type { SlashContext } from '../../slash/types.js';
3
+ import type { InteractiveCtx } from './shared.js';
4
+ export interface TaskViewEntry {
5
+ id: string;
6
+ manager: SubagentManager;
7
+ sessionLabel: string;
8
+ ctx: SlashContext;
9
+ ictx?: InteractiveCtx;
10
+ }
11
+ export declare function renderTaskViewHeader(id: string, status: string, agentType?: string): string;
12
+ export declare function buildTaskFooterLine(isRunning: boolean): string;
13
+ export declare function exitTaskViewMode(entry: TaskViewEntry): void;
14
+ export declare function enterTaskViewMode(entry: TaskViewEntry): Promise<void>;
@@ -0,0 +1,16 @@
1
+ import type { Message } from '../../../agent/types/message-types.js';
2
+ import type { OutputEvent } from '../../../agent/types/session-types.js';
3
+ export interface TaskViewHeader {
4
+ id: string;
5
+ agentType?: string;
6
+ model?: string;
7
+ status: string;
8
+ durationMs?: number;
9
+ toolCount?: number;
10
+ turnCount?: number;
11
+ }
12
+ export interface TaskViewOptions {
13
+ maxEvents?: number;
14
+ }
15
+ export declare function renderMessagesView(header: TaskViewHeader, messages: readonly Message[]): string;
16
+ export declare function renderEventsView(header: TaskViewHeader, events: AsyncIterable<OutputEvent>, options?: TaskViewOptions): Promise<string>;
@@ -0,0 +1,6 @@
1
+ export declare function errorCard(spec: ErrorCardSpec): string;
2
+ export interface ErrorCardSpec {
3
+ title?: string;
4
+ body: string | string[];
5
+ hint?: string;
6
+ }
@@ -7,3 +7,6 @@ export * from './card.js';
7
7
  export * from './divider.js';
8
8
  export * from './progress-bar.js';
9
9
  export * from './box.js';
10
+ export * from './subagent-status-bar.js';
11
+ export * from './stream-progress.js';
12
+ export * from './error-card.js';
@@ -0,0 +1,8 @@
1
+ export declare function streamProgress(spec: StreamProgressSpec): string;
2
+ export interface StreamProgressSpec {
3
+ label: string;
4
+ spinnerFrame: number;
5
+ elapsedMs: number;
6
+ tokenCount?: number;
7
+ costCents?: number;
8
+ }
@@ -0,0 +1,9 @@
1
+ export declare function subagentStatusBar(spec: SubagentStatusBarSpec): string;
2
+ export declare function subagentStatusStack(entries: SubagentStatusBarSpec[], maxLines?: number): string;
3
+ export interface SubagentStatusBarSpec {
4
+ label: string;
5
+ phase?: string;
6
+ elapsedMs: number;
7
+ batchIndex?: number;
8
+ batchSize?: number;
9
+ }