Merge remote-tracking branch 'origin/main' into feat/agent-runtime-status-redesign

# Conflicts:
#	packages/views/issues/components/pickers/property-picker.tsx
#	server/internal/handler/agent.go
#	server/internal/service/task.go
This commit is contained in:
Naiyuan Qing
2026-04-28 19:17:59 +08:00
252 changed files with 11563 additions and 1696 deletions

View File

@@ -147,7 +147,7 @@ multica issue assign <issue-id> --agent <agent-slug>
**关键约定**
- **Callout**`<Callout type="info|warning|tip">...</Callout>`。warning 用于陷阱(如 888888info 用于补充说明tip 用于最佳实践
- **Callout**`<Callout type="info|warning|tip">...</Callout>`。warning 用于陷阱(如固定测试验证码info 用于补充说明tip 用于最佳实践
- **代码块**shell 命令用 \`\`\`bash配置用 \`\`\`yaml / \`\`\`envJSON 用 \`\`\`json
- **Cross-link**:用 markdown 链接 `[显示文字](/docs/page-slug)`,不要写成 "详见 Tasks 章节"
- **表格**:有 3 行以上对照才用表格,不要 1-2 行也用
@@ -723,11 +723,11 @@ multica issue assign <issue-id> --agent <agent-slug>
> **合并说明**:原 7.3 Auth Setup + 7.10 Signup Controls 合并。
- **Source files**: `server/internal/handler/auth.go`APP_ENV 判断 + checkSignupAllowed, `.env.example`auth 相关注释)
- **Source files**: `server/internal/handler/auth.go`固定测试验证码 + checkSignupAllowed, `.env.example`auth 相关注释)
- **目标读者**: self-host 运维
- **叙事位置**: self-host 的 auth 配置。
- **写什么**1500-2000 字):
- **🚨 超醒目 warning block**`APP_ENV=production` 必须设置,否则 verification code 恒为 `888888`(任何人登录任何账号)
- **🚨 超醒目 warning block**生产环境必须保持 `MULTICA_DEV_VERIFICATION_CODE` 为空;固定测试验证码只用于非 production 私有测试
- Email + verification code 登录流程(依赖 Resend
- Google OAuth 配置步骤(创建 OAuth client → redirect URI → 填 env
- **Signup 白名单三层优先级决策树**:
@@ -737,9 +737,9 @@ multica issue assign <issue-id> --agent <agent-slug>
- 典型场景:开放给公司域 / 限定几个邮箱 / 完全关闭 signup
- 和邀请的关系signup 关了也能通过邀请加人)
- **不写**: JWT 实现、token 类型§8.2 讲)
- **写前要验证**: APP_ENV 判断条件OAuth 流程最新Signup 优先级
- **写前要验证**: 固定测试验证码的 env 条件OAuth 流程最新Signup 优先级
- **⚠️ 动笔前必读**:
- ⚠️⚠️ **888888 陷阱必须最醒目**(红色 warning block这是 self-host 最大坑
- ⚠️⚠️ **固定测试验证码风险必须最醒目**(红色 warning block这是 self-host 最大坑
- OAuth 给外部步骤截图,别假设读者懂 GCP Console
- 决策树建议用 Mermaid 图
- **Owner**:
@@ -754,7 +754,7 @@ multica issue assign <issue-id> --agent <agent-slug>
- 任务一直 queuedruntime offline / max_concurrent 满 / agent 配错)
- WebSocket 连不上cookie / CORS / proxy
- Email 没收到Resend 未配置 → 看 stderr
- 验证码收到是 888888 但不工作APP_ENV 检查)
- 固定测试验证码不工作APP_ENV / MULTICA_DEV_VERIFICATION_CODE 检查)
- Port 冲突
- 日志位置daemon / server / browser console
- **不写**: 深度 bug report去 GitHub issue

View File

@@ -118,7 +118,7 @@ Multica = **人 + AI agent 在同一个看板上协作的任务管理平台**。
| Overview | 决策树(哪种部署模式适合你) |
| Docker Compose deployment | `make selfhost` vs `make selfhost-build` |
| Environment variables reference | 完整 env 表 |
| Authentication setup | **🚨 `APP_ENV != "production"` 会让 verification code 固定为 `888888`** —— 生产必须设置 `APP_ENV=production`Google OAuth 配置signup 白名单 |
| Authentication setup | **🚨 固定测试验证码必须显式设置 `MULTICA_DEV_VERIFICATION_CODE`,生产保持为空**Google OAuth 配置signup 白名单 |
| Storage | S3 / CloudFront / 本地磁盘 |
| Email | Resend 配置;**没配会落到 stderr** |
| Upgrading | 版本升级 + migration 策略 |
@@ -145,7 +145,7 @@ Installation / Authentication / Setup / Daemon / Workspace / Issue / Comment / A
| 5 | Webhook autopilot trigger 字段建了但没接路由——第一版不文档化 | Autopilots |
| 6 | custom_env merge 是覆盖而非合并——不能用 custom_env"取消设置"系统 env | Agents |
| 7 | 旧 assignee 取消分配后不会被取消订阅 | Subscriptions |
| 8 | `APP_ENV != "production"` 时 verification code 恒为 `888888` | Self-Hosting → Auth |
| 8 | 固定本地测试验证码默认关闭;`MULTICA_DEV_VERIFICATION_CODE` 仅用于非 production 私有测试 | Self-Hosting → Auth |
| 9 | Signup 白名单优先级ALLOWED_EMAILS > ALLOWED_EMAIL_DOMAINS > ALLOW_SIGNUP | Self-Hosting → Auth |
| 10 | One daemon ↔ many runtimesone runtime ↔ ONE provider同 daemon_id 重启复用旧 runtime 行 | Runtimes / Daemon |
| 11 | Inbox 10 种类型mention dedup 只在单 event 内生效 | Inbox |
@@ -159,7 +159,7 @@ Installation / Authentication / Setup / Daemon / Workspace / Issue / Comment / A
|---|---|
| Mermaid diagram | 架构图 / task 生命周期 / trigger 流向 / autopilot 调度链 |
| Tabs | Cloud / Self-Host / Desktop 并列CLI / UI 并列 |
| Callouts内置| Tip / Warning / Note — **警告类密集用在 Agents 的 custom_env 和 Self-Host 的 888888** |
| Callouts内置| Tip / Warning / Note — **警告类密集用在 Agents 的 custom_env 和 Self-Host 的固定测试验证码** |
| Code Tabs | API 调用多语言Shell / Node / Go |
| Video / GIF | "Create your first agent"、"Follow an agent working" |
| DeploymentPicker定制| 交互式决策树:回答 3 个问题 → 推荐部署路径 |

View File

@@ -82,7 +82,7 @@ Multica 做的事:
Multica **不自己训模型**,也不锁定某一家厂商。它是调度器,本地 daemon 会自动探测以下 CLI 工具并接入:
Claude Code · Codex · OpenClaw · OpenCode · Hermes · Gemini · Pi · Cursor Agent
Claude Code · Codex · OpenClaw · OpenCode · Hermes · Gemini · Pi · Cursor Agent · Kimi · Kiro CLI
每个 agent 可以配置自己的模型、API Key、环境变量、MCP 服务器。
@@ -244,7 +244,7 @@ Project 相比 Issue 是更高层的组织单元。一个 issue 可以不属于
#### 配置字段
- **基本信息**:名字、描述、头像(自动生成)
- **Provider**:选择底层是 Claude / Codex / OpenClaw / OpenCode / Hermes / Gemini / Pi / Cursor 中的哪一个
- **Provider**:选择底层是 Claude / Codex / OpenClaw / OpenCode / Hermes / Gemini / Pi / Cursor / Kimi / Kiro 中的哪一个
- **Runtime**:绑定到哪个运行时(即在哪台机器上跑)
- **Instructions 说明书**agent 的系统提示词("你是一个资深工程师..."
- **Custom Env**:要注入到 CLI 进程的环境变量(如 `ANTHROPIC_API_KEY``ANTHROPIC_BASE_URL``CLAUDE_CODE_USE_BEDROCK`
@@ -291,7 +291,7 @@ Agent 是 Multica 的灵魂。几乎所有功能都围绕"如何让一个 agent
`multica` CLI 在用户的机器上启动一个后台进程macOS launchd / Linux systemd / Windows 服务风格),它:
1. **自动探测** `$PATH` 上安装的 coding CLI`claude`, `codex`, `opencode`, `openclaw`, `hermes`, `gemini`, `pi`, `cursor-agent`
1. **自动探测** `$PATH` 上安装的 coding CLI`claude`, `codex`, `opencode`, `openclaw`, `hermes`, `gemini`, `pi`, `cursor-agent`, `kimi`, `kiro-cli`
2. 向 server **注册** 为一组 runtime一个 CLI = 一个 runtime
3. 每 3 秒 **轮询** 一次 server有任务就认领
4. 每 15 秒 **心跳**keepalive报告自己还活着