7 lines
357 B
TypeScript
7 lines
357 B
TypeScript
import type { RemoteSession } from '../types'
|
|
|
|
/** Forks also carry parentSessionId; only the explicit origin selects subagent routing. */
|
|
export function isSubagentSession(session: RemoteSession): session is RemoteSession & { origin: 'subagent'; parentSessionId: string } {
|
|
return session.origin === 'subagent' && session.parentSessionId !== undefined
|
|
}
|