polyc-controller 2026.8.3

Conversation CRD + kube reconciler for the polychrome control plane.
//! polychrome control-plane reconciler.
//!
//! Defines the [`Conversation`] custom resource (`polychrome.dev/v1alpha1`) and
//! the kube controller that reconciles each `Conversation` into one
//! agent-sandbox `SandboxClaim` (and thus one isolated harness pod).
//!
//! The reconcile decision is the pure [`reconcile::plan`] function; the kube
//! IO that applies it is [`reconcile::reconcile`]. See [the module](mod@reconcile)
//! for the lifecycle (finalizer → claim creation → status → cleanup).

pub mod agent;
pub mod condition;
pub mod control_plane;
pub mod conversation;
mod cron_dow;
pub mod execution_backend;
pub mod fanout;
pub mod grant;
pub mod jitter;
pub mod reconcile;
pub mod reserved_secrets;
pub mod routine;
pub mod routine_cadence;
pub mod routine_intent;
pub mod routine_next_fire;
pub mod routine_preview;
pub mod routine_reconcile;
pub mod servicedefinition;
pub mod servicedefinition_reconcile;
pub mod toolservice;
pub mod toolservice_reconcile;
pub mod workflow;
pub mod workflow_reconcile;

pub use agent::{Agent, AgentSpec, AgentStatus, ApprovalPolicy};
pub use conversation::{Conversation, ConversationSpec, ConversationStatus};
pub use execution_backend::{
    ClaimReadiness, DialAddress, EXECUTION_AUDIENCE_ANNOTATION, ExecutionBackend,
    SandboxClaimBackend,
};
pub use grant::{Admission, EffectiveGrant};
pub use reconcile::{Context, Error, ReconcileAction, error_policy, plan, reconcile, run};
pub use reserved_secrets::{ReservedSecret, check_secret_ref};
pub use routine::{
    Routine, RoutinePayload, RoutineProvenance, RoutineSchedule, RoutineScope, RoutineSpec,
    RoutineStatus, RoutineSuspend,
};
// Like the ToolService reconciler, the Routine reconciler shadows
// `reconcile`-module names; only its run entrypoint and the pure decision
// type get top-level exports.
pub use routine_cadence::{Cadence, cadence_text, zone_label};
pub use routine_intent::compile_spec as compile_routine_spec;
pub use routine_intent::{GrantMode, parse_grant_mode};
pub use routine_next_fire::{
    ScheduledFire, due_fires, due_fires_and_next, next_fire_after, next_n_fires_after,
};
pub use routine_reconcile::{RoutineAction, run_routine, validate_spec as validate_routine_spec};
pub use servicedefinition::{ServiceDefinition, ServiceDefinitionSpec, ServiceDefinitionStatus};
// Like the ToolService reconciler, the ServiceDefinition reconciler shadows
// `reconcile`-module names; only its run entrypoint gets a top-level export.
pub use servicedefinition_reconcile::{ServiceDefinitionAction, run_servicedefinition};
pub use toolservice::{
    Auth, BearerSecretRef, Remote, ToolDescriptor, ToolService, ToolServiceSpec, ToolServiceStatus,
};
// The ToolService reconciler shadows several `reconcile`-module names (`plan`,
// `Context`, `Error`, `reconcile`, `error_policy`), so its items are exported
// under stable, non-clashing names; the rest stay reachable via the module
// path (`toolservice_reconcile::{plan, reconcile, ...}`).
pub use toolservice_reconcile::{
    CHECK_INTERVAL, ToolServiceAction, ToolServiceReadiness, health_check, run_toolservice,
};
pub use workflow::{StageStatus, Workflow, WorkflowSpec, WorkflowStage, WorkflowStatus};
// Like the other secondary reconcilers, the Workflow reconciler shadows
// `reconcile`-module names (`plan`, `Context`, `Error`, `reconcile`); only its
// run entrypoint and the pure decision types get top-level exports.
pub use workflow_reconcile::{WorkflowAction, run_workflow};