感谢您对 FluxAgent 的关注!我们欢迎各种形式的贡献。
如果您发现了 bug,请:
- 检查 Issues 中是否已有相关报告
- 如果没有,请创建新的 issue,包含:
- 详细的问题描述
- 复现步骤
- 期望的行为
- 实际的行为
- 环境信息(Node.js 版本、操作系统等)
如果您有新功能的想法:
- 先在 Issues 中搜索是否有类似的请求
- 创建新的 feature request,描述:
- 功能的用途和价值
- 预期的API设计
- 可能的实现方案
- Fork 项目
- 创建功能分支:
git checkout -b feature/amazing-feature - 本地开发:
pnpm install pnpm build pnpm test - 遵循代码规范:
pnpm lint pnpm format
- 提交更改:
git commit -m 'Add some amazing feature' - 推送分支:
git push origin feature/amazing-feature - 创建 Pull Request
- 使用 TypeScript
- 遵循 ESLint 和 Prettier 配置
- 写有意义的变量和函数名
- 添加必要的注释和文档
- 新功能需要包含单元测试
- 确保所有测试通过:
pnpm test - 保持测试覆盖率在 80% 以上
使用 Conventional Commits 格式:
type(scope): description
- feat: 新功能
- fix: 修复bug
- docs: 文档更新
- style: 代码格式化
- refactor: 重构
- test: 测试相关
- chore: 构建工具或辅助工具的变动
例子:
feat(agent): add knowledge base search functionality
fix(eventHub): resolve memory leak in event listeners
docs(readme): update installation instructions
src/
├── core/ # 核心模块
├── tools/ # 工具实现
├── plugins/ # 插件实现
├── examples/ # 示例代码
└── tests/ # 测试文件
-
克隆项目:
git clone https://github.com/yourusername/fluxagent.git cd fluxagent -
安装依赖:
pnpm install
-
设置环境变量:
cp .env.example .env # 编辑 .env 文件,添加必要的API密钥 -
运行示例:
pnpm dev
只有维护者可以发布新版本:
- 更新版本号:
pnpm version patch|minor|major - 更新 CHANGELOG.md
- 创建 release tag
- 发布到 npm:
pnpm publish
- 对于技术问题,请使用 Issues
- 对于一般讨论,请使用 Discussions
请遵循我们的 行为准则,营造友好包容的社区环境。
感谢您的贡献! 🎉