-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
60 lines (47 loc) · 3.15 KB
/
Copy path.env.example
File metadata and controls
60 lines (47 loc) · 3.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# ===== 飞虹 Code 配置示例(复制为 .env 后填写,切勿提交真实密钥)=====
# 应用
FH_HOME=~/.feihong-code
FH_LOG_DIR=~/.feihong-code/sessions
# 模型路由(多供应商,JSON 数组)
# 每个 provider: { id, type:"openai-compatible"|"ollama", baseURL, apiKey, tags:[], costPer1k }
FH_PROVIDERS='[
{"id":"deepseek","type":"openai-compatible","baseURL":"https://api.deepseek.com/v1","apiKey":"","tags":["code-gen","cheap"],"costPer1k":0.0001},
{"id":"qwen","type":"openai-compatible","baseURL":"https://dashscope.aliyuncs.com/compatible-mode/v1","apiKey":"","tags":["code-gen","long-context"],"costPer1k":0.0002},
{"id":"ollama","type":"ollama","baseURL":"http://localhost:11434","apiKey":"","tags":["code-gen","local"],"costPer1k":0}
]'
FH_MODEL_STRATEGY=cost # cost | capability | latency
FH_BUDGET_USD=0.5 # 单任务预算上限(美元)
# 安全
FH_SHELL_ALLOW=git,npm,pnpm,node,ls,cat # shell 白名单(逗号分隔)
FH_REQUIRE_APPROVAL=true
# P0-2 沙箱三模式(Codex 对齐):
# read-only 只读勘察(禁写禁执行)
# workspace-write 工作区可写(默认,shell 受白名单+审批)
# danger-full-access 全权限(绕过写限制与审批,危险命令黑名单仍生效)
FH_SANDBOX_MODE=workspace-write
# P0-2 网络域名规则(作用于 run_shell 命令中的 http(s) 目标)
FH_NETWORK_DENY=evil.example.com # 命中即拦截(任意模式生效)
# FH_NETWORK_ALLOW=api.example.com # 配置后未命中即拦截(workspace-write 生效)
# P0-3 MCP 外部工具(JSON 数组: { name, command, args[], cwd?, env?, initTimeoutMs?, callTimeoutMs? })
# FH_MCP_SERVERS='[{"name":"github","command":"npx","args":["-y","github-mcp-server"]}]'
# 运行参数
# FHCODE_LANG=en # 界面语言(zh | en,默认按系统 locale 检测)
# ===== P1-4: v7.2 能力接线层配置(voice/knowledge/plugins 无需配置即可用)=====
# Figma 转代码(/api/figma/status、/api/figma/convert)
# 获取:Figma 个人设置 → Security → Personal access tokens
# FH_FIGMA_TOKEN=figd_xxxxxxxxxxxxxxxxxxxx
# 飞书协作通知(/api/collaboration/status、/api/collaboration/notify)
# 需自建飞书应用:开放平台 → 创建企业自建应用 → 启用"机器人"能力
# FH_FEISHU_APP_ID=cli_xxxxxxxxxxxxxxxx
# FH_FEISHU_APP_SECRET=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# FH_FEISHU_WEBHOOK=https://open.feishu.cn/open-apis/bot/v2/hook/xxxxxxxx
# GitHub 协作(/api/collaboration/status 显示 github 配置状态)
# 获取:GitHub → Settings → Developer settings → Personal access tokens
# FH_GITHUB_TOKEN=github_pat_xxxxxxxxxxxxxxxx
# FH_GITHUB_OWNER=your-org-or-user
# FH_GITHUB_REPO=your-repo
# SSO 单点登录(/api/sso/providers、/api/sso/login-url、/api/sso/validate)
# 提供方由代码内 SSOProviderConfig 注册,本文件仅预留说明占位
# 说明:未配置的集成(figma/sso/collaboration)在 Web API 中返回明确错误,不静默失效
# SWE-bench 官方数据集镜像(可选;默认从 HuggingFace datasets-server 拉取)
# FH_SWEBENCH_DATA_URL=https://your-mirror/swebench-lite.json