Commit Graph

53 Commits

Author SHA1 Message Date
Ollie Agent 6211a6cdee Surface tool calls, output, and bypass status in log/chat views
The filtered text views (log, chat) hid call and tool blocks entirely
and had no visibility into bypass requests, which were only published as
events. RenderBlock now renders tool calls (name + args), tool output,
and bypass request/resolution notices; reasoning and context stay
hidden. SetBypassPending/ResolveBypass append bypass and bypass-resolved
blocks to the requesting agent so clients without an event stream (TUI,
o script) see pending approvals and outcomes.
2026-10-10 16:05:05 +02:00
Ollie Agent a4972cd456 Separate chat persistence from live delivery via chat.raw
Streaming partials were appended to log.raw per chunk, each carrying the
full cumulative content, so one response left dozens of partial lines
persisted. GUI clients parsing the snapshot re-rendered the growing block
once per partial (O(N^2)) and replayed all historical partials on every
reconnect, causing intermittent rendering loops.

Partials are no longer persisted: AppendBlock writes only finalized
blocks to log.raw; SetPartial broadcasts the in-flight block without
storing it. New chat.raw StreamRaw file is the authoritative live JSONL
source (finalized history replay, then live deltas); log.raw is a
finalized-only one-shot snapshot. GUI streams chat.raw, never polls
log.raw.
2026-10-10 15:57:48 +02:00
Levi Neely 6cf283044e docs: add chat file to namespace documentation
- AGENTS.md: four views (log.raw, log, chat, block)
- system_prompt.md: add chat to agent file table
- architecture-9p.md: add chat to namespace table
- evolution.md: correct Phase 40 (chat not deleted)
2026-10-09 19:16:20 +02:00
Levi Neely 57c40d541e Migrate chat log to JSONL format
Server changes:
- format/block.go: Block struct with JSONL marshaling, RenderBlock for text
- Deleted format/event.go, format.go, format_test.go (old delimiter format)
- agent/chat.go: Dual logs (rawLog JSONL + textLog rendered text)
- agent/chatlog.go: Streaming via flushPartial/closeBlock, skip internal events
- fs/spec.go: New files log.raw (JSONL), log (text), block (ID lookup)
- Removed chat/chat.raw/chat.search from namespace

GUI changes:
- chatblockmodel: JSONL parsing via QJsonDocument, removed regex state machine
- ollie9pclient: Read from log.raw for replay, removed old streaming code
- Added Context type to block enum, filter context/state/usage from display

Docs updated: AGENTS.md, system_prompt.md, architecture-*.md, scripts/o
2026-10-09 18:52:40 +02:00
Levi Neely 5f67d44e27 Add block ID tests and document chat log files
- Add unit tests for NextBlockID and ChatSearchByID in chat_test.go
- Add unit tests for ParseBlockHeader, BlockDelim, FormatEvent in format_test.go
- Add e2e test script using o CLI to verify block ID search
- Document chat log files in AGENTS.md: chat/chat.raw are blocking streams,
  use log for non-blocking reads, chat.search for block lookup
2026-10-09 17:00:37 +02:00
Levi Neely f7a52088db per-agent cwd override with session-level inheritance
- Agent cwd is optional; empty = inherit session cwd (the common case)
- Session cwd is required at creation and is the inheritance root
- toolsrv maintains agentCWD map, resolved per call from agent= field
- Override set via agent cfg (cwd=...) or ctl (cwd [<dir>|-])
- Agent.SyncCwdToToolServer re-pushes on every (re)connect
- GUI NewAgentDialog shows '(inherit: <sessionCwd>)' as placeholder
- proc_test.go covers per-agent cwd isolation
- Kate and acme scripts updated for new session/agent creation flow
- AGENTS.md documents the architecture
2026-10-07 15:14:04 +02:00
Levi Neely 7e7c29c900 docs: update to reflect event stream pattern over statewait
- AGENTS.md: simplified architecture description
- architecture-9p.md: examples use event stream with filtering
- usage.md: o tui and wiring examples use rdwrs event
2026-10-06 12:40:58 +02:00
Levi Neely f86c8d3cdc docs: update all references from eventwait to event 2026-10-06 12:08:35 +02:00
Ollie Agent 72239fe3d5 kde: remove KF5/Qt5 support, build KF6/Qt6 only
Drop the OLLIE_KF5 CMake option and the entire Qt5/KF5 build branch;
delete KF5-only assets (99-ollie-kf5.sh, ollie-actions-kf5.desktop);
collapse all QT_VERSION_MAJOR and KTEXTEDITOR_VERSION_MAJOR conditionals
to the KF6 path in the KRunner, Kate, KIO, and GUI sources; update
Makefile, README, and docs. Verified: KF6 configure + full build of
ollie-gui, krunner_ollie, ollie_kate, kio_ollie.
2026-09-29 16:44:12 +02:00
Ollie Agent 6b745aaad1 AGENTS.md: document experimental/unstable stability policy
Ollie is experimental and unstable; optimize for a clean minimal
codebase over preserving behavior. No backward-compatibility shims,
deprecation aliases, or legacy fallbacks — change things fully and
delete the old form. Standing preference, applied without asking, so
agent behavior doesn't need per-task course correction.
2026-09-07 13:56:55 +02:00
Ollie Agent 3ca84487c5 toolsrv: neutralize repo-controlled core.fsmonitor in tool env
GitSpawn class (Sep 2026): a repo's .git/config can set core.fsmonitor to
a command that executes on any git index refresh, silently and as the
user. Ollie never spawns git in its own plumbing (repo detection is
os.Stat), but model-run git inside a malicious repo would fire it.

- exec: force core.fsmonitor=false via GIT_CONFIG_* in sandboxed tool env
- turn: wrap repo AGENTS.md in <context> markers (untrusted data,
  filtered by KDE chat rendering)
- AGENTS.md: document the no-git-in-plumbing invariant (lesson 16)
2026-09-05 11:42:38 +02:00
Levi Neely 765e8b9d05 add file-level doc comments and improve AGENTS.md navigation
Agent package files now have descriptive header comments explaining
their purpose:
- dispatch.go: tool execution, batching, conflict detection
- turn.go: turn orchestration and Submit entry point
- state.go: agent state machine and notifications
- history.go: message history and token tracking
- compact.go: context compaction and cold summarization
- cache.go: tool result caching with staleness detection
- retry.go: error tracking and transient retry logic
- runtime.go: preamble assembly and tool schema management
- text_parse.go: text-based tool call parsing
- chatlog.go: chat output formatting
- chat.go: chat log storage and streaming
- workflow.go: workflow classification for discovery
- skill_match.go: semantic skill discovery
- tool_match.go: semantic tool discovery
- commands.go: slash command interception
- feed.go: feed value storage with dedup
- fifo.go: buffered prompt queue
- peer.go: peer agent management
- subagent.go: sub-agent depth and child tracking
- cost.go: cost calculation and audit logging
- prompt_resolver.go: prompt file resolution
- local_summary.go: non-LLM text summarization
- agent_config.go: configuration types

AGENTS.md improvements:
- Add 'Where to Start' section with entry points by concern
- Expand Key Files table with cache, retry, text_parse, tool_match,
  skill_match, chatlog, local_summary, workflow, and proc files
2026-08-27 10:23:26 +02:00
Levi Neely 1159bd700a update AGENTS.md and architecture-core.md for agent package reorganization
AGENTS.md:
- Update Architecture section with detailed agent package file list
- Update Key Files table with new agent package files
- Add lesson 15: split by concern, not size

architecture-core.md:
- Update Package Map diagram with new files
- Add file responsibility table in Agent Loop section
- Reference compact.go in Session & Context section
2026-08-27 10:15:31 +02:00
Levi Neely 7055444748 agent peers: bidirectional peer links with topology-controlled messaging
Add peer/ directory to each agent's 9P namespace. Agents communicate
by writing to peer/{name}, which delivers to the target's prompt handler.
Only declared peers can be messaged — the directory is the ACL.

