Sessions are now nested under s/ instead of the root, making it
straightforward to count active sessions and find newly created ones
by offset:
n=$(ls s/ | wc -l)
echo "new agent=foo" > ctl
sid=$(ls s/ | sort | sed -n "$((n+1))p")
Session IDs are now Unix nanosecond timestamps (from ollie's updated
NewSessionID), so ls s/ | sort gives strict creation order. The s/
directory is a stable listing surface; ctl remains at the root for
control operations.
All path parsing updated throughout: pathType, readDir, makeStat,
handleWrite, readChat, readReply, readFile. README updated to match.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace local agentConfigPath, newSessionID, home paths with
agent.AgentConfigPath, agent.NewSessionID, agent.DefaultAgentsDir,
agent.DefaultSessionsDir. Replace dispatcher wiring with
tools.NewDispatcherFunc using execute.Decl and file.Decl.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
reply holds only the clean assistant text from the most recently
completed turn. It is written atomically when Submit returns and cleared
(as a documented side-effect) when a new prompt is submitted. Stat
reports the real byte length and bumps Qid.Vers on each change, so
polling via stat size > 0 is the intended signal that a reply is ready.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
"new" in root ctl now accepts optional key=value pairs in any order:
backend=<name>, model=<name>, agent=<name>. All are optional; omitting
any uses the default. Replaces the old positional backend/agent args.
Unknown keys and malformed entries are rejected with a clear error.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Exposes the active model name as a readable/writable file. Initialized
from be.Model() at session creation. Writes submit "/model <name>" via
the agent core and update modelName optimistically, rolling back on an
error event.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>