Serve /skills/<name>.md via pkg/skills (read-only, refreshes from disk
on each read). Add discover_skill.sh and load_skill.sh tool scripts
that read from the 9P mount.
Add /prompts/ to the 9P filesystem, backed by DefaultPromptsDir().
Reads serve file contents from disk; writes persist back to disk.
Edits take effect on the next agent session without restart.
Sessions now accept workdir= at creation time:
echo "new workdir=/home/lkn/src/myproject" > ctl
workdir is exposed as a r/w file in each session directory. Writing
to it updates the stored value (takes effect on next /agent switch,
since the execute server is constructed with the workdir at creation).
execute.Decl(workdir) and BuildAgentEnv(..., workdir) are wired
through so the sandbox and system prompt both use the correct path.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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>