Implementation:
- Agent struct: peers map + AddPeer/RemovePeer/Peers methods
- fs/spec.go: peer/ Each node (write-only entries), peeradd/peerdel/peers ctl commands
- Bidirectional: peeradd A on B also adds B on A
- Peers constrained to same session
- Persisted with session state (PersistedAgent.Peers field)
- peeradd/peerdel trigger immediate session save

Docs updated: system_prompt.md, AGENTS.md, README.md, architecture-9p.md,
architecture-core.md, architecture.md, usage.md.
2026-08-19 17:22:30 +02:00
Ollie Agent bdafc30022 replace landrun with native Landlock sandbox 2026-08-18 12:36:27 +02:00
Levi Neely 655378174b Fix lesson 13: don't blame build system 2026-08-17 13:48:27 +02:00
Levi Neely 9aa29c156c Add debugging lessons learned from session 2026-08-17 13:47:51 +02:00
Levi Neely 2e6ec53dec AGENTS.md: update build system references from justfile to Makefile 2026-08-17 10:23:23 +02:00
Levi Neely dff50420ba AGENTS.md: rewrite from scratch (was corrupted garbage) 2026-08-17 10:18:18 +02:00
Ollie Agent 16a2b72051 consolidate 9P clients 2026-08-16 18:56:11 +02:00
Ollie Agent 1e0f9cacd0 Integrate KDE frontend into main repository 2026-08-16 15:08:33 +02:00
Ollie Agent 11f2137ce4 docs: update toolsrv architecture references 2026-08-16 15:02:35 +02:00
Ollie Agent 1d2d5053ab docs: update agent repository guidance 2026-08-16 14:59:49 +02:00
Ollie Agent f82b36ea80 Integrate OptMem memory backend 2026-08-16 11:10:50 +02:00
Ollie Agent d1ef2c946c AGENTS.md: fix duplicate section, update build targets, add toolsrv architecture
- Removed duplicated Submodule/Environment section
- Updated build targets to match actual justfile
- Added two-process model explanation (olliesrv + toolsrv)
- Clarified that ALL tools go through toolsrv
- Fixed data/agents path reference
2026-08-11 20:57:46 +02:00
Ollie Agent e58f76c578 AGENTS.md: update for current architecture
Fix all stale references: fsedsl→virtfs, handlers_*.go→inline spec.go,
flat package layout→cmd/olliesrv/internal/*, etc.
2026-08-11 20:55:48 +02:00
Ollie Agent fbe8059cf5 maintainability: docs, contracts, structural cleanup
- doc/boot-sequence.md: init chain from main → fs.NewRoot → session.Init
- Event protocol: comprehensive table on Event struct (all roles, semantics)
- RPC server moved from cmd/ollie-remote into toolsrv/rpcserver.go
  (binary is now a 93-line thin wrapper)
- SetSessionEnv folded into NewAgent (no post-construction wiring needed)
- AgentCfg → AgentParams (distinguish from AgentConfig JSON schema)
- ToolResult/ToolResultContent shared types in toolsrv/rpcwire.go
- toolsrv/shell.go → toolsrv/exec.go (name matches purpose)
- Resume unified: single path, always through Keeper
- AGENTS.md: fix fs/builder.go → fsedsl/builder.go, handlers_*.go
- fsedsl/Tree: document dual-mode (EDSL lazy vs Manual Mount)
- Truncation stack documented at defaultToolResultMaxBytes
- Integration test rewritten to use srv.ServeRPC directly
2026-08-09 21:45:56 +02:00
Ollie Agent 42823dab2e docs: update README, AGENTS.md, architecture, evolution for Aug 9 changes
- README: fix CLI commands, repo layout (remove detach/, add fsedsl/lib9p)
- AGENTS.md: update architecture section (ctl rdwr, bypass, tool_load)
- architecture.md: rewrite namespace tree to match current state
- evolution.md: add Aug 9 section documenting all simplifications
2026-08-09 03:06:05 +02:00
Ollie Agent d80a87eb86 clean up OLLIE_* env vars: replace with XDG conventions
- Remove all OLLIE_*_PATH vars (TOOLS_PATH, CFG_PATH, DATA_PATH, etc.)
  Use XDG_CONFIG_HOME/ollie/* and XDG_DATA_HOME/ollie/* instead
- Replace OLLIE_<TAG>_LOG per-component logging with single OLLIE_LOG={level}
- Replace OLLIE_USAGE_LOG with XDG_DATA_HOME-based path
- Replace OLLIE_OLLAMA_URL with standard OLLAMA_HOST (or omit entirely)
- Rename protocol markers: OLLIE_LISTEN_READY → ListenReady, OLLIE_9P_OPEN → Open
- Remove freeloader hooks from agent configs
- Update sandbox YAMLs to use XDG paths instead of OLLIE_*_PATH tokens
- Update shell tools to use $(dirname "$0") fallback instead of OLLIE_TOOLS_PATH
- Update docs and prompts accordingly
2026-08-07 07:11:53 +02:00
Ollie Agent 244f328a43 Remove dead OLLIE_ENABLED_BACKENDS from docs 2026-08-05 19:45:13 +02:00
Ollie Agent 1a2ad14f6b docs: replace all session/{id} and {sid} with {sname} 2026-08-04 19:30:57 +02:00
Ollie Agent b939bd4c6b docs: replace all {aid} with {aname} 2026-08-04 19:29:34 +02:00
Levi Neely a3f44bb565 AGENTS.md: add prominent warning to work in source dir, not install targets 2026-08-03 09:05:21 +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 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 1e126ce76a Replace imperative 9P filesystem with declarative EDSL
The old fs/session/ package (14 files) and cmd/olliesrv/elevate_tree.go
(imperative FileTree implementations) are gone. Replaced by a single
declarative EDSL in fs/spec.go that declares the entire 9P namespace.

cmd/olliesrv/server.go simplified from 1430 to 825 lines:
- Deleted pathType() (110 lines) — tree.Stat() now handles all path resolution
- Deleted isSessionFile(), dirMode(), filePerm() — all from tree's info
- Deleted fsRoute/routes/route/routeDir — single rootTree, no route table
- Deleted elevateTree — EDSL handles /elevate/ in spec.go
- Deleted handleWrite(), readDNS(), helpPath() — dead code
- Deleted all 5 per-fid result fields — EDSL Request handlers manage state
- Deleted all path-based intercepts in read()/write() — entry.RequestRespMode()
- Deleted all path-depth hacks in makeStat() — custom Stat() closures in EDSL
- Deleted all content-length compute logic — info.Size() from tree
- Removed imports: agent, backend, elevate, paths, toolsrv, json

New fs/ package:
- spec.go — single EDSL declaration of the entire namespace
- builder.go — BuildTree() validates and compiles spec into *Tree
- tree.go — configurable FileTree implementation
- fsnode.go — Dir(), Leaf(), TemplateDir(), NodeOption constructors
- agentfiles.go / sessionfiles.go / rootfiles.go / elevatefiles.go
  — handler implementations wired by the EDSL
- lifecycle.go — Create, Kill, Rename, Shutdown, InterruptAll
- persist.go, procfiles.go
- edsl.md — documentation of the EDSL
2026-08-02 15:22:17 +02:00
Ollie Agent 94d11f9121 feat: support empty sessions (Core=nil) for multi-agent prep
Create() now registers a Session with Core=nil instead of just reserving
a name. All code paths that accessed sess.Core are nil-guarded:

- root.go: buildIndex, InterruptAll, rootOpen (proc read), rootDel (proc dismiss)
- persist.go: Kill, Rename, Shutdown, waitIdle, persistSession
- files.go: handleCtl save command
- create.go: Create() creates and registers the empty session

Also fixed pathType in server.go which panicked on empty sessions
(calling sess.Core.Agent().Name() when Core is nil). The panic was
caught by the recovery handler and returned as 'internal error'.

AGENTS.md: document cmd/ollie-remote test/build quirk
2026-08-01 19:47:02 +02:00
Levi Neely 5911315408 docs: remove all D-Bus references, add Phase 13 to EVOLUTION
- Delete data/prompts/session-dbus.md (obsolete operational model)
- AGENTS.md: remove dbus/ from layout, single integration surface
- ARCHITECTURE.md: remove D-Bus adapter section, embedded adapter, diagrams
- EVOLUTION.md: add Phase 13 (9P streaming, D-Bus removal), fix principles,
  add D-Bus to dead ends table
- USAGE.md: remove D-Bus reference
- session-9p.md: document chat (streaming) and log (64KB window) files
2026-07-31 20:47:15 +02:00
Ollie Agent 5021dedabe docs: replace /home/lkn/mnt/ollie/session/ paths with 9p commands 2026-07-31 08:36:47 +02:00
Ollie Agent 059cceed5c AGENTS.md: document both script and compiled tool paths 2026-07-30 22:54:54 +02:00
Ollie Agent 9f947e93ec docs: update repo layout for tools/builtin, tools/lsp, data/ 2026-07-30 22:53:48 +02:00
Ollie Agent 69b2c2cc40 tool metadata: replace header comment parsing with .meta sidecar files
The tool registry now reads metadata exclusively from JSON .meta sidecar
files alongside each tool executable. Header comment parsing (ollie:prompt,
ollie:tier, ollie:parallel, args_json) is removed entirely.

- Add toolsrv/meta.go: MetaFile struct, LoadMetaFile, ToolInfoFromMeta
- Rewrite discover.go: scans .meta files only
- Rewrite schema.go: ParseToolInfo reads .meta only
- Rewrite tier.go: tier/readOnly from .meta only
- Generate .meta for all 35 tools
- Update all docs: README, AGENTS.md, ARCHITECTURE, CORE, USAGE, WRITING_TOOLS
2026-07-30 21:48:42 +02:00
Ollie Agent 942cad2dee rename contrib/{prompts,scripts,services,tools,skills,agents} → data/
These are project data files, not community contributions.
contrib/elisp stays as-is.
2026-07-30 21:40:11 +02:00
Ollie Agent 178d79b3cb remove remaining webui/httpgw references in docs 2026-07-30 20:22:49 +02:00
Ollie Agent ea3db9eb08 remove httpgw and webui; update AGENTS.md to reflect current structure
- Remove cmd/ollie-httpgw/ directory and webui/ submodule
- Update justfile: remove httpgw/webui build targets
- Update README.md: remove httpgw/webui references
- Update doc/ARCHITECTURE.md: remove httpgw/webui references
- Update doc/EVOLUTION.md: remove httpgw/webui references
- Update doc/USAGE.md: remove httpgw/webui sections
- Update AGENTS.md: fix repo layout, build targets, testing, architecture
  paths, key files, adding tools/prompts, submodule workflow
2026-07-30 20:19:32 +02:00
Levi Neely 70d0a22af4 user-preferences, execute_code→shell, dead scripts cleanup
- Add prompts/user-preferences.md: visual-first communication preference
  and communication style directives (moved from system_prompt.md).
- Inject user-preferences.md into all agent definitions.
- Replace all execute_code references with shell across docs, prompts,
  and agent configs.
- Remove dead u/ and x/ entries from scripts/README.md.
- Remove SYSTEM_PROMPT_QWEN systemPrompt override from navigator.
- justfile: install user-preferences.md.
2026-07-29 14:44:25 +02:00
Ollie Agent af32aff641 delete SYSTEM_PROMPT.md, remove from justfile, update docs to reference embedded prompt 2026-07-28 23:31:10 +02:00
Ollie Agent e025f2f4ff docs: add ollie-remote to README and AGENTS.md 2026-07-19 18:22:38 +02:00
Ollie Agent 60f38a51cd docs: remove model tier refs, add KDE/dbus to frontends and repo structure
- Remove cascade/escalate/OLLIE_TIER_* references (model tiers are gone)
- Add dbus/ and kde/ to repo structure
- Frontends table now shows KDE components over D-Bus
- httpgw rewritten as D-Bus bridge description
- Key design decisions updated for dual integration surfaces
2026-07-19 17:52:29 +02:00