(
services: NativeExecutionServices<NativeE, McpServerRequestContext>,
execution: Parameters<
NativeExecutionServices<NativeE, McpServerRequestContext>["executionPaused"]
>[0],
)
| 476 | }; |
| 477 | |
| 478 | const nativeInputRequired = async <NativeE extends Cause.YieldableError>( |
| 479 | services: NativeExecutionServices<NativeE, McpServerRequestContext>, |
| 480 | execution: Parameters< |
| 481 | NativeExecutionServices<NativeE, McpServerRequestContext>["executionPaused"] |
| 482 | >[0], |
| 483 | ): Promise<InputRequiredResult> => { |
| 484 | const binding = await requestStateBindingForContext( |
| 485 | config.requestStateBinding, |
| 486 | config.requestStatePrincipal, |
| 487 | services.requestContext.serverContext, |
| 488 | ); |
| 489 | const requestState = await requestStateCodec(binding).mint( |
| 490 | { executionId: execution.id }, |
| 491 | services.requestContext.serverContext, |
| 492 | ); |
| 493 | return inputRequired({ |
| 494 | inputRequests: { |
| 495 | [NATIVE_ELICITATION_RESPONSE_KEY]: elicitationInputRequest( |
| 496 | execution.elicitationContext.request, |
| 497 | ), |
| 498 | }, |
| 499 | requestState, |
| 500 | }); |
| 501 | }; |
| 502 | |
| 503 | return { |
| 504 | server, |
no test coverage detected