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โ
| Rule | What it does |
|---|---|
authorization_header | A header or key named Authorization, Proxy-Authorization or Cookie, whatever its value. |
bearer_token | A value that reads Bearer โฆ, Basic โฆ or token โฆ, or a key, secret or password field. |
declared_secret | The value of a secret the application or its harness declares (requires.secrets, the Appspec's env), by name. |
url_userinfo | A URL with userinfo (https://user:pass@host): the userinfo is dropped. |
signed_user | The user an embed's host signed for the session (signed): dropped, with the entry's user. |
runtime_address | The runtime's uid and addresses (runs_on, the sandbox's host): dropped from every entry. |
Refusalsโ
| Name | Sentence |
|---|---|
unversioned | A session file's first line is a session line that says its format, datalayer-session/1; this file's first line does not. |
other_version | The file is {format}; this runtime reads datalayer-session/1. |
not_a_line | Line {line} of the file is not a session, team_session or entry line: it says record_type {record_type!r}. |
unknown_kind | Line {line} is an entry of kind {kind!r}, which the record does not have: one of {kinds}. |
entry_without_at | Line {line} is an entry that does not say when it was recorded (at). |
team_without_seats | A team session line names its seats, in order, each with its session uid; this one names none. |
too_large | The file has {entries} entries over {megabytes} MB; a session file holds at most 20 000 entries in 64 MB. |
not_json | Line {line} of the file is not JSON. |