Save session to library
publish_sessionSave a session transcript (JSONL), or markdown you composed (format=markdown), to your private a4sx library. The server only rewrites text that matches secret and personal-data patterns (such as tokens, private keys, emails, IP addresses and home-directory user names). It removes no record or field: a raw Claude Code transcript keeps the user's CLAUDE.md and session context (attachment records), file-history snapshot records (absolute file paths), other non-conversation records (such as pr-link), tool-output copies (toolUseResult), and cwd, gitBranch and version on every line; the reply counts them (except version) in unprepared_carriers. Prepare first. Route A, safer when it is enough: compose the decisions, constraints, state and files worth carrying as markdown and send format=markdown. Route B (Claude Code transcripts; other formats: route A), on a copy, never the original transcript: keep only user, assistant and summary records, re-pointing each parentUuid to the nearest kept ancestor (or null); delete cwd, gitBranch, version and toolUseResult; list the hostnames, KEY=value secrets and client or employer names left (show the user counts, not values), and replace the ones the user approves, literally, in decoded strings and object keys. Either way, get the user's explicit yes before sending. Private: it is never listed publicly by this tool.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"transcript": "<transcript>"
},
"name": "publish_session"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| label | No | ||
| title | No | ||
| format | No | jsonl: a transcript. markdown: content you composed (route A: the decisions, constraints, state and files worth carrying); stored as sent, after the same server scrub. | jsonl |
| parent | No | Library id this session continues from (lineage). | |
| transcript | Yes | The session transcript as JSONL (Claude Code or Codex CLI format; detected automatically), or markdown you composed with format=markdown. | |
| visibility | No | Always private. Listing publicly is a separate step in the web app. | private |
| content_sha256 | No | Hex SHA-256 of the transcript's UTF-8 bytes; checked. | |
| client_scrubbed | No | The client scrubbed before sending. The server scrubs again regardless. | |
| idempotency_key | No |