Files
agcore/Cargo.toml
T
徐涛 eeae943727
CI / test (chat,provider-openai) (push) Has been cancelled
CI / test (chat,provider-openai,provider-openai-response) (push) Has been cancelled
CI / test (chat,provider-openai,tools-mcp) (push) Has been cancelled
CI / test (full) (push) Has been cancelled
CI / test (light) (push) Has been cancelled
CI / test (multi,provider-openai) (push) Has been cancelled
CI / test (multi,provider-openai,tools-mcp) (push) Has been cancelled
CI / clippy (push) Has been cancelled
CI / fmt (push) Has been cancelled
CI / examples (push) Has been cancelled
fix(core): 升级 Cargo.toml 版本号到 v0.3.5
2026-07-20 16:47:38 +08:00

157 lines
4.7 KiB
TOML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
[package]
name = "agcore"
version = "0.3.5"
edition = "2024"
[features]
default = ["full"]
# === 模块级 features ===
document = []
llm-types = []
prompt = ["llm-types"]
llm = ["llm-types", "tokio", "async-stream", "futures-core", "futures-util", "tokio-stream"]
tools = ["llm-types", "futures", "tokio-util", "tokio"]
tools-mcp = ["tools", "reqwest"]
# memory 模块依赖 llmconversation/vector_store 使用 compact/embedding)、tokioknowledge.rs 使用 Mutex)、timetypes.rs 使用 OffsetDateTime
memory = ["document", "llm", "tokio", "time"]
memory-sqlite = ["memory", "rusqlite", "time"]
agent = ["llm", "tools", "memory", "futures-util"]
engine = ["agent"]
# === Provider features ===
# Provider features — openai/anthropic/openai-response 额外依赖 bytes(流式解析)和 futures-utilStream 组合)
provider-openai = ["llm", "reqwest", "bytes", "futures-util"]
provider-anthropic = ["llm", "reqwest", "bytes", "futures-util"]
# OpenAI Response APIPOST /responses)—— 与 Chat Completions 协议独立,独立 feature
provider-openai-response = ["llm", "reqwest", "bytes", "futures-util"]
# deepseek/qwen 使用 openai_compat 适配层,不需要 bytes 和 futures-util
provider-deepseek = ["llm", "reqwest"]
provider-qwen = ["llm", "reqwest"]
provider-ollama = ["llm", "reqwest"]
# === 工具 features ===
tracing-init = ["tracing-subscriber"]
# === 快捷组合 ===
full = [
"document", "llm-types", "prompt", "llm",
"tools", "tools-mcp",
"memory", "memory-sqlite",
"agent", "engine",
"provider-openai", "provider-anthropic", "provider-openai-response",
"provider-deepseek", "provider-qwen", "provider-ollama",
"tracing-init",
]
light = ["llm", "provider-openai", "tools", "tools-mcp", "memory", "agent", "engine", "prompt", "document"]
chat = ["agent", "provider-openai"]
multi = ["engine", "provider-openai"]
[dependencies]
# 始终编译的轻量依赖(5 个,不参与门控)
serde = { version = "1", features = ["derive"] }
serde_json = "1"
thiserror = "2"
async-trait = "0.1"
tracing = "0.1"
# 12 个重型依赖(全部 optional
tokio = { version = "1", features = ["rt", "rt-multi-thread", "sync", "time", "macros", "process", "io-util"], optional = true }
reqwest = { version = "0.12", features = ["json", "stream"], optional = true }
rusqlite = { version = "0.32", features = ["bundled"], optional = true }
tracing-subscriber = { version = "0.3", features = ["env-filter"], optional = true }
tokio-stream = { version = "0.1", optional = true }
futures = { version = "0.3", optional = true }
futures-util = { version = "0.3", optional = true }
futures-core = { version = "0.3", optional = true }
bytes = { version = "1", optional = true }
async-stream = { version = "0.3", optional = true }
tokio-util = { version = "0.7", features = ["rt"], optional = true }
time = { version = "0.3", features = ["serde", "parsing", "formatting", "macros"], optional = true }
[dev-dependencies]
tokio = { version = "1", features = ["rt", "rt-multi-thread", "macros"] }
dotenvy = "0.15.7"
wiremock = "0.6"
temp-env = "0.3"
tempfile = "3"
# === Examples required-features ===
# 每个 example 声明最小 feature 集合,`cargo test --features "full"` 时全部编译;
# 其他组合下不兼容的 example 自动跳过。
[[example]]
name = "prompt_composer"
required-features = ["prompt", "llm"]
[[example]]
name = "custom_tool"
required-features = ["tools", "llm"]
[[example]]
name = "conversation_memory_demo"
required-features = ["memory"]
[[example]]
name = "knowledge_graph_demo"
required-features = ["memory"]
[[example]]
name = "knowledge_search_demo"
required-features = ["memory"]
[[example]]
name = "agent_session_demo"
required-features = ["agent"]
[[example]]
name = "task_agent_demo"
required-features = ["agent"]
[[example]]
name = "context_slot_demo"
required-features = ["agent"]
[[example]]
name = "quick_start"
required-features = ["agent"]
[[example]]
name = "simple_visit"
required-features = ["llm", "provider-openai", "tracing-init"]
[[example]]
name = "streaming_events_demo"
required-features = ["llm", "provider-openai"]
[[example]]
name = "agent_switch_demo"
required-features = ["engine"]
[[example]]
name = "bridge_keys_demo"
required-features = ["engine"]
[[example]]
name = "dispatch_stream_demo"
required-features = ["engine"]
[[example]]
name = "engine_demo"
required-features = ["engine"]
[[example]]
name = "sub_agent_dispatch_demo"
required-features = ["engine"]
[[example]]
name = "document_demo"
required-features = ["memory", "tracing-init"]
[[example]]
name = "end_to_end"
required-features = ["agent", "memory-sqlite", "provider-openai"]
[[example]]
name = "response_api_demo"
required-features = ["llm", "provider-openai-response"]