Skip to content

Settle the v2 share payload contract (self-contained messages, metadata-first upload) #14397

Open

Description

@zfralish

Settle the v2 share payload contract (self-contained messages, metadata-first upload)

Parent epic: #14018 (Complete v2 session sharing compatibility and acceptance)
Plan rows: "Share/unshare/fork client operations" (payload half) + "Public shared-transcript viewer" (contract half)
Marker-audit evidence: packages/opencode/src/share/session.ts [partial] — "Kilo public session sharing"

Outcome

One explicit, versioned v2 share payload contract: self-contained messages, metadata uploaded ahead of transcript content, with the content redaction rules for "intentionally shareable data" defined.

Scope

  • Define the payload schema: what a shared session contains on v2 (self-contained message projection per the durable event model), field set, and versioning.
  • Metadata-first upload ordering (metadata available to viewers before full transcript lands) preserved as an explicit contract property.
  • Content selection rules: what is intentionally shareable (PII/redaction policy from the original sharing behavior).
  • Fixture tests proving the contract: a shared payload renders identically from the payload alone.

Current position

Partial: the payload assembly exists in share/session.ts but the contract is not settled as an explicit versioned schema.

Acceptance

  • Written contract (schema + invariants) reviewed and recorded in the working log or specs.
  • Fixture tests: metadata-first ordering, self-contained rendering, redaction rules.
  • Backward-compat statement: how v1-era shares read under the new contract (or explicit refusal).
  • Plan rows updated with evidence.

Dependencies and boundaries

  • Consumed by the viewer issue and the deployed-verification issue; both must code against this contract, not ad-hoc shapes.
  • The cloud viewer implementation is the separate viewer issue.

Tracking

Update the "Share/unshare/fork client operations" row (payload half) and note the contract in the "Public shared-transcript viewer" row; link evidence.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1Priority 1 — next focusV2Opencode v2 merge

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions