Commit Graph

1608 Commits

Author SHA1 Message Date
Levi Neely a3f44bb565 AGENTS.md: add prominent warning to work in source dir, not install targets 2026-08-03 09:05:21 +02:00
Levi Neely 8e2c0a3929 update kde submodule (KF5 GUI parity) 2026-08-03 09:03:19 +02:00
Levi Neely 4094c95587 more qol utils 2026-08-03 08:57:52 +02:00
Ollie Agent 56527598d6 utils for terminal interface 2026-08-03 07:43:50 +02:00
Ollie Agent 261f987c5e move current SLOC table to end of EVOLUTION.md 2026-08-03 01:46:13 +02:00
Ollie Agent fce1e4b4fc restore old SLOC table, add current SLOC table alongside 2026-08-03 01:44:06 +02:00
Ollie Agent 5060ce7d6e update SLOC table in EVOLUTION.md 2026-08-03 01:42:05 +02:00
Ollie Agent d0a3ea2948 ellie README: update for ollie-9p CLI, remove FUSE references 2026-08-03 01:31:41 +02:00
Ollie Agent aeb97621d5 ellie: switch from FUSE file I/O to ollie-9p CLI
ellie.el previously accessed ollie through a FUSE-mounted 9P
filesystem (plain file I/O via insert-file-contents/write-region).
This had several failure modes: stale mounts after suspend/resume,
no error propagation from 9P Rerror, no streaming support.

Now uses the ollie-9p CLI tool which speaks the 9P protocol
directly over the Unix socket. Also removed ellie-dired binding
(C-c C-d) and the ellie-mount-directory customization since
there is no mount point.

The completion subsystem was updated to use ollie-9p rdwr complete
instead of a shell pipeline to a 9P mount path.
2026-08-03 01:30:39 +02:00
Ollie Agent 172b093893 replace $OLLIE/help with ollie-9p read help
ollie-watchdog doesn't need a FUSE mount to probe the server.
ollie-9p speaks the 9P protocol over the Unix socket directly.
2026-08-03 01:22:31 +02:00
Ollie Agent ffccfc57f2 fix plan path: use OLLIE_UNAME via ollie-9p write
session/{id}/agent/{aid}/plan → ollie-9p write
session/$OLLIE_SESSION_ID/agent/$OLLIE_UNAME/plan

UNAME is the agent's immutable ID, matching the agent directory
name. Using ollie-9p write instead of a mounted filesystem path.
2026-08-03 01:20:50 +02:00
Ollie Agent 0cfb99a747 fix plan path: OLLIE_UNAME is the agent ID
OLLIE_AGENT_NAME doesn't exist. OLLIE_UNAME is the env
var that carries the agent's immutable ID.
2026-08-03 01:19:48 +02:00
Ollie Agent bc4c27b602 demote plan from session level to agent level
plan now lives at session/{id}/agent/{aid}/plan instead of
session/{id}/plan. Moved the Leaf declaration from fs/sessionfiles.go
to fs/agentfiles.go. Updated both prompt docs to match.
2026-08-03 01:06:16 +02:00
Ollie Agent c55615bf1b fix stale plan path: s/ → session/
/home/lkn/mnt/ollie/s/ollie/plan was leftover from an old
mount point convention. Updated to /home/lkn/mnt/ollie/session/...
2026-08-03 01:04:22 +02:00
Ollie Agent eaf0a83a57 move LSP .meta files to live alongside their Go code
Each lsp_*.meta now lives in tools/lsp/cmd/<name>/ alongside
main.go, rather than in data/tools/. The lsp-tools just target
was updated to install both the binary and its .meta sidecar.

AGENTS.md updated to document the pattern for compiled tools.
2026-08-03 01:03:27 +02:00
Ollie Agent 60fafd5381 remove tools/builtin/ — zero built-in tools, all tools are external scripts
With the zero-tools transition complete, the tools/builtin/ package
served no purpose — Builtins() returned nil. Removed:

- tools/builtin/builtins.go and the directory
- builtins field, WithBuiltins, Dispatch from toolsrv.Server
- Handler type from toolsrv (only used by builtins)
- OnPreDispatch/WithOnPreDispatch (dead code)
- Strict field and WithStrict (dead code, never read)
- CallTool simplified — no fallback to Dispatch
- builtin import and WithBuiltins/WithStrict calls from ollie-remote
- tools/builtin from justfile build/test targets

