1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
//! `ubl-office` — The Agent Runtime (Wake · Work · Dream)
//!
//! Run agents like reliable services, not fragile notebooks.
//!
//! `ubl-office` is the execution environment for LogLine agents. It coordinates
//! thinking (TDLN), acting (MCP tools), memory, and policy (Gate) under one tight loop.
//! No root access, no mystery state, no shrug emojis.
//!
//! # What it does (in one screen)
//!
//! - **Boot**: load identity/constitution, attach transports, warm caches
//! - **Orient**: build a typed `CognitiveContext` (system directive, recall, constraints)
//! - **Decide**: call `tdln-brain` to produce a strict `SemanticUnit` (TDLN AST)
//! - **Gate**: run `tdln-gate` → Permit | Deny | Challenge
//! - **Act**: execute via `ubl-mcp` (MCP tools)
//! - **Dream**: consolidate short-term into durable memory; compact context; keep it fresh
//! - **Repeat**, with backpressure, watchdog timers, exponential backoff on failure
//!
//! # Mental Model
//!
//! ```text
//! ┌────────────┐ prepares ┌──────────────┐ thinks ┌──────────────┐ acts ┌──────────────┐
//! │ Narrator ├────────────▶│ ContextFrame ├──────────▶│ tdln-brain ├──────────▶│ ubl-mcp/tools│
//! └────┬───────┘ └──────┬───────┘ └──────┬───────┘ └──────┬───────┘
//! │ │ │ │
//! │ recall │ handover │ decision │ receipts
//! ▼ ▼ ▼ ▼
//! ┌────────────┐ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐
//! │ Memory │◀─────────────│ UBL Ledger │◀─────────▶│ TDLN Gate │ │ UBL Ledger │
//! └────────────┘ └──────────────┘ └──────────────┘ └──────────────┘
//! ```
//!
//! # Example
//!
//! ```rust,no_run
//! use ubl_office::{Office, OfficeConfig, OfficeState, SessionType, SessionMode};
//!
//! let config = OfficeConfig {
//! session_type: SessionType::Work,
//! session_mode: SessionMode::Commitment,
//! ..Default::default()
//! };
//! // Office::new(config, brain) to start
//! ```
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;