Files
oh-my-pi/packages/coding-agent/test/tools/task-agent-capabilities.test.ts
T
can1357 d03ea52891 refactor(ai): improved provider in-flight lease signal routing
- Update `releaseProviderInFlightLease` to signal into the specific directory path associated with the lease rather than recomputing it from the root.
- Introduce `signalProviderInFlightWaitersInDir` to decoupling waking waiters from global provider path resolution.
- Remove redundant tests from `coding-agent`.
2026-06-29 20:04:24 +02:00

32 lines
1.3 KiB
TypeScript

import { describe, expect, it } from "bun:test";
import { isReadOnlyAgent } from "@oh-my-pi/pi-coding-agent/task";
import { loadBundledAgents } from "@oh-my-pi/pi-coding-agent/task/agents";
import type { AgentDefinition } from "@oh-my-pi/pi-coding-agent/task/types";
function agentByName(agents: AgentDefinition[], name: string): AgentDefinition {
const agent = agents.find(candidate => candidate.name === name);
expect(agent).toBeDefined();
return agent as AgentDefinition;
}
describe("task agent capability descriptions", () => {
it("classifies bundled explore as the only read-only delegated agent", () => {
const agents = loadBundledAgents();
expect(isReadOnlyAgent(agentByName(agents, "explore"))).toBe(true);
for (const name of ["task", "quick_task", "plan", "reviewer", "oracle", "designer"]) {
expect(isReadOnlyAgent(agentByName(agents, name))).toBe(false);
}
});
it("disables read summarization for explore and librarian, leaves other agents summarizing", () => {
const agents = loadBundledAgents();
expect(agentByName(agents, "explore").readSummarize).toBe(false);
expect(agentByName(agents, "librarian").readSummarize).toBe(false);
for (const name of ["task", "quick_task", "plan", "reviewer", "oracle", "designer"]) {
expect(agentByName(agents, name).readSummarize).toBeUndefined();
}
});
});