From b8a2aeadb7e68e35f29f0765dc8d7ee6477a8b91 Mon Sep 17 00:00:00 2001 From: ymq Date: Thu, 10 Sep 2026 15:30:40 +0800 Subject: [PATCH] =?UTF-8?q?fix(models):=20pipeline=5Fconversations=20?= =?UTF-8?q?=E5=AD=A4=E5=84=BF=E8=A1=A8=E5=BD=92=E7=B1=8D=E6=9C=AC=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=E2=80=94=E2=80=94=E8=A1=A5models=E5=AE=9A=E4=B9=89(13?= =?UTF-8?q?=E5=88=97=E4=B8=8E=E6=B4=BB=E8=A1=A8=E9=80=90=E5=88=97=E5=AF=B9?= =?UTF-8?q?=E9=BD=90,=E5=94=AF=E4=B8=80=E5=86=99=E5=85=A5=E6=96=B9agent=5F?= =?UTF-8?q?loop=5Fv2.=5Fsave=5Fturn)+README=E6=95=B0=E6=8D=AE=E8=A1=A8?= =?UTF-8?q?=E7=99=BB=E8=AE=B0;=E5=AD=97=E6=AE=B5=E9=A1=BA=E5=BA=8F?= =?UTF-8?q?=E5=90=ABm0003=E8=A1=A5=E5=88=97session=5Fid=E5=9C=A8=E5=B0=BE;?= =?UTF-8?q?task=5Fid/step=5Fname/attachments/msg=5Ftype/org=5Fid=E4=B8=BA?= =?UTF-8?q?=E9=A2=84=E7=95=99=E5=88=97(=E6=B4=BB=E8=A1=A8395=E8=A1=8C?= =?UTF-8?q?=E5=AE=9E=E6=B5=8B=E9=9B=B6=E5=86=99=E5=85=A5),=E4=BF=9D?= =?UTF-8?q?=E7=95=99=E5=AE=9A=E4=B9=89=E4=B8=8E=E6=B4=BB=E8=A1=A8=E4=B8=80?= =?UTF-8?q?=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 ++ models/pipeline_conversations.json | 31 ++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 models/pipeline_conversations.json diff --git a/README.md b/README.md index 40fde36..cc1c92a 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,8 @@ | pipeline_artifacts | 步骤产物 | | pipeline_human_tasks | 人工任务 | | pipeline_step_types | 步骤类型注册 | +| pipeline_session_settings | 会话设置(多 tab 项目上下文) | +| pipeline_conversations | 平台会话消息(回放缓存;2026-09-10 归籍本模块——唯一写入方 agent_loop_v2._save_turn,此前是无 models 定义的孤儿表) | ## 安装 diff --git a/models/pipeline_conversations.json b/models/pipeline_conversations.json new file mode 100644 index 0000000..8563fd4 --- /dev/null +++ b/models/pipeline_conversations.json @@ -0,0 +1,31 @@ +{ + "summary": [ + { + "name": "pipeline_conversations", + "title": "平台会话消息表(回放缓存)", + "primary": ["id"], + "catelog": "entity" + } + ], + "fields": [ + {"name": "id", "title": "主键ID", "type": "str", "length": 32, "nullable": "no"}, + {"name": "pipeline_id", "title": "产线ID(空串=通用会话,隔离键)", "type": "str", "length": 32, "default": ""}, + {"name": "iteration_id", "title": "项目ID(历史语义名,存project_id)", "type": "str", "length": 32, "default": ""}, + {"name": "task_id", "title": "Pipeline任务ID(预留,当前零写入)", "type": "str", "length": 32, "default": ""}, + {"name": "step_name", "title": "关联步骤名(预留,当前零写入)", "type": "str", "length": 100, "default": ""}, + {"name": "role", "title": "消息角色", "type": "str", "length": 20, "nullable": "no", "default": "user"}, + {"name": "content", "title": "消息正文(回放缓存,4000字截断)", "type": "text"}, + {"name": "attachments", "title": "附件列表JSON(预留,当前零写入)", "type": "text"}, + {"name": "msg_type", "title": "消息类型", "type": "str", "length": 20, "default": "text"}, + {"name": "org_id", "title": "组织ID(预留,当前零写入)", "type": "str", "length": 32, "default": "0"}, + {"name": "created_by", "title": "创建人用户ID", "type": "str", "length": 32, "default": ""}, + {"name": "created_at", "title": "创建时间", "type": "timestamp", "nullable": "no"}, + {"name": "session_id", "title": "会话ID(多tab隔离键,m0003补列)", "type": "str", "length": 32, "default": ""} + ], + "indexes": [ + {"name": "idx_conv_created_by", "idxtype": "index", "idxfields": ["created_by"]}, + {"name": "idx_conv_session", "idxtype": "index", "idxfields": ["session_id"]}, + {"name": "idx_conv_iteration", "idxtype": "index", "idxfields": ["iteration_id"]}, + {"name": "idx_conv_created", "idxtype": "index", "idxfields": ["created_at"]} + ] +}