feat(mcp): add WorldQuant authentication recovery tools
Deploy production / deploy (push) Successful in 52s
Deploy production / deploy (push) Successful in 52s
This commit is contained in:
@@ -34,7 +34,7 @@ python -m app.cli mcp-token-revoke TOKEN_ID
|
||||
| 权限 | 可调用能力 |
|
||||
| --- | --- |
|
||||
| research:read | 能力、数据目录、元数据、历史、运行、结果、证据、刷新及自相关任务查询、自相关结果读取 |
|
||||
| research:refresh | 显式更新元数据及 PnL 缓存、发起本地自相关检查;同时要求 read |
|
||||
| research:refresh | 显式更新元数据及 PnL 缓存、发起本地自相关检查、使用已保存凭据重新连接或继续认证;同时要求 read |
|
||||
| backtests:execute | 直接提交固定候选;同时要求 read |
|
||||
| backtests:control | 暂停、继续、停止、恢复采集;同时要求 read |
|
||||
|
||||
@@ -46,6 +46,8 @@ python -m app.cli mcp-token-revoke TOKEN_ID
|
||||
|
||||
| 工具 | 输入要点 |
|
||||
| --- | --- |
|
||||
| get_worldquant_connection | `{job_id?}`;只读连接状态及认证任务状态,不返回密码、Cookie 或验证链接 |
|
||||
| authenticate_worldquant | `{action?:"connect"或"verify"}`;默认 connect,使用已保存凭据异步认证,返回 job_id;要求 research:refresh |
|
||||
| get_research_capabilities | `{}`,含单次候选上限及完整候选 schema |
|
||||
| search_catalog | `{filters:{region,universe,delay,...},dataset_id?}`;省略 dataset_id 查数据集,提供则查字段 |
|
||||
| get_research_metadata | `{query:{kind,...}}`;kind 为 scopes/settings/operators/field_availability |
|
||||
@@ -64,6 +66,10 @@ metadata 的 operators 支持 q/category 和分页;settings 支持分页;fie
|
||||
|
||||
列表默认 25 项、最多 100 项;返回 total、offset、limit、has_more。快照证据按顶层 key/value 分页,嵌套内容完整保留;PnL 按日期过滤和分页。元数据仅提供字段与算子资料,不提供原始财务时间序列。
|
||||
|
||||
## 连接恢复
|
||||
|
||||
遇到未连接时,调用 `authenticate_worldquant`,再以返回的 `job_id` 调用 `get_worldquant_connection`。受理不等于已连接;等待任务完成及连接状态为 connected。正在排队或执行的认证任务会复用。人工验证期间 connect 不替换验证会话:用户在返回的系统网页入口完成验证后调用 `{"action":"verify"}`。验证失败或缺少凭据时在网页账户面板处理。该入口不修改凭据,不签发或刷新 MCP PAT;PAT 失效仍需在管理页面处理。已有 research:refresh Key 可用,只读 Key 只能查询。
|
||||
|
||||
## 本地自相关检查
|
||||
|
||||
目标 Alpha 必须已导入;比较基准为本地已同步的同地区已提交 Alpha,排除自身。建议先在网页全量同步已提交 Alpha。MCP 不隐式导入 Alpha 或同步基准列表。
|
||||
|
||||
Reference in New Issue
Block a user