fix(tools): improve delegate task constants and sync handling

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
YeonGyu-Kim
2026-04-10 15:53:14 +09:00
parent 111cf6d1a9
commit fba3e1b3f7
3 changed files with 9 additions and 8 deletions
+5 -4
View File
@@ -2,6 +2,7 @@ import type {
AvailableCategory,
AvailableSkill,
} from "../../agents/dynamic-agent-prompt-builder"
import { getAgentConfigKey } from "../../shared/agent-display-names"
import { truncateDescription } from "../../shared/truncate-description"
export {
CATEGORY_DESCRIPTIONS,
@@ -329,18 +330,18 @@ export function isPlanAgent(agentName: string | undefined): boolean {
}
/**
* Plan family: plan + prometheus. Shares mutual delegation blocking only.
* Does NOT share system prompt or task permission (only isPlanAgent controls those).
* Plan family: plan + prometheus. Shares mutual delegation blocking and task tool permission.
* Does NOT share system prompt (only isPlanAgent controls that).
*/
export const PLAN_FAMILY_NAMES = ["plan", "prometheus"]
/**
* Check if the given agent belongs to the plan family for mutual delegation blocking.
* Check if the given agent belongs to the plan family (blocking + task permission).
*/
export function isPlanFamily(category: string): boolean
export function isPlanFamily(category: string | undefined): boolean
export function isPlanFamily(category: string | undefined): boolean {
if (!category) return false
const lowerCategory = category.toLowerCase().trim()
const lowerCategory = getAgentConfigKey(category).toLowerCase().trim()
return PLAN_FAMILY_NAMES.some((name) => lowerCategory === name)
}