with one click
aim-core-domain
aim 的核心域。对应 `core` 模块。
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
aim 的核心域。对应 `core` 模块。
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
aim 的进程内共享包域。对应 `app/shared` 模块。
AIM 数据库迁移规范与 Docker Compose 集成。当修改 migration SQL 文件、新增迁移、修改 docker-compose.yaml 的 migrate 服务、或排查迁移失败时使用。
AIM 的附件域。涉及 `app/attachment`、AttachmentService gRPC、上传/下载授权、SeaweedFS/S3 签名、附件元数据、`aim.attachment.uploaded` 事件时使用。
aim 的认证域。对应 `auth` 模块。
AIM 开发测试工具(dev-tool)。Python CLI,覆盖 gateway 全部 REST 端点与 WebSocket 帧协议,支持多 profile 多用户并行测试、并发压测。当需要调试 REST/WS 接口、运行集成测试、压力测试、或新增命令时使用。
aim 的网关域。对应 `gateway` 模块。
| name | aim-core-domain |
| description | aim 的核心域。对应 `core` 模块。 |
references/detail.mdreferences/api.mdreferences/transfer-pipeline.mdreferences/detail.mdreferences/api.mdreferences/transfer-pipeline.md2026-05-28: Core PresenceStore 增加 L1 内存缓存包装 CachedPresenceStore,使用 go-zero Redis Sadd/Smembers/Scard/Expire 维护 Redis presence Set,并以 5s L1 TTL 降低投递/typing/read-receipt 查目录延迟。
2026-05-28: 新增 AttachmentParsedConsumer:消费 aim.attachment.parsed 事件,将 data_parsing 解析完成的附件更新(缩略图、尺寸、时长)通过 GatewayClient.PushMessage(is_system=true)推送至会话所有成员。配置结构 AttachmentParsedConsumerConf kq.KqConf。详见 references/detail.md §AttachmentParsedConsumer。
2026-05-28: app/core/rpc/etc/core.yaml 已启用 ConversationEventConsumerConf,消费 aim.conversation.events 并将群管理系统消息推送到目标用户所在 Gateway。
2026-06-03: 注册中心从 Nacos 切到 etcd。core/rpc 的 Etcd / LogicRpc / AttachmentRpc 全部走 zrpc.RpcClientConf.Etcd 字段;删除 app/shared/nacos 引用,4 个 aimnacos.NewNamingClient + RegisterResolver + NewClientWithTarget 块替换为 zrpc.NewClient(conf)。app/shared/nacos 与 aimnacos scheme 整包删除。
2026-05-25: Core 附件引用校验改为调用 AttachmentService.ValidateReference gRPC,保留 core.attachment.validate_reference client span;配置改为 AttachmentRpc etcd 服务发现(Etcd.Key: attachment.rpc)。
2026-05-25: Transfer 热路径新增附件消息校验:image/video/audio/file 的 content 必须符合 aim.attachment.v1 JSON schema,并通过 attachment 服务校验上传完成、发送者、会话归属和类型匹配;配置新增 AttachmentRpc。
2026-05-24: core.yaml 补齐 ReadReceiptConsumerConf,确保 aim.read_receipt.events 由 core 消费并通过 PushReadReceipt 跨节点转发;typing/read_receipt consumer 会跳过事件中的源 gateway_node_id,避免 Gateway 本节点即时推送后 Kafka 回流重复;docker-compose.yaml 的 kafka-init 同步创建 presence/typing/read_receipt topics,避免依赖 Kafka 自动建 topic。
2026-05-23: 新增 ReadReceiptConsumer:消费 aim.read_receipt.events,查会话成员后通过 GatewayClient.PushReadReceipt 把已读游标推到除发送者外的成员所在网关节点。GatewayPusher 接口与 GatewayRouter 同步新增 PushReadReceipt。配置结构 ReadReceiptConsumerConf kq.KqConf。
2026-05-22: 新增 ConversationEventConsumer:消费 aim.conversation.events topic,将群变更系统消息(AddGroupMembers, RemoveGroupMembers, LeaveGroup, DismissGroup, UpdateGroupInfo)通过 GatewayClient.PushMessage(is_system=true)推送给每个 target_user_id。配置结构 ConversationEventConsumerConf kq.KqConf。详见 references/detail.md §ConversationEventConsumer。
2026-05-22: 修复 PresenceConsumer 在线状态推送无法到达目标客户端 Bug:PushPresenceReq 新增 TargetUserId 字段,consumer 将 friendID 写入 TargetUserId,GatewayServer.PushPresence 改用 TargetUserId 寻址,避免错误使用状态变更者本人的 userId 查连接。详见 references/detail.md §PresenceConsumer 修复。
2026-05-22: 新增 PresenceConsumer(消费 aim.presence.events,查好友 → 查目录 → 调 gateway.PushPresence)和 TypingConsumer(消费 aim.typing.events,查成员 → 查目录 → 调 gateway.PushTyping);PresenceStore 改为 Set 语义;GatewayRouter 按 node_id 路由。
2026-05-19: 为 core Kafka delivery consumer 补充 span.RecordError 观测;接入 RPC 统一 unary 错误拦截器。
2026-05-20: 修复消息投递链路:core delivery consumer 通过 logic ConversationService.GetConversationMembers 查询会话成员,并对成员去重 fanout 到 gateway,避免只回推 sender。