Orca is the place for working with a fleet of agents (e.g. Grok Bot, Claude Code). Run any coding agent with your own subscription. Available on desktop, mobile and remote runtime.
TypeScript adeagent-ideai-agentsautomationbotclaude-codecodexghosttygrok-bothermes-agentmobile-appmuseopenclawopencodeorchestrationpiruntimeterminalworktreesyc-backed
import type { PaletteDocument, PaletteTokenAssignment } from './palette-document'
export function assignmentsAreContainerOnly(
document: PaletteDocument,
assignments: readonly PaletteTokenAssignment[]
): boolean {
const tokenRoles = new Map<number, boolean>()
for (const assignment of assignments) {
const isContainer = document.fieldById.get(assignment.fieldId)?.role === 'container'
tokenRoles.set(
assignment.tokenIndex,
(tokenRoles.get(assignment.tokenIndex) ?? true) && isContainer
)
}
return tokenRoles.size > 0 && [...tokenRoles.values()].every(Boolean)
}