Skip to main content

humanize_cli_core/
constants.rs

1//! Constants used throughout the Humanize plugin.
2
3/// Environment variable for the project directory.
4pub const ENV_CLAUDE_PROJECT_DIR: &str = "CLAUDE_PROJECT_DIR";
5
6/// Environment variable to bypass Codex sandbox (dangerous).
7pub const ENV_CODEX_BYPASS_SANDBOX: &str = "HUMANIZE_CODEX_BYPASS_SANDBOX";
8
9/// Default maximum iterations for RLCR loops.
10pub const DEFAULT_MAX_ITERATIONS: u32 = 42;
11
12/// Default Codex model.
13pub const DEFAULT_CODEX_MODEL: &str = "gpt-5.4";
14
15/// Default Codex effort level.
16pub const DEFAULT_CODEX_EFFORT: &str = "xhigh";
17
18/// Default Codex timeout in seconds.
19pub const DEFAULT_CODEX_TIMEOUT_SECS: u64 = 5400;
20
21/// State file names.
22pub mod state_files {
23    pub const STATE_MD: &str = "state.md";
24    pub const FINALIZE_STATE_MD: &str = "finalize-state.md";
25    pub const COMPLETE_STATE_MD: &str = "complete-state.md";
26    pub const CANCEL_STATE_MD: &str = "cancel-state.md";
27    pub const STOP_STATE_MD: &str = "stop-state.md";
28    pub const MAXITER_STATE_MD: &str = "maxiter-state.md";
29    pub const UNEXPECTED_STATE_MD: &str = "unexpected-state.md";
30    pub const APPROVE_STATE_MD: &str = "approve-state.md";
31    pub const MERGED_STATE_MD: &str = "merged-state.md";
32    pub const CLOSED_STATE_MD: &str = "closed-state.md";
33}
34
35/// Signal files for session handshake.
36pub mod signal_files {
37    pub const PENDING_SESSION_ID: &str = ".pending-session-id";
38}
39
40/// YAML frontmatter delimiters.
41pub const YAML_FRONTMATTER_START: &str = "---";
42pub const YAML_FRONTMATTER_END: &str = "---";
43
44/// Maximum JSON nesting depth allowed.
45pub const MAX_JSON_DEPTH: usize = 30;
46
47/// Terminal state file names for RLCR loops.
48pub const RLCR_TERMINAL_STATES: &[&str] = &[
49    "complete-state.md",
50    "stop-state.md",
51    "maxiter-state.md",
52    "unexpected-state.md",
53    "cancel-state.md",
54];
55
56/// Terminal state file names for PR loops.
57pub const PR_TERMINAL_STATES: &[&str] = &[
58    "approve-state.md",
59    "maxiter-state.md",
60    "merged-state.md",
61    "closed-state.md",
62    "cancel-state.md",
63];