openclaw/src/agents/lanes.ts

15 lines
492 B
TypeScript
Raw Normal View History

2026-01-20 10:50:18 +00:00
import { CommandLane } from "../process/lanes.js";
export const AGENT_LANE_NESTED = CommandLane.Nested;
export const AGENT_LANE_SUBAGENT = CommandLane.Subagent;
2026-03-11 00:01:45 +00:00
export function resolveNestedAgentLane(lane?: string): string {
const trimmed = lane?.trim();
// Nested agent runs should not inherit the cron execution lane. Cron jobs
// already occupy that lane while they dispatch inner work.
if (!trimmed || trimmed === "cron") {
return AGENT_LANE_NESTED;
}
return trimmed;
}