[package]
edition = "2021"
rust-version = "1.86"
name = "yoagent"
version = "0.26.1"
authors = ["Yuanhao <yuanhao@yolog.dev>"]
build = false
exclude = [
"docs/images/*",
"docs/theme/*",
".github/*",
"scripts/*",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "The agent loop for Rust: stream from 7 LLM protocols, run tools, loop until done. Native or wasm32 (Cloudflare Workers)."
homepage = "https://yologdev.github.io/yoagent/"
documentation = "https://docs.rs/yoagent"
readme = "README.md"
keywords = [
"agent",
"llm",
"mcp",
"tool-calling",
"wasm",
]
categories = [
"api-bindings",
"asynchronous",
"development-tools",
"wasm",
"network-programming",
]
license = "MIT"
repository = "https://github.com/yologdev/yoagent"
resolver = "3"
[package.metadata.docs.rs]
all-features = true
rustdoc-args = [
"--cfg",
"docsrs",
]
[features]
decision = []
default = ["native"]
gasp = [
"dep:yoagent-state",
"dep:tracing-subscriber",
]
native = [
"tokio/process",
"tokio/fs",
"reqwest/default",
"reqwest/socks",
]
openapi = [
"dep:openapiv3",
"dep:serde_yaml_ng",
"reqwest/query",
]
[lib]
name = "yoagent"
path = "src/lib.rs"
[[example]]
name = "basic"
path = "examples/basic.rs"
[[example]]
name = "callbacks"
path = "examples/callbacks.rs"
[[example]]
name = "cli"
path = "examples/cli.rs"
required-features = ["native"]
[[example]]
name = "code_review"
path = "examples/code_review.rs"
[[example]]
name = "compaction_sweep"
path = "examples/compaction_sweep/main.rs"
[[example]]
name = "decision"
path = "examples/decision.rs"
required-features = ["decision"]
[[example]]
name = "extension_audit"
path = "examples/extension_audit.rs"
[[example]]
name = "extension_budget"
path = "examples/extension_budget.rs"
[[example]]
name = "extension_policy"
path = "examples/extension_policy.rs"
[[example]]
name = "extension_redact"
path = "examples/extension_redact.rs"
[[example]]
name = "extension_tree"
path = "examples/extension_tree.rs"
[[example]]
name = "extension_verifier"
path = "examples/extension_verifier.rs"
[[example]]
name = "gasp_emit"
path = "examples/gasp_emit.rs"
required-features = ["gasp"]
[[example]]
name = "headroom_sweep"
path = "examples/headroom_sweep.rs"
[[example]]
name = "llm_compaction_live"
path = "examples/llm_compaction_live.rs"
required-features = ["gasp"]
[[example]]
name = "long_horizon"
path = "examples/long_horizon.rs"
[[example]]
name = "persistence"
path = "examples/persistence.rs"
[[example]]
name = "release_smoke"
path = "examples/release_smoke.rs"
[[example]]
name = "rlm"
path = "examples/rlm.rs"
required-features = ["native"]
[[example]]
name = "shared_state"
path = "examples/shared_state.rs"
[[example]]
name = "sub_agent"
path = "examples/sub_agent.rs"
required-features = ["native"]
[[example]]
name = "telemetry"
path = "examples/telemetry.rs"
[[test]]
name = "agent_loop_test"
path = "tests/agent_loop_test.rs"
[[test]]
name = "agent_test"
path = "tests/agent_test.rs"
[[test]]
name = "anthropic_stream_test"
path = "tests/anthropic_stream_test.rs"
[[test]]
name = "azure_openai_test"
path = "tests/azure_openai_test.rs"
[[test]]
name = "bedrock_auth_test"
path = "tests/bedrock_auth_test.rs"
[[test]]
name = "bedrock_stream_test"
path = "tests/bedrock_stream_test.rs"
[[test]]
name = "compaction_reprice_test"
path = "tests/compaction_reprice_test.rs"
[[test]]
name = "compaction_spend_test"
path = "tests/compaction_spend_test.rs"
[[test]]
name = "context_cache_test"
path = "tests/context_cache_test.rs"
required-features = ["native"]
[[test]]
name = "decision_agent_test"
path = "tests/decision_agent_test.rs"
required-features = ["decision"]
[[test]]
name = "decision_calibrate_test"
path = "tests/decision_calibrate_test.rs"
required-features = ["decision"]
[[test]]
name = "decision_clef_test"
path = "tests/decision_clef_test.rs"
required-features = ["decision"]
[[test]]
name = "decision_deprecation_test"
path = "tests/decision_deprecation_test.rs"
required-features = ["decision"]
[[test]]
name = "decision_env_test"
path = "tests/decision_env_test.rs"
required-features = ["decision"]
[[test]]
name = "decision_fallback_test"
path = "tests/decision_fallback_test.rs"
required-features = ["decision"]
[[test]]
name = "decision_guard_test"
path = "tests/decision_guard_test.rs"
required-features = ["decision"]
[[test]]
name = "decision_live"
path = "tests/decision_live.rs"
required-features = ["decision"]
[[test]]
name = "decision_logprobs_test"
path = "tests/decision_logprobs_test.rs"
required-features = ["decision"]
[[test]]
name = "decision_openai_test"
path = "tests/decision_openai_test.rs"
required-features = ["decision"]
[[test]]
name = "decision_price_default_test"
path = "tests/decision_price_default_test.rs"
[[test]]
name = "decision_test"
path = "tests/decision_test.rs"
required-features = ["decision"]
[[test]]
name = "extension_budget_test"
path = "tests/extension_budget_test.rs"
[[test]]
name = "extension_combos_test"
path = "tests/extension_combos_test.rs"
[[test]]
name = "extension_test"
path = "tests/extension_test.rs"
[[test]]
name = "gasp_plugin_log_test"
path = "tests/gasp_plugin_log_test.rs"
[[test]]
name = "gasp_test"
path = "tests/gasp_test.rs"
[[test]]
name = "google_stream_test"
path = "tests/google_stream_test.rs"
[[test]]
name = "hook_order_test"
path = "tests/hook_order_test.rs"
[[test]]
name = "hooks_test"
path = "tests/hooks_test.rs"
[[test]]
name = "integration_anthropic"
path = "tests/integration_anthropic.rs"
required-features = ["native"]
[[test]]
name = "integration_gemini"
path = "tests/integration_gemini.rs"
required-features = ["native"]
[[test]]
name = "integration_openai_responses"
path = "tests/integration_openai_responses.rs"
[[test]]
name = "integration_opencode"
path = "tests/integration_opencode.rs"
[[test]]
name = "mcp_custom_notifications_test"
path = "tests/mcp_custom_notifications_test.rs"
[[test]]
name = "mcp_http_chunking_test"
path = "tests/mcp_http_chunking_test.rs"
[[test]]
name = "mcp_http_streaming_test"
path = "tests/mcp_http_streaming_test.rs"
[[test]]
name = "mcp_http_transport_test"
path = "tests/mcp_http_transport_test.rs"
[[test]]
name = "mcp_prefix_agent_test"
path = "tests/mcp_prefix_agent_test.rs"
[[test]]
name = "mcp_stdio_test"
path = "tests/mcp_stdio_test.rs"
[[test]]
name = "openai_compat_stream_test"
path = "tests/openai_compat_stream_test.rs"
[[test]]
name = "openapi_test"
path = "tests/openapi_test.rs"
[[test]]
name = "prefix_cache_harness"
path = "tests/prefix_cache_harness.rs"
[[test]]
name = "preset_prices_test"
path = "tests/preset_prices_test.rs"
[[test]]
name = "price_audit"
path = "tests/price_audit.rs"
[[test]]
name = "price_default_test"
path = "tests/price_default_test.rs"
[[test]]
name = "price_enable_test"
path = "tests/price_enable_test.rs"
required-features = ["native"]
[[test]]
name = "price_env_bad_test"
path = "tests/price_env_bad_test.rs"
[[test]]
name = "price_env_test"
path = "tests/price_env_test.rs"
[[test]]
name = "price_env_unset_test"
path = "tests/price_env_unset_test.rs"
[[test]]
name = "price_explicit_cost_test"
path = "tests/price_explicit_cost_test.rs"
[[test]]
name = "price_fetch_test"
path = "tests/price_fetch_test.rs"
required-features = ["native"]
[[test]]
name = "price_override_test"
path = "tests/price_override_test.rs"
[[test]]
name = "provider_metadata_guard"
path = "tests/provider_metadata_guard.rs"
[[test]]
name = "reasoning_effort_test"
path = "tests/reasoning_effort_test.rs"
[[test]]
name = "refusal_loop_test"
path = "tests/refusal_loop_test.rs"
[[test]]
name = "responses_rebill_test"
path = "tests/responses_rebill_test.rs"
[[test]]
name = "responses_request_test"
path = "tests/responses_request_test.rs"
[[test]]
name = "responses_stream_test"
path = "tests/responses_stream_test.rs"
[[test]]
name = "retry_safe_test"
path = "tests/retry_safe_test.rs"
[[test]]
name = "sandbox_cwd_test"
path = "tests/sandbox_cwd_test.rs"
[[test]]
name = "search_config_test"
path = "tests/search_config_test.rs"
[[test]]
name = "search_engine_test"
path = "tests/search_engine_test.rs"
[[test]]
name = "serialization_test"
path = "tests/serialization_test.rs"
[[test]]
name = "session_test"
path = "tests/session_test.rs"
[[test]]
name = "shared_state_test"
path = "tests/shared_state_test.rs"
[[test]]
name = "skill_test"
path = "tests/skill_test.rs"
[[test]]
name = "sub_agent_test"
path = "tests/sub_agent_test.rs"
[[test]]
name = "telemetry_test"
path = "tests/telemetry_test.rs"
[[test]]
name = "testing_guide_test"
path = "tests/testing_guide_test.rs"
[[test]]
name = "tool_source_test"
path = "tests/tool_source_test.rs"
[[test]]
name = "tools_test"
path = "tests/tools_test.rs"
required-features = ["native"]
[[test]]
name = "wasm32"
path = "tests/wasm32.rs"
[dependencies.async-trait]
version = "0.1"
[dependencies.base64]
version = "0.22"
[dependencies.futures]
version = "0.3"
[dependencies.hmac]
version = "0.13"
[dependencies.openapiv3]
version = "2"
optional = true
[dependencies.rand]
version = "0.10.0"
[dependencies.reqwest]
version = "0.13"
features = [
"json",
"stream",
]
default-features = false
[dependencies.reqwest-eventsource]
version = "0.6"
package = "kameleoon-reqwest-eventsource"
[dependencies.serde]
version = "1.0.177"
features = ["derive"]
[dependencies.serde_json]
version = "1"
[dependencies.serde_yaml_ng]
version = "0.10"
optional = true
[dependencies.sha2]
version = "0.11"
default-features = false
[dependencies.thiserror]
version = "2"
[dependencies.tokio]
version = "1"
features = [
"rt",
"sync",
"macros",
"time",
"io-util",
]
default-features = false
[dependencies.tokio-stream]
version = "0.1"
[dependencies.tokio-util]
version = "0.7"
[dependencies.tracing]
version = "0.1"
[dependencies.tracing-subscriber]
version = "0.3"
features = ["registry"]
optional = true
default-features = false
[dependencies.uuid]
version = "1"
features = ["v4"]
[dependencies.web-time]
version = "1"
[dependencies.yoagent-state]
version = "0.5"
optional = true
[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies.tempfile]
version = "3"
[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies.tokio]
version = "1"
features = [
"full",
"test-util",
]
[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies.tracing-subscriber]
version = "0.3"
features = [
"registry",
"fmt",
]
[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies.wiremock]
version = "0.6"
[target.'cfg(target_arch = "wasm32")'.dependencies.getrandom_02]
version = "0.2"
features = ["js"]
package = "getrandom"
[target.'cfg(target_arch = "wasm32")'.dependencies.getrandom_04]
version = "0.4"
features = ["wasm_js"]
package = "getrandom"
[target.'cfg(target_arch = "wasm32")'.dependencies.js-sys]
version = "0.3"
[target.'cfg(target_arch = "wasm32")'.dependencies.uuid]
version = "1"
features = [
"v4",
"js",
]
[target.'cfg(target_arch = "wasm32")'.dependencies.wasm-bindgen]
version = "0.2"
[target.'cfg(target_arch = "wasm32")'.dependencies.wasm-bindgen-futures]
version = "0.4"
[target.'cfg(target_arch = "wasm32")'.dev-dependencies.wasm-bindgen-test]
version = "0.3.76"
[target."cfg(unix)".dependencies.libc]
version = "0.2"
[profile.mutants]
opt-level = 1
debug = 0
inherits = "test"