agent-afk 5.188.0 → 5.190.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 @@
1
+ export declare function recoverDaemonQueues(queueDir: string): void;
@@ -1,9 +1,10 @@
1
- import { AgentSession } from '../session/agent-session.js';
2
1
  import type { TraceWriter } from '../trace/index.js';
2
+ import type { AgentSession } from '../session/agent-session.js';
3
3
  import type { AgentConfig } from '../types.js';
4
4
  import { ScheduledTask } from './triggers.js';
5
+ export { resolveWorktreePruneRoot } from './worktree-prune-task.js';
6
+ export { daemonTraceLabel } from './session-spawn.js';
5
7
  import { type SessionStartSkipReason } from './gates.js';
6
- export { resolveWorktreePruneRoot, daemonTraceLabel } from './scheduler.helpers.js';
7
8
  export interface SchedulerOptions {
8
9
  sessionConfig?: Partial<AgentConfig>;
9
10
  telemetryPath?: string;
@@ -0,0 +1,19 @@
1
+ import { MemoryStore } from '../memory/index.js';
2
+ import { McpManager } from '../mcp/index.js';
3
+ import { AgentSession } from '../session/agent-session.js';
4
+ import { StateStore } from '../state/state-store.js';
5
+ import type { TraceWriter } from '../trace/index.js';
6
+ import type { AgentConfig } from '../types.js';
7
+ export interface DaemonSpawnOptions {
8
+ sessionConfig?: Partial<AgentConfig>;
9
+ sessionFactory?: (config: AgentConfig, ownedTraceWriter?: TraceWriter) => AgentSession;
10
+ trigger?: 'cron' | 'sessionstart' | 'pull';
11
+ }
12
+ export declare function daemonTraceLabel(taskId: string): string;
13
+ export declare function spawnDaemonSession(taskId: string, options: DaemonSpawnOptions): Promise<{
14
+ session: AgentSession;
15
+ memoryStore: MemoryStore;
16
+ stateStore: StateStore;
17
+ mcpManager?: McpManager;
18
+ dispose: () => void;
19
+ }>;
@@ -0,0 +1,13 @@
1
+ import type { TelemetryRecord, TelemetryTrigger } from './scheduler.js';
2
+ import type { ExecFileFn } from '../worktree-sweep.js';
3
+ export declare function resolveWorktreePruneRoot(execFile: ExecFileFn, cwd: string, override: string | undefined): Promise<string | null>;
4
+ export interface WorktreePruneTaskOptions {
5
+ now: () => number;
6
+ telemetryPath: () => string;
7
+ writeTelemetry: (record: TelemetryRecord) => void;
8
+ }
9
+ export declare function runBuiltinWorktreePruneTask(task: {
10
+ taskId: string;
11
+ command: string;
12
+ cronExpression?: string;
13
+ }, trigger: TelemetryTrigger, options: WorktreePruneTaskOptions): Promise<TelemetryRecord>;
@@ -93,6 +93,7 @@ export type ProviderEvent = {
93
93
  content: string;
94
94
  isError?: boolean;
95
95
  truncated?: boolean;
96
+ capturePath?: string;
96
97
  sessionId?: string;
97
98
  toolName?: string;
98
99
  batchIndex?: number;
@@ -100,6 +101,8 @@ export type ProviderEvent = {
100
101
  incomplete?: boolean;
101
102
  incompleteReason?: string;
102
103
  failureClass?: ToolFailureClass;
104
+ durationMs?: number;
105
+ exitCode?: number;
103
106
  } | {
104
107
  type: 'tool.activity';
105
108
  activeCount: number;
@@ -11,6 +11,9 @@ export interface ToolResult {
11
11
  harnessUserMessage?: HarnessUserMessage;
12
12
  isError?: boolean;
13
13
  truncated?: boolean;
14
+ capturePath?: string;
15
+ durationMs?: number;
16
+ exitCode?: number;
14
17
  incomplete?: boolean;
15
18
  incompleteReason?: string;
16
19
  circuitBreaker?: boolean;
@@ -0,0 +1,9 @@
1
+ export declare function truncateContent(content: string): {
2
+ content: string;
3
+ truncated: boolean;
4
+ lineCount?: number;
5
+ sizeBytes: number;
6
+ sizeLabel: string;
7
+ tailPreview?: string[];
8
+ hiddenLineCount?: number;
9
+ };
@@ -0,0 +1,2 @@
1
+ export declare const CAPTURE_MAX_BYTES = 8000000;
2
+ export declare function writeBashCapture(sessionId: string | undefined, toolUseId: string, fullOutput: string): string | undefined;
@@ -54,9 +54,14 @@ export interface ToolResultChunk {
54
54
  isError?: boolean;
55
55
  truncated?: boolean;
56
56
  persistedPath?: string;
57
+ capturePath?: string;
58
+ tailPreview?: string[];
59
+ hiddenLineCount?: number;
60
+ exitCode?: number;
57
61
  sizeBytes?: number;
58
62
  sizeLabel?: string;
59
63
  lineCount?: number;
64
+ durationMs?: number;
60
65
  display?: string;
61
66
  batchIndex?: number;
62
67
  batchSize?: number;
@@ -1,4 +1,5 @@
1
1
  export declare function calculateContentWidth(indentLength: number): number;
2
+ export declare function calculateProseContentWidth(indentLength: number): number;
2
3
  export declare function renderTextBlock(text: string, contentWidth: number, isCommit?: boolean): string;
3
4
  export declare function formatPendingBuffer(buffer: string, contentWidth: number, shouldRender: boolean): string;
4
5
  export declare function applyIndent(text: string, indentStr: string): string;
@@ -1,4 +1,7 @@
1
1
  export declare const DEFAULT_TEXT_MEASURE = 100;
2
+ export declare const DEFAULT_PROSE_MEASURE = 80;
2
3
  export declare const MIN_TEXT_MEASURE = 20;
3
4
  export declare function resolveTextMeasure(): number | null;
4
5
  export declare function capToMeasure(width: number): number;
6
+ export declare function resolveProseMeasure(): number | null;
7
+ export declare function capToProseMeasure(width: number): number;