agent-afk 5.333.0 → 5.334.0

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,2 @@
1
+ import type { IncomingMessage } from 'node:http';
2
+ export declare function readBody(req: IncomingMessage): Promise<string>;
@@ -1,4 +1,5 @@
1
- export { MemoryStore, estimateTokens } from './memory-store.js';
1
+ export { MemoryStore } from './memory-store.js';
2
+ export { estimateTokens } from './estimate-tokens.js';
2
3
  export { loadHotMemory, injectHotMemory } from './memory-loader.js';
3
4
  export { injectGoalPrompt } from '../goals/inject.js';
4
5
  export { createMemorySessionEndHook, createChildMemoryHotBlockHook } from './memory-hooks.js';
@@ -1,4 +1,4 @@
1
- export type SlotName = 'local' | 'small' | 'medium' | 'large';
1
+ export type SlotName = 'local' | 'small' | 'medium' | 'large' | 'subagent';
2
2
  export declare const SLOT_NAMES: readonly SlotName[];
3
3
  export type SlotProvider = 'anthropic' | 'openai' | 'chatgpt-oauth' | 'xai' | 'xai-oauth';
4
4
  export interface ModelSlotBinding {
@@ -25,7 +25,8 @@ export declare const GPT_TERRA_ID = "gpt-5.6-terra";
25
25
  export declare const DEFAULT_SLOT_BINDINGS: ModelSlots;
26
26
  export declare const AUTO_SENTINEL = "auto";
27
27
  export declare const DIRECT_MODEL_ALIASES: Readonly<Record<string, string>>;
28
- export { OPENAI_MODEL_HINTS, MODEL_ALIASES_HINT } from './model-slots.hints.js';
28
+ export { OPENAI_MODEL_HINTS } from './model-slots.hints.js';
29
+ export declare const MODEL_ALIASES_HINT: readonly string[];
29
30
  export declare function setSlotBindings(bindings: ModelSlots | undefined): void;
30
31
  export declare function resetSlotBindings(): void;
31
32
  export declare function computeSlotBindings(fileOverrides?: Partial<Record<SlotName, ModelSlotBinding>>): ModelSlots;
@@ -37,6 +38,5 @@ export declare function unconfiguredSlotError(input: string | undefined, binding
37
38
  export declare function parseModelsConfig(raw: unknown): Partial<Record<SlotName, ModelSlotBinding>>;
38
39
  export { coerceSlotBindingInput } from './model-slots.coerce.js';
39
40
  export declare const MAX_CONTEXT_WINDOW_OVERRIDE = 10000000;
40
- export declare function contextWindowOverrideFor(concreteId: string, bindings?: ModelSlots): number | undefined;
41
- export { maxOutputTokensOverrideFor } from './model-slots.output-override.js';
41
+ export { maxOutputTokensOverrideFor, contextWindowOverrideFor } from './model-slots.output-override.js';
42
42
  export declare function _resetJsonStringSlotWarnings(): void;
@@ -1,2 +1,2 @@
1
1
  export declare const OPENAI_MODEL_HINTS: readonly string[];
2
- export declare const MODEL_ALIASES_HINT: readonly string[];
2
+ export declare function getModelAliasesHint(): readonly string[];
@@ -1,2 +1,3 @@
1
1
  import type { ModelSlots } from './model-slots.js';
2
2
  export declare function maxOutputTokensOverrideFor(concreteId: string, bindings?: ModelSlots): number | undefined;
3
+ export declare function contextWindowOverrideFor(concreteId: string, bindings?: ModelSlots): number | undefined;
@@ -12,6 +12,7 @@ import type { CommitCoordinator } from './commit-coordinator.js';
12
12
  import type { SourceState } from './stream-renderer-source.js';
13
13
  import type { ChildActivityTracker } from './child-activity-select.js';
14
14
  import type { ThoughtSummaryHold } from './thought-summary-hold.js';
15
+ import type { CompletionWriter } from '../commands/interactive/shared.js';
15
16
  export declare function makeOrchestratorCtx(args: {
16
17
  out: Writer;
17
18
  isTTY: boolean;
@@ -39,6 +40,7 @@ export declare function makeSubagentCtx(args: {
39
40
  streamingMarkdown: Map<string, StreamingMarkdownRenderer>;
40
41
  thinkingMode: 'off' | 'summary' | 'live' | 'digest';
41
42
  orchestratorCtx: OrchestratorCtx;
43
+ completionWriter?: CompletionWriter;
42
44
  }): SubagentCtx;
43
45
  export declare function resolveParentSyntheticId(args: {
44
46
  parentId: string | undefined;
@@ -9,6 +9,8 @@ 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
+ export declare const WAITING_LABEL_PREFIX = " \u00B7 waiting ";
13
+ export declare const AWAITING_LABEL_PREFIX = " \u00B7 awaiting ";
12
14
  export interface LifecycleContext extends TtfbTickCtx {
13
15
  compositor: TerminalCompositor | null;
14
16
  overlayComposer: OverlayComposer | null;
@@ -3,9 +3,11 @@ import type { IHistoryRing } from '../input/types.js';
3
3
  import type { AutocompleteState } from '../input/autocomplete-state.js';
4
4
  import type { TerminalCompositor } from '../terminal-compositor.js';
5
5
  import type { PreviewDiffRef } from '../../agent/tools/hooks/edit-preview-hook.js';
6
+ import type { CompletionWriter } from '../commands/interactive/shared.js';
6
7
  export interface StreamRendererOptions {
7
8
  skillIdentity?: import('./skill-identity-format.js').SkillIdentity;
8
9
  out: Writer;
10
+ completionWriter?: CompletionWriter;
9
11
  thinkingMode?: 'off' | 'summary' | 'live' | 'digest';
10
12
  onCancel?: () => void;
11
13
  onBackground?: () => void;
@@ -10,6 +10,7 @@ import type { CommitCoordinator } from './commit-coordinator.js';
10
10
  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
+ import type { CompletionWriter } from '../commands/interactive/shared.js';
13
14
  import type { LoopStage, StageSignals } from '../commands/interactive/loop-stage.js';
14
15
  import { type SourceState } from './stream-renderer-source.js';
15
16
  export interface ProcessCtx {
@@ -34,5 +35,6 @@ export interface ProcessCtx {
34
35
  activeSkillName: string | undefined;
35
36
  onStageChange: ((stage: LoopStage, signals?: StageSignals) => void) | undefined;
36
37
  buildOrchestratorCtx: () => OrchestratorCtx;
38
+ completionWriter?: CompletionWriter;
37
39
  }
38
40
  export declare function processEvent(ctx: ProcessCtx, event: OutputEvent, meta?: SubagentProgressMeta): void;
@@ -8,6 +8,7 @@ interface SourceState {
8
8
  stats: {
9
9
  tokens: number;
10
10
  toolUses: number;
11
+ seenToolUseIds: Set<string>;
11
12
  progressReportedToolUses?: number;
12
13
  };
13
14
  lastProgressSummary?: string;
@@ -3,6 +3,7 @@ import type { SourceState } from './stream-renderer-source.js';
3
3
  import type { TerminalCompositor } from '../terminal-compositor.js';
4
4
  import type { ToolLane } from '../commands/interactive/tool-lane.js';
5
5
  import type { Writer } from '../slash/types.js';
6
+ import type { CompletionWriter } from '../commands/interactive/shared.js';
6
7
  import type { CardSpec } from '../render.js';
7
8
  import { StreamingMarkdownRenderer } from '../markdown-stream.js';
8
9
  import type { OrchestratorCtx } from './stream-renderer-orchestrator.js';
@@ -12,6 +13,7 @@ export interface SubagentCtx {
12
13
  compositor: TerminalCompositor | null;
13
14
  toolLane: ToolLane;
14
15
  out: Writer;
16
+ completionWriter?: CompletionWriter;
15
17
  streamingMarkdown: Map<string, StreamingMarkdownRenderer>;
16
18
  thinkingMode: 'off' | 'summary' | 'live' | 'digest';
17
19
  orchestratorCtx?: OrchestratorCtx;
@@ -45,6 +45,7 @@ export declare class StreamRenderer {
45
45
  private ttfbDone;
46
46
  private lastTtfbAnnotation;
47
47
  private readonly addPreviewDiffRef;
48
+ private completionWriter;
48
49
  readonly sink: (event: OutputEvent, meta?: SubagentProgressMeta) => void;
49
50
  constructor(opts: StreamRendererOptions);
50
51
  arm(): Promise<void>;
@@ -108,6 +108,7 @@ export interface CompletionWriter {
108
108
  fn: (line: string) => void;
109
109
  idleFn: (line: string) => void;
110
110
  suppressSubagentCompletion?: boolean;
111
+ renderedSubagentIds?: Set<string>;
111
112
  }
112
113
  export interface TurnHandles {
113
114
  setInFlight(v: boolean): void;
@@ -20,6 +20,8 @@ export declare class ToolLane {
20
20
  compactScrollback: boolean;
21
21
  addStart(toolUseId: string, toolName: string, toolInput: string): void;
22
22
  addStartWithAgentContext(toolUseId: string, toolName: string, toolInput: string, agentContext: string | undefined, maxWidth?: number): void;
23
+ annotateIfPresent(toolUseId: string, toolName: string, toolInput: string): boolean;
24
+ countLiveChildAgents(parentId: string): number;
23
25
  mergeAgentLabel(parentToolUseId: string, label: string, maxWidth?: number): boolean;
24
26
  setSkillIdentity(toolUseId: string, identity: SkillIdentity): void;
25
27
  setAgentContext(toolUseId: string, agentContext: string | undefined): void;
@@ -1,2 +1,3 @@
1
1
  import type { Entry } from './tool-lane-render.js';
2
2
  export declare function trailingCompletedRootToolName(entries: ReadonlyMap<string, Entry>, order: readonly string[]): string | undefined;
3
+ export declare function liveChildAgentCount(entries: ReadonlyMap<string, Entry>, parentId: string): number;
@@ -90,6 +90,7 @@ export interface ConfigFileSchema {
90
90
  small?: string | ModelSlotConfigEntry;
91
91
  medium?: string | ModelSlotConfigEntry;
92
92
  large?: string | ModelSlotConfigEntry;
93
+ subagent?: string | ModelSlotConfigEntry;
93
94
  };
94
95
  maxTokens?: number;
95
96
  temperature?: number;
@@ -9,7 +9,7 @@ export interface AfkMdTarget {
9
9
  blank: boolean;
10
10
  duplicate: boolean;
11
11
  }
12
- export declare const OVERLAY_TOKEN_WARN_THRESHOLD = 10000;
12
+ export { OVERLAY_TOKEN_WARN_THRESHOLD as OVERLAY_TOKEN_WARN_THRESHOLD } from '../../../config/afk-md-tier.js';
13
13
  export declare function resolveTargets(cwd?: string): AfkMdTarget[];
14
14
  export declare function targetFor(scope: AfkMdScope, cwd?: string): AfkMdTarget;
15
15
  export declare function contributes(t: AfkMdTarget): boolean;