Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 60 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions crates/borg/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,20 @@ default = []
# Exposes `borg::testing::*` (FakeLlmClient, ScriptedAgent, …) so
# consumers can test borg pipelines without re-implementing fakes.
testing = []
# `borg::UsdBudget`: a `Budget` that books real USD via the `llm-budget`
# crate's price table and hard cap, instead of counting tokens.
usd-budget = ["dep:llm-budget", "dep:thiserror"]

[dependencies]
async-stream.workspace = true
async-trait.workspace = true
borg-macros.workspace = true
futures.workspace = true
llm-budget = { version = "0.3", optional = true }
parking_lot.workspace = true
serde.workspace = true
serde_json.workspace = true
thiserror = { workspace = true, optional = true }
tokio.workspace = true
tokio-util.workspace = true
tracing.workspace = true
Expand Down
4 changes: 4 additions & 0 deletions crates/borg/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@
pub mod streaming;
pub mod suspend;
pub mod tools;
#[cfg(feature = "usd-budget")]
pub mod usd_budget;

mod agent;
mod composition;
Expand Down Expand Up @@ -215,9 +217,11 @@
// ── Stable — the API surface external users should depend on ──────────

pub use agent::{BorgAgent, BoxedAgent, Provider};
pub use budget::{

Check warning on line 220 in crates/borg/src/lib.rs

View workflow job for this annotation

GitHub Actions / rustfmt

Diff in /home/runner/work/borg/borg/crates/borg/src/lib.rs
in_memory_budget, sub_budget, Budget, BudgetVerdict, InMemoryBudget, SubBudget, TokenUsage,
};
#[cfg(feature = "usd-budget")]
pub use usd_budget::{UsdBudget, UsdBudgetError, MICRO_USD};
pub use checkpoint::{
composition_fingerprint, CheckpointPolicy, CheckpointStore, InMemoryCheckpointStore, Snapshot,
SNAPSHOT_SCHEMA_VERSION,
Expand Down Expand Up @@ -258,7 +262,7 @@
run_sanitizer, OutputSanitizerPipeline, OutputTransformStage, SanitizerCtx,
};
pub use propagation::{register_carrier, ContextCarrier, TaskLocal};
pub use retry_classify::{FailureClass, ProviderFailure, RetryableError, RETRYABLE_HTTP_STATUS};

Check warning on line 265 in crates/borg/src/lib.rs

View workflow job for this annotation

GitHub Actions / rustfmt

Diff in /home/runner/work/borg/borg/crates/borg/src/lib.rs
pub use scheduled::{Scheduled, SubAgentHandle};
pub use terminal_guard::TerminalGuard;
pub use verdict::Verdict;
Expand Down
Loading
Loading