MCPcopy Index your code
hub / github.com/AI45Lab/Code / eventData

Function eventData

sdk/node/examples/streaming/hitl_confirmation_loop.ts:20–27  ·  view source on GitHub ↗
(event: AgentEvent)

Source from the content-addressed store, hash-verified

18};
19
20function eventData(event: AgentEvent): ConfirmationEventData {
21 if (!event.data) return {};
22 try {
23 return JSON.parse(event.data) as ConfirmationEventData;
24 } catch {
25 return {};
26 }
27}
28
29async function pendingByToolId(session: Session, toolId?: string | null): Promise<PendingConfirmation | null> {
30 const pending = await session.pendingConfirmations();

Callers 1

confirmFromCliFunction · 0.85

Calls 1

parseMethod · 0.45

Tested by

no test coverage detected