Files
rea/src/hopper/HopperOperationStage.ts
T
5a67c7fc54 fix(hopper): diagnose MCP provider failures with stage, state, and request context (#1044)
* fix(hopper): diagnose MCP provider failures with stage, state, and request context

* fix(hopper): retain health at the actual provider lifecycle boundary

* test(hopper): distinguish socket loss from later observed process exit

* test(hopper): cover observed exit separately from socket-first replies

---------

Co-authored-by: N0zoM1z0 <1705004398@qq.com>
2026-10-09 00:33:56 +08:00

10 lines
371 B
TypeScript

import type { ProviderFailureStage } from "../domain/providerOperationHealth.js";
/** Classify Hopper wire operations at their provider boundary. */
export const hopperOperationStage = (
operation: string,
): ProviderFailureStage => {
if (operation === "health") return "connection";
return operation === "procedure_pseudo_code" ? "decompilation" : "analysis";
};