Optional onCalled after the primary agent session closes and before its report is generated. Errors are logged and do not stop session cleanup.
The worker stops waiting after ServerOptions.sessionEndTimeout. JavaScript cannot cancel the
returned promise, so timed-out work can continue until the job process exits.
The callback is not called if the primary agent session fails to close or exceeds its close
timeout.
The job context for the completed session.
Optional onCalled when a simulation run driving this agent ends. Read the
simulator's verdict via ctx.simulatorVerdict and veto a pass from your
own checks with ctx.fail(reason). Never called for normal sessions.
Optional prewarm
Defines the entrypoint and lifecycle callbacks for an agent.
See
defineAgent