MCPcopy Create free account
hub / github.com/Noumena-Network/code / fetchSessionTitle

Function fetchSessionTitle

src/bridge/bridgeMain.ts:1988–1995  ·  view source on GitHub ↗

* 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,
)

Source from the content-addressed store, hash-verified

1986 * first user message.
1987 */
1988async function fetchSessionTitle(
1989 compatSessionId: string,
1990 baseUrl: string,
1991): Promise<string | undefined> {
1992 const { getBridgeSession } = await import('./createSession.js')
1993 const session = await getBridgeSession(compatSessionId, { baseUrl })
1994 return session?.title || undefined
1995}
1996
1997export async function bridgeMain(args: string[]): Promise<void> {
1998 const parsed = parseArgs(args)

Callers 1

runBridgeLoopFunction · 0.85

Calls 1

getBridgeSessionFunction · 0.85

Tested by

no test coverage detected