mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-09-20 00:11:34 +00:00
This PR extracts a new `fabro-model` crate from `fabro-llm`, isolating
the model catalog, provider identity types, and model metadata into a
focused, lightweight package. The new crate contains `Provider`,
`ModelId`, `ModelInfo` (and related structs), and the full catalog API
(`get_model_info`, `list_models`, `default_model_from_env`,
`build_fallback_chain`, etc.) — with only `serde` and `serde_json` as
runtime dependencies, no async runtime required.
The extraction follows a clean boundary: `fabro-llm` now depends on
`fabro-model` and re-exports `Provider` and `ModelId` at its root so
existing `fabro_llm::Provider` usage remains valid without a migration.
The `ProviderAdapter` trait, `StreamEventStream`, and
`validate_tool_choice` stay in `fabro-llm` since they depend on async
streaming types. All seven consumer crates (`fabro-agent`, `fabro-api`,
`fabro-cli`, `fabro-hooks`, `fabro-workflows`, `fabro-validate`, and
`fabro-llm` itself) are updated to import catalog functions and provider
types directly from `fabro_model` rather than `fabro_llm::catalog` or
`fabro_llm::provider`.
The most impactful dependency reduction is in `fabro-validate`, which
previously pulled in all of `fabro-llm` (tokio, reqwest, the full async
runtime) just to perform catalog lookups and validate provider names. It
now depends solely on `fabro-model`, eliminating that heavyweight
transitive closure. All other consumers retain their `fabro-llm`
dependency for client and streaming functionality, but gain a precise
import path for catalog and identity concerns.
### Fabro Details
<details>
<summary>Ran 9 stages in 21m 16s for $5.47</summary>
| Stage | Duration | Cost | Retries |
|---|---|---|---|
| start | 0s | – | 0 |
| toolchain | 0s | – | 0 |
| preflight_compile | 1m 10s | – | 0 |
| preflight_lint | 12s | – | 0 |
| implement | 13m 29s | $3.81 | 1 |
| simplify_opus | 5m 41s | $1.66 | 0 |
| simplify_gpt | 0s | – | 0 |
| verify | 15s | – | 0 |
| fmt | 1s | – | 0 |
| **Total** | **21m 16s** | **$5.47** | **1** |
</details>
<details>
<summary>Ran <code>ImplementAndSimplify.fabro</code> (12 nodes and 15
edges)</summary>
```dot
digraph ImplementAndSimplify {
graph [
goal="Implement and simplify",
model_stylesheet="
* { backend: api; model: claude-opus-4-6;}
"
]
rankdir=LR
start [shape=Mdiamond, label="Start"]
exit [shape=Msquare, label="Exit"]
toolchain [label="Toolchain", shape=parallelogram, script="command -v cargo >/dev/null || { curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && sudo ln -sf $HOME/.cargo/bin/* /usr/local/bin/; }; cargo --version 2>&1", max_retries=0]
preflight_compile [label="Preflight Compile", shape=parallelogram, script="cargo check -q --workspace 2>&1", max_retries=0]
preflight_lint [label="Preflight Lint", shape=parallelogram, script="cargo clippy -q --workspace -- -D warnings 2>&1", max_retries=0]
fix_lints [label="Fix Lints", prompt="The preflight lint step failed. Read the build output from context and fix all clippy lint warnings.", max_visits=3]
implement [label="Implement", prompt="Read the plan file referenced in the goal and implement every step. Make all the code changes described in the plan. Use red/green TDD."]
simplify_opus [label="Simplify (Opus)", prompt="@prompts/simplify.md"]
simplify_gpt [label="Simplify (GPT-54)", prompt="@prompts/simplify.md", model="gpt-54"]
verify [label="Verify", shape=parallelogram, script="cargo clippy -q --workspace -- -D warnings 2>&1 && cargo nextest run --cargo-quiet --workspace --status-level fail 2>&1", goal_gate=true, retry_target="fixup"]
fixup [label="Fixup", prompt="The verify step failed. Read the build output from context and fix all clippy lint warnings and test failures.", max_visits=3]
fmt [label="Format", shape=parallelogram, script="cargo fmt --all 2>&1", max_retries=0]
start -> toolchain
toolchain -> preflight_compile [condition="outcome=success"]
toolchain -> exit
preflight_compile -> preflight_lint [condition="outcome=success"]
preflight_compile -> exit
preflight_lint -> implement [condition="outcome=success"]
preflight_lint -> fix_lints
fix_lints -> preflight_lint
implement -> simplify_opus -> simplify_gpt -> verify
verify -> fmt [condition="outcome=success"]
verify -> fixup
fixup -> verify
fmt -> exit
}
```
</details>
⚒️ Generated with [Fabro](https://fabro.sh)
---------
Co-authored-by: Fabro <noreply@fabro.sh>
91 lines
No EOL
2.5 KiB
TOML
91 lines
No EOL
2.5 KiB
TOML
[package]
|
|
name = "fabro-cli"
|
|
edition.workspace = true
|
|
version.workspace = true
|
|
license.workspace = true
|
|
description = "Unified CLI for the Fabro AI framework"
|
|
|
|
[[bin]]
|
|
name = "fabro"
|
|
path = "src/main.rs"
|
|
|
|
[features]
|
|
default = []
|
|
server = ["dep:fabro-api"]
|
|
exedev = ["fabro-sandbox/exe", "fabro-config/exedev", "fabro-workflows/exedev"]
|
|
sleep_inhibitor = ["dep:fabro-beastie"]
|
|
|
|
[dependencies]
|
|
fabro-config = { path = "../fabro-config" }
|
|
fabro-llm = { path = "../fabro-llm" }
|
|
fabro-model = { path = "../fabro-model" }
|
|
fabro-openai-oauth = { path = "../fabro-openai-oauth" }
|
|
fabro-github = { path = "../fabro-github" }
|
|
fabro-agent = { path = "../fabro-agent" }
|
|
fabro-devcontainer = { path = "../fabro-devcontainer" }
|
|
fabro-hooks = { path = "../fabro-hooks" }
|
|
fabro-interview = { path = "../fabro-interview" }
|
|
fabro-mcp = { path = "../fabro-mcp" }
|
|
fabro-retro = { path = "../fabro-retro" }
|
|
fabro-sandbox = { path = "../fabro-sandbox", features = ["ssh", "daytona"] }
|
|
fabro-git-storage = { path = "../fabro-git-storage" }
|
|
fabro-graphviz = { path = "../fabro-graphviz" }
|
|
fabro-validate = { path = "../fabro-validate" }
|
|
fabro-workflows = { path = "../fabro-workflows" }
|
|
fabro-api = { path = "../fabro-api", optional = true }
|
|
fabro-beastie = { path = "../fabro-beastie", optional = true }
|
|
fabro-telemetry = { path = "../fabro-telemetry" }
|
|
fabro-util = { path = "../fabro-util" }
|
|
clap.workspace = true
|
|
cli-table.workspace = true
|
|
console.workspace = true
|
|
indicatif.workspace = true
|
|
daytona-sdk.workspace = true
|
|
anyhow.workspace = true
|
|
dotenvy.workspace = true
|
|
tokio.workspace = true
|
|
tracing.workspace = true
|
|
tracing-subscriber.workspace = true
|
|
tracing-appender.workspace = true
|
|
chrono.workspace = true
|
|
dirs.workspace = true
|
|
serde.workspace = true
|
|
toml.workspace = true
|
|
futures.workspace = true
|
|
regex.workspace = true
|
|
semver.workspace = true
|
|
reqwest.workspace = true
|
|
async-trait.workspace = true
|
|
jsonwebtoken.workspace = true
|
|
base64.workspace = true
|
|
ulid.workspace = true
|
|
scopeguard = "1"
|
|
rustls = { version = "0.23", default-features = false, features = ["std", "ring"] }
|
|
rustls-pemfile = "2"
|
|
x509-parser = "0.16"
|
|
rand.workspace = true
|
|
dialoguer.workspace = true
|
|
git2.workspace = true
|
|
axum = "0.8"
|
|
open = "5"
|
|
serde_json.workspace = true
|
|
tempfile = "3"
|
|
sha2.workspace = true
|
|
shlex = "1"
|
|
walkdir.workspace = true
|
|
|
|
[target.'cfg(unix)'.dependencies]
|
|
libc = "0.2"
|
|
|
|
[build-dependencies]
|
|
chrono = { workspace = true }
|
|
|
|
[dev-dependencies]
|
|
assert_cmd = "2"
|
|
insta = { workspace = true }
|
|
paste = "1"
|
|
predicates = "3"
|
|
serde_json.workspace = true
|
|
tempfile = "3"
|
|
httpmock = "0.8"
|
|
trycmd = "0.15" |