Files
social-app/.opencode/skills/ag-ui/modules/serialization.md
T

863 B

Serialization

作用: 介绍 AG-UI 事件流的序列化,用于历史恢复、分支和时间旅行。

源文件: llms-full.txt 行号范围: 2640-2827

内容索引:

  • Core Concepts:
    • Stream serialization - 事件流转为 JSON (行 2660-2662)
    • Event compaction - 压缩事件流 (行 2662-2663)
    • Run lineage - parentRunId 实现 git 类日志 (行 2664-2665)
  • Updated Event Fields - RunStarted 新增 parentRunId, input (行 2667-2685)
  • Event Compaction - compactEvents 函数, 压缩规则 (行 2686-2704)
  • Branching and Time Travel - parentRunId 创建分支, git 类日志 (行 2705-2729)
  • Examples:
    • Basic Serialization (行 2732-2744)
    • Event Compaction - 压缩前后示例 (行 2746-2774)
    • Branching With parentRunId (行 2776-2795)
    • Normalized Input (行 2797-2814)
  • Implementation Notes (行 2816-2822)