Commit Graph

97 Commits

Author SHA1 Message Date
Levi Neely bd3dec3696 docs: add systemprompt to filesystem layout
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 19:40:14 +02:00
Levi Neely dfd7dc2ef3 9p: delegate session tmpdir cleanup to core.Close()
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 19:30:03 +02:00
Levi Neely 550510c459 9p: remove duplicate tmpdir creation (now in core)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 19:28:06 +02:00
Levi Neely 0101f81dd2 9p: clean up /tmp/ollie/$id on session kill
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 19:25:56 +02:00
Levi Neely 52bb97973a 9p: expose s/{id}/systemprompt as read-only file
Returns the fully rendered system prompt for the session via Core.SystemPrompt().

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 19:17:03 +02:00
Levi Neely 78dd946144 rename OLLIE_9MOUNT → OLLIE
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 17:39:36 +02:00
Levi Neely d46b54877b add /m create+write handlers for memory files
Create handler initializes an empty file in memDir; write handler
(called from clunk) writes the full content to disk. Removes
temporary debug logging.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 17:29:24 +02:00
Levi Neely 64dd815388 server: remove restrictive create guard, allow creates in all directories
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 16:24:06 +02:00
Levi Neely da3412bb13 server: default memory path to ~/.config/ollie/memory, create on startup
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 16:15:53 +02:00
Levi Neely d6075b9a89 server: create memory directory on startup
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 16:11:38 +02:00
Levi Neely 61c1b65c83 9p: make t/idx a live synthetic file like sk/idx
Add explicit idx check in pathType() before the os.Stat fallback,
add idx entry to /t directory listing with mode 0444, and set
/t/idx stat mode to 0444. The read handler already generated live
content from tool headers — only the routing was broken.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 15:33:27 +02:00
Levi Neely acaaef9971 9p: remove file and reasoning server registrations; session tmpdir init
- Remove file.Decl and reasoning.Decl from dispatcher
- go mod tidy: drop go-udiff dependency
- Initialize /tmp/ollie/$sessID on session create (rm -rf + mkdir)
- Rename /tmp/ollie/$oldID -> $newID on session rename

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 15:26:23 +02:00
Levi Neely f5c0b29522 9p: serve t/idx and sk/idx as live synthetic files
Both are generated on read from current state — no physical files.
t/idx scans ToolsPath() headers; sk/idx uses skills.List().

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 14:47:38 +02:00
Levi Neely 547e0d79dc 9p: serve sk/idx as read-only synthetic file
sk/idx is written by rebuildSkillsIdx() at session start but was
invisible via 9P since sk/ reads go through skills.Read() which only
knows skill directories. Add explicit handling in pathType, read, stat,
and directory listing — same pattern as s/idx.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 14:34:08 +02:00
Levi Neely e176e7ef7f 9p: add s/idx — live session index for agent cooperation
Synthetic read-only file at ollie/s/idx. Each line is tab-separated:
  {id}	{state}	{cwd}	{backend}	{model}

Generated on demand from live session state so it's always current.
Enables agents to discover peers by cwd or name without polling
individual session files.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 14:27:47 +02:00
Levi Neely d832965710 server: remove OLLIE_*_PATH SetEnv calls
OLLIE_MEMORY_PATH and OLLIE_PLAN_PATH are now configured via sandbox
yaml overlays rather than injected at session creation. Remove the
SetEnv calls so the sandbox can pick them up from the environment if
the user has set them.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 08:41:45 +02:00
Levi Neely 7f8fc0e033 remove memory and task server registrations from dispatcher
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 08:37:33 +02:00
Levi Neely 90cde3a30e 9p: add ollie/m directory backed by OLLIE_MEMORY_PATH
Wire /m as a read-write directory that maps to s.memDir
(OLLIE_MEMORY_PATH or ~/.local/share/ollie/memory). Handles
fileType, create, read, write, rename, remove, stat, and directory
listing — mirrors /pl exactly. Inject OLLIE_MEMORY_PATH into the
execute server env alongside OLLIE_PLAN_PATH.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 08:24:09 +02:00
Levi Neely 6168dc9313 wire memory and task servers; drop filePlanBackend
Register memory.Decl() and task.Decl(planDir) in the dispatcher.
Remove filePlanBackend (plan logic now lives in core/pkg/tools/task).
Drop WithFallbackPlanBackend now that BuildAgentEnv takes no options.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 08:14:57 +02:00
Levi Neely 3cd2afc24c fix ctl command list in package comment
Was: compact, clear, interrupt
Now: stop, kill, rn, compact, clear
2026-04-13 18:08:53 +02:00
Levi Neely 7d23361982 rename workdir to cwd
Local vars and method calls updated to match core API rename.
2026-04-13 18:03:26 +02:00
Levi Neely 818ccf2632 rename workdir to cwd
Rename the user-facing 9P file and session key from "workdir" to
"cwd" for consistency with the /cwd command.
2026-04-13 15:51:49 +02:00
Levi Neely b048aac109 9p: reject unrecognized ctl commands
ctl now validates the first word of input against a closed set of
known commands. Unrecognized input returns an error instead of being
silently forwarded as a prompt to the agent.
2026-04-13 15:44:14 +02:00
Levi Neely fdcf048a70 name= support for ollie/s/new; wip mutable state tailing 2026-04-13 15:23:04 +02:00
Levi Neely 0a4ca8a869 9p: add agents dir, backends, help, plan rm; refactor readSlice 2026-04-13 14:45:17 +02:00
Levi Neely fc5443e314 9p: session rename via wstat, ctl kill/rn, connection tracking
- Support mv on session directories (wstat rename)
- Track connections globally for fid path rewriting on rename
- Add kill and rn <name> to ctl handler
- Append rename notification to chat log
- Update README with rename and ctl docs
2026-04-13 14:25:53 +02:00
Levi Neely 368d1a9ba0 9p: accept empty values in s/new, fix docs to rm -r 2026-04-13 13:56:52 +02:00
Levi Neely 039c5ddf0c README: update for s/new, rm, ctl changes, document async write caveat 2026-04-13 13:45:00 +02:00
Levi Neely e5a20ecf8a 9p: revert ctl to async (fire-and-forget) 2026-04-13 13:42:06 +02:00
Levi Neely 69e5bd18d9 9p: make ctl sync, guard non-stop commands when agent is running
ctl is no longer in the async bucket. stop is always instant.
Slash commands forwarded via Submit are synchronous for recognized
commands. Unrecognized input is rejected with Rerror when the
agent is running to prevent accidentally starting an agent turn.
2026-04-13 13:41:30 +02:00
Levi Neely 81f7379fb6 9p: split clunk into sync (Rerror) and async (fire-and-forget)
prompt, enqueue, ctl writes run async — they may block for an
entire agent turn and don't benefit from Rerror. Everything else
(disk I/O, state mutations, s/new) runs synchronously so errors
surface as Rerror without holding the connection.
2026-04-13 13:37:41 +02:00
Levi Neely d326ca88f7 9p: synchronous clunk with Rerror, guard state writes
handleWrite returns error; clunk runs it synchronously and
returns Rerror on failure. Writes to backend, agent, model
reject with Rerror when the agent is running. Prompt writes
remain async (they block for the full agent turn). Disk I/O
errors now surface as Rerror instead of stderr logging.
2026-04-13 13:34:13 +02:00
Levi Neely 3ff2454dcb 9p: session ctl: remove interrupt alias, drop / prefix for commands
stop is the only out-of-band signal. Everything else is forwarded
as a slash command (/ prepended automatically), so 'echo compact > ctl'
works directly.
2026-04-13 13:23:49 +02:00
Levi Neely 99e001f326 9p: reject mkdir (Tcreate with DMDIR) on flat directories 2026-04-13 13:17:32 +02:00
Levi Neely 9a0aaa67bc 9p: replace root ctl with s/new and rm s/{sid}
- s/new: read returns KV template (workdir, backend, model, agent);
  write creates a session from KV pairs.