Updated AGENTS.md, ARCHITECTURE.md, README.md, EVOLUTION.md
2026-08-03 00:55:22 +02:00
Ollie Agent 73eb4dea63 kde submodule: revert all system-user-interruption changes 2026-08-03 00:42:05 +02:00
Ollie Agent d89259d4f5 Revert "kde submodule: render system-user-interruption as styled yellow box"
This reverts commit 10cd007d90.
2026-08-03 00:39:39 +02:00
Ollie Agent 4dfa6a55d5 Revert "wrap system-user-interruption in its own fence block"
This reverts commit d5dea4446d.
2026-08-03 00:39:29 +02:00
Ollie Agent 10cd007d90 kde submodule: render system-user-interruption as styled yellow box 2026-08-03 00:38:08 +02:00
Ollie Agent d5dea4446d wrap system-user-interruption in its own fence block 2026-08-03 00:37:55 +02:00
Ollie Agent 28cfd40771 kde submodule: fix build on Qt < 6.5 2026-08-03 00:32:31 +02:00
Ollie Agent ff84c0b4c6 kde submodule: render system-user-interruption as styled box 2026-08-03 00:31:15 +02:00
Ollie Agent 6994388ffd remove plan 2026-08-03 00:29:17 +02:00
Ollie Agent 04d191fe68 kde submodule: fix fence close regex 2026-08-03 00:27:32 +02:00
Ollie Agent d0607f363e kde submodule: preserve newlines in plaintext blocks 2026-08-03 00:25:03 +02:00
Ollie Agent 6509bdb5ae streaming tool blocks: always close source fence and emit [[[end]]]
When a streaming tool completes, emit a final empty-Content event so the
log handler always closes the markdown source fence. In the handler,
emit [[[end]]] directly instead of a blank line, so the GUI block parser
transitions back to BlockStart regardless of what follows.
2026-08-03 00:21:48 +02:00
Ollie Agent 7beef106e0 tool_load: add dynamic tool loader with bash script
Add a tool_load tool that writes a tool name to the session's 9P
tools file via ollie-9p, enabling on-demand tool loading.

Reduce autoLoad lists in default.json and theo.json to bare
essentials — everything else is loaded via tool_load.
2026-08-03 00:15:36 +02:00
Ollie Agent 0a418c20f4 bump kde 2026-08-02 23:59:36 +02:00
Ollie Agent 53ecbe249b fix tool output format; bump kde 2026-08-02 23:48:15 +02:00
Ollie Agent b2fe5f1b4e connection statuses 2026-08-02 23:35:30 +02:00
Ollie Agent d3860304af Add formatted tool output fences 2026-08-02 22:57:17 +02:00
Ollie Agent 2d621d26b9 Update KDE frontend 2026-08-02 22:34:41 +02:00
Ollie Agent 8fc47622c8 Persist renamed sessions and profiles 2026-08-02 22:34:35 +02:00
Ollie Agent 39ce817f51 Remove hard-coded tool autoloads 2026-08-02 22:33:54 +02:00
Ollie Agent 1f2870dd20 fix rename session and agent 2026-08-02 22:16:22 +02:00
Ollie Agent aa6f444fa5 bump kde 2026-08-02 22:10:45 +02:00
Ollie Agent 119e673299 fix naming problems 2026-08-02 22:10:00 +02:00
Ollie Agent 088aa38f1c data/agents/default.json: remove hard-coded shell and reasoning_think from autoLoad
These two are built-in tools always available regardless of autoload.
No need to explicitly load them.
2026-08-02 21:16:43 +02:00
Ollie Agent 9af742acd6 fs/lifecycle: fix nil MkdirAll panic blocking agent creation and autoload
The panic at fs/lifecycle.go:463 was a nil function pointer: fs.Config.MkdirAll
is a func field, not a method, and the struct literal in cmd/olliesrv/main.go
omitted it, defaulting to nil. When CreateAgent called
rs.cfg.MkdirAll(...), it panicked before ever reaching the autoload loop.

- Add MkdirAll: os.MkdirAll to fs.Config in main.go
- Spawn tool server in Create() so empty session/new sessions are
  operational, then reuse it in CreateAgent (else if sess.proc != nil)
