Skip to main content

beam_core/
lib.rs

1pub mod api;
2pub mod api_token;
3pub mod ask;
4pub mod cli_specs;
5pub mod config;
6pub mod i18n;
7pub mod ipc;
8pub mod logging;
9pub mod paths;
10pub mod permissions;
11pub mod persist;
12pub mod schedule_parser;
13pub mod schedule_store;
14pub mod session;
15pub mod triggers;
16pub mod workflow;
17pub mod workflow_actions;
18pub mod workflow_binding;
19pub mod workflow_cold_scan;
20pub mod workflow_definition;
21pub mod workflow_orchestrator;
22pub mod workflow_output;
23pub mod workflow_projection;
24pub mod workflow_resume;
25pub mod workflow_run;
26pub mod workflow_runtime;
27pub mod workflow_sidecar;
28pub mod workflow_snapshot;
29
30/// Default terminal columns used by beam when creating zellij sessions
31/// and for reset-to-default resize operations (reference: botmux 160×50).
32pub const DEFAULT_TERMINAL_COLS: u16 = 160;
33
34/// Default terminal rows used by beam when creating zellij sessions
35/// and for reset-to-default resize operations.
36pub const DEFAULT_TERMINAL_ROWS: u16 = 50;
37
38pub use api::{
39    ApiHealth, AttemptResumeEndResponse, AttemptResumeRequest, AttemptResumeStartResponse,
40    AttentionRequest, BotSummary, CreateSessionRequest, DaemonOverview, DaemonRuntimeState,
41    FinalOutputRequest, MentionTarget, RestartSessionRequest, ResumeSessionRequest, SessionGroup,
42    SessionInputRequest, SessionLocateInfo, SessionSummary, TerminalInfo,
43};
44pub use ask::{AskOption, AskQuestion, AskRequest, AskResult, legacy_selected};
45pub use cli_specs::{CLI_SPECS, CliSpec, cli_spec};
46pub use config::{
47    BotConfig, Config, CustomTrigger, DaemonConfig, LarkConfig, MessageQuotaConfig,
48    OncallChatBinding, QuotaEntry, ScreenAnalyzerConfig, WebConfig,
49};
50pub use ipc::{
51    CliUsageLimitKind, CliUsageLimitState, DaemonToWorker, DisplayMode, FinalOutputKind,
52    InitConfig, ScreenStatus, TermActionKey, TranscriptChoice, TuiPromptOption, WorkerToDaemon,
53};
54pub use paths::BeamPaths;
55pub use permissions::{
56    TalkEvaluation, TalkReason, can_operate, evaluate_talk, get_owner_open_id, grant_restricted,
57    is_owner,
58};
59pub use schedule_parser::{ParsedNaturalSchedule, parse_natural_schedule, parse_schedule};
60pub use schedule_store::{
61    CreateTaskInput, ParsedSchedule, ParsedScheduleKind, ScheduleChatType, ScheduleDeliver,
62    ScheduleRepeat, ScheduleStoreError, ScheduleTaskUpdate, ScheduledTask, append_output_log,
63    create_task, get_task, list_tasks, mark_run, remove_task, update_task,
64};
65pub use session::{
66    AdoptedFrom, AgentAttention, ChatMode, PendingResponseCardState, Session, SessionScope,
67    SessionStatus,
68};
69pub use triggers::{custom_trigger_rest, resolve_custom_trigger, resolve_trigger_message};
70pub use workflow::{EventDraft, EventLog, WorkflowActor, WorkflowEventEnvelope};
71pub use workflow_actions::{
72    CompleteActivityCancelInput, CompleteNodeCancelInput, CompleteRunCancelInput, CreateWaitInput,
73    DeliverCancelInput, ExpireWaitInput, RequestCancelInput, ResolveWaitInput, WaitKind,
74    WaitOnTimeout, WaitResolution, complete_activity_cancel, complete_node_cancel,
75    complete_run_cancel, create_wait, deliver_cancel, expire_wait, request_cancel, resolve_wait,
76};
77pub use workflow_binding::{
78    BindingContext, BindingError, LoopContext, resolve_bindings, resolve_bound_string,
79};
80pub use workflow_cold_scan::{ColdScanStats, ColdWorkflowRun, scan_cold_workflow_runs};
81pub use workflow_definition::{
82    DecisionNode, HostExecutorNode, HumanGate, LoopNode, LoopOutputProjection, LoopTerminate,
83    ParamDef, RetryPolicy, SubagentNode, WorkflowDefaults, WorkflowDefinition, WorkflowNode,
84    parse_workflow_definition,
85};
86pub use workflow_orchestrator::{OrchestratorAction, decide_next_actions, topological_order};
87pub use workflow_output::{
88    WORKFLOW_OUTPUT_BEGIN, WORKFLOW_OUTPUT_END, parse_workflow_output,
89    with_workflow_output_protocol,
90};
91pub use workflow_projection::{
92    EventWindow, EventWindowOpts, event_seq_from_id, infer_run_status, read_event_window,
93    read_run_events_pure,
94};
95pub use workflow_resume::{
96    PriorReconcileRecoveryOutcome, ScheduleResumeOutcome, ScheduleResumeResult,
97    recover_prior_reconcile_result, resume_schedule_dangling_effects,
98};
99pub use workflow_run::{
100    BootstrapWorkflowRunInput, RunChatBinding, WorkflowOutputRef, WorkflowRunBootstrap,
101    bootstrap_workflow_run, mint_workflow_run_id, normalize_workflow_params,
102};
103pub use workflow_runtime::{
104    HostExecutorPrepareResult, RecoveryResult, RunLoopResult, RunLoopStopReason, RunTickResult,
105    WorkflowDispatchOutcome, WorkflowDispatchRun, WorkflowDispatchSession, WorkflowExecutionHooks,
106    WorkflowRuntimeContext, complete_node_failed, complete_node_succeeded, complete_run_failed,
107    complete_run_succeeded, derive_workflow_idempotency_key, dispatch_gate, dispatch_work,
108    finish_loop, finish_loop_iteration, get_host_executor_provider_meta, run_loop, run_tick,
109    start_loop, start_loop_iteration,
110};
111pub use workflow_sidecar::{load_effect_input_sidecar, write_effect_input_sidecar};
112pub use workflow_snapshot::{
113    ActivityState, ActivityStatus, AttemptIODTO, AttemptState, AttemptTerminalDTO, BlobPreviewDTO,
114    BotSnapshot, CancelIntent, DanglingSnapshot, EffectAttemptedState, LoopIterationState,
115    LoopIterationStatus, LoopSnapshotDTO, LoopState, LoopStatus, NodeState, NodeStatus,
116    ReconcileResultState, RunSnapshotDTO, RunState, RunStatus, WaitResolutionState, WaitState,
117    read_run_snapshot,
118};