- rm s/{sid}: kills the session (Tremove on session directory).
- Remove root ctl file entirely.
2026-04-13 13:15:50 +02:00
Levi Neely 56f9daf13c 9p: implement Tremove for /p, /sk, /t
Allows rm on files under the prompts, skills, and tools directories.
Skills remove the entire skill directory (including SKILL.md).
Other paths still return 'remove not supported'.
2026-04-13 13:08:15 +02:00
Levi Neely 1188706a3b filePlanBackend: include sed example in CreatePlan response 2026-04-13 13:05:07 +02:00
Levi Neely dffd2e1ea6 plan: timestamp+uid filenames, __todo/__wip/__done lifecycle
- Replace {sid} with YYYYMMDDThhmmss_{uid8} in plan filenames for
  uniqueness independent of session identity
- Initial status is __todo (was __wip)
- Instruct bot to transition __todo → __wip → __done
- Remove sid field from filePlanBackend
2026-04-13 12:01:33 +02:00
Levi Neely e2e7f594ca flat planning repo built-in 2026-04-13 11:40:52 +02:00
Levi Neely c320693ab6 docs: drop responses from usage description 2026-04-13 11:06:24 +02:00
Levi Neely e29aaabf9c docs: update usage file description with responses and estimated flag 2026-04-13 11:03:34 +02:00
Levi Neely 4ae91a1668 usage/ctxsz: separate billed tokens from context size
- Rename Core.Usage() to Core.CtxSz() (estimated context size)
- New Core.Usage() returns billed token counts (in, out, requests)
- 9P: add ctxsz file, usage file now returns billed tokens
- /context command now shows context size summary
- Emacs mode-line reads ctxsz instead of usage
2026-04-13 10:45:45 +02:00
Levi Neely 0586e94672 9p: make /p createable, fix /p dir mode to 0755, update README
- Add /p to create handler (same pattern as /t and /sk)
- Use 0755 for /p directory (prompts aren't executable)
- Update README: sk/ is now r/w
2026-04-13 10:28:45 +02:00
Levi Neely 7b3e159ac0 9p: add create support, writable skills, update tools path
- Route Tcreate to new create handler for /t and /sk
- Add skill file write support (write to SKILL.md in skill dir)
- Make /sk files writable (0666), /t files/dir 0777
- Update default tools path to ~/.config/ollie/tools
2026-04-13 10:25:15 +02:00
Levi Neely 173ab613f5 p9: stop truncating tool result output in chat
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-12 20:43:02 +02:00
Levi Neely 00dfbaeb83 p9: remove "= " prefix from tool result events
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-12 20:39:56 +02:00
Levi Neely 13e8cc75a6 p9: wire file tools server into session dispatcher
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-12 20:19:03 +02:00
Levi Neely 386b4f9ec8 9p: remove routing logic from prompt handler
Submit on core now decides whether to inject or start a new turn.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-11 22:25:42 +02:00
Levi Neely 2ac1f85a92 move ideas to monorep 2026-04-11 18:15:33 +02:00
Levi Neely fa35f4bf5f fix reply 2026-04-11 18:06:32 +02:00