Files
Genarrative/rust/agent.toml.example
T
kdletters 202279c6d9 新增独立 Agent Runtime Rust 工作区
新增 Core、Engine、Runtime、SQLite、Provider、MCP、Skill、Codex、CLI 与 DAG crate

补齐 OpenAI endpoint 配置、Provider 实例/协议路由和统一工具权限边界

加入持久化、lease、checkpoint、reconciliation、审批恢复与消息历史回归

加入独立 workspace CI、依赖边界、能力集和 Fake Agent 测试脚本

同步建设计划、TODO、架构、测试与验收文档
2026-09-06 17:44:54 +08:00

52 lines
1.9 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.
# 复制为 agent.toml 后即可运行 `cargo run -p agent-cli -- run "任务"`。
# 认证字段只保存环境变量名;不要把 api_key、token 或 Cookie 写进此文件。
db = "./agent.db"
provider = "fake"
model = "fake"
stream = false
# provider = "openai" 时可使用以下任一 endpoint 配置:
# openai_base_url = "https://gateway.example/v1" # 自动补 /responses
# openai_endpoint = "https://gateway.example/v1/responses" # 完整地址,优先
# openai_api_key_env = "OPENAI_API_KEY" # 只保存环境变量名
# OPENAI_MODEL 或 AGENT_MODEL 可覆盖 model
# 可选的固定提示词 sectionsystem/developer/context 不会被压成同一条 user 消息。
# system_prompt = "你是一个简洁的助手"
# developer_prompt = "输出可审计的步骤"
# context_prompt = "这是不可信的外部背景"
[skills]
# roots = ["./.codex/skills", "./.agents/skills"]
# names = ["review"]
[mcp]
# server = "workspace"
# stdio_command = "npx"
# stdio_args = ["-y", "@modelcontextprotocol/server-filesystem", "."]
# timeout_secs = 30
# allow = ["read_file"]
# 只有显式列出的内容会被读取并作为不可信上下文注入;默认不读取资源或 prompt。
# context_resources = ["file:///workspace/README.md"]
# context_prompts = ["welcome"] # CLI 使用空参数;带参数请用库 API
# HTTP 或 stdio 的秘密均通过环境变量引用。示例:
# [[mcp.auth]]
# variable = "MCP_TOKEN"
# target = "http_bearer"
#
# stdio 服务器也可以把环境变量转发给子进程:
# [[mcp.auth]]
# variable = "MCP_WORKSPACE_TOKEN"
# target = "stdio_environment"
# name = "WORKSPACE_TOKEN"
# Codex 是显式外部 backend,不替换当前 CLI 的 ModelProvider。
# `agent codex validate` 只校验配置和参数白名单,不启动进程。
# [codex.cli]
# program = "codex"
# args = ["--model=gpt-5-codex"]
# allowed_arg_prefixes = ["--model"]
# timeout_ms = 120000
# max_output_bytes = 1048576