agent-afk 5.187.0 → 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/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.mjs +622 -622
- package/dist/index.mjs +233 -233
- package/dist/telegram.mjs +324 -324
- package/package.json +1 -1
|
@@ -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>;
|