* One-shot fetch of a session's title via GET /v1/sessions/{id}. * * Uses `getBridgeSession` from createSession.ts (ccr-byoc headers + org UUID) * rather than the environments-level bridgeApi client, whose headers make the * Sessions API return 404. Returns undefined if the session has no title
( compatSessionId: string, baseUrl: string, )
| 1990 | * first user message. |
| 1991 | */ |
| 1992 | async function fetchSessionTitle( |
| 1993 | compatSessionId: string, |
| 1994 | baseUrl: string, |
| 1995 | ): Promise<string | undefined> { |
| 1996 | const { getBridgeSession } = await import('./createSession.js') |
| 1997 | const session = await getBridgeSession(compatSessionId, { baseUrl }) |
| 1998 | return session?.title || undefined |
| 1999 | } |
| 2000 | |
| 2001 | export async function bridgeMain(args: string[]): Promise<void> { |
| 2002 | const parsed = parseArgs(args) |
no test coverage detected