cueloop 0.5.0

A Rust CLI for managing AI agent loops with a structured JSON task queue
Documentation
//! Contracts module for CueLoop configuration and queue/task JSON structures.
//!
//! Purpose:
//! - Contracts module for CueLoop configuration and queue/task JSON structures.
//!
//! Responsibilities:
//! - Own the canonical data models for config, queue, and task contracts.
//! - Re-export the public contract types for crate-wide access.
//!
//! Not handled here:
//! - Queue persistence and IO (see `crate::queue`).
//! - CLI argument parsing or command behavior (see `crate::cli`).
//!
//!
//! Usage:
//! - Used through the crate module tree or integration test harness.
//!
//! Invariants/assumptions:
//! - Public contract types remain stable and are re-exported from this module.
//! - Serde/schemars attributes define the wire contract and must not drift.

#![allow(clippy::struct_excessive_bools)]

mod blocking;
mod cli_spec;
mod config;
mod machine;
mod model;
mod queue;
mod runner;
mod session;
mod task;

// Re-exports from config module (core config types)
// All config types are now re-exported from config::mod.rs for backward compatibility
pub use config::{
    AgentConfig, CiGateConfig, Config, GitPublishMode, GitRevertMode, LoopConfig,
    NotificationConfig, ParallelConfig, PhaseOverrideConfig, PhaseOverrides, PluginConfig,
    PluginsConfig, ProjectType, QueueAgingThresholds, QueueConfig, RunnerRetryConfig,
    ScanPromptVersion, WebhookConfig, WebhookEventSubscription, WebhookQueuePolicy,
};
pub(crate) use config::{
    builtin_profile, builtin_profile_names, is_reserved_profile_name,
    validate_webhook_destination_url, validate_webhook_settings,
};

// Re-exports from blocking module (operator-facing stalled/waiting state)
pub use blocking::{BlockingReason, BlockingState, BlockingStatus};

// Re-exports from machine module (versioned app/CLI machine surfaces)
pub use machine::{
    MACHINE_CLI_SPEC_VERSION, MACHINE_CONFIG_RESOLVE_VERSION, MACHINE_DASHBOARD_READ_VERSION,
    MACHINE_DECOMPOSE_VERSION, MACHINE_DOCTOR_REPORT_VERSION, MACHINE_ERROR_VERSION,
    MACHINE_GRAPH_READ_VERSION, MACHINE_PARALLEL_STATUS_VERSION, MACHINE_QUEUE_READ_VERSION,
    MACHINE_QUEUE_REPAIR_VERSION, MACHINE_QUEUE_UNDO_VERSION, MACHINE_QUEUE_UNLOCK_INSPECT_VERSION,
    MACHINE_QUEUE_VALIDATE_VERSION, MACHINE_RUN_EVENT_VERSION, MACHINE_RUN_STOP_VERSION,
    MACHINE_RUN_SUMMARY_VERSION, MACHINE_SYSTEM_INFO_VERSION, MACHINE_TASK_BUILD_VERSION,
    MACHINE_TASK_CREATE_VERSION, MACHINE_TASK_MUTATION_VERSION, MACHINE_WORKSPACE_OVERVIEW_VERSION,
    MachineCliSpecDocument, MachineConfigResolveDocument, MachineConfigSafetySummary,
    MachineContinuationAction, MachineContinuationSummary, MachineDashboardReadDocument,
    MachineDecomposeDocument, MachineDoctorReportDocument, MachineErrorCode, MachineErrorDocument,
    MachineExecutionControlDiagnostic, MachineExecutionControlDiagnosticCode,
    MachineExecutionControlDiagnosticSeverity, MachineExecutionControls, MachineGraphReadDocument,
    MachineParallelLifecycleCounts, MachineParallelStatusDocument, MachineParallelWorkersControl,
    MachineQueuePaths, MachineQueueReadDocument, MachineQueueRepairDocument,
    MachineQueueUndoDocument, MachineQueueUnlockCondition, MachineQueueUnlockInspectDocument,
    MachineQueueValidateDocument, MachineResumeDecision, MachineRunEventEnvelope,
    MachineRunEventKind, MachineRunStopAction, MachineRunStopDocument, MachineRunStopMarker,
    MachineRunSummaryDocument, MachineRunnerOption, MachineSystemInfoDocument,
    MachineTaskBuildDocument, MachineTaskBuildRequest, MachineTaskBuildResult,
    MachineTaskCreateDocument, MachineTaskCreateRequest, MachineTaskMutationDocument,
    MachineValidationWarning, MachineWorkspaceOverviewDocument,
};

// Re-exports from cli_spec module (versioned; suitable for tooling consumption)
pub use cli_spec::{ArgSpec, CLI_SPEC_VERSION, CliSpec, CommandSpec};

// Re-exports from model module (model types)
pub use model::{Model, ModelEffort, ReasoningEffort};

// Re-exports from queue module
pub use queue::QueueFile;

// Re-exports from runner module (runner types)
pub use runner::{
    ClaudePermissionMode, Runner, RunnerApprovalMode, RunnerCliConfigRoot, RunnerCliOptionsPatch,
    RunnerOutputFormat, RunnerPlanMode, RunnerSandboxMode, RunnerVerbosity,
    UnsupportedOptionPolicy,
};

// Re-exports from session module
pub use session::{PhaseSettingsSnapshot, SessionState};

// Re-export SESSION_STATE_VERSION from constants for backward compatibility
pub use crate::constants::versions::SESSION_STATE_VERSION;

// Re-exports from task module
pub use task::{
    TASK_INSERT_VERSION, Task, TaskAgent, TaskInsertCreatedTask, TaskInsertDocument,
    TaskInsertRequest, TaskInsertSpec, TaskKind, TaskPriority, TaskStatus,
};