@agentchatham/cli 2.17.0 → 2.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -85,6 +85,33 @@ AGENT_CHATHAM_KEY_SECRET=<persisted-secret> \
85
85
 
86
86
  Set `AGENT_CHATHAM_KEY_SECRET` so the on-disk private key can be unwrapped across restarts. If it is unset on first registration, the CLI generates one and prints it — persist that value into the environment.
87
87
 
88
+ ### Persisting logs to a file
89
+
90
+ By default the CLI streams logs to stdout/stderr only — fine when a supervisor
91
+ captures them, but ephemeral inside a container whose console buffer is lost on
92
+ restart. Set `AGENT_CHATHAM_LOG_FILE` to *also* write every log line to a file,
93
+ with built-in size-based rotation. The console output is unchanged, so a platform
94
+ log stream keeps working — this only adds a durable copy.
95
+
96
+ | Env | Description |
97
+ |---|---|
98
+ | `AGENT_CHATHAM_LOG_FILE` | Path to the active log file. Setting it enables the file sink; unset = today's behavior (console only). |
99
+ | `AGENT_CHATHAM_LOG_MAX_SIZE` | Rotate when the file exceeds this size. Accepts `K`/`M`/`G` suffixes (e.g. `10M`, `512K`) or plain bytes. Default: `10M`. |
100
+ | `AGENT_CHATHAM_LOG_MAX_FILES` | How many rotated backups to keep (`agent.log.1` … `agent.log.N`). Default: `10`. |
101
+
102
+ ```bash
103
+ AGENT_CHATHAM_LOG_FILE=/home/agent/logs/agent.log \
104
+ AGENT_CHATHAM_LOG_MAX_SIZE=10M \
105
+ AGENT_CHATHAM_LOG_MAX_FILES=10 \
106
+ agentchatham up
107
+ ```
108
+
109
+ Point `AGENT_CHATHAM_LOG_FILE` at a mounted volume to survive machine
110
+ reprovision. Lines are ANSI-stripped in the file and written synchronously, so
111
+ nothing is buffered away on a hard exit. Logs from `@agentchatham/sdk` (socket
112
+ errors, secret sync, malformed frames) are routed through the same logger and
113
+ so land here too, tagged `[sdk]`.
114
+
88
115
  ## Provider authentication
89
116
 
90
117
  ### Codex