{
  "_comment": "会话 chat SSE 样例：招搬运工触发生成用工草稿（plugin_call → plugin_call_output → assistant 文本 + card_draft）",
  "_source": "POST /api/v1/mp/conversations/{id}/chat 返回的 text/event-stream 中一条 data 事件",
  "id": "response_ff9d9c4cab174cc5bc3b2858644e60f2",
  "object": "response",
  "status": "completed",
  "created_at": "2026-07-14T06:09:27+00:00",
  "completed_at": "2026-07-14T06:09:36+00:00",
  "session_id": "a1b2c3d4e5f6789012345678901229",
  "sequence_number": 61,
  "metadata": null,
  "usage": {
    "input_tokens": 12942,
    "output_tokens": 55
  },
  "content_type": "card_draft",
  "next_action": "show_employment_draft",
  "related_draft_id": 24,
  "card_payload": {
    "draft_id": 24,
    "draft_no": "637336d5a1114bfb99e8700a8622fbca",
    "title": null,
    "worker_count": null,
    "work_days": null,
    "work_type": null,
    "work_location": "江苏省南京市测试地址",
    "settlement_mode": null,
    "total_amount": null,
    "status": "incomplete",
    "missing_fields": [
      "worker_count",
      "total_amount",
      "work_days",
      "work_type",
      "settlement_mode"
    ]
  },
  "output": [
    {
      "id": "msg_d3993fefdceb4deb8eeee0679cae6b38",
      "type": "plugin_call",
      "role": "assistant",
      "status": "completed",
      "name": "assistant",
      "object": "message",
      "sequence_number": 24,
      "metadata": null,
      "content": [
        {
          "type": "data",
          "delta": false,
          "index": null,
          "status": "completed",
          "object": "content",
          "msg_id": null,
          "sequence_number": 23,
          "data": {
            "call_id": "chatcmpl-tool-a1b08eed8c344c6cac7d45dded56d13f",
            "name": "MCP__generate_initial_draft",
            "arguments": {
              "user_id": "6",
              "session_id": "a1b2c3d4e5f6789012345678901229",
              "intent_text": "招10个搬运工，浦东仓库，2天"
            }
          }
        }
      ]
    },
    {
      "id": "msg_f11323dfaf624535a6004206b4b9940f",
      "type": "plugin_call_output",
      "role": "tool",
      "status": "completed",
      "name": "assistant",
      "object": "message",
      "sequence_number": 29,
      "metadata": null,
      "content": [
        {
          "type": "data",
          "delta": false,
          "index": 0,
          "status": "completed",
          "object": "content",
          "msg_id": null,
          "sequence_number": 28,
          "data": {
            "call_id": "chatcmpl-tool-a1b08eed8c344c6cac7d45dded56d13f",
            "name": "MCP__generate_initial_draft",
            "state": "success",
            "output": {
              "status": 200,
              "data": {
                "code": 200,
                "msg": "success",
                "data": {
                  "schema": {
                    "fields": [
                      {
                        "key": "worker_count",
                        "label": "用工人数",
                        "type": "integer",
                        "required": true,
                        "editable": true
                      },
                      {
                        "key": "total_amount",
                        "label": "预估总支出（元）",
                        "type": "decimal",
                        "required": true,
                        "editable": true
                      },
                      {
                        "key": "work_days",
                        "label": "工作天数",
                        "type": "integer",
                        "required": true,
                        "editable": true
                      },
                      {
                        "key": "work_type",
                        "label": "岗位/工种",
                        "type": "string",
                        "required": true,
                        "editable": true
                      },
                      {
                        "key": "work_content",
                        "label": "工作内容",
                        "type": "text",
                        "required": false,
                        "editable": true
                      },
                      {
                        "key": "work_location",
                        "label": "工作地点",
                        "type": "string",
                        "required": true,
                        "editable": true
                      },
                      {
                        "key": "settlement_mode",
                        "label": "结算方式",
                        "type": "enum",
                        "required": true,
                        "editable": true
                      },
                      {
                        "key": "daily_wage",
                        "label": "日薪标准（元）",
                        "type": "decimal",
                        "required": false,
                        "editable": true
                      },
                      {
                        "key": "job_requirements",
                        "label": "岗位要求",
                        "type": "text",
                        "required": false,
                        "editable": true
                      },
                      {
                        "key": "work_start_date",
                        "label": "计划开工日期",
                        "type": "date",
                        "required": false,
                        "editable": true
                      },
                      {
                        "key": "work_end_date",
                        "label": "计划结束日期",
                        "type": "date",
                        "required": false,
                        "editable": true
                      }
                    ],
                    "rules": {
                      "required_fields": [
                        "worker_count",
                        "total_amount",
                        "work_days",
                        "work_type",
                        "work_location",
                        "settlement_mode"
                      ],
                      "settlement_mode_values": [
                        "daily",
                        "piece",
                        "monthly"
                      ]
                    }
                  },
                  "status": "incomplete",
                  "missingFields": [
                    "worker_count",
                    "total_amount",
                    "work_days",
                    "work_type",
                    "settlement_mode"
                  ]
                }
              }
            }
          }
        }
      ]
    },
    {
      "id": "msg_b97e67e958314a95ac8d40c5f62fa8d9",
      "type": "message",
      "role": "assistant",
      "status": "completed",
      "name": "assistant",
      "object": "message",
      "sequence_number": 60,
      "metadata": null,
      "usage": {
        "input_tokens": 12942,
        "output_tokens": 55
      },
      "content": [
        {
          "type": "text",
          "delta": false,
          "index": 0,
          "status": null,
          "object": "content",
          "msg_id": null,
          "text": "已生成草稿框架。当前信息：10人、搬运工、浦东仓库、2天。请补充**日薪标准**（如 300 元/天）与**结算方式**（建议日结），我即可测算总支出与到手金额。"
        }
      ]
    }
  ]
}
