5aca07a7a0f45b54901ebcca414b4491ff951e9d
- Format: {proposal_code}:E{seq:05x} (e.g. PROJ01:P00001:E00001)
- Prefix 'E' for Essential, 5-digit zero-padded hex sequence
- Sequence scoped per Proposal, derived from max existing code
- No separate counter table needed (uses max-suffix approach)
- Supports batch_offset for bulk creation during Proposal Accept
- Includes validate_essential_code() helper
Merge pull request 'feat: RBAC + activity logging + Docker health check' (#3) from feat/rbac-and-polish into main
HarborForge Backend
Agent/人类协同任务管理平台 - FastAPI 后端
API Endpoints (38)
Auth
POST /auth/token- 登录获取 JWT tokenGET /auth/me- 获取当前用户信息
Issues
Issues 和 Search 列表接口返回分页格式:
{items, total, page, page_size, total_pages}Issues 支持排序参数:sort_by(created_at/priority/title/due_date/status),sort_order(asc/desc) Issues 支持额外过滤:assignee_id,tag
Issues 和 Search 列表接口返回分页格式: Issues 支持排序参数: (created_at/priority/title/due_date/status), (asc/desc) Issues 支持额外过滤:,
POST /issues- 创建 issue(支持 resolution 决议案类型)GET /issues- 列表(分页、排序、按 assignee/tag 过滤)(支持按 project/status/type 过滤)GET /issues/{id}- 详情PATCH /issues/{id}- 更新DELETE /issues/{id}- 删除POST /issues/{id}/transition- 状态变更(触发 webhook)GET /search/issues?q=keyword- 搜索
Comments
POST /comments- 创建评论GET /issues/{id}/comments- 列表PATCH /comments/{id}- 更新DELETE /comments/{id}- 删除
Projects
POST /projects- 创建GET /projects- 列表GET /projects/{id}- 详情PATCH /projects/{id}- 更新DELETE /projects/{id}- 删除
Project Members
POST /projects/{id}/members- 添加成员GET /projects/{id}/members- 列表DELETE /projects/{id}/members/{user_id}- 移除
Users
POST /users- 注册GET /users- 列表GET /users/{id}- 详情PATCH /users/{id}- 更新
Webhooks
POST /webhooks- 创建GET /webhooks- 列表GET /webhooks/{id}- 详情PATCH /webhooks/{id}- 更新DELETE /webhooks/{id}- 删除GET /webhooks/{id}/logs- 投递日志
System
GET /health- 健康检查GET /version- 版本信息GET /dashboard/stats- 统计面板
Milestones
POST /milestones- 创建里程碑GET /milestones- 列表(支持按 project/status 过滤)GET /milestones/{id}- 详情PATCH /milestones/{id}- 更新DELETE /milestones/{id}- 删除GET /milestones/{id}/issues- 里程碑下的 issue 列表GET /milestones/{id}/progress- 里程碑完成进度
Notifications
GET /notifications- 列表(支持 user_id, unread_only 过滤)GET /notifications/count- 未读通知计数POST /notifications/{id}/read- 标记已读POST /notifications/read-all- 全部标记已读
Issue Assignment
POST /issues/{id}/assign- 指派 issue(自动发送通知)
Webhook Retry
POST /webhooks/{id}/retry/{log_id}- 重试失败的 webhook 投递
Time Tracking (Work Logs)
POST /worklogs- 记录工时GET /issues/{id}/worklogs- 某 issue 的工时记录GET /issues/{id}/worklogs/summary- 某 issue 工时汇总GET /users/{id}/worklogs- 某用户的工时记录DELETE /worklogs/{id}- 删除工时记录GET /projects/{id}/worklogs/summary- 项目工时汇总(按用户分组)
Export
GET /export/issues- 导出 issues CSVGET /issues/overdue- 逾期未完成的 issue
CLI
The legacy Python CLI (cli.py) has been retired. Use the Go-based hf CLI instead.
See HarborForge.Cli for installation and usage.
技术栈
- Python 3.11 + FastAPI
- SQLAlchemy + MySQL
- JWT (python-jose)
- Docker
Issue Types
| Type | 用途 |
|---|---|
| task | 普通任务 |
| story | 用户故事 |
| test | 测试用例 |
| resolution | 决议案(Agent 僵局提交) |
Description
Languages
Python
99.8%