As always, brakes are safety critical and I would recommend erring on the side of caution. That said, most brake hoses that I've seen have multiple layers (although as noted in the comments under your question, some do not). Usually there's three main components:
- An inner layer that prevents the fluid from leaking out.
- A woven layer which handles structural integrity under pressure.
- An outer sheath which protects the textile from abrasion, dirt, and solvents.
With Shimano hoses at least, these are a translucent plastic tube, an off-white/amber weave (much like a Chinese finger trap), and a black tube respectively. I would reckon that as long as you can't see the woven layer (either directly seeing it or by the presence of loose fibers), you should still be alright. Definitely inspect the cut carefully though and exercise some critical thinking. The outer sheath probably isn't very thick to begin with, so if the cut is deeper than 0.5mm (see next paragraph), I'd suspect that the textile layer has already been reached or that the hose doesn't have distinct visible layers to begin with. In either case, the hose is probably unsafe to continue using with that deep of a cut.
To put some numbers on that previous paragraph, this post reports that your hose has an inner diameter of 2.5mm and an outer diameter of 5.5mm. That leaves you with 1.5mm of wall thickness total. It's probably reasonable to assume that the three layers have similar thicknesses, so yeah, if the cut is any deeper than 0.5mm (!), you have some cause for concern.
If possible, I'd be tempted to slide some heatshrink tubing over the area to reinforce the cut (by undoing the hydraulic cutting at the lever or caliper and sliding the tubing over the end. Would require a brake bleed afterwards). Not really as structural support mind you--more to serve as that protective sheath. Otherwise, a spiral wrap of electrical tape would also be helpful as an alternative.