# Cursor Agent Bridge Profile — 内置类型(推荐)
#
# 无需额外 Python 脚本和依赖,ilink-hub-bridge 内置对 Cursor Agent CLI 的支持:
# · 自动调用 agent --output-format stream-json
# · 实时流式输出(ILINK_PARTIAL)
# · 自动管理 --resume 会话续接
# · session 失效时自动降级为新会话
#
# 前提条件:
# 1. Cursor Agent CLI 已安装并在 PATH 中
# agent --version # 验证
# 2. 已认证:agent login 或 export CURSOR_API_KEY=key-...
#
# 本地测试(不启动 bridge):
# ILINK_MESSAGE="你好" ILINK_SESSION_ID="" ilink-hub-bridge profile cursor
#
# 启动 bridge:
# ilink-hub-bridge --config profiles-builtin.yaml
#
profiles:
cursor:
type: cursor # 内置:自动管理 --resume 续接上下文 + ILINK_PARTIAL 流式
cwd: /path/to/your/project # ← 改为你的项目目录(agent 会在此目录下运行)
timeout_secs: 1800
max_reply_chars: 8000
env:
CURSOR_MODEL: claude-4.6-sonnet-medium # 可选:不设则使用 agent 默认模型
routing:
strategy: fixed
default_profile: cursor
skip_bot_messages: true
require_text: true
send_error_reply: true