Skip to content

Bring the Claude transcript projection to server parity #775

Closed

Description

@alexeyzimarev

Part of #679. Second of five steps; the rules are the Claude section of docs/superpowers/specs/2026-09-04-ai2265-transcript-normalization-leaf-design.md.

Deliverable

ClaudeTranscriptEvents in Capacitor.Models.Transcripts produces everything the server's ClaudeCodeNormalizer produces today, so the server can call it instead:

  • usage from message.usage on the record's first emitted event, governed by the previous-usage memory with the transitions the spec states (clear on any other record, untouched without usage, compare-then-store with usage even when nothing is emitted);
  • tool-result text per the server rule: a string as is, an array's text blocks joined with a blank line or its raw JSON when it has none, any other content as raw JSON, unset when absent; extensions.claude_code with tool_use_result, output_raw, is_error;
  • image blocks as TranscriptAttachments with the scoped attachment id; attachment records of type queued_command as user messages;
  • is_meta on user messages, is_sidechain on every event of a sidechain record, origin_kind on task notifications.

Done when

  • The leaf's synthetic Claude fixtures and golden files cover every rule above, including multi-block assistant records, multi-result user records, an invalid uuid, and the usage-memory sequences.
  • Identifier vectors include the attachment id.
  • The Chat tab's output is unchanged (Core's ClaudeChatRulesTests stay green).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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