Description
There is no API endpoint to export a completed session's full transcript. Users must piece together transcript data from multiple API calls or read the JSONL file directly from the filesystem.
This is a common cc-connect feature and important for:
- Audit/compliance (export session history)
- Knowledge sharing (export a session as a readable doc)
- Debugging (share full transcript with team)
Proposed API
GET /v1/sessions/:id/export?format=jsonl|markdown
JSONL format
Stream the raw JSONL transcript file.
Markdown format
Convert JSONL to readable Markdown:
- User messages →
## User\n<content>
- Assistant messages →
## Assistant\n<content>
- Tool calls → collapsible
<details> blocks
Acceptance Criteria
Environment
- Aegis: v0.6.6-preview.1
- Node: v22
Description
There is no API endpoint to export a completed session's full transcript. Users must piece together transcript data from multiple API calls or read the JSONL file directly from the filesystem.
This is a common cc-connect feature and important for:
Proposed API
JSONL format
Stream the raw JSONL transcript file.
Markdown format
Convert JSONL to readable Markdown:
## User\n<content>## Assistant\n<content><details>blocksAcceptance Criteria
GET /v1/sessions/:id/export?format=jsonlreturns raw JSONL with proper content-typeGET /v1/sessions/:id/export?format=markdownreturns readable Markdownnpm run gatepassesEnvironment