import type { TaskRecord } from "../../boards/index.js"; export type OpenClawAgentPathEntry = { id: string; workspace: string; agentDir: string; }; type AgentReportNode = { agentId: string; metadata: { reportsTo: string | null; }; }; export declare function containsAlreadyExistsMessage(stdout: string, stderr: string): boolean; export declare function containsAgentNotFoundMessage(stdout: string, stderr: string): boolean; export declare function toErrorMessage(error: unknown): string; export declare function resolveInactiveMinutes(value: number | undefined): number; export declare function resolveInProgressTimeoutMinutes(value: number | undefined): number; export declare function resolveMaxParallelFlows(value: number | undefined): number; export declare function resolveInactiveAgentNotificationTarget(value: "all-managers" | "ceo-only" | undefined): "all-managers" | "ceo-only"; export interface BottomUpTaskDelegationStrategyConfig { enabled?: boolean; inactiveMinutes?: number; notificationTarget?: "all-managers" | "ceo-only"; } export interface TopDownTaskDelegationStrategyConfig { enabled?: boolean; openTasksThreshold?: number; } export interface TaskDelegationStrategiesConfig { topDown?: TopDownTaskDelegationStrategyConfig; bottomUp?: BottomUpTaskDelegationStrategyConfig; } export interface ResolvedTopDownTaskDelegationStrategy { enabled: boolean; openTasksThreshold: number; } export interface ResolvedBottomUpTaskDelegationStrategy { enabled: boolean; inactiveMinutes: number; notificationTarget: "all-managers" | "ceo-only"; } export declare function resolveTopDownOpenTasksThreshold(value: number | undefined): number; export declare function resolveTopDownTaskDelegationStrategy(options: { delegationStrategies?: TaskDelegationStrategiesConfig; }): ResolvedTopDownTaskDelegationStrategy; export declare function resolveBottomUpTaskDelegationStrategy(options: { inactiveMinutes?: number; notificationTarget?: "all-managers" | "ceo-only"; notifyInactiveAgents?: boolean; delegationStrategies?: TaskDelegationStrategiesConfig; }): ResolvedBottomUpTaskDelegationStrategy; export declare function extractManagedSkillsDir(payload: unknown): string | null; export declare function extractOpenClawAgents(payload: unknown): OpenClawAgentPathEntry[]; export declare function extractOpenClawAgentEntry(payload: unknown, agentId: string): { workspace: string; agentDir: string; } | null; export declare function pathMatches(left: string, right: string): boolean; export declare function pathIsWithin(containerPath: string, candidatePath: string): boolean; export declare function buildTaskSessionRef(agentId: string, _taskId: string): string; export declare function buildInactiveSessionRef(managerAgentId: string, _subjectAgentId: string): string; export declare function buildNotificationSessionRef(agentId: string): string; export declare function buildTodoTaskMessage(params: { task: TaskRecord; notificationTimestamp?: string; }): string; export declare function buildPendingTaskMessage(params: { task: TaskRecord; pendingMinutes: number; notificationTimestamp?: string; }): string; export declare function buildDoingTaskMessage(params: { task: TaskRecord; doingMinutes: number; notificationTimestamp?: string; }): string; export declare function buildBlockedTaskMessage(params: { task: TaskRecord; notificationTimestamp?: string; }): string; export declare function buildTopDownTaskDelegationMessage(params: { openTasksThreshold: number; openTasksCount: number; totalAgents: number; managerAgents: number; ceoDirectReportees: number; openTasks: Array<{ taskId: string; title: string; status: string; assignedTo: string; }>; notificationTimestamp?: string; }): string; export declare function buildInactiveAgentMessage(params: { managerAgentId: string; subjectAgentId: string; subjectName: string; role: string; directReporteesCount: number; indirectReporteesCount: number; inactiveMinutes: number; notificationTimestamp?: string; lastActionTimestamp?: number; }): string; export declare function buildInactiveAgentsMessage(params: { inactiveMinutes: number; notificationTimestamp?: string; candidates: Array<{ subjectAgentId: string; subjectName: string; role: string; directReporteesCount: number; indirectReporteesCount: number; lastActionTimestamp?: number; }>; }): string; export declare function buildReporteeStats(manifests: AgentReportNode[]): { directByManager: Map; totalByManager: Map; }; export declare function assertAgentExists(manifests: AgentReportNode[], agentId: string): void; export declare function collectAllReportees(manifests: AgentReportNode[], managerAgentId: string): string[]; export declare function prepareOpenClawCommandEnv(env: NodeJS.ProcessEnv): NodeJS.ProcessEnv; export declare function isSpawnPermissionOrMissing(error: unknown): error is NodeJS.ErrnoException; export {};