refactor(agents): remove stale nested lane helper

This commit is contained in:
Vincent Koc
2026-06-18 14:11:22 +08:00
parent 5feb88dc1e
commit 5b5e6ff272
2 changed files with 0 additions and 24 deletions

View File

@@ -1,28 +1,13 @@
// Documents nested-agent command lane resolution and session scoping.
import { describe, expect, it } from "vitest";
import { CommandLane } from "../process/lanes.js";
import {
AGENT_LANE_CRON_NESTED,
AGENT_LANE_NESTED,
isNestedAgentLane,
resolveCronAgentLane,
resolveNestedAgentLane,
resolveNestedAgentLaneForSession,
} from "./lanes.js";
describe("resolveNestedAgentLane", () => {
it("defaults to the nested lane when no lane is provided", () => {
expect(resolveNestedAgentLane()).toBe(AGENT_LANE_NESTED);
});
it("preserves explicit lanes", () => {
expect(resolveNestedAgentLane("cron")).toBe(CommandLane.Cron);
expect(resolveNestedAgentLane(" cron ")).toBe(CommandLane.Cron);
expect(resolveNestedAgentLane("subagent")).toBe("subagent");
expect(resolveNestedAgentLane(" custom-lane ")).toBe("custom-lane");
});
});
describe("resolveCronAgentLane", () => {
it("defaults cron-owned runs to the cron-nested lane", () => {
expect(resolveCronAgentLane()).toBe(AGENT_LANE_CRON_NESTED);

View File

@@ -11,15 +11,6 @@ const AGENT_LANE_CRON: string = CommandLane.Cron;
const NESTED_LANE = "nested";
const NESTED_LANE_PREFIX = `${NESTED_LANE}:`;
/** Resolves the lane for nested agent work. */
export function resolveNestedAgentLane(lane?: string): string {
const trimmed = lane?.trim();
if (!trimmed) {
return AGENT_LANE_NESTED;
}
return trimmed;
}
/** Resolves the lane for agent work started from cron. */
export function resolveCronAgentLane(lane?: string): string {
const trimmed = lane?.trim();