Skip to content

feat: add native code edit event to session transcript #146

@NathanFlurry

Description

@NathanFlurry

Summary

Add a first-class/native code edit event in the session transcript so clients can render file edits directly without reconstructing them from tool output text.

Problem

Today, code edits are mostly inferred from tool output and post-hoc diffs. This is brittle and provider-dependent.

Proposal

Introduce a dedicated session event/item shape for code edits (or an equivalent normalized event) that includes structured edit metadata.

Suggested minimum fields:

  • file path
  • operation (create/update/delete/rename)
  • before/after hashes (if available)
  • patch/diff payload (or structured hunks)
  • tool/source attribution
  • timestamps / sequencing compatible with existing item.started -> item.delta -> item.completed model

Why

  • Makes UI rendering of edits deterministic
  • Avoids parsing free-form tool text
  • Improves parity across providers and event consumers
  • Simplifies downstream integrations that need edit timelines

Acceptance criteria

  • Session events expose a structured code-edit event for actual file mutations
  • Event shape is documented in docs/session-transcript-schema.mdx
  • Conversion docs are updated (docs/conversion.mdx)
  • HTTP/SSE tests cover the new event end-to-end

Related: #102

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions