Expand description
Client-side resolution of path-like SessionConfig arguments (T4, F26).
When a thin client ships --system ./prompt.md to the daemon, the
string ./prompt.md must be resolved against the client’s cwd, not
the daemon’s. This module provides resolve_client_session_args which
rewrites SessionConfig in place before Hello is sent.
§Path-like heuristic for --system
A value is treated as a file path when it:
- starts with
/,./,../, or~, or - ends with
.mdor.txt(case-insensitive)
and contains no embedded newlines or runs of whitespace longer than a single space (prose rarely looks like a path).
When path-like AND the file is readable, the value is replaced with the file’s contents. When path-like but missing/unreadable, an error is returned so the client can exit non-zero with a helpful message.
Non-path-like values pass through untouched (they are literal prompt text).
§--prompt-manifest
Canonicalized against client_cwd. Missing → error with the resolved path.
Functions§
- looks_
path_ like - Returns
truewhen the value looks like a file path rather than prose. - resolve_
client_ session_ args - Resolve path-like arguments in
cfgagainstclient_cwd.