agent-afk 5.84.11 → 5.84.13

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,8 @@
1
+ import type { AgentConfig } from '../types.js';
2
+ export declare const DENY_ELICITATION: NonNullable<AgentConfig['onElicitation']>;
3
+ export declare const SUBAGENT_DEFAULT_MAX_TOOL_USE_ITERATIONS = 50;
4
+ export declare const SUBAGENT_DEFAULT_TIMEOUT_MS: number;
5
+ export declare function resolveSubagentTimeoutMs(): number;
6
+ export declare const SUBAGENT_DEFAULT_IDLE_TIMEOUT_MS: number;
7
+ export declare function resolveSubagentIdleTimeoutMs(): number;
8
+ export declare const SUBAGENT_BACKGROUND_TIMEOUT_MS: number;
@@ -0,0 +1,38 @@
1
+ import type { ZodType } from 'zod';
2
+ import type { CanUseTool } from '../types/sdk-types.js';
3
+ import type { HookRegistry } from '../hooks.js';
4
+ import type { AgentConfig, IAgentSession } from '../types.js';
5
+ import type { SubagentProgressSink } from '../types/session-types.js';
6
+ import type { TraceWriter } from '../trace/index.js';
7
+ import type { Surface } from '../awareness/types.js';
8
+ import type { PhaseRole } from '../tools/nesting.js';
9
+ export interface ForkParent {
10
+ sessionId?: string;
11
+ id?: string;
12
+ }
13
+ export interface ForkSubagentOptions<T = unknown> {
14
+ parent: Pick<IAgentSession, 'sessionId'> & Partial<Pick<IAgentSession, 'getInputStreamRef' | 'abortSignal' | 'hookRegistry'>>;
15
+ config: AgentConfig;
16
+ idPrefix?: string;
17
+ outputSchema?: ZodType<T>;
18
+ agentType: string;
19
+ resolvedAgentType?: string;
20
+ parentId?: string;
21
+ promptHead?: string;
22
+ denyElicitations?: boolean;
23
+ phaseRole?: PhaseRole;
24
+ }
25
+ export interface SubagentManagerOptions {
26
+ canUseTool?: CanUseTool;
27
+ parentAbortSignal?: AbortSignal;
28
+ hookRegistry?: HookRegistry;
29
+ progressSink?: SubagentProgressSink;
30
+ apiKey?: string;
31
+ baseUrl?: string;
32
+ parentModel?: string;
33
+ cwd?: string;
34
+ parentReadRoots?: string[];
35
+ traceWriter?: TraceWriter;
36
+ surface?: Surface;
37
+ onSubagentSucceeded?: (usage: import('./result.js').SubagentTrace['usage'], costUsd: number | undefined) => void;
38
+ }
@@ -1,53 +1,13 @@
1
- import type { CanUseTool } from './types/sdk-types.js';
2
- import type { ZodType } from 'zod';
3
1
  import { type ChildAbortedListener } from './abort-graph.js';
4
- import type { HookRegistry } from './hooks.js';
5
- import type { AgentConfig, IAgentSession } from './types.js';
6
- import type { SubagentProgressSink } from './types/session-types.js';
7
- import type { AbortOrigin, TraceWriter } from './trace/index.js';
8
- import type { Surface } from './awareness/types.js';
2
+ import type { AbortOrigin } from './trace/index.js';
9
3
  import { type ReadScopeInputs } from './subagent-read-scope.js';
10
- import { type PhaseRole } from './tools/nesting.js';
11
4
  import { type SubagentHandle } from './subagent/handle.js';
12
5
  import type { SubagentStatus, SubagentResult, SubagentTrace } from './subagent/result.js';
13
6
  export type { SubagentStatus, SubagentResult, SubagentTrace, SubagentHandle };
14
- export declare const DENY_ELICITATION: NonNullable<AgentConfig['onElicitation']>;
15
- export declare const SUBAGENT_DEFAULT_MAX_TOOL_USE_ITERATIONS = 50;
16
- export declare const SUBAGENT_DEFAULT_TIMEOUT_MS: number;
17
- export declare function resolveSubagentTimeoutMs(): number;
18
- export declare const SUBAGENT_DEFAULT_IDLE_TIMEOUT_MS: number;
19
- export declare function resolveSubagentIdleTimeoutMs(): number;
20
- export declare const SUBAGENT_BACKGROUND_TIMEOUT_MS: number;
21
- export interface ForkParent {
22
- sessionId?: string;
23
- id?: string;
24
- }
25
- export interface ForkSubagentOptions<T = unknown> {
26
- parent: Pick<IAgentSession, 'sessionId'> & Partial<Pick<IAgentSession, 'getInputStreamRef' | 'abortSignal' | 'hookRegistry'>>;
27
- config: AgentConfig;
28
- idPrefix?: string;
29
- outputSchema?: ZodType<T>;
30
- agentType: string;
31
- resolvedAgentType?: string;
32
- parentId?: string;
33
- promptHead?: string;
34
- denyElicitations?: boolean;
35
- phaseRole?: PhaseRole;
36
- }
37
- export interface SubagentManagerOptions {
38
- canUseTool?: CanUseTool;
39
- parentAbortSignal?: AbortSignal;
40
- hookRegistry?: HookRegistry;
41
- progressSink?: SubagentProgressSink;
42
- apiKey?: string;
43
- baseUrl?: string;
44
- parentModel?: string;
45
- cwd?: string;
46
- parentReadRoots?: string[];
47
- traceWriter?: TraceWriter;
48
- surface?: Surface;
49
- onSubagentSucceeded?: (usage: import('./subagent/result.js').SubagentTrace['usage'], costUsd: number | undefined) => void;
50
- }
7
+ import { DENY_ELICITATION, SUBAGENT_DEFAULT_MAX_TOOL_USE_ITERATIONS, SUBAGENT_DEFAULT_TIMEOUT_MS, SUBAGENT_DEFAULT_IDLE_TIMEOUT_MS, SUBAGENT_BACKGROUND_TIMEOUT_MS, resolveSubagentTimeoutMs, resolveSubagentIdleTimeoutMs } from './subagent/constants.js';
8
+ import type { ForkParent, ForkSubagentOptions, SubagentManagerOptions } from './subagent/fork-types.js';
9
+ export { DENY_ELICITATION, SUBAGENT_DEFAULT_MAX_TOOL_USE_ITERATIONS, SUBAGENT_DEFAULT_TIMEOUT_MS, SUBAGENT_DEFAULT_IDLE_TIMEOUT_MS, SUBAGENT_BACKGROUND_TIMEOUT_MS, resolveSubagentTimeoutMs, resolveSubagentIdleTimeoutMs, };
10
+ export type { ForkParent, ForkSubagentOptions, SubagentManagerOptions };
51
11
  export declare class SubagentManager {
52
12
  private readonly active;
53
13
  private readonly parentCanUseTool;