agent-afk 5.276.18 → 5.276.19

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,3 @@
1
+ import type { Fact, MemorySearchResult } from './types.js';
2
+ export declare function factsToResults(facts: Fact[]): MemorySearchResult[];
3
+ export declare function sanitizeFtsQuery(query: string): string;
@@ -0,0 +1,15 @@
1
+ export interface ClusterHit {
2
+ locus: string;
3
+ signal: string;
4
+ category: string;
5
+ transcriptFile: string;
6
+ sessionDate: string;
7
+ }
8
+ export interface Cluster {
9
+ locus: string;
10
+ category: string;
11
+ sessionCount: number;
12
+ transcriptFiles: string[];
13
+ lastSeen: string;
14
+ }
15
+ export declare function clusterHits(hits: ClusterHit[]): Cluster[];
@@ -38,6 +38,7 @@ export declare class SubagentManager {
38
38
  private outputEventSink;
39
39
  constructor(options?: SubagentManagerOptions);
40
40
  list(): Array<Pick<SubagentHandle, 'id' | 'status'>>;
41
+ get dispatchCount(): number;
41
42
  get(id: string): SubagentHandle | undefined;
42
43
  onChildAborted(listener: ChildAbortedListener): () => void;
43
44
  setOnSubagentSucceeded(cb: (usage: import('./subagent/result.js').SubagentTrace['usage'], costUsd: number | undefined) => void): void;
@@ -0,0 +1,16 @@
1
+ export interface FgCountsManagerSlice {
2
+ list(): Array<{
3
+ id: string;
4
+ status: string;
5
+ }>;
6
+ readonly dispatchCount: number;
7
+ }
8
+ export interface FgCountsRegistrySlice {
9
+ list(): ReadonlyArray<{
10
+ subagentId: string;
11
+ }>;
12
+ }
13
+ export declare function makeForegroundCountsGetter(manager: FgCountsManagerSlice, registry: FgCountsRegistrySlice | undefined): () => {
14
+ active: number;
15
+ total: number;
16
+ };
@@ -8,6 +8,7 @@ import type { AgentModelInput } from '../../../agent/types.js';
8
8
  import type { BackgroundAgentRegistry } from '../../../agent/background-registry.js';
9
9
  import type { BackgroundSummarizer } from '../../../agent/background-summarizer.js';
10
10
  import type { SubagentControl } from '../../../agent/tools/subagent-executor.js';
11
+ import type { SubagentManager } from '../../../agent/subagent.js';
11
12
  import type { SlashContext, SessionStats, ResumeSwapResult, ThinkingUiMode } from '../../slash/types.js';
12
13
  import type { StoredSession } from '../../session-store.js';
13
14
  import type { StatusLine } from '../../status-line.js';
@@ -63,6 +64,7 @@ export interface InteractiveCtx {
63
64
  };
64
65
  mcpManager?: import('../../../agent/mcp/index.js').McpManager;
65
66
  backgroundRegistry: BackgroundAgentRegistry;
67
+ subagentManager: SubagentManager;
66
68
  subagentControl?: SubagentControl;
67
69
  bgSummarizer?: BackgroundSummarizer;
68
70
  firstTurnHook?: (firstMessage: string) => Promise<void>;
@@ -4,17 +4,23 @@ export interface HealthRailOptions {
4
4
  stream?: NodeJS.WriteStream;
5
5
  backgroundRegistry?: BackgroundAgentRegistry;
6
6
  getExtraRows: () => number;
7
+ getForegroundAgentCounts?: () => {
8
+ active: number;
9
+ total: number;
10
+ };
7
11
  }
8
12
  export declare class HealthRail {
9
13
  private readonly stream;
10
14
  private readonly registry;
11
15
  private readonly getExtraRows;
16
+ private readonly getForegroundAgentCounts;
12
17
  private started;
13
18
  private snapshot;
14
19
  private onRowCountChange?;
15
20
  private resizeUnsub;
16
21
  private tickInterval;
17
- private totalSubsEver;
22
+ private totalBgSubsEver;
23
+ private totalFgSubsEver;
18
24
  constructor(opts: HealthRailOptions);
19
25
  setRowCountChangeHandler(handler: (rows: number) => void): void;
20
26
  start(): void;