(params: {
session: RenderSession;
handlerContext?: ToolHandlerContext;
onStructuredOutput?: InvokeOptions['onStructuredOutput'];
code: string;
message: string;
})
| 26 | }; |
| 27 | |
| 28 | function emitExplicitRuntimeError(params: { |
| 29 | session: RenderSession; |
| 30 | handlerContext?: ToolHandlerContext; |
| 31 | onStructuredOutput?: InvokeOptions['onStructuredOutput']; |
| 32 | code: string; |
| 33 | message: string; |
| 34 | }): void { |
| 35 | const output = createStructuredErrorOutput({ |
| 36 | category: 'runtime', |
| 37 | code: params.code, |
| 38 | message: params.message, |
| 39 | }); |
| 40 | params.session.setStructuredOutput?.(output); |
| 41 | if (params.handlerContext) { |
| 42 | params.handlerContext.structuredOutput = output; |
| 43 | } |
| 44 | params.onStructuredOutput?.(output); |
| 45 | } |
| 46 | |
| 47 | function buildTemplateNextSteps( |
| 48 | tool: ToolDefinition, |
no test coverage detected