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

Function onStateChange

src/cli/print.ts:3992–4007  ·  view source on GitHub ↗
(state, detail)

Source from the content-addressed store, hash-verified

3990 }
3991 },
3992 onStateChange(state, detail) {
3993 if (state === 'failed') {
3994 bridgeFailureDetail = detail
3995 }
3996 logForDebugging(
3997 `[bridge:sdk] State change: ${state}${detail ? ` — ${detail}` : ''}`,
3998 )
3999 output.enqueue({
4000 type: 'system' as StdoutMessage['type'],
4001 subtype: 'bridge_state' as string,
4002 state,
4003 detail,
4004 uuid: randomUUID(),
4005 session_id: getSessionId(),
4006 } as StdoutMessage)
4007 },
4008 initialMessages:
4009 mutableMessages.length > 0 ? mutableMessages : undefined,
4010 })

Callers 9

RecentDenialsTabFunction · 0.85
initEnvLessBridgeCoreFunction · 0.85
wireTransportCallbacksFunction · 0.85
recoverFromAuthFailureFunction · 0.85
initBridgeCoreFunction · 0.85
wireTransportFunction · 0.85
startWorkPollLoopFunction · 0.85
initReplBridgeFunction · 0.85

Calls 4

randomUUIDFunction · 0.90
getSessionIdFunction · 0.85
logForDebuggingFunction · 0.50
enqueueMethod · 0.45

Tested by

no test coverage detected