The state folder
The daemon keeps its state in one folder: ~/.local/state/jcode by default, or --state DIR. The folder has the mode 0700. Each file of an agent has the mode 0600.
| File | What it has |
|---|---|
token |
The key of the command line: 32 random bytes as hex, mode 0600. |
port |
The port of the running daemon. |
pid |
The process id of the running daemon. |
config.json |
Optional settings (Configuration). |
passkeys.json |
The passkeys: the credential id, the COSE algorithm, the public key, the counter, and the time of the registration. |
next-id |
The number of the next agent. |
agents/ID/meta.json |
The state of the agent: the options of the start, the state, the reason, the counts of tokens, and the times. |
agents/ID/brief.txt |
The brief. |
agents/ID/messages.jsonl |
The messages of the Converse API, one for each line. A restart goes on from them. |
agents/ID/transcript.jsonl |
The transcript, one entry for each line. |
agents/ID/run/ |
The scratch folder: the output of a running command, and tmp/ (the TMPDIR of the level process). |
The transcript
Each line of transcript.jsonl is a JSON object:
| Key | Value |
|---|---|
n |
The number of the entry, from 1. |
t |
The time, in milliseconds since 1970. |
kind |
brief, agent, tool, result, ask, user, note, state, error, or report. |
text |
The text. A tool entry has the name and the JSON input. A result entry starts with ok: or fail:. |
{"n":8,"t":1796324373454,"kind":"report","text":"Added --help. The slow test was stopped."}
read ID --json gives the same entries.
Back up or move
Stop the daemon first. Copy the whole folder. The token and the passkeys are in it: keep the copy private.