feat: 添加视觉设计语言系统并重构认证页面UI
- 新增 visual_design_language.md 设计规范文档 - 新增 auth 设计 tokens (authBackground, authCard, authInput, feedback 系列等) - 重构登录/注册/验证码/重置密码页面为新设计系统 - 新增 AuthHeroHeader, AuthSurfaceCard, AuthSection, AuthField, PasswordField 组件 - 重构 AppBanner 和 Toast 支持多类型配置 (info/success/warning/error) - 后端 AgentScope: 重整 schemas/prompts/tools 作用域, 新增协议文档 - 更新 AGENTS.md 集成视觉设计语言约束
This commit is contained in:
@@ -0,0 +1,130 @@
|
||||
# Inbox Messages Protocol
|
||||
|
||||
> **NOTE**: This document is the single source of truth. All implementations must follow this specification.
|
||||
|
||||
## Overview
|
||||
|
||||
Inbox messages are notifications sent to users for various events like friend requests and calendar invites.
|
||||
|
||||
## Version
|
||||
|
||||
- **Current**: `1.0`
|
||||
- **Status**: Active
|
||||
|
||||
---
|
||||
|
||||
## Message Types
|
||||
|
||||
```typescript
|
||||
type InboxMessageType = 'friend_request' | 'calendar' | 'system' | 'group';
|
||||
```
|
||||
|
||||
```typescript
|
||||
type InboxMessageStatus = 'pending' | 'accepted' | 'rejected' | 'dismissed';
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Content Schema
|
||||
|
||||
### Calendar Invite Content
|
||||
|
||||
```typescript
|
||||
interface CalendarInviteContent {
|
||||
type: 'invite';
|
||||
permission: number; // 1=view, 4=edit, 8=invite
|
||||
action: 'pending';
|
||||
}
|
||||
```
|
||||
|
||||
### Calendar Update Content
|
||||
|
||||
```typescript
|
||||
interface CalendarUpdateContent {
|
||||
type: 'update';
|
||||
title: string;
|
||||
action: 'updated';
|
||||
}
|
||||
```
|
||||
|
||||
### Calendar Delete Content
|
||||
|
||||
```typescript
|
||||
interface CalendarDeleteContent {
|
||||
type: 'delete';
|
||||
title: string;
|
||||
action: 'deleted';
|
||||
}
|
||||
```
|
||||
|
||||
### Friendship Request Content
|
||||
|
||||
```typescript
|
||||
interface FriendshipContent {
|
||||
type: 'request';
|
||||
message?: string; // Optional friend request message
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Union Type
|
||||
|
||||
```typescript
|
||||
type InboxMessageContent =
|
||||
| CalendarInviteContent
|
||||
| CalendarUpdateContent
|
||||
| CalendarDeleteContent
|
||||
| FriendshipContent;
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Database Field
|
||||
|
||||
| Field | Type | Description |
|
||||
|-------|------|-------------|
|
||||
| content | jsonb | Structured content based on message_type |
|
||||
|
||||
---
|
||||
|
||||
## JSON Examples
|
||||
|
||||
### Friend Request
|
||||
|
||||
```json
|
||||
{
|
||||
"type": "request",
|
||||
"message": "Hi, let's be friends!"
|
||||
}
|
||||
```
|
||||
|
||||
### Calendar Invite
|
||||
|
||||
```json
|
||||
{
|
||||
"type": "invite",
|
||||
"permission": 4,
|
||||
"action": "pending"
|
||||
}
|
||||
```
|
||||
|
||||
### Calendar Update
|
||||
|
||||
```json
|
||||
{
|
||||
"type": "update",
|
||||
"title": "Team Meeting",
|
||||
"action": "updated"
|
||||
}
|
||||
```
|
||||
|
||||
### Calendar Delete
|
||||
|
||||
```json
|
||||
{
|
||||
"type": "delete",
|
||||
"title": "Team Meeting",
|
||||
"action": "deleted"
|
||||
}
|
||||
```
|
||||
Reference in New Issue
Block a user