# astron-bifrost **Repository Path**: iflytek/astron-bifrost ## Basic Information - **Project Name**: astron-bifrost - **Description**: No description available - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-06-02 - **Last Updated**: 2026-09-24 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Astron Bifrost - Claude Code 插件 [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![版本](https://img.shields.io/badge/version-1.260519.1-blue.svg)](https://github.com/iflytek/astron-bifrost) 连接**讯飞开放平台**的 Claude Code 原生插件,用于 AI 模型管理、Coding Plan 订阅管理,以及与讯飞 MaaS(模型即服务)平台的无缝集成。 [English](README.md) | 简体中文 ## 功能特性 - 🔐 **OAuth2 认证**:安全登录讯飞开放平台 - 📦 **Coding Plan 管理**:查看、切换和管理您的 AI 模型订阅 - 📊 **用量追踪**:实时配额监控和使用统计 - 🚀 **一键配置**:新用户简化的引导流程 - 🌐 **双语支持**:命令支持中英文 - 🔄 **模型切换**:轻松在订阅的不同 AI 模型间切换 ## 安装方式 ```bash # 添加 marketplace /plugin marketplace add iflytek/astron-bifrost # 安装插件 /plugin install astron-bifrost@iflytek-astron ``` ## 快速开始 安装后,按以下步骤操作: 1. **登录讯飞开放平台** ``` /astron-bifrost:login ``` 这会打开浏览器进行 OAuth2 认证。 2. **查看您的 Coding Plan** ``` /astron-bifrost:codingplan-list ``` 3. **查看用量** ``` /astron-bifrost:codingplan-usage ``` 4. **切换模型**(如果您的订阅包含多个模型) ``` /astron-bifrost:codingplan-switch-model ``` ## 可用命令 | 命令 | 说明 | |------|------| | `/astron-bifrost:login` | 登录讯飞开放平台 | | `/astron-bifrost:logout` | 登出并清除凭证 | | `/astron-bifrost:setup` | 新用户初始配置向导 | | `/astron-bifrost:codingplan-list` | 列出所有 Coding Plan 订阅 | | `/astron-bifrost:codingplan-info` | 显示当前激活的 Coding Plan 详情 | | `/astron-bifrost:codingplan-usage` | 查看用量统计和配额 | | `/astron-bifrost:codingplan-apply` | 应用 Coding Plan 到当前会话 | | `/astron-bifrost:codingplan-switch-model` | 在订阅内切换 AI 模型 | | `/astron-bifrost:codingplan-statusline` | 在终端状态栏显示用量 | ## 前置要求 - **Claude Code**:2.0.0 或更高版本 - **Node.js**:18.0.0 或更高版本 - **讯飞账号**:在 [maas.xfyun.cn](https://maas.xfyun.cn) 注册 - **有效订阅**:在 [maas.xfyun.cn/packageSubscription](https://maas.xfyun.cn/packageSubscription) 购买 Coding Plan ## 配置说明 插件在安装时自动配置。配置文件存储在: - **MCP Server 配置**:`~/.claude/plugins/astron-bifrost/.mcp.json` - **凭证**(已加密):`~/.astron-bifrost/credentials.json` ## 故障排查 ### 登录问题 如果登录失败: 1. 检查网络连接 2. 确认已在 [maas.xfyun.cn](https://maas.xfyun.cn) 注册 3. 确认端口 `51943` 未被占用(用于 OAuth 回调) 4. 尝试登出后重新登录:`/astron-bifrost:logout` → `/astron-bifrost:login` ### 找不到订阅 如果 `/astron-bifrost:codingplan-list` 显示无结果: 1. 访问 [maas.xfyun.cn/packageSubscription](https://maas.xfyun.cn/packageSubscription) 2. 购买 Coding Plan 订阅 3. 等待 1-2 分钟激活 4. 重新运行 `/astron-bifrost:codingplan-list` ### 连接错误 - **超时错误**:检查是否能访问 `maas.xfyun.cn` - **证书错误**:确保系统时间正确 - **代理问题**:如需代理,请配置环境变量 ## 工作原理 ``` ┌─────────────────┐ │ Claude Code │ │ (你的 IDE) │ └────────┬────────┘ │ MCP 协议 ▼ ┌─────────────────┐ │ MCP Server │ ← 本插件(本地运行) │ (本地) │ └────────┬────────┘ │ HTTPS ▼ ┌─────────────────┐ │ 讯飞 MaaS │ ← 云端服务 │ 平台 │ └─────────────────┘ ``` 本插件作为本地 MCP Server 与 Claude Code 协同运行。它负责处理 OAuth2 认证,并通过 HTTPS 与讯飞云端平台通信,管理您的 Coding Plan 订阅和模型访问。 ## 隐私与安全 - **本地凭证**:所有凭证使用 AES-256-GCM 加密并本地存储 - **OAuth2 流程**:永不存储密码,仅使用访问令牌 - **仅 HTTPS**:所有 API 通信使用 TLS 加密 - **令牌过期**:访问令牌 2 小时后过期,需重新认证 ## 贡献指南 这是 Astron Bifrost Claude Code 插件的编译分发包。如需贡献源码或提交问题,请联系维护者。 ## 开源协议 MIT License - 详见 [LICENSE](LICENSE) ## 支持 - **文档**:[讯飞开放平台文档](https://maas.xfyun.cn/doc) - **问题反馈**:通过平台联系讯飞技术支持 - **社区**:访问 [maas.xfyun.cn](https://maas.xfyun.cn) 参与讨论 ## 更新日志 查看 [GitHub Releases](https://github.com/iflytek/astron-bifrost/releases) 了解版本历史。 --- **维护者**:科大讯飞股份有限公司 **平台**:[maas.xfyun.cn](https://maas.xfyun.cn)