Skip to main content

Module route_handler

Module route_handler 

Source

Structs§

AplRouteHandler
Synthetic plugin that drives APL evaluation for one route + one phase.

Enums§

Phase
Which APL phase this handler runs. Pre covers args + policy; Post covers result + post_invocation. Set once at construction and never changes.

Constants§

ELICITATION_APPROVED_CODE
JSON-RPC error code emitted when an agent re-checks an approval in peek mode and it has resolved approved: “approved — confirm to apply.” The phase does NOT forward to the tool; the agent confirms with the requester and re-sends without the peek header to actually run it. Lets a human authorize while the requester separately commits execution.
ELICITATION_ID_HEADER
Header an agent echoes on retry to continue a suspended elicitation — its value is the elicitation_id from a prior -32120. The handler seeds it into the bag (elicitation.id) before evaluation so the runtime checks the existing elicitation instead of dispatching a new one. Mirrors how X-User-Token carries request-scoped context.
ELICITATION_PEEK_HEADER
Header an agent sets (alongside X-Policy-Elicitation-Id) to peek at an approval — resolve its status without committing the action. Truthy value (“1”/“true”/anything non-empty) enables it.
ELICITATION_PENDING_CODE
JSON-RPC error code the host emits when a phase suspends on a pending elicitation: “request not complete — retry echoing the elicitation id.” In the application-reserved JSON-RPC range; carried via PluginViolation::proto_error_code for the host to put on the wire. The agent SDK keys its pause/resume loop on this code.