agent-afk 5.186.1 → 5.188.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.
- package/dist/agent/daemon/handoff-consume.d.ts +7 -0
- package/dist/agent/daemon/scheduler.d.ts +1 -3
- package/dist/agent/daemon/scheduler.helpers.d.ts +4 -0
- package/dist/agent/subagent/fork-progress-events.d.ts +5 -0
- package/dist/agent/subagent/fork-types.d.ts +1 -0
- package/dist/agent/subagent/handle.d.ts +2 -0
- package/dist/agent/subagent/progress-constants.d.ts +2 -0
- package/dist/agent/subagent.d.ts +3 -2
- package/dist/agent/tools/nesting.d.ts +1 -0
- package/dist/agent/tools/subagent/emit-progress.d.ts +11 -0
- package/dist/agent/tools/subagent/input-parse.d.ts +1 -0
- package/dist/cli/_lib/capture-mode.d.ts +1 -0
- package/dist/cli/commands/interactive/turn-handler.d.ts +1 -1
- package/dist/cli/commands/interactive/turn-handler.footer.d.ts +3 -0
- package/dist/cli.mjs +653 -650
- package/dist/config/env.d.ts +7 -0
- package/dist/index.mjs +233 -233
- package/dist/telegram.mjs +324 -324
- package/package.json +1 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { HandoffRecord } from './handoff-store.js';
|
|
2
|
+
export declare function buildHandoffResumeCommand(record: HandoffRecord): string;
|
|
3
|
+
export interface ProcessHandoffsResult {
|
|
4
|
+
requeued: number;
|
|
5
|
+
cleaned: number;
|
|
6
|
+
}
|
|
7
|
+
export declare function processAnsweredHandoffs(queueDir?: string, handoffsDir?: string): Promise<ProcessHandoffsResult>;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import type { ExecFileFn } from '../worktree-sweep.js';
|
|
2
1
|
import { AgentSession } from '../session/agent-session.js';
|
|
3
2
|
import type { TraceWriter } from '../trace/index.js';
|
|
4
3
|
import type { AgentConfig } from '../types.js';
|
|
5
4
|
import { ScheduledTask } from './triggers.js';
|
|
6
5
|
import { type SessionStartSkipReason } from './gates.js';
|
|
7
|
-
export
|
|
8
|
-
export declare function daemonTraceLabel(taskId: string): string;
|
|
6
|
+
export { resolveWorktreePruneRoot, daemonTraceLabel } from './scheduler.helpers.js';
|
|
9
7
|
export interface SchedulerOptions {
|
|
10
8
|
sessionConfig?: Partial<AgentConfig>;
|
|
11
9
|
telemetryPath?: string;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ExecFileFn } from '../worktree-sweep.js';
|
|
2
|
+
export declare const builtinPruneExecFile: ExecFileFn;
|
|
3
|
+
export declare function resolveWorktreePruneRoot(execFile: ExecFileFn, cwd: string, override: string | undefined): Promise<string | null>;
|
|
4
|
+
export declare function daemonTraceLabel(taskId: string): string;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { AgentConfig } from '../types.js';
|
|
2
|
+
import type { InputStreamRef } from '../types/permission-types.js';
|
|
3
|
+
import type { SubagentHandleImpl } from './handle.js';
|
|
4
|
+
export type BindProgressHandle = (handle: SubagentHandleImpl<unknown>) => void;
|
|
5
|
+
export declare function wireProgressEvents(config: AgentConfig, enabled: boolean | undefined, parentInputStreamRef: InputStreamRef | undefined, parentAbortSignal: AbortSignal | undefined): BindProgressHandle;
|
|
@@ -71,6 +71,8 @@ export declare class SubagentHandleImpl<T> implements SubagentHandle<T> {
|
|
|
71
71
|
private _drainingMessages;
|
|
72
72
|
sendMessage(text: string): void;
|
|
73
73
|
readonly _steeringMessages: string[];
|
|
74
|
+
readonly _progressEvents: import('../tools/subagent/emit-progress.js').ProgressEventPayload[];
|
|
74
75
|
steer(text: string): void;
|
|
76
|
+
emitProgress(payload: import('../tools/subagent/emit-progress.js').ProgressEventPayload): void;
|
|
75
77
|
get _beforeNextRound(): () => string | undefined;
|
|
76
78
|
}
|
package/dist/agent/subagent.d.ts
CHANGED
|
@@ -5,9 +5,10 @@ import { type SubagentHandle } from './subagent/handle.js';
|
|
|
5
5
|
import type { SubagentStatus, SubagentResult, SubagentTrace } from './subagent/result.js';
|
|
6
6
|
import { CompletedCache } from './subagent/completed-cache.js';
|
|
7
7
|
export type { SubagentStatus, SubagentResult, SubagentTrace, SubagentHandle };
|
|
8
|
-
import {
|
|
8
|
+
import { SUBAGENT_DEFAULT_IDLE_TIMEOUT_MS, SUBAGENT_DRAIN_TIMEOUT_MS, resolveSubagentIdleTimeoutMs } from './subagent/constants.js';
|
|
9
9
|
import type { ForkParent, ForkSubagentOptions, SubagentManagerOptions } from './subagent/fork-types.js';
|
|
10
|
-
export { DENY_ELICITATION, SUBAGENT_DEFAULT_MAX_TOOL_USE_ITERATIONS, SUBAGENT_DEFAULT_TIMEOUT_MS,
|
|
10
|
+
export { DENY_ELICITATION, SUBAGENT_DEFAULT_MAX_TOOL_USE_ITERATIONS, SUBAGENT_DEFAULT_TIMEOUT_MS, SUBAGENT_BACKGROUND_TIMEOUT_MS, resolveSubagentTimeoutMs, } from './subagent/constants.js';
|
|
11
|
+
export { SUBAGENT_DEFAULT_IDLE_TIMEOUT_MS, SUBAGENT_DRAIN_TIMEOUT_MS, resolveSubagentIdleTimeoutMs, };
|
|
11
12
|
export type { ForkParent, ForkSubagentOptions, SubagentManagerOptions };
|
|
12
13
|
export declare class SubagentManager {
|
|
13
14
|
private readonly active;
|
|
@@ -18,6 +18,7 @@ export interface ChildProviderFactoryArgs {
|
|
|
18
18
|
model?: AgentModelInput;
|
|
19
19
|
allowedTools?: string[];
|
|
20
20
|
readOnlyBash?: boolean;
|
|
21
|
+
customTools?: import('../tools/custom-tool.js').CustomToolDef[];
|
|
21
22
|
}
|
|
22
23
|
export declare function createStubParentSession(signal: AbortSignal): Pick<IAgentSession, 'sessionId' | 'getInputStreamRef' | 'abortSignal'>;
|
|
23
24
|
export declare const CHILD_ALLOWED_TOOLS: string[];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { SubagentHandleImpl } from '../../subagent/handle.js';
|
|
2
|
+
import type { ToolResult } from '../types.js';
|
|
3
|
+
export interface ProgressEventPayload {
|
|
4
|
+
message: string;
|
|
5
|
+
phase?: string;
|
|
6
|
+
metadata?: Record<string, unknown>;
|
|
7
|
+
}
|
|
8
|
+
export declare const PROGRESS_RING_CAPACITY = 20;
|
|
9
|
+
export declare const PROGRESS_MAX_MESSAGE_BYTES = 2048;
|
|
10
|
+
export declare function formatProgressEvent(payload: ProgressEventPayload, subagentId: string): string;
|
|
11
|
+
export declare function createEmitProgressHandler(handle: SubagentHandleImpl<unknown>, parentQueueFn: (text: string) => void, parentAbortSignal: AbortSignal | undefined): (input: unknown, _signal: AbortSignal) => Promise<ToolResult>;
|
|
@@ -10,6 +10,7 @@ export declare function ringBellIfEnabled(stream: {
|
|
|
10
10
|
}, env?: NodeJS.ProcessEnv): void;
|
|
11
11
|
export declare function detectTermTitle(env?: NodeJS.ProcessEnv): boolean;
|
|
12
12
|
export declare function detectNotify(env?: NodeJS.ProcessEnv): boolean;
|
|
13
|
+
export declare function detectTurnSeparator(env?: NodeJS.ProcessEnv): boolean;
|
|
13
14
|
export declare function formatTerminalTitle(cwd: string, running: boolean): string;
|
|
14
15
|
export declare function stripControlBytes(s: string): string;
|
|
15
16
|
export declare function setTerminalTitleIfEnabled(stream: {
|
|
@@ -10,4 +10,4 @@ export declare function runTurn(input: {
|
|
|
10
10
|
attachments: ImageAttachment[];
|
|
11
11
|
}, session: AgentSession, stats: SessionStats, h: TurnHandles, thinkingUi?: ThinkingUiMode, completionWriter?: CompletionWriter, inputSurface?: InputSurfaceRefs): Promise<void>;
|
|
12
12
|
export type { ContextTier } from './turn-handler.footer.js';
|
|
13
|
-
export { formatContextUsage, printTurnFooter } from './turn-handler.footer.js';
|
|
13
|
+
export { formatContextUsage, printTurnFooter, printTurnSeparator } from './turn-handler.footer.js';
|
|
@@ -9,3 +9,6 @@ export declare function printTurnFooter(meta: {
|
|
|
9
9
|
totalCostUsd?: number;
|
|
10
10
|
usage?: Record<string, unknown>;
|
|
11
11
|
} | undefined, stats: SessionStats, write?: (line: string) => void): void;
|
|
12
|
+
export declare function printTurnSeparator(write: (line: string) => void, stdout?: {
|
|
13
|
+
isTTY?: boolean;
|
|
14
|
+
}): void;
|