Tool behavior with a hard 9P filesystem dependency belongs here, not in
core. The extension point (tools.PlanBackend + WithFallbackPlanBackend)
remains in core for other consumers to implement against.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When no task_create MCP tool is registered, reasoning_plan steps are
enqueued to the session's enqueue file in topological order. Placeholder
IDs (q1, q2, …) are returned so the agent can reference steps.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
No sensible default exists server-side. Clients must pass workdir=<path>
explicitly. The TUI uses $PWD of the ollie process; shell users should
pass workdir=$PWD or use a wrapper.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Plain file operations on $OLLIE_9MOUNT/sk/ replace these. Remove the
tools/ directory and the mkfile step that installed them.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
file_read and file_write removed from core; drop the file.Decl entry
from the dispatcher and the import.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Now that reads go through sess.core.WorkDir(), the cached workdir field
on the session struct serves no purpose. Remove it and the write that
kept it in sync.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
sess.workdir is only updated via the 9P write handler, so changes made
through the agent core (e.g. /cwd via ctl or prompt) were invisible to
readers. Use sess.core.WorkDir() to always reflect the live value.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Validate the path and propagate the change to the agent core (which
updates the execute server and rebuilds the system prompt) before
updating the session's cached workdir field. Return early on error.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Exposes ollie/s/{sid}/mcp as a read-only file that returns all registered
tool servers and their tools, grouped by server name. Backed by the new
Core.ListServers() method.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replaces the r/w prompt.fifo with two separate endpoints: enqueue
(write-only, queues a prompt) and dequeue (read-only, pops the next
queued prompt). Also fixes a bug where cat's trailing EOF read at
non-zero offset would silently consume and discard the next queued item.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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>