- Wrap create agent error with fmt.Errorf for clearer messages
- Add panic stack trace to stderr for debugging
2026-08-02 21:16:12 +02:00
Ollie Agent 8fba664f11 cleanup / unify toolsrv bootstrap 2026-08-02 20:08:45 +02:00
Ollie Agent e25157ffcd multiplex toolsrv, wip zero-tool server 2026-08-02 19:18:39 +02:00
Ollie Agent 7b5573ee89 docs: fix design philosophy — Plan 9/Acme, not Emacs
Ollie's extensibility is the opposite of Emacs: instead of building
capabilities on top of an interpreter, the core provides integration
surfaces (9P, shell) and pushes everything else to the surrounding
system. This is the Acme/Plan 9 model.
2026-08-02 16:45:54 +02:00
Ollie Agent 6c6c133d76 docs: update architecture docs for Aug 1-2 refactors
Covers the major changes from the past two days:

- 9P Declarative EDSL (fs/spec.go + fs/builder.go, fs/session/ → fs/ flattening)
- 9P Server streamlining (fid map, GroupTable, method extraction)
- Multi-Agent Deepening (ID/Name split, UUIDv4, two-step creation, empty sessions)
- Eventwait redesign (global /eventwait ring buffer, structured delta events)
- Chat log [[[type]]]/[[[end]]] block format
- KDE submodule evolution (StreamFsm, responsive tree, emoji states, eventwait)

Updates: AGENTS.md, ARCHITECTURE.md, EVOLUTION.md, MULTI_AGENT.md,
         CORE.md, edsl.md
2026-08-02 16:43:13 +02:00
Ollie Agent bb152f401d create: set f.entry after creating files
After Tcreate on a file, the fid is open and should be usable for
read/write without a separate Topen. Set f.entry via root.Open()
after creation so subsequent reads/writes on the same fid work.
2026-08-02 16:23:08 +02:00
Ollie Agent b23785a4d9 Fix directory read: entry not required for dirs
Tree.Open() returns an error for directories (is a directory), so
f.entry stays nil after Topen on a dir. The entry == nil guard in
read() was firing before the isDir branch, breaking directory reads.
Moved the guard after the isDir check — directories use buildDirData
directly and never need entry.
2026-08-02 16:22:13 +02:00
Ollie Agent e1e03e50ae Inline handle into Start; rename Serve→Start, Shutdown→Kill
- handle() is gone — the dispatch + panic recovery is inlined into
  the per-request goroutine in Start(). Panic recovery is lifecycle,
  not protocol handling.
- Serve → Start: accepts a connection and runs the 9P loop
- Shutdown → Kill: stops accepting, cancels sessions, waits for
  goroutines to drain.
- 2 methods remain on *Server: Start, Kill. Server is purely lifecycle.
- All 9P protocol handlers are package-level functions.
2026-08-02 16:18:32 +02:00
Ollie Agent 447156ce13 Extract attach and open from *Server; pass groups and log explicitly
- attach() is now a function taking (*olog.Logger, *GroupTable, ...)
- open() is now a function taking (*fs.Tree, *GroupTable, ...)
- Both captured in the handler map via closures over s.sink, s.groups
- 3 methods remain on *Server: Serve, handle, Shutdown
2026-08-02 16:13:23 +02:00
Ollie Agent 3242f108f9 Store opened file on fid; read/write use f.entry instead of path re-resolution
- Added entry (fs.File) field to fid struct
- open() stores the result of rootTree.Open() on f.entry after
  permission check succeeds
- read() uses f.entry instead of calling root.Open(path[1:]) —
  fids survive renames because the File object references the
  tree entry by pointer, not by path
- write() uses f.entry for RequestRespMode writes — no longer
  needs root parameter at all; it's a pure connState+fid function
2026-08-02 16:11:57 +02:00
Ollie Agent 05e0aba155 Server owns the fid map: validate newfids, GC stale fids
- attach: reject if fc.Fid already in use (was silently overwriting)
- walk: reject if fc.Newfid already in use (both clone and full walk)
- open: validate fid path exists; delete stale fid if path is gone
- stat: validate fid path exists; delete stale fid if path is gone
- wstat: after rename, GC all fids on this connection that reference
  the old path tree (was previously updating paths — now just deletes)

The server fully owns the fid map. The client proposes fid numbers,
the server validates and accepts or rejects. Stale fids (pointing to
renamed/deleted paths) are garbage collected when detected.
2026-08-02 16:08:23 +02:00