* 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>
10 lines
371 B
TypeScript
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";
|
|
};
|