Skip to content

feat(output): download sessions as .riffrec - #7

Open
kieranklaassen wants to merge 2 commits into
mainfrom
feat/riffrec-file-extension
Open

feat(output): download sessions as .riffrec#7
kieranklaassen wants to merge 2 commits into
mainfrom
feat/riffrec-file-extension

Conversation

@kieranklaassen

Copy link
Copy Markdown
Owner

Summary

Session downloads from the zip-fallback path now produce riffrec-<date>-<id>.riffrec instead of …zip. The bundle is still a standard ZIP archive — the bytes are unchanged, so renaming back to .zip (or running unzip foo.riffrec directly) reveals the same session.json / events.json / recording.webm layout. The point is brand identity at the file-system level: a .riffrec file is unmistakably a Riffrec session.

Public-API impact

  • RecordSessionResult.sessionPath now ends in .riffrec for the zip-fallback path. Hosts that switch on the suffix need to update their pattern.
  • Blob MIME type changed from application/zip to application/x-riffrec.
  • The RiffrecResult.method discriminant ("filesystem" | "zip") is intentionally not renamed — it describes the internal mechanism, not the artifact, and several integrations may already key off it.

Release note

This is a behavior change to a public API string value. A 1.1.0 minor bump and a CHANGELOG.md entry should accompany the next tag — release tagging is a separate decision and is not done in this PR.

Deferred follow-up

The downstream ce-riffrec-feedback-analysis skill (separate repo: compound-engineering-plugin) matches riffrec-*.zip in its frontmatter description. A one-line update to also match riffrec-*.riffrec (keep .zip for back-compat) will land in a follow-up PR there. Until then, agents can still load the skill via the content-shape trigger (a bundle with session.json + events.json + recording.webm + voice.webm).

Test plan

  • npm test passes (15/15, including a new ZipWriter.writeSession assertion locking the .riffrec suffix and download attribute).
  • npm run typecheck passes.
  • Manual: large-file async path (totalBytes >= MAX_RECORDING_IN_ZIP_BYTES) is untested in this PR — pre-existing gap, not introduced here.

Plan

docs/plans/2026-05-26-001-feat-riffrec-file-extension-plan.md


Compound Engineering
Claude Code

The downloaded bundle is still a standard ZIP archive — only the
filename suffix and advertised MIME type change. Renaming back to
.zip (or running unzip directly on the .riffrec file) reveals the
same session.json / events.json / recording.webm layout.
Update README and the requirements doc to call the download artifact
.riffrec instead of plain 'zip', with a brief parenthetical noting
it's a standard zip with a custom extension. The public
`method: 'filesystem' | 'zip'` discriminant is intentionally
unchanged to avoid breaking host integrations.

Also commits the plan file for this change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant