Skip to main content

Module plan

Module plan 

Source
Expand description

Phase 2.4 plan-level evaluation HTTP surface.

Mirrors the structure of crate::emergency: chio-http-core does not embed an HTTP server, so this module exposes a substrate-agnostic handler that accepts raw request bytes, delegates to the kernel, and returns a structured response. Each substrate adapter wires the handler into its own framework-native route handler.

Unlike the emergency endpoints, /evaluate-plan does NOT require an admin token: any caller in possession of a valid capability token can ask the kernel whether a prospective plan would be allowed. The pre-flight check is explicitly designed to be consulted often by agent planners during plan generation.

The handler returns 200 OK regardless of the aggregate plan verdict: denials are conveyed inside the JSON body, not as HTTP status codes. Only malformed request bodies produce a 400.

Enums§

PlanHandlerError
Error surfaced by handle_evaluate_plan when the request body is malformed. Aggregate plan denials are NOT represented here; those are carried inside the successful response.

Functions§

handle_evaluate_plan
Handler for POST /evaluate-plan.