Skip to main content

codewhale_command_contract/
types.rs

1//! Prototype boundary values used by the command capability shapes.
2//!
3//! These types deliberately do not replace the current TUI-owned production
4//! types in FEAT-014. During the in-place adoption stage, thin TUI adapters
5//! convert between existing application values and these boundary values.
6
7/// Stable provider identity at the command boundary.
8#[derive(Debug, Clone, PartialEq, Eq)]
9pub struct CommandProviderId(pub String);
10
11/// Provider-neutral reasoning preference exposed to commands.
12#[derive(Debug, Default, Clone, Copy, PartialEq, Eq)]
13pub enum CommandReasoningEffort {
14    Off,
15    Minimal,
16    Low,
17    Medium,
18    High,
19    XHigh,
20    Ultra,
21    Auto,
22    #[default]
23    Max,
24}
25
26/// Application mode visible to commands.
27#[derive(Debug, Clone, Copy, PartialEq, Eq)]
28pub enum CommandMode {
29    Agent,
30    Auto,
31    Yolo,
32    Plan,
33    Operate,
34}
35
36/// Tool-approval posture visible to commands.
37#[derive(Debug, Default, Clone, Copy, PartialEq, Eq)]
38pub enum CommandApprovalMode {
39    Auto,
40    Bypass,
41    #[default]
42    Suggest,
43    Never,
44}
45
46/// Cost currency used by command-facing accounting operations.
47#[derive(Debug, Clone, Copy, PartialEq, Eq)]
48pub enum CommandCurrency {
49    Usd,
50    Cny,
51}