feat(tools): add native team orchestration tool suite
Port team lifecycle, teammate runtime, inbox messaging, and team-scoped task flows into built-in tools so multi-agent coordination works natively without external server dependencies.
This commit is contained in:
committed by
YeonGyu-Kim
parent
4ab93c0cf7
commit
0f9c93fd55
@@ -0,0 +1,29 @@
|
||||
const VALID_NAME_RE = /^[A-Za-z0-9_-]+$/
|
||||
const MAX_NAME_LENGTH = 64
|
||||
|
||||
function validateName(value: string, label: "team" | "agent"): string | null {
|
||||
if (!value || !value.trim()) {
|
||||
return `${label}_name_required`
|
||||
}
|
||||
|
||||
if (!VALID_NAME_RE.test(value)) {
|
||||
return `${label}_name_invalid`
|
||||
}
|
||||
|
||||
if (value.length > MAX_NAME_LENGTH) {
|
||||
return `${label}_name_too_long`
|
||||
}
|
||||
|
||||
return null
|
||||
}
|
||||
|
||||
export function validateTeamName(teamName: string): string | null {
|
||||
return validateName(teamName, "team")
|
||||
}
|
||||
|
||||
export function validateAgentName(agentName: string): string | null {
|
||||
if (agentName === "team-lead") {
|
||||
return "agent_name_reserved"
|
||||
}
|
||||
return validateName(agentName, "agent")
|
||||
}
|
||||
Reference in New Issue
Block a user