module Platform.Linux.Nvidia.ObservedRequest import Data.Bytes import Platform.Linux.Nvidia.PlanHost import Platform.Linux.Nvidia.PlanHostRequest import Std.Natural import Runtime.NativeObservedProgram -- Use the maintained request-step interpreter with source-declared effects. -- A boundary is reached only after the owning protocol has returned; recorder -- lowering owns required capture, drain/retry, storage and target bindings. -- Keeping this adapter beside the interpreter avoids making every unobserved -- host import the capture implementation merely to lower its ordinary steps. def nvidiaPlanHostObservedSteps = (nvidiaPlanHostStepsWith (family NativeObservedSteps) nativeObservedPrefixWith) -- Complete request lifecycle, using the same envelope, request, channel, -- staging, learner and schedule owners as the physical instance. Embedded -- legacy command fragments may still emit v1 phase records: retain their -- recorder mapping until those declarations migrate to typed source effects. -- Top-level boundaries are supplied by the caller's declared capture policy. -- End closes the producer before cleanup; a failed earlier command never -- reaches this completion path and cannot fabricate a terminal acknowledgement. def nvidiaPlanHostObservedRequestSteps = (lambda unrestricted boundary : (pi unrestricted phase : Nat . (pi unrestricted name : Bytes . (pi unrestricted after : (family NativeObservedSteps) . (family NativeObservedSteps)))) . (lambda unrestricted cleanup : (family NativeObservedSteps) . (nvidiaPlanHostRequestWith (family NativeObservedSteps) nativeObservedPrefixWith (nativeObservedPrefixWith phTelemetryOpen) boundary (constructor NativeObservedSteps NativeObservedFinish cleanup))))