MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / extractApprovalId

Function extractApprovalId

packages/server/test/services.test.ts:539–547  ·  view source on GitHub ↗
(sentFrames: unknown[])

Source from the content-addressed store, hash-verified

537 }
538
539 function extractApprovalId(sentFrames: unknown[]): string | undefined {
540 for (const frame of sentFrames) {
541 const env = frame as { type: string; payload: { approval_id?: string } };
542 if (env.type === 'event.approval.requested' && env.payload.approval_id) {
543 return env.payload.approval_id;
544 }
545 }
546 return undefined;
547 }
548
549 it('broadcasts event.approval.requested AND settles via resolve(approval_id, response)', async () => {
550 const { broker, bus, broadcast, conn } = makeBrokerWithBus();

Callers 1

services.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected