agent-afk 5.313.7 → 5.313.8

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.
@@ -5,7 +5,7 @@ import type { AgentModelInput } from '../../types.js';
5
5
  import type { AgentConfig } from '../../types/config-types.js';
6
6
  import type { MessageJournal } from '../../journal/types.js';
7
7
  import type { JournalParent } from '../../subagent/fork-types.js';
8
- import { createStubParentSession, type ChildProviderFactoryArgs } from '../nesting.js';
8
+ import { createStubParentSession } from '../nesting.js';
9
9
  import type { RegisteredAgent } from '../../agents/index.js';
10
10
  import type { AgentRegistry } from '../../agents/index.js';
11
11
  import type { SkillExecutor } from '../skill-executor.js';
@@ -13,6 +13,7 @@ import type { Surface } from '../../awareness/types.js';
13
13
  import type { TraceSink } from '../../trace/index.js';
14
14
  import type { SubagentExecutor, SubagentExecutorContext } from '../subagent-executor.js';
15
15
  import type { AgentInput } from './input-parse.js';
16
+ import type { ChildProviderFactoryArgs } from '../nesting.js';
16
17
  export type ChildParentSession = ReturnType<typeof createStubParentSession> & {
17
18
  sessionId: string | undefined;
18
19
  messageJournal?: MessageJournal;
@@ -0,0 +1,48 @@
1
+ import { resolveAgentToolAccess } from '../../agents/index.js';
2
+ import { SubagentManager } from '../../subagent.js';
3
+ import type { RegisteredAgent, AgentRegistry } from '../../agents/index.js';
4
+ import type { AgentModelInput } from '../../types.js';
5
+ import type { AgentConfig } from '../../types/config-types.js';
6
+ import type { SubagentExecutor, SubagentExecutorContext } from '../subagent-executor.js';
7
+ import type { AgentInput } from './input-parse.js';
8
+ import type { BuildChildConfigArgs, ChildParentSession } from './child-config.js';
9
+ export interface ResolvedChildModel {
10
+ childModel: string;
11
+ childIsOpenAI: boolean;
12
+ }
13
+ export declare function resolveChildModelAndProvider(parsed: Pick<AgentInput, 'model'>, namedAgent: RegisteredAgent | undefined, defaultSubagentModel: AgentModelInput, parentModel: AgentModelInput | undefined): ResolvedChildModel;
14
+ export interface ResolvedChildToolAccess {
15
+ resolvedAccess: ReturnType<typeof resolveAgentToolAccess> | undefined;
16
+ effectiveAllowedTools: string[] | undefined;
17
+ effectiveReadOnlyBash: boolean;
18
+ childWriteCapable: boolean;
19
+ childSideEffectFree: boolean;
20
+ }
21
+ export declare function resolveChildToolAccess(namedAgent: RegisteredAgent | undefined, cageAllowedTools: string[] | undefined, cageReadOnlyBash: boolean | undefined, agentRegistry: AgentRegistry | undefined): ResolvedChildToolAccess;
22
+ export interface ResolvedChildBudgets {
23
+ effectiveMaxTurns: number;
24
+ effectiveMaxToolUseIterations: number;
25
+ }
26
+ export declare function resolveChildBudgets(parsed: Pick<AgentInput, 'max_turns' | 'max_turns_explicit' | 'max_tool_use_iterations' | 'max_tool_use_iterations_explicit'>, namedAgent: RegisteredAgent | undefined): ResolvedChildBudgets;
27
+ export declare function resolveChildCredential(childModel: string, resolveApiKeyForModel: ((model: string) => string | undefined) | undefined, parentApiKey: string | undefined): string | undefined;
28
+ export declare function buildBaseChildConfig(parsed: Pick<AgentInput, 'cwd' | 'writeRoots' | 'readRoots'>, namedAgent: RegisteredAgent | undefined, defaultConfig: SubagentExecutorContext['defaultConfig'], childModel: string, childIsOpenAI: boolean, resolvedChildApiKey: string | undefined, effectiveMaxTurns: number, effectiveMaxToolUseIterations: number, depth: number, maxDepth: number): AgentConfig;
29
+ export interface WireChildNestingResult {
30
+ childParentSession: ChildParentSession | undefined;
31
+ childManager: SubagentManager | undefined;
32
+ }
33
+ interface WireChildNestingArgs {
34
+ args: BuildChildConfigArgs;
35
+ childConfig: AgentConfig;
36
+ effectiveAllowedTools: string[] | undefined;
37
+ effectiveReadOnlyBash: boolean;
38
+ resolvedAccess: ReturnType<typeof resolveAgentToolAccess> | undefined;
39
+ depth: number;
40
+ maxDepth: number;
41
+ signal: AbortSignal;
42
+ currentCwd: string | undefined;
43
+ createChildExecutor: (ctx: SubagentExecutorContext) => SubagentExecutor;
44
+ }
45
+ export declare function wireChildNesting(w: WireChildNestingArgs): WireChildNestingResult;
46
+ export declare function buildNestedChildManager(args: Pick<BuildChildConfigArgs, 'childInheritedReadRoots' | 'traceWriter' | 'surface' | 'workspaceStore' | 'parentRootSessionId' | 'hookRegistry'>, signal: AbortSignal, currentCwd: string | undefined): SubagentManager;
47
+ export declare function nestedExecutorInherits(args: Pick<BuildChildConfigArgs, 'traceWriter' | 'workspaceStore' | 'hookRegistry'>): Pick<SubagentExecutorContext, 'traceWriter' | 'workspaceStore' | 'hookRegistry'>;
48
+ export {};