@@ -4,12 +4,12 @@ type CliDaemonManifest = ExecutorLocalServerManifest & { readonly kind: "cli-dae
44
55type SupervisedDaemonAttachDecision =
66 | {
7- readonly _tag : "Attach " ;
7+ readonly kind : "attach " ;
88 readonly manifest : CliDaemonManifest ;
99 readonly authToken : string ;
1010 }
11- | { readonly _tag : "RemoveStaleManifest " ; readonly pid : number }
12- | { readonly _tag : "Unavailable " } ;
11+ | { readonly kind : "remove-stale-manifest " ; readonly pid : number }
12+ | { readonly kind : "unavailable " } ;
1313
1414export const resolveSupervisedDaemonAttach = async (
1515 manifest : ExecutorLocalServerManifest | null ,
@@ -18,18 +18,18 @@ export const resolveSupervisedDaemonAttach = async (
1818 readonly isPidAlive : ( pid : number ) => boolean ;
1919 } ,
2020) : Promise < SupervisedDaemonAttachDecision > => {
21- if ( ! manifest || manifest . kind !== "cli-daemon" ) return { _tag : "Unavailable " } ;
21+ if ( ! manifest || manifest . kind !== "cli-daemon" ) return { kind : "unavailable " } ;
2222 const cliManifest = { ...manifest , kind : "cli-daemon" as const } ;
2323
2424 if ( await input . isReachable ( cliManifest . connection . origin ) ) {
2525 const auth = cliManifest . connection . auth ;
2626 const authToken = auth && auth . kind === "bearer" ? auth . token : "" ;
27- return { _tag : "Attach " , manifest : cliManifest , authToken } ;
27+ return { kind : "attach " , manifest : cliManifest , authToken } ;
2828 }
2929
3030 if ( ! input . isPidAlive ( cliManifest . pid ) ) {
31- return { _tag : "RemoveStaleManifest " , pid : cliManifest . pid } ;
31+ return { kind : "remove-stale-manifest " , pid : cliManifest . pid } ;
3232 }
3333
34- return { _tag : "Unavailable " } ;
34+ return { kind : "unavailable " } ;
3535} ;
0 commit comments