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 Plan,
31 Operate,
32}
33
34/// Tool-approval posture visible to commands.
35#[derive(Debug, Default, Clone, Copy, PartialEq, Eq)]
36pub enum CommandApprovalMode {
37 Auto,
38 Bypass,
39 #[default]
40 Suggest,
41 Never,
42}
43
44/// Cost currency used by command-facing accounting operations.
45#[derive(Debug, Clone, Copy, PartialEq, Eq)]
46pub enum CommandCurrency {
47 Usd,
48 Cny,
49}