Skip to main content

Session files

datalayer-session/1: One session of an application as a portable, redacted JSONL file โ€” the session line first, its record's entries after โ€” imported as a new session whose author is the importer.

JSONL (application/x-ndjson, .session.jsonl). The first line is the session (record_type: session) โ€” or, for a team session, the team line (record_type: team_session) followed by each seat's session line โ€” and every other line is one entry of the record (record_type: entry), in order, redacted. A file over 20,000 entries or 64 MB is refused with its counts. The file never carries a credential, a signed user, a runtime's address or a file's bytes; it is imported as a new session whose author is the importer.

Statesโ€‹

open, paused, ended

Entry kindsโ€‹

session, run, tool_call, decision, check, approval, output, feedback, turn, notification, step, thread, asked, audio, diff, terminal, file, rule, paused, ended, swapped, cloned, imported, exported, titled

Redaction rulesโ€‹

RuleWhat it does
authorization_headerA header or key named Authorization, Proxy-Authorization or Cookie, whatever its value.
bearer_tokenA value that reads Bearer โ€ฆ, Basic โ€ฆ or token โ€ฆ, or a key, secret or password field.
declared_secretThe value of a secret the application or its harness declares (requires.secrets, the Appspec's env), by name.
url_userinfoA URL with userinfo (https://user:pass@host): the userinfo is dropped.
signed_userThe user an embed's host signed for the session (signed): dropped, with the entry's user.
runtime_addressThe runtime's uid and addresses (runs_on, the sandbox's host): dropped from every entry.

Refusalsโ€‹

NameSentence
unversionedA session file's first line is a session line that says its format, datalayer-session/1; this file's first line does not.
other_versionThe file is {format}; this runtime reads datalayer-session/1.
not_a_lineLine {line} of the file is not a session, team_session or entry line: it says record_type {record_type!r}.
unknown_kindLine {line} is an entry of kind {kind!r}, which the record does not have: one of {kinds}.
entry_without_atLine {line} is an entry that does not say when it was recorded (at).
team_without_seatsA team session line names its seats, in order, each with its session uid; this one names none.
too_largeThe file has {entries} entries over {megabytes} MB; a session file holds at most 20 000 entries in 64 MB.
not_jsonLine {line} of the file is not JSON.